@openclaw/matrix 2026.11.5 → 2026.11.10-beta.1
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-config-CRsKoMqJ.mjs → account-config-CVM2a28p.mjs} +1 -2
- package/dist/.setup/{account-selection-UUPhMBmu.mjs → account-selection-Cow3TMFO.mjs} +5 -8
- package/dist/.setup/{approval-handler.runtime-Ca12_7Qa.mjs → approval-handler.runtime-D7KO6ds_.mjs} +8 -9
- package/dist/.setup/{approval-reactions-BazmsDbe.mjs → approval-reactions-Bz_8XB01.mjs} +2 -3
- package/dist/.setup/{backup-health-Dm_YMVFT.mjs → backup-health-BxH69np2.mjs} +1 -2
- package/dist/.setup/{channel-FfaEmyIU.mjs → channel-BJGiol_v.mjs} +30 -40
- package/dist/.setup/{channel.runtime-CkkHG8zy.mjs → channel.runtime-BrSYy4Qm.mjs} +10 -12
- package/dist/.setup/{channel.setup-B00zzOOL.mjs → channel.setup-DJdvsvAL.mjs} +9 -7
- package/dist/.setup/{cli-dz9hd2dR.mjs → cli-CjjggD1Y.mjs} +25 -34
- package/dist/.setup/{cli-metadata-CwUhA9CY.mjs → cli-metadata-nnz3uf_k.mjs} +3 -5
- package/dist/.setup/{client-D1bsidwU.mjs → client-DIeTvz6C.mjs} +21 -26
- package/dist/.setup/{client-bootstrap-CTT0VF6v.mjs → client-bootstrap-CvbnV_7R.mjs} +2 -3
- package/dist/.setup/{client-support-B_Mp4Qk9.mjs → client-support-CqXAOZp3.mjs} +2 -3
- package/dist/.setup/{client-CFPYqaYK.mjs → client-uAX074II.mjs} +4 -5
- package/dist/.setup/{config-paths-CnREYb1Y.mjs → config-paths-DBpHxDyc.mjs} +1 -2
- package/dist/.setup/{create-client-Ccf5wyS3.mjs → create-client-XL9SKJ2s.mjs} +8 -9
- package/dist/.setup/{credentials-kT20jk_u.mjs → credentials-CGgWuhFV.mjs} +5 -6
- package/dist/.setup/{credentials-read-CM6wXUjL.mjs → credentials-read-rPqEpuxv.mjs} +5 -6
- package/dist/.setup/{credentials-state-B3cuUFwZ.mjs → credentials-state-jxq29yQw.mjs} +1 -2
- package/dist/.setup/{crypto-node.runtime-6Aj_ltHQ.mjs → crypto-node.runtime-E_hqXGxm.mjs} +1 -2
- package/dist/.setup/{crypto-runtime-DZNytKX5.mjs → crypto-runtime-D96thr_g.mjs} +10 -15
- package/dist/.setup/{crypto-state-store-BZLlwkv_.mjs → crypto-state-store-CzAmeC_Z.mjs} +4 -4
- package/dist/.setup/{crypto-store-ownership-CiQ1l_O7.mjs → crypto-store-ownership-DPO9WcVz.mjs} +3 -4
- package/dist/.setup/{crypto-unsafe-state-doctor-Dh1dtuSz.mjs → crypto-unsafe-state-doctor-CkhtP1mQ.mjs} +7 -8
- package/dist/.setup/{deps-D-W_QQjz.mjs → deps-CVPT2Ros.mjs} +1 -2
- package/dist/.setup/{device-health-Ck2YpEVN.mjs → device-health-D7n-lPeb.mjs} +2 -3
- package/dist/.setup/{direct-management-Dp1giZ34.mjs → direct-management-D59C1WO-.mjs} +7 -11
- package/dist/.setup/{directory-live-ufzRheWx.mjs → directory-live-5RgaKKuc.mjs} +5 -6
- package/dist/.setup/{doctor-contract-BANpMUbP.mjs → doctor-contract-GiXgCj7k.mjs} +2 -3
- package/dist/.setup/{draft-stream-BPjjKSoI.mjs → draft-stream-CjEpElZ-.mjs} +3 -4
- package/dist/.setup/{encryption-guidance-Br3Lv9Hm.mjs → encryption-guidance-DfbEaKct.mjs} +3 -4
- package/dist/.setup/{env-vars-aEBngJPa.mjs → env-vars-Bh1iOXJ1.mjs} +1 -2
- package/dist/.setup/{errors-Bw4EHwKX.mjs → errors-CL3YJV8U.mjs} +1 -2
- package/dist/.setup/{event-helpers-CxNgMQqH.mjs → event-helpers-DDUjVVf7.mjs} +1 -2
- package/dist/.setup/{exec-approvals-BwEOyI1-.mjs → exec-approvals-DcQS_LNp.mjs} +6 -9
- package/dist/.setup/{file-sync-store-BpS12yaK.mjs → file-sync-store-CAhnwOPA.mjs} +6 -36
- package/dist/.setup/{http-client-B_ohXrBm.mjs → http-client-CqnKFKUH.mjs} +5 -8
- package/dist/.setup/{idb-persistence-BTOsltD9.mjs → idb-persistence-DeGUs--C.mjs} +6 -7
- package/dist/.setup/{idb-persistence-lock-Bh3ZLIsE.mjs → idb-persistence-lock-CH2K6d_3.mjs} +1 -2
- package/dist/.setup/{joined-room-encryption-C0gHa2DG.mjs → joined-room-encryption-9sJK1kM-.mjs} +2 -3
- package/dist/.setup/{logger-CuAzdD8Q.mjs → logger-B9TwnY6C.mjs} +2 -3
- package/dist/.setup/{logging-CoaEyRtA.mjs → logging-Bnsn7s4r.mjs} +3 -4
- package/dist/.setup/{messages-DpJ9naJa.mjs → messages-CmlRhlPp.mjs} +9 -14
- package/dist/.setup/{monitor-vpzawYrB.mjs → monitor-DG8yTCh9.mjs} +98 -137
- package/dist/.setup/{onboarding-BK-V2ZLT.mjs → onboarding-CY_oesMI.mjs} +10 -11
- package/dist/.setup/{outbound-DydCDuvM.mjs → outbound-BY9kS8Kt.mjs} +5 -6
- package/dist/.setup/{profile-update-RLsY-gu6.mjs → profile-update-BRugBHSm.mjs} +13 -10
- package/dist/.setup/{reaction-events-lcgVF3M5.mjs → reaction-events-B1DQTt9d.mjs} +8 -9
- package/dist/.setup/{resolve-targets-DYW8ULZS.mjs → resolve-targets-CUBvJ37V.mjs} +4 -5
- package/dist/.setup/{retired-state-JGUEBE72.mjs → retired-state-BsxdpJNk.mjs} +3 -41
- package/dist/.setup/{room-info-Dhc4efkA.mjs → room-info-CJVhaCvB.mjs} +6 -8
- package/dist/.setup/{runtime-1kn1P6io.mjs → runtime-Ck8TjD7L.mjs} +1 -2
- package/dist/.setup/{runtime-doctor-migrations-hxP-CXX7.mjs → runtime-doctor-migrations-CSvRANPN.mjs} +5 -10
- package/dist/.setup/{runtime-setter-api-i2MOXoT3.mjs → runtime-setter-api-CpwhcBQK.mjs} +1 -1
- package/dist/.setup/{sdk-DPXiQ3jr.mjs → sdk-CRJQM2N0.mjs} +33 -47
- package/dist/.setup/{secret-contract-DxyzKSzf.mjs → secret-contract-AKnr45nw.mjs} +2 -3
- package/dist/.setup/{secret-contract-api-Dukgvike.mjs → secret-contract-api-DMSwMIxd.mjs} +1 -1
- package/dist/.setup/{send-HHAbKARg.mjs → send-QWCT3NT9.mjs} +58 -44
- package/dist/.setup/{send-currentness-DGxiiBn9.mjs → send-currentness-D1x6YP9O.mjs} +2 -4
- package/dist/.setup/{setup-bootstrap-DaT2j28V.mjs → setup-bootstrap-DrBapwjQ.mjs} +4 -5
- package/dist/.setup/{setup-core-DcqQbLZv.mjs → setup-core-B4sVj_9e.mjs} +13 -20
- package/dist/.setup/setup-plugin-api-t9yhI-Tq.mjs +2 -0
- package/dist/.setup/sqlite-state-D6Zpz1q1.mjs +36 -0
- package/dist/.setup/{startup-verification-UkaoSldm.mjs → startup-verification-DfOuAruK.mjs} +5 -5
- package/dist/.setup/{state-layout-walk-BQMgMykU.mjs → state-layout-walk-BqCZTHpp.mjs} +2 -3
- package/dist/.setup/{storage-C3N6YZIn.mjs → storage-CCarF_gm.mjs} +9 -10
- package/dist/.setup/{storage-paths-B51JM-pC.mjs → storage-paths-e_Vq6cvw.mjs} +1 -2
- package/dist/.setup/{subagent-hooks-CfGAysJi.mjs → subagent-hooks-BdbuojSv.mjs} +2 -3
- package/dist/.setup/{sync-cache-state-BKVaKRzQ.mjs → sync-cache-state-BMvqW4Ii.mjs} +5 -5
- package/dist/.setup/{sync-state-CWbp0QSY.mjs → sync-state-Cu1nagBV.mjs} +1 -2
- package/dist/.setup/{target-ids-HhcaKX1n.mjs → target-ids-DltG_ZHJ.mjs} +1 -2
- package/dist/.setup/{task-runner-DY3aKiQa.mjs → task-runner-CYyGHdNW.mjs} +1 -2
- package/dist/.setup/{thread-binding-api-BvuaKpd0.mjs → thread-binding-api-OtSciHmZ.mjs} +2 -3
- package/dist/.setup/{thread-bindings-891JsKXF.mjs → thread-bindings-jNXWItIL.mjs} +54 -23
- package/dist/.setup/{thread-bindings-shared-QmZOfX9Q.mjs → thread-bindings-shared-DEAGGuDA.mjs} +6 -3
- package/dist/.setup/{tool-actions-8mXdq9OV.mjs → tool-actions-4sdtsvN2.mjs} +25 -25
- package/dist/.setup/{url-validation-By_2hsXr.mjs → url-validation-DesoKUns.mjs} +1 -2
- package/dist/.setup/{verification-CcZIVL8P.mjs → verification-DQu-OS0V.mjs} +4 -5
- package/dist/.source-module-urls/1cd4d4ff8d44e1c8b830932b44d7cf8a7f3350e09e169910e1d7a85e131b7bea.json +1 -1
- package/dist/api.js +8 -8
- package/dist/auth-presence.js +2 -3
- package/dist/channel-plugin-api.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/contract-api.js +2 -2
- package/dist/doctor-contract-api.js +14 -16
- package/dist/helper-api.js +3 -3
- package/dist/index.js +3 -4
- package/dist/plugin-entry.handlers.runtime.js +3 -4
- package/dist/runtime-api.js +7 -8
- package/dist/runtime-setter-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/session-binding-contract-api.js +2 -2
- package/dist/setup-entry.js +4 -5
- package/dist/setup-plugin-api.js +1 -1
- package/dist/subagent-hooks-api.js +2 -3
- package/dist/thread-binding-api.js +1 -1
- package/dist/thread-bindings-runtime.js +1 -1
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +45 -1
- package/node_modules/@openclaw/fs-safe/README.md +4 -0
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic-io.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic-io.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-options.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-options.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/errors.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.js +1 -11
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.js +2 -3
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts +3 -3
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +30 -4
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +7 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.js +30 -4
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store.js +5 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +9 -0
- package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +4 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +19 -13
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.js +27 -5
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.js +84 -7
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.js +0 -11
- package/node_modules/@openclaw/fs-safe/dist/prepare-directory-mode.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/prepare-directory-mode.js +61 -0
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +2 -1
- package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/realpath.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +8 -6
- package/node_modules/@openclaw/fs-safe/dist/replace-file-types.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file.js +20 -13
- package/node_modules/@openclaw/fs-safe/dist/root-context.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/root-create-native.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-create-native.js +18 -9
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-errors.js +9 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/root-mkdir-native.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-mkdir-native.js +35 -16
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +6 -2
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +32 -20
- package/node_modules/@openclaw/fs-safe/dist/root-path.js +32 -26
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-file.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +5 -4
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +3 -2
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.js +8 -9
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/types.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +12 -3
- package/node_modules/@openclaw/fs-safe/dist/windows-security-helper.exe +0 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.js +10 -12
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +3 -3
- package/node_modules/@openclaw/fs-safe/docs/atomic.md +16 -3
- package/node_modules/@openclaw/fs-safe/docs/compiler-qualification.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +27 -18
- package/node_modules/@openclaw/fs-safe/docs/errors.md +3 -1
- package/node_modules/@openclaw/fs-safe/docs/file-store.md +14 -2
- package/node_modules/@openclaw/fs-safe/docs/in-place-write.md +31 -0
- package/node_modules/@openclaw/fs-safe/docs/install.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/json-store.md +6 -1
- package/node_modules/@openclaw/fs-safe/docs/json.md +5 -1
- package/node_modules/@openclaw/fs-safe/docs/path-prefix.md +14 -4
- package/node_modules/@openclaw/fs-safe/docs/public-api.md +4 -2
- package/node_modules/@openclaw/fs-safe/docs/secret-file.md +5 -1
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +4 -0
- package/node_modules/@openclaw/fs-safe/docs/temp.md +9 -1
- package/node_modules/@openclaw/fs-safe/docs/types.md +5 -1
- package/node_modules/@openclaw/fs-safe/package.json +12 -12
- 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 +57 -17
- package/node_modules/@tokenizer/inflate/lib/ZipHandler.d.ts +12 -1
- package/node_modules/@tokenizer/inflate/lib/ZipHandler.js +127 -57
- package/node_modules/@tokenizer/inflate/lib/ZipLimitError.d.ts +18 -4
- package/node_modules/@tokenizer/inflate/lib/ZipLimitError.js +1 -1
- package/node_modules/@tokenizer/inflate/lib/index.d.ts +1 -1
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/LICENSE.txt +21 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/README.md +736 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/AbortSignal.d.ts +2 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/AbortSignal.js +7 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/AbstractTokenizer.d.ts +117 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/AbstractTokenizer.js +204 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BlobTokenizer.d.ts +29 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BlobTokenizer.js +57 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BufferSizeError.d.ts +19 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BufferSizeError.js +27 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BufferTokenizer.d.ts +29 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BufferTokenizer.js +51 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/FileTokenizer.d.ts +47 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/FileTokenizer.js +83 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/NotRegularFileError.d.ts +5 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/NotRegularFileError.js +8 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/ReadStreamTokenizer.d.ts +34 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/ReadStreamTokenizer.js +140 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/TokenizerBoundaryError.d.ts +7 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/TokenizerBoundaryError.js +10 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/TokenizerView.d.ts +9 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/TokenizerView.js +184 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/core.d.ts +44 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/core.js +56 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/index.d.ts +17 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/index.js +46 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/isRandomAccessTokenizer.d.ts +6 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/isRandomAccessTokenizer.js +10 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/AbstractStreamReader.d.ts +54 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/AbstractStreamReader.js +73 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/Deferred.d.ts +6 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/Deferred.js +10 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/Errors.d.ts +10 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/Errors.js +16 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/StreamReader.d.ts +34 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/StreamReader.js +125 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamByobReader.d.ts +14 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamByobReader.js +29 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamDefaultReader.d.ts +19 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamDefaultReader.js +67 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamReader.d.ts +24 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamReader.js +13 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamReaderFactory.d.ts +5 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamReaderFactory.js +19 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/index.d.ts +6 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/index.js +5 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/types.d.ts +163 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/types.js +1 -0
- package/node_modules/@tokenizer/inflate/node_modules/strtok3/package.json +97 -0
- package/node_modules/@tokenizer/inflate/package.json +5 -5
- package/node_modules/fake-indexeddb/README.md +7 -7
- package/node_modules/fake-indexeddb/build/cjs/lib/Index.js +47 -22
- package/node_modules/fake-indexeddb/build/cjs/lib/ObjectStore.js +4 -2
- package/node_modules/fake-indexeddb/build/cjs/lib/RecordStore.js +14 -9
- package/node_modules/fake-indexeddb/build/esm/lib/Index.js +47 -22
- package/node_modules/fake-indexeddb/build/esm/lib/ObjectStore.js +4 -2
- package/node_modules/fake-indexeddb/build/esm/lib/RecordStore.js +14 -9
- package/node_modules/fake-indexeddb/package.json +1 -1
- package/node_modules/file-type/node_modules/strtok3/README.md +154 -9
- package/node_modules/file-type/node_modules/strtok3/lib/AbstractTokenizer.d.ts +3 -0
- package/node_modules/file-type/node_modules/strtok3/lib/AbstractTokenizer.js +12 -4
- package/node_modules/file-type/node_modules/strtok3/lib/BlobTokenizer.js +1 -0
- package/node_modules/file-type/node_modules/strtok3/lib/BufferTokenizer.js +2 -1
- package/node_modules/file-type/node_modules/strtok3/lib/FileTokenizer.d.ts +1 -1
- package/node_modules/file-type/node_modules/strtok3/lib/FileTokenizer.js +3 -3
- package/node_modules/file-type/node_modules/strtok3/lib/ReadStreamTokenizer.js +17 -2
- package/node_modules/file-type/node_modules/strtok3/lib/TokenizerBoundaryError.d.ts +7 -0
- package/node_modules/file-type/node_modules/strtok3/lib/TokenizerBoundaryError.js +10 -0
- package/node_modules/file-type/node_modules/strtok3/lib/TokenizerView.d.ts +9 -0
- package/node_modules/file-type/node_modules/strtok3/lib/TokenizerView.js +184 -0
- package/node_modules/file-type/node_modules/strtok3/lib/core.d.ts +4 -1
- package/node_modules/file-type/node_modules/strtok3/lib/core.js +5 -18
- package/node_modules/file-type/node_modules/strtok3/lib/index.js +28 -5
- package/node_modules/file-type/node_modules/strtok3/lib/isRandomAccessTokenizer.d.ts +6 -0
- package/node_modules/file-type/node_modules/strtok3/lib/isRandomAccessTokenizer.js +10 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/StreamReader.d.ts +4 -0
- package/node_modules/file-type/node_modules/strtok3/lib/stream/StreamReader.js +29 -8
- package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamReader.d.ts +12 -2
- package/node_modules/file-type/node_modules/strtok3/lib/types.d.ts +19 -2
- package/node_modules/file-type/node_modules/strtok3/package.json +10 -8
- package/node_modules/file-type/package.json +3 -3
- package/node_modules/file-type/source/detectors/ebml.js +31 -16
- package/node_modules/file-type/source/detectors/zip.js +21 -203
- package/node_modules/matrix-js-sdk/CHANGELOG.md +28 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.d.ts +30 -25
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js +91 -100
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.d.ts +6 -4
- package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.d.ts +2 -15
- 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/LivekitTransport.d.ts +36 -7
- package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.js +29 -2
- package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts +12 -51
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js +10 -66
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.d.ts +5 -10
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js +25 -44
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.d.ts +8 -8
- package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js +30 -22
- package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/ToDeviceKeyTransport.js +7 -8
- package/node_modules/matrix-js-sdk/lib/matrixrtc/ToDeviceKeyTransport.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.d.ts +8 -13
- 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 +2 -11
- 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 +6 -2
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.js +3 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.d.ts +5 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js +5 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.d.ts +9 -2
- 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 +8 -5
- package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.d.ts +17 -2
- 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 +88 -47
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room.d.ts +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 +8 -2
- package/node_modules/matrix-js-sdk/lib/models/room.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 +23 -2
- package/node_modules/matrix-js-sdk/lib/models/thread.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.d.ts +3 -3
- package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/SignInWithQRFlow.d.ts +95 -0
- package/node_modules/matrix-js-sdk/lib/rendezvous/SignInWithQRFlow.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/rendezvous/SignInWithQRFlow.js +3 -0
- package/node_modules/matrix-js-sdk/lib/rendezvous/SignInWithQRFlow.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/rendezvous/index.d.ts +1 -0
- 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/rust-crypto/index.js +5 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/package.json +3 -3
- package/node_modules/matrix-js-sdk/src/matrixrtc/CallMembership.ts +85 -95
- package/node_modules/matrix-js-sdk/src/matrixrtc/EncryptionManager.ts +6 -4
- package/node_modules/matrix-js-sdk/src/matrixrtc/IMembershipManager.ts +2 -15
- package/node_modules/matrix-js-sdk/src/matrixrtc/LivekitTransport.ts +58 -9
- package/node_modules/matrix-js-sdk/src/matrixrtc/MatrixRTCSession.ts +21 -80
- package/node_modules/matrix-js-sdk/src/matrixrtc/MembershipManager.ts +23 -40
- package/node_modules/matrix-js-sdk/src/matrixrtc/RTCEncryptionManager.ts +51 -39
- package/node_modules/matrix-js-sdk/src/matrixrtc/ToDeviceKeyTransport.ts +7 -7
- package/node_modules/matrix-js-sdk/src/matrixrtc/membershipData/rtc.ts +9 -23
- package/node_modules/matrix-js-sdk/src/matrixrtc/membershipData/session.ts +14 -2
- package/node_modules/matrix-js-sdk/src/matrixrtc/types.ts +6 -0
- package/node_modules/matrix-js-sdk/src/models/event-timeline-set.ts +19 -4
- package/node_modules/matrix-js-sdk/src/models/room-sticky-events.ts +92 -58
- package/node_modules/matrix-js-sdk/src/models/room.ts +8 -2
- package/node_modules/matrix-js-sdk/src/models/thread.ts +25 -3
- package/node_modules/matrix-js-sdk/src/rendezvous/MSC4108SignInWithQR.ts +3 -3
- package/node_modules/matrix-js-sdk/src/rendezvous/SignInWithQRFlow.ts +117 -0
- package/node_modules/matrix-js-sdk/src/rendezvous/index.ts +1 -0
- package/node_modules/matrix-js-sdk/src/rust-crypto/index.ts +5 -1
- package/node_modules/music-metadata/README.md +62 -67
- package/node_modules/music-metadata/lib/ParserFactory.js +3 -1
- package/node_modules/music-metadata/lib/aiff/AiffParser.d.ts +2 -0
- package/node_modules/music-metadata/lib/aiff/AiffParser.js +42 -3
- package/node_modules/music-metadata/lib/aiff/AiffToken.d.ts +1 -0
- package/node_modules/music-metadata/lib/aiff/AiffToken.js +1 -0
- package/node_modules/music-metadata/lib/apev2/APEv2Parser.js +11 -1
- package/node_modules/music-metadata/lib/asf/AsfObject.d.ts +2 -2
- package/node_modules/music-metadata/lib/asf/AsfObject.js +81 -111
- package/node_modules/music-metadata/lib/asf/AsfParser.js +5 -3
- package/node_modules/music-metadata/lib/asf/AsfTagMapper.js +27 -3
- package/node_modules/music-metadata/lib/asf/AsfUtil.d.ts +1 -1
- package/node_modules/music-metadata/lib/caf/CafParser.js +13 -2
- package/node_modules/music-metadata/lib/caf/CafToken.d.ts +2 -2
- package/node_modules/music-metadata/lib/caf/CafToken.js +9 -2
- package/node_modules/music-metadata/lib/common/Allocation.d.ts +6 -0
- package/node_modules/music-metadata/lib/common/Allocation.js +18 -0
- package/node_modules/music-metadata/lib/common/GenericTagMapper.js +1 -1
- package/node_modules/music-metadata/lib/common/MetadataCollector.d.ts +2 -0
- package/node_modules/music-metadata/lib/common/MetadataCollector.js +21 -4
- package/node_modules/music-metadata/lib/common/Util.d.ts +4 -0
- package/node_modules/music-metadata/lib/common/Util.js +34 -1
- package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.d.ts +4 -1
- package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.js +32 -36
- package/node_modules/music-metadata/lib/ebml/EbmlIterator.js +6 -2
- package/node_modules/music-metadata/lib/flac/FlacParser.js +2 -1
- package/node_modules/music-metadata/lib/id3v2/FrameParser.d.ts +7 -3
- package/node_modules/music-metadata/lib/id3v2/FrameParser.js +91 -46
- package/node_modules/music-metadata/lib/id3v2/ID3v22TagMapper.js +6 -0
- package/node_modules/music-metadata/lib/id3v2/ID3v24TagMapper.d.ts +5 -0
- package/node_modules/music-metadata/lib/id3v2/ID3v24TagMapper.js +6 -4
- package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.d.ts +2 -1
- package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.js +57 -15
- package/node_modules/music-metadata/lib/lrc/LyricsParser.d.ts +18 -2
- package/node_modules/music-metadata/lib/lrc/LyricsParser.js +14 -3
- package/node_modules/music-metadata/lib/mp4/Atom.d.ts +3 -3
- package/node_modules/music-metadata/lib/mp4/Atom.js +14 -7
- package/node_modules/music-metadata/lib/mp4/AtomToken.d.ts +25 -25
- package/node_modules/music-metadata/lib/mp4/AtomToken.js +136 -119
- package/node_modules/music-metadata/lib/mp4/MP4Parser.d.ts +16 -2
- package/node_modules/music-metadata/lib/mp4/MP4Parser.js +370 -132
- package/node_modules/music-metadata/lib/mp4/MP4TagMapper.js +30 -0
- package/node_modules/music-metadata/lib/musepack/sv8/StreamVersion8.js +19 -8
- package/node_modules/music-metadata/lib/ogg/OggParser.js +6 -2
- package/node_modules/music-metadata/lib/ogg/OggToken.d.ts +2 -2
- package/node_modules/music-metadata/lib/ogg/OggToken.js +3 -9
- package/node_modules/music-metadata/lib/ogg/flac/FlacStream.d.ts +9 -11
- package/node_modules/music-metadata/lib/ogg/flac/FlacStream.js +111 -27
- package/node_modules/music-metadata/lib/ogg/speex/SpeexStream.js +6 -0
- package/node_modules/music-metadata/lib/ogg/theora/TheoraStream.js +6 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.d.ts +2 -2
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.js +8 -4
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.d.ts +1 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.js +23 -3
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisTagMapper.d.ts +4 -0
- package/node_modules/music-metadata/lib/ogg/vorbis/VorbisTagMapper.js +15 -2
- package/node_modules/music-metadata/lib/riff/RiffInfoTagMap.js +1 -0
- package/node_modules/music-metadata/lib/type.d.ts +23 -6
- package/node_modules/music-metadata/lib/wav/BwfChunk.d.ts +12 -2
- package/node_modules/music-metadata/lib/wav/BwfChunk.js +39 -11
- package/node_modules/music-metadata/lib/wav/WaveParser.js +13 -2
- package/node_modules/music-metadata/package.json +2 -1
- package/node_modules/typebox/build/format/date_time.d.mts +2 -1
- package/node_modules/typebox/build/format/date_time.mjs +12 -3
- package/node_modules/typebox/package.json +1 -1
- package/package.json +9 -9
- package/dist/.setup/setup-plugin-api-Cg4TelGZ.mjs +0 -2
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/auto.js +0 -54
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/binarySearchTree.js +0 -413
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/fakeIndexedDB.js +0 -1018
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/forceCloseDatabase.js +0 -99
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/getAll.js +0 -707
- package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/memoryLeaks.js +0 -42
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/auto.js +0 -52
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/binarySearchTree.js +0 -409
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/fakeIndexedDB.js +0 -1014
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/forceCloseDatabase.js +0 -95
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/getAll.js +0 -703
- package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/memoryLeaks.js +0 -38
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import initDebug from 'debug';
|
|
2
|
+
import { createTokenizerView } from 'strtok3/core';
|
|
2
3
|
import { StringType, UINT32_LE } from 'token-types';
|
|
3
4
|
import { ZipLimitError } from './ZipLimitError.js';
|
|
4
5
|
import { DataDescriptor, EndOfCentralDirectoryRecordToken, FileHeader, LocalFileHeaderToken, Signature } from './ZipToken.js';
|
|
@@ -9,17 +10,30 @@ function signatureToArray(signature) {
|
|
|
9
10
|
}
|
|
10
11
|
const debug = initDebug('tokenizer:inflate');
|
|
11
12
|
const syncBufferSize = 256 * 1024;
|
|
12
|
-
const ddSignatureArray = signatureToArray(Signature.DataDescriptor);
|
|
13
13
|
const eocdSignatureBytes = signatureToArray(Signature.EndOfCentralDirectory);
|
|
14
14
|
export class ZipHandler {
|
|
15
15
|
constructor(tokenizer, options = {}) {
|
|
16
16
|
this.tokenizer = tokenizer;
|
|
17
17
|
this.syncBuffer = new Uint8Array(syncBufferSize);
|
|
18
|
+
this.scannedBytes = 0;
|
|
19
|
+
this.descriptorScannedBytes = 0;
|
|
18
20
|
this.limits = {
|
|
21
|
+
maxEntryCount: options.maxEntryCount ?? Number.POSITIVE_INFINITY,
|
|
22
|
+
maxTotalScanBytes: options.maxTotalScanBytes ?? Number.POSITIVE_INFINITY,
|
|
23
|
+
maxTotalDataDescriptorScanBytes: options.maxTotalDataDescriptorScanBytes ?? Number.POSITIVE_INFINITY,
|
|
24
|
+
maxSkippedEntrySize: options.maxSkippedEntrySize ?? Number.POSITIVE_INFINITY,
|
|
19
25
|
maxDataDescriptorScanBytes: options.maxDataDescriptorScanBytes ?? Number.POSITIVE_INFINITY,
|
|
20
26
|
maxCompressedSize: options.maxCompressedSize ?? Number.POSITIVE_INFINITY,
|
|
21
27
|
maxUncompressedSize: options.maxUncompressedSize ?? Number.POSITIVE_INFINITY
|
|
22
28
|
};
|
|
29
|
+
this.useCentralDirectory = options.useCentralDirectory ?? true;
|
|
30
|
+
this.allowTruncatedDataDescriptor = options.allowTruncatedDataDescriptor ?? false;
|
|
31
|
+
if (typeof this.useCentralDirectory !== 'boolean') {
|
|
32
|
+
throw new TypeError('useCentralDirectory must be a boolean');
|
|
33
|
+
}
|
|
34
|
+
if (typeof this.allowTruncatedDataDescriptor !== 'boolean') {
|
|
35
|
+
throw new TypeError('allowTruncatedDataDescriptor must be a boolean');
|
|
36
|
+
}
|
|
23
37
|
for (const [name, limit] of Object.entries(this.limits)) {
|
|
24
38
|
if (limit !== Number.POSITIVE_INFINITY && (!Number.isSafeInteger(limit) || limit <= 0)) {
|
|
25
39
|
throw new RangeError(`${name} must be a positive safe integer or Infinity`);
|
|
@@ -32,6 +46,27 @@ export class ZipHandler {
|
|
|
32
46
|
throw new ZipLimitError(limit, size, this.limits[limit]);
|
|
33
47
|
}
|
|
34
48
|
}
|
|
49
|
+
resetTraversal() {
|
|
50
|
+
this.scannedBytes = 0;
|
|
51
|
+
this.descriptorScannedBytes = 0;
|
|
52
|
+
}
|
|
53
|
+
consumeBytes(length) {
|
|
54
|
+
this.checkLimit('maxTotalScanBytes', this.scannedBytes + length);
|
|
55
|
+
this.scannedBytes += length;
|
|
56
|
+
}
|
|
57
|
+
readToken(token, input = this.tokenizer) {
|
|
58
|
+
this.consumeBytes(token.len);
|
|
59
|
+
return input.readToken(token);
|
|
60
|
+
}
|
|
61
|
+
ignore(length, input = this.tokenizer) {
|
|
62
|
+
this.consumeBytes(length);
|
|
63
|
+
return input.ignore(length);
|
|
64
|
+
}
|
|
65
|
+
readData(length) {
|
|
66
|
+
this.consumeBytes(length);
|
|
67
|
+
const data = new Uint8Array(length);
|
|
68
|
+
return this.tokenizer.readBuffer(data).then(() => data);
|
|
69
|
+
}
|
|
35
70
|
checkEntrySize(header) {
|
|
36
71
|
this.checkLimit('maxCompressedSize', header.compressedSize);
|
|
37
72
|
this.checkLimit('maxUncompressedSize', header.uncompressedSize);
|
|
@@ -49,6 +84,7 @@ export class ZipHandler {
|
|
|
49
84
|
const randomReadTokenizer = this.tokenizer;
|
|
50
85
|
const chunkLength = Math.min(16 * 1024, randomReadTokenizer.fileInfo.size);
|
|
51
86
|
const buffer = this.syncBuffer.subarray(0, chunkLength);
|
|
87
|
+
this.consumeBytes(chunkLength);
|
|
52
88
|
await this.tokenizer.readBuffer(buffer, { position: randomReadTokenizer.fileInfo.size - chunkLength });
|
|
53
89
|
// Search the buffer from end to beginning for EOCD signature
|
|
54
90
|
// const signature = 0x06054b50;
|
|
@@ -64,84 +100,133 @@ export class ZipHandler {
|
|
|
64
100
|
return -1;
|
|
65
101
|
}
|
|
66
102
|
async readCentralDirectory() {
|
|
103
|
+
this.resetTraversal();
|
|
104
|
+
const entries = await this.centralDirectoryEntries();
|
|
105
|
+
if (!entries) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const files = [];
|
|
109
|
+
for await (const entry of entries) {
|
|
110
|
+
files.push(entry);
|
|
111
|
+
}
|
|
112
|
+
return files;
|
|
113
|
+
}
|
|
114
|
+
async centralDirectoryEntries() {
|
|
67
115
|
if (!this.tokenizer.supportsRandomAccess()) {
|
|
68
116
|
debug('Cannot reading central-directory without random-read support');
|
|
69
117
|
return;
|
|
70
118
|
}
|
|
71
119
|
debug('Reading central-directory...');
|
|
72
120
|
const pos = this.tokenizer.position;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
121
|
+
try {
|
|
122
|
+
const offset = await this.findEndOfCentralDirectoryLocator();
|
|
123
|
+
if (offset > 0) {
|
|
124
|
+
debug('Central-directory 32-bit signature found');
|
|
125
|
+
this.tokenizer.setPosition(offset);
|
|
126
|
+
const eocdHeader = await this.readToken(EndOfCentralDirectoryRecordToken);
|
|
127
|
+
return this.iterateDirectory(eocdHeader.offsetOfStartOfCd, eocdHeader.sizeOfCd, eocdHeader.nrOfEntriesOfSize);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
finally {
|
|
131
|
+
this.tokenizer.setPosition(pos);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
async *iterateDirectory(offset, size, count) {
|
|
135
|
+
const source = this.tokenizer;
|
|
136
|
+
const pos = source.position;
|
|
137
|
+
let directory;
|
|
138
|
+
let position = 0;
|
|
139
|
+
try {
|
|
140
|
+
source.setPosition(offset);
|
|
141
|
+
directory = createTokenizerView(source, size);
|
|
142
|
+
for (let n = 0; n < count; ++n) {
|
|
143
|
+
this.checkLimit('maxEntryCount', n + 1);
|
|
144
|
+
// Extraction between yields can move the source to a local header.
|
|
145
|
+
directory.setPosition(position);
|
|
146
|
+
const entry = await this.readToken(FileHeader, directory);
|
|
81
147
|
if (entry.signature !== Signature.CentralFileHeader) {
|
|
82
148
|
throw new Error('Expected Central-File-Header signature');
|
|
83
149
|
}
|
|
84
|
-
entry.filename = await this.
|
|
85
|
-
await this.
|
|
86
|
-
await this.
|
|
87
|
-
|
|
88
|
-
|
|
150
|
+
entry.filename = await this.readToken(new StringType(entry.filenameLength, 'utf-8'), directory);
|
|
151
|
+
await this.ignore(entry.extraFieldLength, directory);
|
|
152
|
+
await this.ignore(entry.fileCommentLength, directory);
|
|
153
|
+
position = directory.position;
|
|
154
|
+
yield entry;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
finally {
|
|
158
|
+
try {
|
|
159
|
+
await directory?.close();
|
|
160
|
+
}
|
|
161
|
+
finally {
|
|
162
|
+
source.setPosition(pos);
|
|
89
163
|
}
|
|
90
|
-
this.tokenizer.setPosition(pos);
|
|
91
|
-
return files;
|
|
92
164
|
}
|
|
93
|
-
this.tokenizer.setPosition(pos);
|
|
94
165
|
}
|
|
95
166
|
async unzip(fileCb) {
|
|
96
|
-
|
|
167
|
+
this.resetTraversal();
|
|
168
|
+
const entries = this.useCentralDirectory ? await this.centralDirectoryEntries() : undefined;
|
|
97
169
|
if (entries) {
|
|
98
170
|
// Use Central Directory to iterate over files
|
|
99
171
|
return this.iterateOverCentralDirectory(entries, fileCb);
|
|
100
172
|
}
|
|
101
173
|
// Scan Zip files for local-file-header
|
|
102
174
|
let stop = false;
|
|
175
|
+
let entryCount = 0;
|
|
103
176
|
do {
|
|
104
177
|
const zipHeader = await this.readLocalFileHeader();
|
|
105
178
|
if (!zipHeader) {
|
|
106
179
|
break;
|
|
107
180
|
}
|
|
181
|
+
this.checkLimit('maxEntryCount', ++entryCount);
|
|
108
182
|
const next = fileCb(zipHeader);
|
|
109
183
|
stop = !!next.stop;
|
|
110
184
|
let fileData;
|
|
111
|
-
await this.
|
|
185
|
+
await this.ignore(zipHeader.extraFieldLength);
|
|
112
186
|
if (next.handler) {
|
|
113
187
|
this.checkEntrySize(zipHeader);
|
|
114
188
|
}
|
|
189
|
+
else {
|
|
190
|
+
this.checkLimit('maxSkippedEntrySize', zipHeader.compressedSize);
|
|
191
|
+
}
|
|
115
192
|
if (zipHeader.dataDescriptor && zipHeader.compressedSize === 0) {
|
|
116
193
|
const chunks = [];
|
|
117
194
|
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);
|
|
195
|
+
const scanLimit = Math.min(this.limits.maxDataDescriptorScanBytes, this.limits.maxTotalDataDescriptorScanBytes - this.descriptorScannedBytes, this.limits.maxTotalScanBytes - this.scannedBytes, next.handler ? Number.POSITIVE_INFINITY : this.limits.maxSkippedEntrySize, next.handler ? this.limits.maxCompressedSize : Number.POSITIVE_INFINITY, next.handler && zipHeader.compressedMethod === 0 ? this.limits.maxUncompressedSize : Number.POSITIVE_INFINITY);
|
|
119
196
|
debug('Compressed-file-size unknown, scanning for next data-descriptor-signature....');
|
|
120
197
|
while (true) {
|
|
121
|
-
//
|
|
122
|
-
const peekLength = Math.min(syncBufferSize, scanLimit - totalSize +
|
|
198
|
+
// Retain a full descriptor overlap so its compressed-size field can be validated.
|
|
199
|
+
const peekLength = Math.min(syncBufferSize, scanLimit - totalSize + DataDescriptor.len);
|
|
123
200
|
const len = await this.tokenizer.peekBuffer(this.syncBuffer.subarray(0, peekLength), { mayBeLess: true });
|
|
124
|
-
const
|
|
125
|
-
|
|
201
|
+
const allowTruncated = this.allowTruncatedDataDescriptor && len < peekLength;
|
|
202
|
+
const nextHeaderIndex = findDescriptor(this.syncBuffer.subarray(0, len), totalSize, allowTruncated);
|
|
203
|
+
if (nextHeaderIndex < 0 && len < DataDescriptor.len && !allowTruncated) {
|
|
126
204
|
throw new Error('Expected data-descriptor-signature before end of input');
|
|
127
205
|
}
|
|
128
|
-
const size = nextHeaderIndex >= 0 ? nextHeaderIndex : len -
|
|
206
|
+
const size = nextHeaderIndex >= 0 ? nextHeaderIndex : allowTruncated ? len : len - DataDescriptor.len + 1;
|
|
207
|
+
if (size === 0) {
|
|
208
|
+
break;
|
|
209
|
+
}
|
|
129
210
|
this.checkLimit('maxDataDescriptorScanBytes', totalSize + size);
|
|
211
|
+
this.checkLimit('maxTotalDataDescriptorScanBytes', this.descriptorScannedBytes + size);
|
|
212
|
+
if (!next.handler) {
|
|
213
|
+
this.checkLimit('maxSkippedEntrySize', totalSize + size);
|
|
214
|
+
}
|
|
130
215
|
if (next.handler) {
|
|
131
216
|
this.checkLimit('maxCompressedSize', totalSize + size);
|
|
132
217
|
if (zipHeader.compressedMethod === 0) {
|
|
133
218
|
this.checkLimit('maxUncompressedSize', totalSize + size);
|
|
134
219
|
}
|
|
135
220
|
if (size > 0) {
|
|
136
|
-
const data =
|
|
137
|
-
await this.tokenizer.readBuffer(data);
|
|
221
|
+
const data = await this.readData(size);
|
|
138
222
|
chunks.push(data);
|
|
139
223
|
}
|
|
140
224
|
}
|
|
141
225
|
else {
|
|
142
|
-
await this.
|
|
226
|
+
await this.ignore(size);
|
|
143
227
|
}
|
|
144
228
|
totalSize += size;
|
|
229
|
+
this.descriptorScannedBytes += size;
|
|
145
230
|
if (nextHeaderIndex >= 0) {
|
|
146
231
|
break;
|
|
147
232
|
}
|
|
@@ -155,19 +240,18 @@ export class ZipHandler {
|
|
|
155
240
|
else {
|
|
156
241
|
if (next.handler) {
|
|
157
242
|
debug(`Reading compressed-file-data: ${zipHeader.compressedSize} bytes`);
|
|
158
|
-
fileData =
|
|
159
|
-
await this.tokenizer.readBuffer(fileData);
|
|
243
|
+
fileData = await this.readData(zipHeader.compressedSize);
|
|
160
244
|
await this.inflate(zipHeader, fileData, next.handler);
|
|
161
245
|
}
|
|
162
246
|
else {
|
|
163
247
|
debug(`Ignoring compressed-file-data: ${zipHeader.compressedSize} bytes`);
|
|
164
|
-
await this.
|
|
248
|
+
await this.ignore(zipHeader.compressedSize);
|
|
165
249
|
}
|
|
166
250
|
}
|
|
167
251
|
debug(`Reading data-descriptor at pos=${this.tokenizer.position}`);
|
|
168
252
|
if (zipHeader.dataDescriptor) {
|
|
169
253
|
// await this.tokenizer.ignore(DataDescriptor.len);
|
|
170
|
-
const dataDescriptor = await this.
|
|
254
|
+
const dataDescriptor = await this.readToken(DataDescriptor);
|
|
171
255
|
if (dataDescriptor.signature !== 0x08074b50) {
|
|
172
256
|
throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position - DataDescriptor.len}`);
|
|
173
257
|
}
|
|
@@ -175,17 +259,16 @@ export class ZipHandler {
|
|
|
175
259
|
} while (!stop);
|
|
176
260
|
}
|
|
177
261
|
async iterateOverCentralDirectory(entries, fileCb) {
|
|
178
|
-
for (const fileHeader of entries) {
|
|
262
|
+
for await (const fileHeader of entries) {
|
|
179
263
|
const next = fileCb(fileHeader);
|
|
180
264
|
if (next.handler) {
|
|
181
265
|
this.tokenizer.setPosition(fileHeader.relativeOffsetOfLocalHeader);
|
|
182
266
|
const zipHeader = await this.readLocalFileHeader();
|
|
183
267
|
if (zipHeader) {
|
|
184
|
-
await this.
|
|
268
|
+
await this.ignore(zipHeader.extraFieldLength);
|
|
185
269
|
this.checkEntrySize(fileHeader);
|
|
186
270
|
this.checkEntrySize(zipHeader);
|
|
187
|
-
const fileData =
|
|
188
|
-
await this.tokenizer.readBuffer(fileData);
|
|
271
|
+
const fileData = await this.readData(fileHeader.compressedSize);
|
|
189
272
|
await this.inflate(zipHeader, fileData, next.handler);
|
|
190
273
|
}
|
|
191
274
|
}
|
|
@@ -260,8 +343,8 @@ export class ZipHandler {
|
|
|
260
343
|
async readLocalFileHeader() {
|
|
261
344
|
const signature = await this.tokenizer.peekToken(UINT32_LE);
|
|
262
345
|
if (signature === Signature.LocalFileHeader) {
|
|
263
|
-
const header = await this.
|
|
264
|
-
header.filename = await this.
|
|
346
|
+
const header = await this.readToken(LocalFileHeaderToken);
|
|
347
|
+
header.filename = await this.readToken(new StringType(header.filenameLength, 'utf-8'));
|
|
265
348
|
return header;
|
|
266
349
|
}
|
|
267
350
|
if (signature === Signature.CentralFileHeader) {
|
|
@@ -273,27 +356,14 @@ export class ZipHandler {
|
|
|
273
356
|
throw new Error('Unexpected signature');
|
|
274
357
|
}
|
|
275
358
|
}
|
|
276
|
-
function
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
return -1;
|
|
282
|
-
}
|
|
283
|
-
// Search for the portion in the buffer
|
|
284
|
-
for (let i = 0; i <= bufferLength - portionLength; i++) {
|
|
285
|
-
let found = true;
|
|
286
|
-
for (let j = 0; j < portionLength; j++) {
|
|
287
|
-
if (buffer[i + j] !== portion[j]) {
|
|
288
|
-
found = false;
|
|
289
|
-
break;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
if (found) {
|
|
293
|
-
return i; // Return the starting offset
|
|
359
|
+
function findDescriptor(buffer, consumed, allowTruncated) {
|
|
360
|
+
for (let i = 0; i <= buffer.length - (allowTruncated ? 4 : DataDescriptor.len); i++) {
|
|
361
|
+
if (UINT32_LE.get(buffer, i) === Signature.DataDescriptor &&
|
|
362
|
+
(buffer.length - i < 12 || UINT32_LE.get(buffer, i + 8) === consumed + i)) {
|
|
363
|
+
return i;
|
|
294
364
|
}
|
|
295
365
|
}
|
|
296
|
-
return -1;
|
|
366
|
+
return -1;
|
|
297
367
|
}
|
|
298
368
|
function mergeArrays(chunks) {
|
|
299
369
|
// Concatenate chunks into a single Uint8Array
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
/** Opt-in
|
|
2
|
-
export interface
|
|
1
|
+
/** Opt-in ZIP processing limits. Byte limits exclude bounded descriptor lookahead. */
|
|
2
|
+
export interface ZipProcessingLimits {
|
|
3
|
+
/** Maximum entries visited in one traversal, including ignored entries. */
|
|
4
|
+
maxEntryCount?: number;
|
|
5
|
+
/** Maximum metadata and compressed-data bytes consumed in one traversal, excluding seek distances. */
|
|
6
|
+
maxTotalScanBytes?: number;
|
|
7
|
+
/** Maximum bytes scanned across all entries with unknown compressed sizes. */
|
|
8
|
+
maxTotalDataDescriptorScanBytes?: number;
|
|
9
|
+
/** Maximum compressed bytes skipped for one ignored entry. */
|
|
10
|
+
maxSkippedEntrySize?: number;
|
|
3
11
|
/** Maximum bytes scanned before a data descriptor, including ignored entries. */
|
|
4
12
|
maxDataDescriptorScanBytes?: number;
|
|
5
13
|
/** Maximum compressed bytes buffered for a selected entry. */
|
|
@@ -7,10 +15,16 @@ export interface ZipHandlerOptions {
|
|
|
7
15
|
/** Maximum decompressed bytes retained for a selected entry (including stored entries). */
|
|
8
16
|
maxUncompressedSize?: number;
|
|
9
17
|
}
|
|
18
|
+
export interface ZipHandlerOptions extends ZipProcessingLimits {
|
|
19
|
+
/** Use the central directory on random-access inputs. Defaults to true. */
|
|
20
|
+
useCentralDirectory?: boolean;
|
|
21
|
+
/** Deliver available entry data before a truncated/missing descriptor fails. Intended for detection. */
|
|
22
|
+
allowTruncatedDataDescriptor?: boolean;
|
|
23
|
+
}
|
|
10
24
|
/** A configured ZIP processing limit was exceeded. */
|
|
11
25
|
export declare class ZipLimitError extends RangeError {
|
|
12
|
-
readonly limit: keyof
|
|
26
|
+
readonly limit: keyof ZipProcessingLimits;
|
|
13
27
|
readonly requestedSize: number;
|
|
14
28
|
readonly maxSize: number;
|
|
15
|
-
constructor(limit: keyof
|
|
29
|
+
constructor(limit: keyof ZipProcessingLimits, requestedSize: number, maxSize: number);
|
|
16
30
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** A configured ZIP processing limit was exceeded. */
|
|
2
2
|
export class ZipLimitError extends RangeError {
|
|
3
3
|
constructor(limit, requestedSize, maxSize) {
|
|
4
|
-
super(`ZIP ${limit} exceeded: ${requestedSize}
|
|
4
|
+
super(`ZIP ${limit} exceeded: ${requestedSize} exceeds limit of ${maxSize}`);
|
|
5
5
|
this.limit = limit;
|
|
6
6
|
this.requestedSize = requestedSize;
|
|
7
7
|
this.maxSize = maxSize;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { GzipHandler } from './GzipHandler.js';
|
|
2
2
|
export { ZipHandler } from './ZipHandler.js';
|
|
3
|
-
export { type ZipHandlerOptions, ZipLimitError } from './ZipLimitError.js';
|
|
3
|
+
export { type ZipHandlerOptions, ZipLimitError, type ZipProcessingLimits } from './ZipLimitError.js';
|
|
4
4
|
export type { ILocalFileHeader } from './ZipToken.js';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright © 2026 Borewit
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|