@openclaw/matrix 2026.11.3 → 2026.11.5-beta.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/.setup/{account-selection-CWsL5zIU.mjs → account-selection-UUPhMBmu.mjs} +10 -10
- package/dist/.setup/{approval-handler.runtime-Co2elSYS.mjs → approval-handler.runtime-Ca12_7Qa.mjs} +16 -51
- package/dist/.setup/{approval-reactions-D2pEUrFS.mjs → approval-reactions-BazmsDbe.mjs} +2 -2
- package/dist/.setup/{channel-BBvOdxTc.mjs → channel-CX7k81dL.mjs} +291 -360
- package/dist/.setup/channel.runtime-K_hHX-9W.mjs +73 -0
- package/dist/.setup/{channel.setup-p6oll48W.mjs → channel.setup-B00zzOOL.mjs} +28 -45
- package/dist/.setup/{cli-C2XKMk1U.mjs → cli-dz9hd2dR.mjs} +248 -308
- package/dist/.setup/{cli-metadata-C60BW1oa.mjs → cli-metadata-CwUhA9CY.mjs} +1 -1
- package/dist/.setup/{client-Cxv-iMwp.mjs → client-CFPYqaYK.mjs} +5 -5
- package/dist/.setup/{client-BEl7PU1_.mjs → client-D1bsidwU.mjs} +87 -174
- package/dist/.setup/{client-bootstrap-D1vLveT2.mjs → client-bootstrap-CTT0VF6v.mjs} +5 -10
- package/dist/.setup/{client-support-D-xHScuo.mjs → client-support-B_Mp4Qk9.mjs} +1 -15
- package/dist/.setup/{create-client-CrY1E3hg.mjs → create-client-Ccf5wyS3.mjs} +5 -5
- package/dist/.setup/{credentials-udso1z0C.mjs → credentials-kT20jk_u.mjs} +6 -20
- package/dist/.setup/{credentials-read-Dj7Hj87M.mjs → credentials-read-CM6wXUjL.mjs} +2 -2
- package/dist/.setup/{crypto-runtime-DqX7VD1W.mjs → crypto-runtime-DZNytKX5.mjs} +73 -159
- package/dist/.setup/{crypto-state-store-DclM-fO5.mjs → crypto-state-store-BZLlwkv_.mjs} +14 -10
- package/dist/.setup/{crypto-store-ownership-Dr-T40Rp.mjs → crypto-store-ownership-CiQ1l_O7.mjs} +1 -1
- package/dist/.setup/{crypto-unsafe-state-doctor-BG9qMu0B.mjs → crypto-unsafe-state-doctor-Dh1dtuSz.mjs} +6 -5
- package/dist/.setup/{deps-L_1bUAGL.mjs → deps-D-W_QQjz.mjs} +4 -3
- package/dist/.setup/device-health-Ck2YpEVN.mjs +8 -0
- package/dist/.setup/{direct-management-ZcjZgYEl.mjs → direct-management-Dp1giZ34.mjs} +21 -27
- package/dist/.setup/{directory-live-_yaRaktv.mjs → directory-live-ufzRheWx.mjs} +4 -4
- package/dist/.setup/{draft-stream-vO_qjwJb.mjs → draft-stream-BPjjKSoI.mjs} +10 -16
- package/dist/.setup/{encryption-guidance-BLUoN4aV.mjs → encryption-guidance-Br3Lv9Hm.mjs} +1 -1
- package/dist/.setup/{exec-approvals-BFT-ee9F.mjs → exec-approvals-BwEOyI1-.mjs} +31 -41
- package/dist/.setup/{file-sync-store-BxUPmUoJ.mjs → file-sync-store-BpS12yaK.mjs} +81 -8
- package/dist/.setup/{http-client-ByR4STVQ.mjs → http-client-B_ohXrBm.mjs} +19 -31
- package/dist/.setup/{idb-persistence-C2TsCHY2.mjs → idb-persistence-BTOsltD9.mjs} +21 -14
- package/dist/.setup/{joined-room-encryption-DBbLkdvv.mjs → joined-room-encryption-C0gHa2DG.mjs} +3 -2
- package/dist/.setup/{messages-TuEa_BPZ.mjs → messages-DpJ9naJa.mjs} +39 -22
- package/dist/.setup/{monitor-B86Ll4B8.mjs → monitor-Rzl3naSn.mjs} +693 -857
- package/dist/.setup/{onboarding-DOLEjkg2.mjs → onboarding-BK-V2ZLT.mjs} +115 -127
- package/dist/.setup/{outbound-BWsyqwt1.mjs → outbound-DMMVmZjV.mjs} +2 -2
- package/dist/.setup/{profile-update-DiXSVBki.mjs → profile-update-RLsY-gu6.mjs} +14 -14
- package/dist/.setup/{reaction-events-CuUeYcBC.mjs → reaction-events-UA_g6jEX.mjs} +74 -99
- package/dist/.setup/{resolve-targets-Dd70hGcM.mjs → resolve-targets-DYW8ULZS.mjs} +1 -1
- package/dist/.setup/{retired-state-C4UnLIg4.mjs → retired-state-JGUEBE72.mjs} +41 -2
- package/dist/.setup/{room-info-C13IUffQ.mjs → room-info-Dhc4efkA.mjs} +21 -8
- package/dist/.setup/runtime-setter-api-i2MOXoT3.mjs +2 -0
- package/dist/.setup/{sdk-DNW03GqJ.mjs → sdk-DPXiQ3jr.mjs} +92 -105
- package/dist/.setup/secret-contract-api-Dukgvike.mjs +2 -0
- package/dist/.setup/{send-BGgwE5pV.mjs → send-HHAbKARg.mjs} +168 -250
- package/dist/.setup/{send-currentness-C2rMVVIQ.mjs → send-currentness-DGxiiBn9.mjs} +9 -15
- package/dist/.setup/{setup-bootstrap-BCbltIf_.mjs → setup-bootstrap-DaT2j28V.mjs} +2 -2
- package/dist/.setup/{setup-core-Di6NtQ_J.mjs → setup-core-DcqQbLZv.mjs} +18 -41
- package/dist/.setup/setup-plugin-api-Cg4TelGZ.mjs +2 -0
- package/dist/.setup/{startup-verification-8xvGpdtK.mjs → startup-verification-UkaoSldm.mjs} +9 -23
- package/dist/.setup/{storage-CN4dxdtV.mjs → storage-C3N6YZIn.mjs} +8 -20
- package/dist/.setup/{subagent-hooks-CSY4iwa_.mjs → subagent-hooks-CfGAysJi.mjs} +1 -1
- package/dist/.setup/{sync-cache-state-L1kwjhjj.mjs → sync-cache-state-BKVaKRzQ.mjs} +5 -8
- package/dist/.setup/sync-state-CWbp0QSY.mjs +12 -0
- package/dist/.setup/task-runner-DY3aKiQa.mjs +52 -0
- package/dist/.setup/{thread-bindings-pNgPVdof.mjs → thread-bindings-891JsKXF.mjs} +34 -50
- package/dist/.setup/{thread-bindings-shared-CPjUA0Ib.mjs → thread-bindings-shared-QmZOfX9Q.mjs} +2 -2
- package/dist/.setup/{tool-actions-CFC7ZpIt.mjs → tool-actions-yFZH_7mC.mjs} +59 -67
- package/dist/.setup/{url-validation-CF6pG6eE.mjs → url-validation-By_2hsXr.mjs} +1 -2
- package/dist/.setup/{verification-CuT5ZBDO.mjs → verification-CcZIVL8P.mjs} +6 -6
- package/dist/.source-module-urls/1cd4d4ff8d44e1c8b830932b44d7cf8a7f3350e09e169910e1d7a85e131b7bea.json +1 -0
- package/dist/api.js +6 -6
- package/dist/auth-presence.js +1 -1
- package/dist/channel-plugin-api.js +1 -2
- package/dist/cli-metadata.js +1 -2
- package/dist/contract-api.js +2 -2
- package/dist/doctor-contract-api.js +110 -120
- package/dist/helper-api.js +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin-entry.handlers.runtime.js +2 -2
- package/dist/runtime-api.js +3 -3
- package/dist/runtime-setter-api.js +1 -2
- package/dist/secret-contract-api.js +1 -2
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/setup-entry.js +3 -3
- package/dist/setup-plugin-api.js +1 -2
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/thread-binding-api.js +1 -2
- package/dist/thread-bindings-runtime.js +1 -2
- package/node_modules/@babel/runtime/helpers/asyncIterator.js +1 -1
- package/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +12 -6
- package/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +1 -1
- package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +12 -6
- package/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +16 -19
- package/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +5 -5
- package/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +16 -19
- package/node_modules/@babel/runtime/helpers/toPrimitive.js +5 -5
- package/node_modules/@babel/runtime/package.json +1 -1
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +94 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-path-admission.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.js +8 -1
- package/node_modules/@openclaw/fs-safe/dist/file-open-error.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/file-open-error.js +14 -0
- package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/file-sync.js +6 -1
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-config.js +14 -3
- package/node_modules/@openclaw/fs-safe/dist/native-operations.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +9 -2
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +40 -32
- package/node_modules/@openclaw/fs-safe/dist/output.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path.js +5 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.js +25 -2
- package/node_modules/@openclaw/fs-safe/dist/publication-handle.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/publication-handle.js +32 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +19 -9
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +23 -24
- package/node_modules/@openclaw/fs-safe/dist/publish-rename-fallback.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-rename-fallback.js +102 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-native.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.js +8 -5
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list-types.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +19 -9
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +27 -13
- package/node_modules/@openclaw/fs-safe/dist/root-path.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +18 -3
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +68 -21
- package/node_modules/@openclaw/fs-safe/dist/watch-io-error.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io-error.js +27 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io-worker.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io-worker.js +93 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io.d.ts +47 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io.js +236 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/watch-native.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/watch-probe.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-probe.js +135 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-rescan.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/watch-rescan.js +86 -24
- package/node_modules/@openclaw/fs-safe/dist/watch-scan.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-scan.js +78 -16
- package/node_modules/@openclaw/fs-safe/dist/watch-stream.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-stream.js +23 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-types.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/watch.js +60 -13
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-helper.exe +0 -0
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +5 -2
- package/node_modules/@openclaw/fs-safe/docs/compiler-qualification.md +392 -0
- package/node_modules/@openclaw/fs-safe/docs/config.md +7 -1
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +25 -5
- package/node_modules/@openclaw/fs-safe/docs/copy.md +10 -0
- package/node_modules/@openclaw/fs-safe/docs/durability.md +9 -3
- package/node_modules/@openclaw/fs-safe/docs/errors.md +13 -0
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +6 -4
- package/node_modules/@openclaw/fs-safe/docs/native-helper.md +6 -4
- package/node_modules/@openclaw/fs-safe/docs/output.md +4 -2
- package/node_modules/@openclaw/fs-safe/docs/path.md +5 -2
- package/node_modules/@openclaw/fs-safe/docs/permissions.md +15 -0
- package/node_modules/@openclaw/fs-safe/docs/security-model.md +9 -0
- package/node_modules/@openclaw/fs-safe/docs/staged-file.md +2 -0
- package/node_modules/@openclaw/fs-safe/docs/testing.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/watch.md +62 -5
- package/node_modules/@openclaw/fs-safe/docs/writing.md +6 -1
- package/node_modules/@openclaw/fs-safe/package.json +18 -16
- package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-freebsd-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-freebsd-arm64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-freebsd-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-freebsd-x64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-win32-arm64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-arm64-msvc/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
- package/node_modules/@tokenizer/inflate/README.md +30 -1
- package/node_modules/@tokenizer/inflate/lib/GzipHandler.js +1 -1
- package/node_modules/@tokenizer/inflate/lib/ZipHandler.d.ts +8 -3
- package/node_modules/@tokenizer/inflate/lib/ZipHandler.js +101 -26
- package/node_modules/@tokenizer/inflate/lib/ZipLimitError.d.ts +16 -0
- package/node_modules/@tokenizer/inflate/lib/ZipLimitError.js +10 -0
- package/node_modules/@tokenizer/inflate/lib/ZipToken.d.ts +1 -1
- package/node_modules/@tokenizer/inflate/lib/ZipToken.js +11 -7
- package/node_modules/@tokenizer/inflate/lib/index.d.ts +2 -1
- package/node_modules/@tokenizer/inflate/lib/index.js +2 -1
- package/node_modules/@tokenizer/inflate/package.json +16 -15
- package/node_modules/argparse/lib/argparse.js +1 -1
- package/node_modules/argparse/package.json +1 -1
- package/node_modules/fake-indexeddb/build/cjs/FDBCursor.js +20 -18
- package/node_modules/fake-indexeddb/build/cjs/FDBKeyRange.js +6 -6
- package/node_modules/fake-indexeddb/build/cjs/FDBTransaction.js +20 -2
- package/node_modules/fake-indexeddb/build/cjs/lib/RecordStore.js +3 -3
- package/node_modules/fake-indexeddb/build/cjs/lib/binarySearchTree.js +11 -13
- package/node_modules/fake-indexeddb/build/cjs/lib/cmp.js +44 -14
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/auto.js +54 -0
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/binarySearchTree.js +413 -0
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/fakeIndexedDB.js +1018 -0
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/forceCloseDatabase.js +99 -0
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/getAll.js +707 -0
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/memoryLeaks.js +42 -0
- package/node_modules/fake-indexeddb/build/esm/FDBCursor.js +19 -18
- package/node_modules/fake-indexeddb/build/esm/FDBKeyRange.js +6 -6
- package/node_modules/fake-indexeddb/build/esm/FDBTransaction.js +20 -2
- package/node_modules/fake-indexeddb/build/esm/lib/RecordStore.js +3 -3
- package/node_modules/fake-indexeddb/build/esm/lib/binarySearchTree.js +11 -13
- package/node_modules/fake-indexeddb/build/esm/lib/cmp.js +41 -11
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/auto.js +52 -0
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/binarySearchTree.js +409 -0
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/fakeIndexedDB.js +1014 -0
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/forceCloseDatabase.js +95 -0
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/getAll.js +703 -0
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/memoryLeaks.js +38 -0
- package/node_modules/fake-indexeddb/package.json +1 -1
- package/node_modules/file-type/node_modules/strtok3/LICENSE.txt +21 -0
- package/node_modules/file-type/node_modules/strtok3/README.md +591 -0
- package/node_modules/file-type/node_modules/strtok3/lib/AbortSignal.d.ts +2 -0
- package/node_modules/file-type/node_modules/strtok3/lib/AbortSignal.js +7 -0
- package/node_modules/file-type/node_modules/strtok3/lib/AbstractTokenizer.d.ts +114 -0
- package/node_modules/file-type/node_modules/strtok3/lib/AbstractTokenizer.js +196 -0
- package/node_modules/file-type/node_modules/strtok3/lib/BlobTokenizer.d.ts +29 -0
- package/node_modules/file-type/node_modules/strtok3/lib/BlobTokenizer.js +56 -0
- package/node_modules/file-type/node_modules/strtok3/lib/BufferSizeError.d.ts +19 -0
- package/node_modules/file-type/node_modules/strtok3/lib/BufferSizeError.js +27 -0
- package/node_modules/file-type/node_modules/strtok3/lib/BufferTokenizer.d.ts +29 -0
- package/node_modules/file-type/node_modules/strtok3/lib/BufferTokenizer.js +50 -0
- package/node_modules/file-type/node_modules/strtok3/lib/FileTokenizer.d.ts +47 -0
- package/node_modules/file-type/node_modules/strtok3/lib/FileTokenizer.js +83 -0
- package/node_modules/file-type/node_modules/strtok3/lib/NotRegularFileError.d.ts +5 -0
- package/node_modules/file-type/node_modules/strtok3/lib/NotRegularFileError.js +8 -0
- package/node_modules/file-type/node_modules/strtok3/lib/ReadStreamTokenizer.d.ts +34 -0
- package/node_modules/file-type/node_modules/strtok3/lib/ReadStreamTokenizer.js +125 -0
- package/node_modules/file-type/node_modules/strtok3/lib/core.d.ts +41 -0
- package/node_modules/file-type/node_modules/strtok3/lib/core.js +69 -0
- package/node_modules/file-type/node_modules/strtok3/lib/index.d.ts +17 -0
- package/node_modules/file-type/node_modules/strtok3/lib/index.js +23 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/AbstractStreamReader.d.ts +54 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/AbstractStreamReader.js +73 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/Deferred.d.ts +6 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/Deferred.js +10 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/Errors.d.ts +10 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/Errors.js +16 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/StreamReader.d.ts +30 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/StreamReader.js +104 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamByobReader.d.ts +14 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamByobReader.js +29 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamDefaultReader.d.ts +19 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamDefaultReader.js +67 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamReader.d.ts +14 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamReader.js +13 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamReaderFactory.d.ts +5 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamReaderFactory.js +19 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/index.d.ts +6 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/index.js +5 -0
- package/node_modules/file-type/node_modules/strtok3/lib/types.d.ts +146 -0
- package/node_modules/file-type/node_modules/strtok3/lib/types.js +1 -0
- package/node_modules/file-type/node_modules/strtok3/package.json +95 -0
- package/node_modules/file-type/package.json +28 -27
- package/node_modules/file-type/readme.md +32 -3
- package/node_modules/file-type/source/detectors/ebml.js +2 -2
- package/node_modules/file-type/source/detectors/png.js +1 -0
- package/node_modules/file-type/source/detectors/zip.js +71 -112
- package/node_modules/file-type/source/index.d.ts +18 -8
- package/node_modules/file-type/source/index.js +75 -49
- package/node_modules/file-type/source/index.test-d.ts +29 -21
- package/node_modules/file-type/source/supported.js +4 -0
- package/node_modules/file-type/source/tokens.js +2 -2
- package/node_modules/markdown-it/dist/browser/markdown-it.esm.min.mjs +737 -686
- package/node_modules/markdown-it/dist/browser/markdown-it.esm.min.mjs.map +1 -1
- package/node_modules/markdown-it/dist/browser/markdown-it.umd.min.js +8 -8
- package/node_modules/markdown-it/dist/browser/markdown-it.umd.min.js.map +1 -1
- package/node_modules/markdown-it/dist/markdown-it.cjs.js +660 -518
- package/node_modules/markdown-it/dist/markdown-it.cjs.js.map +1 -1
- package/node_modules/markdown-it/dist/markdown-it.d.mts +1 -0
- package/node_modules/markdown-it/dist/markdown-it.mjs +179 -124
- package/node_modules/markdown-it/dist/markdown-it.mjs.map +1 -1
- package/node_modules/markdown-it/package.json +11 -11
- package/node_modules/matrix-js-sdk/CHANGELOG.md +23 -0
- package/node_modules/matrix-js-sdk/lib/@types/PushRules.d.ts +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/PushRules.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/PushRules.js +2 -0
- package/node_modules/matrix-js-sdk/lib/@types/PushRules.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/event.d.ts +1 -0
- package/node_modules/matrix-js-sdk/lib/@types/event.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/event.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/client.d.ts +88 -37
- package/node_modules/matrix-js-sdk/lib/client.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/client.js +72 -47
- package/node_modules/matrix-js-sdk/lib/client.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/index.d.ts +3 -3
- 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/embedded.d.ts +17 -1
- package/node_modules/matrix-js-sdk/lib/embedded.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/embedded.js +46 -1
- package/node_modules/matrix-js-sdk/lib/embedded.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/errors.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/errors.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/errors.js +2 -2
- package/node_modules/matrix-js-sdk/lib/errors.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/fetch.d.ts +7 -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 +14 -5
- package/node_modules/matrix-js-sdk/lib/http-api/fetch.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/interface.d.ts +34 -8
- 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 +10 -3
- 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 +30 -11
- 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 +72 -5
- package/node_modules/matrix-js-sdk/lib/http-api/refresh.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.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js +20 -6
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.d.ts +5 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts +27 -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 +58 -36
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSessionManager.js +1 -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 +76 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js +264 -47
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.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 +8 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/common.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/common.js +10 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/common.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/index.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/index.js +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.d.ts +104 -11
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js +263 -19
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/utils.d.ts +22 -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 +38 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/utils.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.d.ts +7 -0
- 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-sticky-events.js +27 -0
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/thread.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/thread.js +8 -0
- package/node_modules/matrix-js-sdk/lib/models/thread.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/authorize.js +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/authorize.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/index.d.ts +3 -5
- package/node_modules/matrix-js-sdk/lib/oauth/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/index.js +7 -7
- package/node_modules/matrix-js-sdk/lib/oauth/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/tokenRefresher.d.ts +10 -4
- package/node_modules/matrix-js-sdk/lib/oauth/tokenRefresher.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/tokenRefresher.js +34 -24
- package/node_modules/matrix-js-sdk/lib/oauth/tokenRefresher.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/receipt-accumulator.d.ts +10 -11
- package/node_modules/matrix-js-sdk/lib/receipt-accumulator.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/receipt-accumulator.js +26 -25
- package/node_modules/matrix-js-sdk/lib/receipt-accumulator.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/room-summary-api.d.ts +71 -0
- package/node_modules/matrix-js-sdk/lib/room-summary-api.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/room-summary-api.js +82 -0
- package/node_modules/matrix-js-sdk/lib/room-summary-api.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.d.ts +7 -0
- 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 +41 -25
- package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.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 +6 -1
- package/node_modules/matrix-js-sdk/lib/sync.js.map +1 -1
- package/node_modules/matrix-js-sdk/package.json +6 -6
- package/node_modules/matrix-js-sdk/src/@types/PushRules.ts +2 -0
- package/node_modules/matrix-js-sdk/src/@types/event.ts +1 -1
- package/node_modules/matrix-js-sdk/src/@types/matrix-sdk-crypto-wasm.d.ts +15 -12
- package/node_modules/matrix-js-sdk/src/client.ts +105 -62
- package/node_modules/matrix-js-sdk/src/crypto-api/index.ts +3 -3
- package/node_modules/matrix-js-sdk/src/embedded.ts +61 -2
- package/node_modules/matrix-js-sdk/src/errors.ts +2 -1
- package/node_modules/matrix-js-sdk/src/http-api/fetch.ts +14 -5
- package/node_modules/matrix-js-sdk/src/http-api/interface.ts +36 -8
- package/node_modules/matrix-js-sdk/src/http-api/refresh.ts +101 -17
- package/node_modules/matrix-js-sdk/src/matrix.ts +1 -1
- package/node_modules/matrix-js-sdk/src/matrixrtc/CallMembership.ts +22 -4
- package/node_modules/matrix-js-sdk/src/matrixrtc/IMembershipManager.ts +6 -0
- package/node_modules/matrix-js-sdk/src/matrixrtc/MatrixRTCSession.ts +72 -49
- package/node_modules/matrix-js-sdk/src/matrixrtc/MatrixRTCSessionManager.ts +1 -1
- package/node_modules/matrix-js-sdk/src/matrixrtc/MembershipManager.ts +284 -61
- package/node_modules/matrix-js-sdk/src/matrixrtc/index.ts +7 -1
- package/node_modules/matrix-js-sdk/src/matrixrtc/membershipData/common.ts +12 -0
- package/node_modules/matrix-js-sdk/src/matrixrtc/membershipData/index.ts +1 -1
- package/node_modules/matrix-js-sdk/src/matrixrtc/types.ts +351 -23
- package/node_modules/matrix-js-sdk/src/matrixrtc/utils.ts +54 -1
- package/node_modules/matrix-js-sdk/src/models/room-sticky-events.ts +26 -1
- package/node_modules/matrix-js-sdk/src/models/thread.ts +9 -0
- package/node_modules/matrix-js-sdk/src/oauth/authorize.ts +1 -1
- package/node_modules/matrix-js-sdk/src/oauth/index.ts +7 -8
- package/node_modules/matrix-js-sdk/src/oauth/tokenRefresher.ts +15 -5
- package/node_modules/matrix-js-sdk/src/receipt-accumulator.ts +30 -26
- package/node_modules/matrix-js-sdk/src/room-summary-api.ts +114 -0
- package/node_modules/matrix-js-sdk/src/rust-crypto/backup.ts +46 -33
- package/node_modules/matrix-js-sdk/src/sync.ts +9 -1
- package/node_modules/music-metadata/README.md +125 -37
- package/node_modules/music-metadata/lib/ParseError.d.ts +10 -3
- package/node_modules/music-metadata/lib/ParseError.js +2 -0
- package/node_modules/music-metadata/lib/ParserFactory.d.ts +1 -1
- package/node_modules/music-metadata/lib/ParserFactory.js +20 -8
- package/node_modules/music-metadata/lib/aiff/AiffParser.d.ts +1 -0
- package/node_modules/music-metadata/lib/aiff/AiffParser.js +25 -17
- package/node_modules/music-metadata/lib/aiff/AiffToken.d.ts +9 -3
- package/node_modules/music-metadata/lib/aiff/AiffToken.js +10 -0
- package/node_modules/music-metadata/lib/apev2/APEv2Parser.d.ts +4 -3
- package/node_modules/music-metadata/lib/apev2/APEv2Parser.js +6 -30
- package/node_modules/music-metadata/lib/asf/AsfGuid.js +49 -49
- package/node_modules/music-metadata/lib/asf/AsfObject.d.ts +12 -6
- package/node_modules/music-metadata/lib/asf/AsfObject.js +201 -58
- package/node_modules/music-metadata/lib/asf/AsfParser.d.ts +4 -0
- package/node_modules/music-metadata/lib/asf/AsfParser.js +119 -27
- package/node_modules/music-metadata/lib/caf/CafLoader.d.ts +2 -0
- package/node_modules/music-metadata/lib/caf/CafLoader.js +8 -0
- package/node_modules/music-metadata/lib/caf/CafParser.d.ts +37 -0
- package/node_modules/music-metadata/lib/caf/CafParser.js +253 -0
- package/node_modules/music-metadata/lib/caf/CafTagMap.d.ts +8 -0
- package/node_modules/music-metadata/lib/caf/CafTagMap.js +38 -0
- package/node_modules/music-metadata/lib/caf/CafToken.d.ts +75 -0
- package/node_modules/music-metadata/lib/caf/CafToken.js +135 -0
- package/node_modules/music-metadata/lib/common/Allocation.d.ts +14 -0
- package/node_modules/music-metadata/lib/common/Allocation.js +70 -0
- package/node_modules/music-metadata/lib/common/BasicParser.d.ts +2 -0
- package/node_modules/music-metadata/lib/common/BasicParser.js +8 -0
- package/node_modules/music-metadata/lib/common/CaseInsensitiveTagMap.d.ts +1 -1
- package/node_modules/music-metadata/lib/common/CaseInsensitiveTagMap.js +3 -3
- package/node_modules/music-metadata/lib/common/CombinedTagMapper.js +4 -3
- package/node_modules/music-metadata/lib/common/GenericTagMapper.d.ts +1 -1
- package/node_modules/music-metadata/lib/common/GenericTagMapper.js +4 -2
- package/node_modules/music-metadata/lib/common/GenericTagTypes.d.ts +2 -2
- package/node_modules/music-metadata/lib/common/MetadataCollector.d.ts +6 -5
- package/node_modules/music-metadata/lib/common/MetadataCollector.js +57 -30
- package/node_modules/music-metadata/lib/common/TrackInfo.d.ts +8 -0
- package/node_modules/music-metadata/lib/common/TrackInfo.js +68 -0
- package/node_modules/music-metadata/lib/common/Util.d.ts +1 -1
- package/node_modules/music-metadata/lib/common/Util.js +6 -12
- package/node_modules/music-metadata/lib/core.d.ts +1 -1
- package/node_modules/music-metadata/lib/core.js +10 -18
- package/node_modules/music-metadata/lib/dsdiff/DsdiffLoader.js +1 -1
- package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.d.ts +7 -3
- package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.js +69 -33
- package/node_modules/music-metadata/lib/dsf/DsfParser.d.ts +4 -3
- package/node_modules/music-metadata/lib/dsf/DsfParser.js +1 -1
- package/node_modules/music-metadata/lib/ebml/EbmlIterator.d.ts +28 -19
- package/node_modules/music-metadata/lib/ebml/EbmlIterator.js +97 -67
- package/node_modules/music-metadata/lib/ebml/types.d.ts +36 -8
- package/node_modules/music-metadata/lib/ebml/types.js +2 -1
- package/node_modules/music-metadata/lib/flac/FlacParser.js +10 -18
- package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.d.ts +1 -1
- package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.js +5 -1
- package/node_modules/music-metadata/lib/id3v2/AbstractID3Parser.js +1 -4
- package/node_modules/music-metadata/lib/id3v2/EmbeddedID3v2.d.ts +5 -0
- package/node_modules/music-metadata/lib/id3v2/EmbeddedID3v2.js +29 -0
- package/node_modules/music-metadata/lib/id3v2/FrameParser.d.ts +5 -3
- package/node_modules/music-metadata/lib/id3v2/FrameParser.js +59 -33
- package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.js +15 -8
- package/node_modules/music-metadata/lib/index.d.ts +2 -0
- package/node_modules/music-metadata/lib/index.js +8 -4
- package/node_modules/music-metadata/lib/matroska/MatroskaDtd.d.ts +630 -2
- package/node_modules/music-metadata/lib/matroska/MatroskaDtd.js +58 -40
- package/node_modules/music-metadata/lib/matroska/MatroskaParser.d.ts +4 -0
- package/node_modules/music-metadata/lib/matroska/MatroskaParser.js +211 -68
- package/node_modules/music-metadata/lib/matroska/types.d.ts +33 -131
- package/node_modules/music-metadata/lib/matroska/types.js +1 -18
- package/node_modules/music-metadata/lib/mp4/Atom.js +7 -0
- package/node_modules/music-metadata/lib/mp4/AtomToken.d.ts +17 -4
- package/node_modules/music-metadata/lib/mp4/AtomToken.js +124 -21
- package/node_modules/music-metadata/lib/mp4/MP4Parser.d.ts +12 -3
- package/node_modules/music-metadata/lib/mp4/MP4Parser.js +559 -242
- package/node_modules/music-metadata/lib/mpeg/AdtsFrameHeader.d.ts +17 -0
- package/node_modules/music-metadata/lib/mpeg/AdtsFrameHeader.js +44 -0
- package/node_modules/music-metadata/lib/mpeg/MpegFrameHeader.d.ts +41 -0
- package/node_modules/music-metadata/lib/mpeg/MpegFrameHeader.js +84 -0
- package/node_modules/music-metadata/lib/mpeg/MpegParser.d.ts +11 -24
- package/node_modules/music-metadata/lib/mpeg/MpegParser.js +77 -337
- package/node_modules/music-metadata/lib/musepack/MusepackConentError.d.ts +4 -3
- package/node_modules/music-metadata/lib/musepack/sv7/BitReader.js +3 -2
- package/node_modules/music-metadata/lib/musepack/sv7/MpcSv7Parser.js +3 -6
- package/node_modules/music-metadata/lib/musepack/sv8/MpcSv8Parser.js +1 -4
- package/node_modules/music-metadata/lib/musepack/sv8/StreamVersion8.js +1 -0
- package/node_modules/music-metadata/lib/ogg/OggLoader.js +1 -1
- package/node_modules/music-metadata/lib/ogg/OggParser.d.ts +4 -3
- package/node_modules/music-metadata/lib/ogg/OggParser.js +54 -9
- package/node_modules/music-metadata/lib/ogg/OggStreamMetadata.d.ts +14 -0
- package/node_modules/music-metadata/lib/ogg/OggStreamMetadata.js +27 -0
- package/node_modules/music-metadata/lib/ogg/OggToken.d.ts +1 -0
- package/node_modules/music-metadata/lib/ogg/OggToken.js +3 -1
- package/node_modules/music-metadata/lib/ogg/flac/FlacStream.d.ts +3 -1
- package/node_modules/music-metadata/lib/ogg/flac/FlacStream.js +21 -3
- package/node_modules/music-metadata/lib/ogg/opus/Opus.d.ts +4 -3
- package/node_modules/music-metadata/lib/ogg/opus/Opus.js +1 -0
- package/node_modules/music-metadata/lib/ogg/opus/OpusStream.js +4 -2
- package/node_modules/music-metadata/lib/ogg/speex/SpeexStream.js +2 -1
- package/node_modules/music-metadata/lib/ogg/theora/Theora.d.ts +5 -0
- package/node_modules/music-metadata/lib/ogg/theora/Theora.js +7 -2
- package/node_modules/music-metadata/lib/ogg/theora/TheoraStream.d.ts +5 -2
- package/node_modules/music-metadata/lib/ogg/theora/TheoraStream.js +43 -3
- package/node_modules/music-metadata/lib/ogg/vorbis/Vorbis.js +4 -3
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.d.ts +11 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.js +29 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.d.ts +6 -4
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.js +24 -18
- package/node_modules/music-metadata/lib/riff/RiffChunk.js +3 -0
- package/node_modules/music-metadata/lib/type.d.ts +49 -6
- package/node_modules/music-metadata/lib/type.js +22 -1
- package/node_modules/music-metadata/lib/wav/WaveChunk.d.ts +4 -3
- package/node_modules/music-metadata/lib/wav/WaveChunk.js +2 -0
- package/node_modules/music-metadata/lib/wav/WaveParser.d.ts +0 -1
- package/node_modules/music-metadata/lib/wav/WaveParser.js +21 -23
- package/node_modules/music-metadata/lib/wavpack/WavPackParser.d.ts +4 -3
- package/node_modules/music-metadata/lib/wavpack/WavPackParser.js +6 -6
- package/node_modules/music-metadata/package.json +26 -22
- package/node_modules/strtok3/LICENSE.txt +21 -21
- package/node_modules/strtok3/README.md +712 -399
- package/node_modules/strtok3/lib/AbortSignal.d.ts +2 -0
- package/node_modules/strtok3/lib/AbortSignal.js +7 -0
- package/node_modules/strtok3/lib/AbstractTokenizer.d.ts +40 -2
- package/node_modules/strtok3/lib/AbstractTokenizer.js +101 -16
- package/node_modules/strtok3/lib/BlobTokenizer.d.ts +1 -1
- package/node_modules/strtok3/lib/BlobTokenizer.js +14 -11
- package/node_modules/strtok3/lib/BufferSizeError.d.ts +19 -0
- package/node_modules/strtok3/lib/BufferSizeError.js +27 -0
- package/node_modules/strtok3/lib/BufferTokenizer.d.ts +1 -1
- package/node_modules/strtok3/lib/BufferTokenizer.js +7 -9
- package/node_modules/strtok3/lib/FileTokenizer.d.ts +13 -3
- package/node_modules/strtok3/lib/FileTokenizer.js +29 -7
- package/node_modules/strtok3/lib/NotRegularFileError.d.ts +5 -0
- package/node_modules/strtok3/lib/NotRegularFileError.js +8 -0
- package/node_modules/strtok3/lib/ReadStreamTokenizer.js +32 -9
- package/node_modules/strtok3/lib/TokenizerBoundaryError.d.ts +7 -0
- package/node_modules/strtok3/lib/TokenizerBoundaryError.js +10 -0
- package/node_modules/strtok3/lib/TokenizerView.d.ts +9 -0
- package/node_modules/strtok3/lib/TokenizerView.js +184 -0
- package/node_modules/strtok3/lib/core.d.ts +10 -6
- package/node_modules/strtok3/lib/core.js +16 -22
- package/node_modules/strtok3/lib/index.d.ts +5 -4
- package/node_modules/strtok3/lib/index.js +3 -2
- package/node_modules/strtok3/lib/isRandomAccessTokenizer.d.ts +6 -0
- package/node_modules/strtok3/lib/isRandomAccessTokenizer.js +10 -0
- package/node_modules/strtok3/lib/stream/AbstractStreamReader.js +5 -3
- package/node_modules/strtok3/lib/stream/Errors.js +3 -3
- package/node_modules/strtok3/lib/stream/StreamReader.d.ts +4 -3
- package/node_modules/strtok3/lib/stream/StreamReader.js +46 -25
- package/node_modules/strtok3/lib/stream/WebStreamByobReader.js +5 -3
- package/node_modules/strtok3/lib/stream/WebStreamDefaultReader.d.ts +1 -1
- package/node_modules/strtok3/lib/stream/WebStreamDefaultReader.js +9 -4
- package/node_modules/strtok3/lib/stream/WebStreamReader.d.ts +13 -3
- package/node_modules/strtok3/lib/stream/WebStreamReader.js +1 -1
- package/node_modules/strtok3/lib/stream/WebStreamReaderFactory.js +1 -1
- package/node_modules/strtok3/lib/stream/index.d.ts +1 -1
- package/node_modules/strtok3/lib/types.d.ts +25 -1
- package/node_modules/strtok3/package.json +97 -94
- package/node_modules/typebox/build/format/duration.d.mts +2 -2
- package/node_modules/typebox/build/format/duration.mjs +2 -2
- package/node_modules/typebox/build/format/idn_email.d.mts +1 -0
- package/node_modules/typebox/build/format/idn_email.mjs +1 -0
- package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -1
- package/node_modules/typebox/build/format/idn_hostname.mjs +1 -1
- package/node_modules/typebox/build/format/ipv4.d.mts +2 -2
- package/node_modules/typebox/build/format/ipv4.mjs +2 -2
- package/node_modules/typebox/build/format/ipv6.d.mts +1 -1
- package/node_modules/typebox/build/format/ipv6.mjs +1 -1
- package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
- package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
- package/node_modules/typebox/build/schema/build.mjs +1 -0
- package/node_modules/typebox/build/schema/engine/_unique.d.mts +4 -2
- package/node_modules/typebox/build/schema/engine/_unique.mjs +7 -3
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +0 -3
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +15 -17
- package/node_modules/typebox/build/schema/engine/contains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/engine/index.mjs +1 -0
- package/node_modules/typebox/build/schema/engine/items.mjs +7 -4
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/minContains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +2 -2
- package/node_modules/typebox/build/system/hashing/hash.mjs +63 -34
- package/node_modules/typebox/build/system/locale/en_US.mjs +2 -1
- package/node_modules/typebox/build/system/memory/assign.d.mts +2 -8
- package/node_modules/typebox/build/system/memory/assign.mjs +13 -6
- package/node_modules/typebox/build/system/memory/clone.d.mts +4 -5
- package/node_modules/typebox/build/system/memory/clone.mjs +8 -96
- package/node_modules/typebox/build/system/memory/create.d.mts +1 -5
- package/node_modules/typebox/build/system/memory/create.mjs +18 -13
- package/node_modules/typebox/build/system/memory/deep.d.mts +2 -0
- package/node_modules/typebox/build/system/memory/deep.mjs +108 -0
- package/node_modules/typebox/build/system/memory/discard.d.mts +1 -1
- package/node_modules/typebox/build/system/memory/discard.mjs +9 -8
- package/node_modules/typebox/build/system/memory/finalize.d.mts +4 -0
- package/node_modules/typebox/build/system/memory/finalize.mjs +30 -0
- package/node_modules/typebox/build/system/memory/keys.d.mts +2 -0
- package/node_modules/typebox/build/system/memory/keys.mjs +8 -0
- package/node_modules/typebox/build/system/memory/update.d.mts +1 -4
- package/node_modules/typebox/build/system/memory/update.mjs +43 -16
- package/node_modules/typebox/build/type/engine/call/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/call/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +2 -24
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +2 -29
- package/node_modules/typebox/build/type/engine/evaluate/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/evaluate/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +5 -1
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +6 -1
- package/node_modules/typebox/build/type/engine/evaluate/property.d.mts +30 -0
- package/node_modules/typebox/build/type/engine/evaluate/property.mjs +29 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +1 -4
- package/node_modules/typebox/build/type/engine/object/from_intersect.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/object/from_intersect.mjs +2 -2
- package/node_modules/typebox/build/type/engine/object/from_union.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +1 -4
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +1 -4
- package/node_modules/typebox/build/type/engine/this/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/this/index.mjs +1 -0
- package/node_modules/typebox/build/value/clone/clone.d.mts +4 -3
- package/node_modules/typebox/build/value/clone/clone.mjs +5 -7
- package/node_modules/typebox/build/value/repair/from_cyclic.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_cyclic.mjs +6 -0
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +25 -14
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +1 -1
- package/node_modules/zod/package.json +1 -1
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
- package/node_modules/zod/src/v4/core/compile.ts +9 -0
- package/node_modules/zod/src/v4/core/schemas.ts +35 -1
- package/node_modules/zod/src/v4/core/util.ts +13 -0
- package/node_modules/zod/src/v4/core/versions.ts +1 -1
- package/node_modules/zod/v4/core/compile.cjs +8 -0
- package/node_modules/zod/v4/core/compile.js +8 -0
- package/node_modules/zod/v4/core/schemas.cjs +30 -0
- package/node_modules/zod/v4/core/schemas.d.cts +3 -1
- package/node_modules/zod/v4/core/schemas.d.ts +3 -1
- package/node_modules/zod/v4/core/schemas.js +30 -0
- package/node_modules/zod/v4/core/util.cjs +15 -0
- package/node_modules/zod/v4/core/util.d.cts +2 -0
- package/node_modules/zod/v4/core/util.d.ts +2 -0
- package/node_modules/zod/v4/core/util.js +14 -0
- package/node_modules/zod/v4/core/versions.cjs +1 -1
- package/node_modules/zod/v4/core/versions.js +1 -1
- package/openclaw.plugin.json +11 -0
- package/package.json +11 -11
- package/dist/.setup/channel.runtime-DyX4mM8d.mjs +0 -76
- package/dist/.setup/device-health-D6_ECUVe.mjs +0 -21
- package/dist/.setup/inbound-dedupe-sW_gaR44.mjs +0 -48
- package/dist/.setup/runtime-setter-api-DtxDAM-x.mjs +0 -3
- package/dist/.setup/secret-contract-api-CiuSYjUy.mjs +0 -3
- package/dist/.setup/setup-plugin-api-ORC_4yEA.mjs +0 -3
- package/dist/.setup/sqlite-state-LByPx4Yp.mjs +0 -37
- package/node_modules/music-metadata/node_modules/content-type/LICENSE +0 -22
- package/node_modules/music-metadata/node_modules/content-type/README.md +0 -71
- package/node_modules/music-metadata/node_modules/content-type/dist/index.d.ts +0 -46
- package/node_modules/music-metadata/node_modules/content-type/dist/index.js +0 -176
- package/node_modules/music-metadata/node_modules/content-type/dist/index.js.map +0 -1
- package/node_modules/music-metadata/node_modules/content-type/package.json +0 -52
- package/node_modules/typebox/build/system/memory/freeze.d.mts +0 -4
- package/node_modules/typebox/build/system/memory/freeze.mjs +0 -6
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { StringType, UINT32_LE } from 'token-types';
|
|
2
1
|
import initDebug from 'debug';
|
|
3
|
-
import {
|
|
2
|
+
import { StringType, UINT32_LE } from 'token-types';
|
|
3
|
+
import { ZipLimitError } from './ZipLimitError.js';
|
|
4
|
+
import { DataDescriptor, EndOfCentralDirectoryRecordToken, FileHeader, LocalFileHeaderToken, Signature } from './ZipToken.js';
|
|
4
5
|
function signatureToArray(signature) {
|
|
5
6
|
const signatureBytes = new Uint8Array(UINT32_LE.len);
|
|
6
7
|
UINT32_LE.put(signatureBytes, 0, signature);
|
|
@@ -11,12 +12,35 @@ const syncBufferSize = 256 * 1024;
|
|
|
11
12
|
const ddSignatureArray = signatureToArray(Signature.DataDescriptor);
|
|
12
13
|
const eocdSignatureBytes = signatureToArray(Signature.EndOfCentralDirectory);
|
|
13
14
|
export class ZipHandler {
|
|
14
|
-
constructor(tokenizer) {
|
|
15
|
+
constructor(tokenizer, options = {}) {
|
|
15
16
|
this.tokenizer = tokenizer;
|
|
16
17
|
this.syncBuffer = new Uint8Array(syncBufferSize);
|
|
18
|
+
this.limits = {
|
|
19
|
+
maxDataDescriptorScanBytes: options.maxDataDescriptorScanBytes ?? Number.POSITIVE_INFINITY,
|
|
20
|
+
maxCompressedSize: options.maxCompressedSize ?? Number.POSITIVE_INFINITY,
|
|
21
|
+
maxUncompressedSize: options.maxUncompressedSize ?? Number.POSITIVE_INFINITY
|
|
22
|
+
};
|
|
23
|
+
for (const [name, limit] of Object.entries(this.limits)) {
|
|
24
|
+
if (limit !== Number.POSITIVE_INFINITY && (!Number.isSafeInteger(limit) || limit <= 0)) {
|
|
25
|
+
throw new RangeError(`${name} must be a positive safe integer or Infinity`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/** Reject oversized entries before retaining data or allocating a combined buffer. */
|
|
30
|
+
checkLimit(limit, size) {
|
|
31
|
+
if (size > this.limits[limit]) {
|
|
32
|
+
throw new ZipLimitError(limit, size, this.limits[limit]);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
checkEntrySize(header) {
|
|
36
|
+
this.checkLimit('maxCompressedSize', header.compressedSize);
|
|
37
|
+
this.checkLimit('maxUncompressedSize', header.uncompressedSize);
|
|
38
|
+
if (header.compressedMethod === 0) {
|
|
39
|
+
this.checkLimit('maxUncompressedSize', header.compressedSize);
|
|
40
|
+
}
|
|
17
41
|
}
|
|
18
42
|
async isZip() {
|
|
19
|
-
return await this.peekSignature() === Signature.LocalFileHeader;
|
|
43
|
+
return (await this.peekSignature()) === Signature.LocalFileHeader;
|
|
20
44
|
}
|
|
21
45
|
peekSignature() {
|
|
22
46
|
return this.tokenizer.peekToken(UINT32_LE);
|
|
@@ -78,33 +102,53 @@ export class ZipHandler {
|
|
|
78
102
|
let stop = false;
|
|
79
103
|
do {
|
|
80
104
|
const zipHeader = await this.readLocalFileHeader();
|
|
81
|
-
if (!zipHeader)
|
|
105
|
+
if (!zipHeader) {
|
|
82
106
|
break;
|
|
107
|
+
}
|
|
83
108
|
const next = fileCb(zipHeader);
|
|
84
109
|
stop = !!next.stop;
|
|
85
110
|
let fileData;
|
|
86
111
|
await this.tokenizer.ignore(zipHeader.extraFieldLength);
|
|
112
|
+
if (next.handler) {
|
|
113
|
+
this.checkEntrySize(zipHeader);
|
|
114
|
+
}
|
|
87
115
|
if (zipHeader.dataDescriptor && zipHeader.compressedSize === 0) {
|
|
88
116
|
const chunks = [];
|
|
89
|
-
let
|
|
117
|
+
let totalSize = 0;
|
|
118
|
+
const scanLimit = Math.min(this.limits.maxDataDescriptorScanBytes, next.handler ? this.limits.maxCompressedSize : Number.POSITIVE_INFINITY, next.handler && zipHeader.compressedMethod === 0 ? this.limits.maxUncompressedSize : Number.POSITIVE_INFINITY);
|
|
90
119
|
debug('Compressed-file-size unknown, scanning for next data-descriptor-signature....');
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
const
|
|
120
|
+
while (true) {
|
|
121
|
+
// Keep three bytes of overlap and allow the signature to start exactly at the limit.
|
|
122
|
+
const peekLength = Math.min(syncBufferSize, scanLimit - totalSize + ddSignatureArray.length);
|
|
123
|
+
const len = await this.tokenizer.peekBuffer(this.syncBuffer.subarray(0, peekLength), { mayBeLess: true });
|
|
124
|
+
const nextHeaderIndex = indexOf(this.syncBuffer.subarray(0, len), ddSignatureArray);
|
|
125
|
+
if (nextHeaderIndex < 0 && len < ddSignatureArray.length) {
|
|
126
|
+
throw new Error('Expected data-descriptor-signature before end of input');
|
|
127
|
+
}
|
|
128
|
+
const size = nextHeaderIndex >= 0 ? nextHeaderIndex : len - ddSignatureArray.length + 1;
|
|
129
|
+
this.checkLimit('maxDataDescriptorScanBytes', totalSize + size);
|
|
96
130
|
if (next.handler) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
131
|
+
this.checkLimit('maxCompressedSize', totalSize + size);
|
|
132
|
+
if (zipHeader.compressedMethod === 0) {
|
|
133
|
+
this.checkLimit('maxUncompressedSize', totalSize + size);
|
|
134
|
+
}
|
|
135
|
+
if (size > 0) {
|
|
136
|
+
const data = new Uint8Array(size);
|
|
137
|
+
await this.tokenizer.readBuffer(data);
|
|
138
|
+
chunks.push(data);
|
|
139
|
+
}
|
|
100
140
|
}
|
|
101
141
|
else {
|
|
102
|
-
// Move position to the next header if found, skip the whole buffer otherwise
|
|
103
142
|
await this.tokenizer.ignore(size);
|
|
104
143
|
}
|
|
144
|
+
totalSize += size;
|
|
145
|
+
if (nextHeaderIndex >= 0) {
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
105
148
|
}
|
|
106
149
|
debug(`Found data-descriptor-signature at pos=${this.tokenizer.position}`);
|
|
107
150
|
if (next.handler) {
|
|
151
|
+
this.checkLimit('maxCompressedSize', totalSize);
|
|
108
152
|
await this.inflate(zipHeader, mergeArrays(chunks), next.handler);
|
|
109
153
|
}
|
|
110
154
|
}
|
|
@@ -138,28 +182,32 @@ export class ZipHandler {
|
|
|
138
182
|
const zipHeader = await this.readLocalFileHeader();
|
|
139
183
|
if (zipHeader) {
|
|
140
184
|
await this.tokenizer.ignore(zipHeader.extraFieldLength);
|
|
185
|
+
this.checkEntrySize(fileHeader);
|
|
186
|
+
this.checkEntrySize(zipHeader);
|
|
141
187
|
const fileData = new Uint8Array(fileHeader.compressedSize);
|
|
142
188
|
await this.tokenizer.readBuffer(fileData);
|
|
143
189
|
await this.inflate(zipHeader, fileData, next.handler);
|
|
144
190
|
}
|
|
145
191
|
}
|
|
146
|
-
if (next.stop)
|
|
192
|
+
if (next.stop) {
|
|
147
193
|
break;
|
|
194
|
+
}
|
|
148
195
|
}
|
|
149
196
|
}
|
|
150
197
|
async inflate(zipHeader, fileData, cb) {
|
|
151
198
|
if (zipHeader.compressedMethod === 0) {
|
|
152
199
|
// Stored (uncompressed)
|
|
200
|
+
this.checkLimit('maxUncompressedSize', fileData.length);
|
|
153
201
|
return cb(fileData);
|
|
154
202
|
}
|
|
155
203
|
if (zipHeader.compressedMethod !== 8) {
|
|
156
204
|
throw new Error(`Unsupported ZIP compression method: ${zipHeader.compressedMethod}`);
|
|
157
205
|
}
|
|
158
206
|
debug(`Decompress filename=${zipHeader.filename}, compressed-size=${fileData.length}`);
|
|
159
|
-
const uncompressedData = await
|
|
207
|
+
const uncompressedData = await this.decompressDeflateRaw(fileData);
|
|
160
208
|
return cb(uncompressedData);
|
|
161
209
|
}
|
|
162
|
-
|
|
210
|
+
async decompressDeflateRaw(data) {
|
|
163
211
|
// Wrap Uint8Array in a ReadableStream without copying
|
|
164
212
|
const input = new ReadableStream({
|
|
165
213
|
start(controller) {
|
|
@@ -167,21 +215,47 @@ export class ZipHandler {
|
|
|
167
215
|
controller.close();
|
|
168
216
|
}
|
|
169
217
|
});
|
|
170
|
-
const ds = new DecompressionStream(
|
|
218
|
+
const ds = new DecompressionStream('deflate-raw');
|
|
171
219
|
const output = input.pipeThrough(ds);
|
|
220
|
+
const reader = output.getReader();
|
|
221
|
+
const chunks = [];
|
|
222
|
+
let totalSize = 0;
|
|
172
223
|
try {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
224
|
+
while (true) {
|
|
225
|
+
const { done, value } = await reader.read();
|
|
226
|
+
if (done) {
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
this.checkLimit('maxUncompressedSize', totalSize + value.length);
|
|
230
|
+
totalSize += value.length;
|
|
231
|
+
chunks.push(value);
|
|
232
|
+
}
|
|
233
|
+
this.checkLimit('maxUncompressedSize', totalSize);
|
|
234
|
+
return mergeArrays(chunks);
|
|
177
235
|
}
|
|
178
236
|
catch (err) {
|
|
237
|
+
// Cancellation propagates through pipeThrough to stop decompression.
|
|
238
|
+
await reader.cancel(err).catch(() => {
|
|
239
|
+
// Preserve the original failure if cancellation also fails.
|
|
240
|
+
});
|
|
241
|
+
if (err instanceof ZipLimitError) {
|
|
242
|
+
throw err;
|
|
243
|
+
}
|
|
244
|
+
// Descriptor scanning can retain bytes after the deflate stream, including
|
|
245
|
+
// unsigned ZIP data descriptors. Node.js rejects these after delivering the
|
|
246
|
+
// inflated data. Recover only this error; every retained chunk was bounded.
|
|
247
|
+
if (err instanceof Error && 'code' in err && err.code === 'ERR_TRAILING_JUNK_AFTER_STREAM_END') {
|
|
248
|
+
return mergeArrays(chunks);
|
|
249
|
+
}
|
|
179
250
|
// Provide ZIP-specific error context
|
|
180
251
|
const message = err instanceof Error
|
|
181
252
|
? `Failed to deflate ZIP entry: ${err.message}`
|
|
182
|
-
:
|
|
253
|
+
: 'Unknown decompression error in ZIP entry';
|
|
183
254
|
throw new TypeError(message);
|
|
184
255
|
}
|
|
256
|
+
finally {
|
|
257
|
+
reader.releaseLock();
|
|
258
|
+
}
|
|
185
259
|
}
|
|
186
260
|
async readLocalFileHeader() {
|
|
187
261
|
const signature = await this.tokenizer.peekToken(UINT32_LE);
|
|
@@ -193,7 +267,7 @@ export class ZipHandler {
|
|
|
193
267
|
if (signature === Signature.CentralFileHeader) {
|
|
194
268
|
return false;
|
|
195
269
|
}
|
|
196
|
-
if (signature ===
|
|
270
|
+
if (signature === 0xe011cfd0) {
|
|
197
271
|
throw new Error('Encrypted ZIP');
|
|
198
272
|
}
|
|
199
273
|
throw new Error('Unexpected signature');
|
|
@@ -203,8 +277,9 @@ function indexOf(buffer, portion) {
|
|
|
203
277
|
const bufferLength = buffer.length;
|
|
204
278
|
const portionLength = portion.length;
|
|
205
279
|
// Return -1 if the portion is longer than the buffer
|
|
206
|
-
if (portionLength > bufferLength)
|
|
280
|
+
if (portionLength > bufferLength) {
|
|
207
281
|
return -1;
|
|
282
|
+
}
|
|
208
283
|
// Search for the portion in the buffer
|
|
209
284
|
for (let i = 0; i <= bufferLength - portionLength; i++) {
|
|
210
285
|
let found = true;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Opt-in per-entry ZIP processing limits, in bytes. */
|
|
2
|
+
export interface ZipHandlerOptions {
|
|
3
|
+
/** Maximum bytes scanned before a data descriptor, including ignored entries. */
|
|
4
|
+
maxDataDescriptorScanBytes?: number;
|
|
5
|
+
/** Maximum compressed bytes buffered for a selected entry. */
|
|
6
|
+
maxCompressedSize?: number;
|
|
7
|
+
/** Maximum decompressed bytes retained for a selected entry (including stored entries). */
|
|
8
|
+
maxUncompressedSize?: number;
|
|
9
|
+
}
|
|
10
|
+
/** A configured ZIP processing limit was exceeded. */
|
|
11
|
+
export declare class ZipLimitError extends RangeError {
|
|
12
|
+
readonly limit: keyof ZipHandlerOptions;
|
|
13
|
+
readonly requestedSize: number;
|
|
14
|
+
readonly maxSize: number;
|
|
15
|
+
constructor(limit: keyof ZipHandlerOptions, requestedSize: number, maxSize: number);
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** A configured ZIP processing limit was exceeded. */
|
|
2
|
+
export class ZipLimitError extends RangeError {
|
|
3
|
+
constructor(limit, requestedSize, maxSize) {
|
|
4
|
+
super(`ZIP ${limit} exceeded: ${requestedSize} bytes exceeds limit of ${maxSize} bytes`);
|
|
5
|
+
this.limit = limit;
|
|
6
|
+
this.requestedSize = requestedSize;
|
|
7
|
+
this.maxSize = maxSize;
|
|
8
|
+
this.name = 'ZipLimitError';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Ref https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
|
|
3
3
|
*/
|
|
4
|
-
import { UINT16_LE, UINT32_LE } from
|
|
4
|
+
import { UINT16_LE, UINT32_LE } from 'token-types';
|
|
5
5
|
export const Signature = {
|
|
6
6
|
LocalFileHeader: 0x04034b50,
|
|
7
7
|
DataDescriptor: 0x08074b50,
|
|
@@ -13,9 +13,10 @@ export const DataDescriptor = {
|
|
|
13
13
|
return {
|
|
14
14
|
signature: UINT32_LE.get(array, 0),
|
|
15
15
|
compressedSize: UINT32_LE.get(array, 8),
|
|
16
|
-
uncompressedSize: UINT32_LE.get(array, 12)
|
|
16
|
+
uncompressedSize: UINT32_LE.get(array, 12)
|
|
17
17
|
};
|
|
18
|
-
},
|
|
18
|
+
},
|
|
19
|
+
len: 16
|
|
19
20
|
};
|
|
20
21
|
/**
|
|
21
22
|
* First part of the ZIP Local File Header
|
|
@@ -49,7 +50,8 @@ export const LocalFileHeaderToken = {
|
|
|
49
50
|
extraFieldLength: UINT16_LE.get(array, 28),
|
|
50
51
|
filename: null
|
|
51
52
|
};
|
|
52
|
-
},
|
|
53
|
+
},
|
|
54
|
+
len: 30
|
|
53
55
|
};
|
|
54
56
|
/**
|
|
55
57
|
* 4.3.16 End of central directory record:
|
|
@@ -73,9 +75,10 @@ export const EndOfCentralDirectoryRecordToken = {
|
|
|
73
75
|
nrOfEntriesOfSize: UINT16_LE.get(array, 10),
|
|
74
76
|
sizeOfCd: UINT32_LE.get(array, 12),
|
|
75
77
|
offsetOfStartOfCd: UINT32_LE.get(array, 16),
|
|
76
|
-
zipFileCommentLength: UINT16_LE.get(array, 20)
|
|
78
|
+
zipFileCommentLength: UINT16_LE.get(array, 20)
|
|
77
79
|
};
|
|
78
|
-
},
|
|
80
|
+
},
|
|
81
|
+
len: 22
|
|
79
82
|
};
|
|
80
83
|
/**
|
|
81
84
|
* File header:
|
|
@@ -113,5 +116,6 @@ export const FileHeader = {
|
|
|
113
116
|
relativeOffsetOfLocalHeader: UINT32_LE.get(array, 42),
|
|
114
117
|
filename: null
|
|
115
118
|
};
|
|
116
|
-
},
|
|
119
|
+
},
|
|
120
|
+
len: 46
|
|
117
121
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { ZipHandler } from './ZipHandler.js';
|
|
2
1
|
export { GzipHandler } from './GzipHandler.js';
|
|
2
|
+
export { ZipHandler } from './ZipHandler.js';
|
|
3
|
+
export { type ZipHandlerOptions, ZipLimitError } from './ZipLimitError.js';
|
|
3
4
|
export type { ILocalFileHeader } from './ZipToken.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenizer/inflate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Tokenized zip support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/index.js",
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"eslint": "eslint lib test",
|
|
19
19
|
"lint:md": "remark -u preset-lint-recommended .",
|
|
20
20
|
"lint:ts": "biome check",
|
|
21
|
-
"fix": "
|
|
21
|
+
"lint:ts:fix": "biome check --write",
|
|
22
|
+
"fix": "yarn run lint:ts:fix",
|
|
22
23
|
"test": "mocha",
|
|
23
24
|
"start": "yarn run compile && yarn run lint && yarn run cover-test",
|
|
24
25
|
"update-biome": "yarn add -D --exact @biomejs/biome && npx @biomejs/biome migrate --write"
|
|
@@ -31,26 +32,26 @@
|
|
|
31
32
|
"url": "https://github.com/Borewit"
|
|
32
33
|
},
|
|
33
34
|
"license": "MIT",
|
|
34
|
-
"packageManager": "yarn@4.
|
|
35
|
+
"packageManager": "yarn@4.18.1",
|
|
35
36
|
"devDependencies": {
|
|
36
|
-
"@aws-sdk/client-s3": "^3.
|
|
37
|
-
"@biomejs/biome": "2.
|
|
38
|
-
"@tokenizer/s3": "^1.0.
|
|
37
|
+
"@aws-sdk/client-s3": "^3.1148.0",
|
|
38
|
+
"@biomejs/biome": "2.5.15",
|
|
39
|
+
"@tokenizer/s3": "^1.0.4",
|
|
39
40
|
"@types/chai": "^5.2.3",
|
|
40
41
|
"@types/debug": "^4",
|
|
41
42
|
"@types/mocha": "^10.0.10",
|
|
42
|
-
"@types/node": "^
|
|
43
|
-
"chai": "^6.
|
|
44
|
-
"del-cli": "^
|
|
45
|
-
"file-type": "^
|
|
46
|
-
"mocha": "^
|
|
47
|
-
"strtok3": "^10.
|
|
48
|
-
"
|
|
49
|
-
"typescript": "^
|
|
43
|
+
"@types/node": "^26.6.4",
|
|
44
|
+
"chai": "^6.3.0",
|
|
45
|
+
"del-cli": "^8.0.1",
|
|
46
|
+
"file-type": "^22.1.1",
|
|
47
|
+
"mocha": "^12.0.3",
|
|
48
|
+
"strtok3": "^10.5.0",
|
|
49
|
+
"tsx": "^4.23.15",
|
|
50
|
+
"typescript": "^7.0.2"
|
|
50
51
|
},
|
|
51
52
|
"dependencies": {
|
|
52
53
|
"debug": "^4.4.3",
|
|
53
|
-
"token-types": "^6.1.
|
|
54
|
+
"token-types": "^6.1.2"
|
|
54
55
|
},
|
|
55
56
|
"repository": {
|
|
56
57
|
"type": "git",
|
|
@@ -2706,7 +2706,7 @@ const ArgumentParser = _callable(class ArgumentParser extends _AttributeHolder(_
|
|
|
2706
2706
|
this.register('type', undefined, identity)
|
|
2707
2707
|
this.register('type', null, identity)
|
|
2708
2708
|
this.register('type', 'int', function (x) {
|
|
2709
|
-
if (typeof x === 'string' && !/^[+-]?\d+(?:_
|
|
2709
|
+
if (typeof x === 'string' && !/^[+-]?\d+(?:_\d+)*$/.test(x.trim())) {
|
|
2710
2710
|
throw new TypeError(sub('could not convert string to int: %r', x))
|
|
2711
2711
|
}
|
|
2712
2712
|
const result = _string_to_number(x)
|
|
@@ -6,11 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _FDBKeyRange = _interopRequireDefault(require("./FDBKeyRange.js"));
|
|
8
8
|
var _FDBObjectStore = _interopRequireDefault(require("./FDBObjectStore.js"));
|
|
9
|
-
var _cmp =
|
|
9
|
+
var _cmp = _interopRequireWildcard(require("./lib/cmp.js"));
|
|
10
10
|
var _errors = require("./lib/errors.js");
|
|
11
11
|
var _extractKey = _interopRequireDefault(require("./lib/extractKey.js"));
|
|
12
12
|
var _valueToKey = _interopRequireDefault(require("./lib/valueToKey.js"));
|
|
13
13
|
var _cloneValueForInsertion = require("./lib/cloneValueForInsertion.js");
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
16
|
const getEffectiveObjectStore = cursor => {
|
|
16
17
|
if (cursor.source instanceof _FDBObjectStore.default) {
|
|
@@ -33,7 +34,7 @@ const makeKeyRange = (range, lowers, uppers) => {
|
|
|
33
34
|
if (lowerTemp === undefined) {
|
|
34
35
|
continue;
|
|
35
36
|
}
|
|
36
|
-
if (lower === undefined || (0, _cmp.
|
|
37
|
+
if (lower === undefined || (0, _cmp.cmpKeys)(lower, lowerTemp) === 1) {
|
|
37
38
|
lower = lowerTemp;
|
|
38
39
|
}
|
|
39
40
|
}
|
|
@@ -41,7 +42,7 @@ const makeKeyRange = (range, lowers, uppers) => {
|
|
|
41
42
|
if (upperTemp === undefined) {
|
|
42
43
|
continue;
|
|
43
44
|
}
|
|
44
|
-
if (upper === undefined || (0, _cmp.
|
|
45
|
+
if (upper === undefined || (0, _cmp.cmpKeys)(upper, upperTemp) === -1) {
|
|
45
46
|
upper = upperTemp;
|
|
46
47
|
}
|
|
47
48
|
}
|
|
@@ -114,8 +115,8 @@ class FDBCursor {
|
|
|
114
115
|
if (this.direction === "next") {
|
|
115
116
|
const range = makeKeyRange(this._range, [key, this._position], []);
|
|
116
117
|
for (const record of records.values(range)) {
|
|
117
|
-
const cmpResultKey = key !== undefined ? (0, _cmp.
|
|
118
|
-
const cmpResultPosition = this._position !== undefined ? (0, _cmp.
|
|
118
|
+
const cmpResultKey = key !== undefined ? (0, _cmp.cmpKeys)(record.key, key) : undefined;
|
|
119
|
+
const cmpResultPosition = this._position !== undefined ? (0, _cmp.cmpKeys)(record.key, this._position) : undefined;
|
|
119
120
|
if (key !== undefined) {
|
|
120
121
|
if (cmpResultKey === -1) {
|
|
121
122
|
continue;
|
|
@@ -125,7 +126,7 @@ class FDBCursor {
|
|
|
125
126
|
if (cmpResultKey === -1) {
|
|
126
127
|
continue;
|
|
127
128
|
}
|
|
128
|
-
const cmpResultPrimaryKey = (0, _cmp.
|
|
129
|
+
const cmpResultPrimaryKey = (0, _cmp.cmpKeys)(record.value, primaryKey);
|
|
129
130
|
if (cmpResultKey === 0 && cmpResultPrimaryKey === -1) {
|
|
130
131
|
continue;
|
|
131
132
|
}
|
|
@@ -139,7 +140,7 @@ class FDBCursor {
|
|
|
139
140
|
if (cmpResultPosition === -1) {
|
|
140
141
|
continue;
|
|
141
142
|
}
|
|
142
|
-
if (cmpResultPosition === 0 && (0, _cmp.
|
|
143
|
+
if (cmpResultPosition === 0 && (0, _cmp.cmpKeys)(record.value, this._objectStorePosition) !== 1) {
|
|
143
144
|
continue;
|
|
144
145
|
}
|
|
145
146
|
}
|
|
@@ -158,12 +159,12 @@ class FDBCursor {
|
|
|
158
159
|
const range = makeKeyRange(this._range, [key, this._position], []);
|
|
159
160
|
for (const record of records.values(range)) {
|
|
160
161
|
if (key !== undefined) {
|
|
161
|
-
if ((0, _cmp.
|
|
162
|
+
if ((0, _cmp.cmpKeys)(record.key, key) === -1) {
|
|
162
163
|
continue;
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
166
|
if (this._position !== undefined) {
|
|
166
|
-
if ((0, _cmp.
|
|
167
|
+
if ((0, _cmp.cmpKeys)(record.key, this._position) !== 1) {
|
|
167
168
|
continue;
|
|
168
169
|
}
|
|
169
170
|
}
|
|
@@ -178,8 +179,8 @@ class FDBCursor {
|
|
|
178
179
|
} else if (this.direction === "prev") {
|
|
179
180
|
const range = makeKeyRange(this._range, [], [key, this._position]);
|
|
180
181
|
for (const record of records.values(range, "prev")) {
|
|
181
|
-
const cmpResultKey = key !== undefined ? (0, _cmp.
|
|
182
|
-
const cmpResultPosition = this._position !== undefined ? (0, _cmp.
|
|
182
|
+
const cmpResultKey = key !== undefined ? (0, _cmp.cmpKeys)(record.key, key) : undefined;
|
|
183
|
+
const cmpResultPosition = this._position !== undefined ? (0, _cmp.cmpKeys)(record.key, this._position) : undefined;
|
|
183
184
|
if (key !== undefined) {
|
|
184
185
|
if (cmpResultKey === 1) {
|
|
185
186
|
continue;
|
|
@@ -189,7 +190,7 @@ class FDBCursor {
|
|
|
189
190
|
if (cmpResultKey === 1) {
|
|
190
191
|
continue;
|
|
191
192
|
}
|
|
192
|
-
const cmpResultPrimaryKey = (0, _cmp.
|
|
193
|
+
const cmpResultPrimaryKey = (0, _cmp.cmpKeys)(record.value, primaryKey);
|
|
193
194
|
if (cmpResultKey === 0 && cmpResultPrimaryKey === 1) {
|
|
194
195
|
continue;
|
|
195
196
|
}
|
|
@@ -203,7 +204,7 @@ class FDBCursor {
|
|
|
203
204
|
if (cmpResultPosition === 1) {
|
|
204
205
|
continue;
|
|
205
206
|
}
|
|
206
|
-
if (cmpResultPosition === 0 && (0, _cmp.
|
|
207
|
+
if (cmpResultPosition === 0 && (0, _cmp.cmpKeys)(record.value, this._objectStorePosition) !== -1) {
|
|
207
208
|
continue;
|
|
208
209
|
}
|
|
209
210
|
}
|
|
@@ -220,12 +221,12 @@ class FDBCursor {
|
|
|
220
221
|
const range = makeKeyRange(this._range, [], [key, this._position]);
|
|
221
222
|
for (const record of records.values(range, "prev")) {
|
|
222
223
|
if (key !== undefined) {
|
|
223
|
-
if ((0, _cmp.
|
|
224
|
+
if ((0, _cmp.cmpKeys)(record.key, key) === 1) {
|
|
224
225
|
continue;
|
|
225
226
|
}
|
|
226
227
|
}
|
|
227
228
|
if (this._position !== undefined) {
|
|
228
|
-
if ((0, _cmp.
|
|
229
|
+
if ((0, _cmp.cmpKeys)(record.key, this._position) !== -1) {
|
|
229
230
|
continue;
|
|
230
231
|
}
|
|
231
232
|
}
|
|
@@ -387,7 +388,7 @@ class FDBCursor {
|
|
|
387
388
|
}
|
|
388
389
|
if (key !== undefined) {
|
|
389
390
|
key = (0, _valueToKey.default)(key);
|
|
390
|
-
const cmpResult = (0, _cmp.
|
|
391
|
+
const cmpResult = (0, _cmp.cmpKeys)(key, this._position);
|
|
391
392
|
if (cmpResult <= 0 && (this.direction === "next" || this.direction === "nextunique") || cmpResult >= 0 && (this.direction === "prev" || this.direction === "prevunique")) {
|
|
392
393
|
throw new _errors.DataError();
|
|
393
394
|
}
|
|
@@ -428,11 +429,12 @@ class FDBCursor {
|
|
|
428
429
|
throw new _errors.DataError();
|
|
429
430
|
}
|
|
430
431
|
key = (0, _valueToKey.default)(key);
|
|
431
|
-
const cmpResult = (0, _cmp.
|
|
432
|
+
const cmpResult = (0, _cmp.cmpKeys)(key, this._position);
|
|
432
433
|
if (cmpResult === -1 && this.direction === "next" || cmpResult === 1 && this.direction === "prev") {
|
|
433
434
|
throw new _errors.DataError();
|
|
434
435
|
}
|
|
435
|
-
|
|
436
|
+
primaryKey = (0, _valueToKey.default)(primaryKey);
|
|
437
|
+
const cmpResult2 = (0, _cmp.cmpKeys)(primaryKey, this._objectStorePosition);
|
|
436
438
|
if (cmpResult === 0) {
|
|
437
439
|
if (cmpResult2 <= 0 && this.direction === "next" || cmpResult2 >= 0 && this.direction === "prev") {
|
|
438
440
|
throw new _errors.DataError();
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _cmp =
|
|
7
|
+
var _cmp = require("./lib/cmp.js");
|
|
8
8
|
var _errors = require("./lib/errors.js");
|
|
9
9
|
var _valueToKey = _interopRequireDefault(require("./lib/valueToKey.js"));
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -35,12 +35,12 @@ class FDBKeyRange {
|
|
|
35
35
|
if (arguments.length < 2) {
|
|
36
36
|
throw new TypeError();
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
lower = (0, _valueToKey.default)(lower);
|
|
39
|
+
upper = (0, _valueToKey.default)(upper);
|
|
40
|
+
const cmpResult = (0, _cmp.cmpKeys)(lower, upper);
|
|
39
41
|
if (cmpResult === 1 || cmpResult === 0 && (lowerOpen || upperOpen)) {
|
|
40
42
|
throw new _errors.DataError();
|
|
41
43
|
}
|
|
42
|
-
lower = (0, _valueToKey.default)(lower);
|
|
43
|
-
upper = (0, _valueToKey.default)(upper);
|
|
44
44
|
return new FDBKeyRange(lower, upper, lowerOpen, upperOpen);
|
|
45
45
|
}
|
|
46
46
|
constructor(lower, upper, lowerOpen, upperOpen) {
|
|
@@ -57,13 +57,13 @@ class FDBKeyRange {
|
|
|
57
57
|
}
|
|
58
58
|
key = (0, _valueToKey.default)(key);
|
|
59
59
|
if (this.lower !== undefined) {
|
|
60
|
-
const cmpResult = (0, _cmp.
|
|
60
|
+
const cmpResult = (0, _cmp.cmpKeys)(this.lower, key);
|
|
61
61
|
if (cmpResult === 1 || cmpResult === 0 && this.lowerOpen) {
|
|
62
62
|
return false;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
if (this.upper !== undefined) {
|
|
66
|
-
const cmpResult = (0, _cmp.
|
|
66
|
+
const cmpResult = (0, _cmp.cmpKeys)(this.upper, key);
|
|
67
67
|
if (cmpResult === -1 || cmpResult === 0 && this.upperOpen) {
|
|
68
68
|
return false;
|
|
69
69
|
}
|
|
@@ -118,7 +118,7 @@ class FDBTransaction extends _FakeEventTarget.default {
|
|
|
118
118
|
request.result = undefined;
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
|
-
this.
|
|
121
|
+
this._markFinished();
|
|
122
122
|
}
|
|
123
123
|
abort() {
|
|
124
124
|
if (this._state === "committing" || this._state === "finished") {
|
|
@@ -251,13 +251,31 @@ class FDBTransaction extends _FakeEventTarget.default {
|
|
|
251
251
|
// Check if transaction complete event needs to be fired
|
|
252
252
|
if (this._state !== "finished") {
|
|
253
253
|
// Either aborted or committed already
|
|
254
|
-
this.
|
|
254
|
+
this._markFinished();
|
|
255
255
|
if (!this.error) {
|
|
256
256
|
const event = new _FakeEvent.default("complete");
|
|
257
257
|
this.dispatchEvent(event);
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
|
+
_markFinished() {
|
|
262
|
+
this._state = "finished";
|
|
263
|
+
|
|
264
|
+
// Remove from the list of transactions attached to the linked database to avoid
|
|
265
|
+
// indefinite memory bloat (issue #170)
|
|
266
|
+
// Note we do this in a macrotask since other consumers immediately check if it's in the array
|
|
267
|
+
(0, _scheduling.queueTask)(() => {
|
|
268
|
+
const {
|
|
269
|
+
transactions
|
|
270
|
+
} = this.db._rawDatabase;
|
|
271
|
+
const idx = transactions.indexOf(this);
|
|
272
|
+
if (idx !== -1) {
|
|
273
|
+
transactions.splice(idx, 1);
|
|
274
|
+
} else {
|
|
275
|
+
throw new Error("should have been able to remove transaction");
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
}
|
|
261
279
|
commit() {
|
|
262
280
|
if (this._state !== "active") {
|
|
263
281
|
throw new _errors.InvalidStateError();
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _FDBKeyRange = _interopRequireDefault(require("../FDBKeyRange.js"));
|
|
8
|
-
var _cmp =
|
|
8
|
+
var _cmp = require("./cmp.js");
|
|
9
9
|
var _binarySearchTree = _interopRequireDefault(require("./binarySearchTree.js"));
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
class RecordStore {
|
|
@@ -75,7 +75,7 @@ class RecordStore {
|
|
|
75
75
|
next: () => {
|
|
76
76
|
let current = next();
|
|
77
77
|
// for nextunique, continue if we already emitted the lowest unique value
|
|
78
|
-
while (!current.done && previousValue !== undefined && (0, _cmp.
|
|
78
|
+
while (!current.done && previousValue !== undefined && (0, _cmp.cmpKeys)(previousValue.key, current.value.key) === 0) {
|
|
79
79
|
current = next();
|
|
80
80
|
}
|
|
81
81
|
previousValue = current.value;
|
|
@@ -90,7 +90,7 @@ class RecordStore {
|
|
|
90
90
|
let nextResult = next();
|
|
91
91
|
return {
|
|
92
92
|
next: () => {
|
|
93
|
-
while (!nextResult.done && (0, _cmp.
|
|
93
|
+
while (!nextResult.done && (0, _cmp.cmpKeys)(current.value.key, nextResult.value.key) === 0) {
|
|
94
94
|
// note we return the _lowest_ possible value, hence set the current
|
|
95
95
|
current = nextResult;
|
|
96
96
|
nextResult = next();
|