@openclaw/whatsapp 2026.7.1-beta.2 → 2026.7.1-beta.4
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/{access-control-88UPniDc.js → access-control-DYE5dXna.js} +5 -3
- package/dist/{accounts-DgViSyJx.js → accounts-4YgwroRU.js} +1 -1
- package/dist/{action-runtime-hqza0J8B.js → action-runtime-DPahAqxV.js} +2 -2
- package/dist/action-runtime-api.js +1 -1
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/{active-listener-CFwkn3ho.js → active-listener-B4SDebQ6.js} +1 -1
- package/dist/api.js +14 -13
- package/dist/{approval-handler.runtime-9_SV7vhc.js → approval-handler.runtime-DNWS4aYQ.js} +1 -1
- package/dist/auth-presence.js +1 -1
- package/dist/{auth-store-ECx4h57q.js → auth-store-Db-wfApd.js} +23 -13
- package/dist/call-tool-api.js +233 -0
- package/dist/{channel-fcXxWXic.js → channel-BWp7h1uY.js} +44 -18
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-react-action-Dgy9uUMl.js → channel-react-action-CKJHL_Wf.js} +3 -3
- package/dist/{channel.runtime-B4ThooGF.js → channel.runtime-CAssfx9p.js} +5 -5
- package/dist/{channel.setup-C_WEdyJR.js → channel.setup-CURc5rEt.js} +2 -2
- package/dist/{config-schema-CROZuhT-.js → config-schema-mBX2nmn1.js} +4 -0
- package/dist/{connection-controller-u-tfAFhJ.js → connection-controller-DkbrFSIn.js} +6 -5
- package/dist/connection-controller-registry-TSX_udJp.js +22 -0
- package/dist/contract-api.js +1 -1
- package/dist/{quoted-message-CpA_ujXK.js → group-session-key-BhC1RQOE.js} +31 -2
- package/dist/{identity-CmsTmkKR.js → identity-Dqft3mFA.js} +2 -1
- package/dist/index.js +9 -2
- package/dist/light-runtime-api.js +3 -3
- package/dist/{login-8lHwLmXj.js → login-C48y0jlx.js} +14 -7
- package/dist/{login-qr-BEZZqrTb.js → login-qr-BjId7dll.js} +7 -7
- package/dist/login-qr-runtime.js +1 -1
- package/dist/{monitor-BqkJ4MpT.js → monitor-DD8bXohk.js} +249 -160
- package/dist/runtime-api.js +9 -9
- package/dist/{send-i8Xk5mBQ.js → send-C5CpFcBG.js} +27 -9
- package/dist/{send-api-DndiBJhN.js → send-api-DLlXl8CH.js} +6 -5
- package/dist/{session-WU4SVP8f.js → session-DriaHt7V.js} +3 -3
- package/dist/{session-errors-CbsoQqoy.js → session-errors-BAj9D2La.js} +1 -22
- package/dist/{setup-core-KjSBbWX4.js → setup-core-DH-DFPLY.js} +4 -4
- package/dist/{setup-finalize-WedNP30s.js → setup-finalize-c8dl34sO.js} +3 -3
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-IOdkbWsQ.js → setup-surface-DlWb0Z09.js} +3 -3
- package/dist/{socket-timing-DvMNkIge.js → socket-timing-DhbVFjah.js} +17 -5
- package/dist/{text-runtime-C88QkuU9.js → targets-runtime-C-GiVn6Y.js} +2 -3
- package/dist/text-runtime-DdX6-mC_.js +4 -0
- package/node_modules/@cacheable/memory/README.md +177 -0
- package/node_modules/@cacheable/memory/dist/index.cjs +867 -820
- package/node_modules/@cacheable/memory/dist/index.d.cts +382 -280
- package/node_modules/@cacheable/memory/dist/index.d.mts +412 -0
- package/node_modules/@cacheable/memory/dist/index.mjs +841 -0
- package/node_modules/@cacheable/memory/package.json +9 -9
- package/node_modules/@cacheable/utils/README.md +342 -8
- package/node_modules/@cacheable/utils/dist/index.cjs +1322 -619
- package/node_modules/@cacheable/utils/dist/index.d.cts +769 -173
- package/node_modules/@cacheable/utils/dist/index.d.mts +903 -0
- package/node_modules/@cacheable/utils/dist/index.mjs +1355 -0
- package/node_modules/@cacheable/utils/package.json +8 -8
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/assert/strict.d.ts +10 -1
- package/node_modules/@types/node/assert.d.ts +144 -17
- package/node_modules/@types/node/async_hooks.d.ts +9 -9
- package/node_modules/@types/node/buffer.d.ts +64 -30
- package/node_modules/@types/node/child_process.d.ts +17 -21
- package/node_modules/@types/node/cluster.d.ts +13 -13
- package/node_modules/@types/node/console.d.ts +1 -1
- package/node_modules/@types/node/crypto.d.ts +471 -575
- package/node_modules/@types/node/diagnostics_channel.d.ts +274 -32
- package/node_modules/@types/node/dns.d.ts +15 -15
- package/node_modules/@types/node/events.d.ts +3 -3
- package/node_modules/@types/node/ffi.d.ts +486 -0
- package/node_modules/@types/node/fs/promises.d.ts +7 -4
- package/node_modules/@types/node/fs.d.ts +24 -18
- package/node_modules/@types/node/globals.d.ts +4 -4
- package/node_modules/@types/node/http.d.ts +30 -5
- package/node_modules/@types/node/http2.d.ts +5 -1
- package/node_modules/@types/node/index.d.ts +1 -3
- package/node_modules/@types/node/inspector.d.ts +1 -1
- package/node_modules/@types/node/module.d.ts +16 -45
- package/node_modules/@types/node/net.d.ts +1 -1
- package/node_modules/@types/node/os.d.ts +2 -2
- package/node_modules/@types/node/package.json +4 -4
- package/node_modules/@types/node/perf_hooks.d.ts +1 -9
- package/node_modules/@types/node/process.d.ts +25 -12
- package/node_modules/@types/node/quic.d.ts +92 -11
- package/node_modules/@types/node/readline.d.ts +12 -11
- package/node_modules/@types/node/repl.d.ts +10 -10
- package/node_modules/@types/node/sqlite.d.ts +56 -1
- package/node_modules/@types/node/stream/iter.d.ts +150 -0
- package/node_modules/@types/node/stream/promises.d.ts +2 -2
- package/node_modules/@types/node/stream/web.d.ts +1 -1
- package/node_modules/@types/node/stream.d.ts +37 -5
- package/node_modules/@types/node/test/reporters.d.ts +1 -1
- package/node_modules/@types/node/test.d.ts +120 -10
- package/node_modules/@types/node/tls.d.ts +1 -1
- package/node_modules/@types/node/ts5.6/index.d.ts +2 -4
- package/node_modules/@types/node/ts5.7/index.d.ts +1 -3
- package/node_modules/@types/node/url.d.ts +3 -3
- package/node_modules/@types/node/util/types.d.ts +1 -1
- package/node_modules/@types/node/util.d.ts +22 -22
- package/node_modules/@types/node/v8.d.ts +85 -3
- package/node_modules/@types/node/vm.d.ts +9 -9
- package/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
- package/node_modules/@types/node/worker_threads.d.ts +10 -12
- package/node_modules/@types/node/zlib.d.ts +3 -3
- package/node_modules/cacheable/README.md +309 -30
- package/node_modules/cacheable/dist/index.cjs +1307 -1153
- package/node_modules/cacheable/dist/index.d.cts +741 -469
- package/node_modules/cacheable/dist/index.d.mts +766 -0
- package/node_modules/cacheable/dist/index.mjs +1210 -0
- package/node_modules/cacheable/package.json +10 -10
- package/node_modules/content-type/README.md +32 -57
- package/node_modules/content-type/dist/index.d.ts +26 -0
- package/node_modules/content-type/dist/index.js +170 -0
- package/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/content-type/package.json +35 -25
- package/node_modules/media-typer/README.md +19 -33
- package/node_modules/media-typer/dist/index.d.ts +29 -0
- package/node_modules/media-typer/dist/index.js +64 -0
- package/node_modules/media-typer/dist/index.js.map +1 -0
- package/node_modules/media-typer/package.json +37 -22
- package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.js +2 -2
- package/node_modules/music-metadata/lib/mp4/AtomToken.js +65 -13
- package/node_modules/music-metadata/lib/wav/WaveChunk.d.ts +10 -0
- package/node_modules/music-metadata/lib/wav/WaveChunk.js +13 -3
- package/node_modules/music-metadata/lib/wav/WaveParser.d.ts +1 -0
- package/node_modules/music-metadata/lib/wav/WaveParser.js +6 -5
- package/node_modules/music-metadata/package.json +5 -5
- package/node_modules/typebox/build/compile/validator.d.mts +2 -7
- package/node_modules/typebox/build/compile/validator.mjs +6 -36
- package/node_modules/typebox/build/error/errors.d.mts +1 -7
- package/node_modules/typebox/build/format/_idna.mjs +36 -6
- package/node_modules/typebox/build/format/_puny.mjs +4 -1
- package/node_modules/typebox/build/format/uuid.d.mts +2 -2
- package/node_modules/typebox/build/format/uuid.mjs +3 -3
- package/node_modules/typebox/build/guard/emit.d.mts +0 -4
- package/node_modules/typebox/build/guard/emit.mjs +0 -8
- package/node_modules/typebox/build/guard/guard.d.mts +4 -8
- package/node_modules/typebox/build/guard/guard.mjs +5 -13
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
- package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
- package/node_modules/typebox/build/schema/engine/schema.mjs +5 -10
- package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
- package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/types/index.mjs +0 -1
- package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
- package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
- package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
- package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
- package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
- package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
- package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
- package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
- package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
- package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
- package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
- package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
- package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
- package/node_modules/typebox/build/type/action/index.d.mts +7 -4
- package/node_modules/typebox/build/type/action/index.mjs +7 -4
- package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
- package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
- package/node_modules/typebox/build/type/action/module.d.mts +8 -7
- package/node_modules/typebox/build/type/action/module.mjs +7 -6
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
- package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -5
- package/node_modules/typebox/build/type/action/with.d.mts +11 -0
- package/node_modules/typebox/build/type/action/with.mjs +11 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
- package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
- package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
- package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
- package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
- package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
- package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/index.mjs +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
- package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
- package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
- package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
- package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
- package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
- package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
- package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
- 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 +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
- package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
- package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
- package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
- package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
- package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
- package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
- package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
- package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
- package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
- package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
- package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
- package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
- package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
- package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
- package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
- package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
- package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
- package/node_modules/typebox/build/type/extends/object.mjs +25 -3
- package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
- package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
- package/node_modules/typebox/build/type/extends/record.mjs +23 -0
- package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
- package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
- package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
- package/node_modules/typebox/build/type/extends/union.mjs +2 -2
- package/node_modules/typebox/build/type/script/mapping.d.mts +84 -99
- package/node_modules/typebox/build/type/script/mapping.mjs +81 -85
- package/node_modules/typebox/build/type/script/parser.d.mts +40 -40
- package/node_modules/typebox/build/type/script/parser.mjs +22 -22
- package/node_modules/typebox/build/type/script/script.d.mts +3 -4
- package/node_modules/typebox/build/type/script/script.mjs +3 -2
- package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
- package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
- package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
- package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
- package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
- package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
- package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
- package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
- package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
- package/node_modules/typebox/build/type/types/call.d.mts +3 -3
- package/node_modules/typebox/build/type/types/call.mjs +3 -2
- package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
- package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
- package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
- package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
- package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
- package/node_modules/typebox/build/type/types/enum.mjs +5 -0
- package/node_modules/typebox/build/type/types/index.d.mts +1 -4
- package/node_modules/typebox/build/type/types/index.mjs +1 -4
- package/node_modules/typebox/build/type/types/number.d.mts +1 -1
- package/node_modules/typebox/build/type/types/number.mjs +1 -1
- package/node_modules/typebox/build/type/types/record.d.mts +13 -7
- package/node_modules/typebox/build/type/types/record.mjs +15 -9
- package/node_modules/typebox/build/type/types/static.d.mts +2 -5
- package/node_modules/typebox/build/typebox.d.mts +4 -8
- package/node_modules/typebox/build/typebox.mjs +4 -8
- package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
- package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
- package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
- package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
- package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
- package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
- package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
- package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
- package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
- package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
- package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
- package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
- package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/index.d.mts +0 -1
- package/node_modules/typebox/build/value/index.mjs +0 -1
- package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
- package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
- package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
- package/node_modules/typebox/build/value/value.d.mts +0 -1
- package/node_modules/typebox/build/value/value.mjs +0 -1
- package/node_modules/typebox/package.json +25 -25
- package/node_modules/typebox/readme.md +97 -80
- package/node_modules/undici-types/agent.d.ts +0 -2
- package/node_modules/undici-types/client.d.ts +25 -19
- package/node_modules/undici-types/dispatcher.d.ts +7 -33
- package/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
- package/node_modules/undici-types/fetch.d.ts +24 -4
- package/node_modules/undici-types/h2c-client.d.ts +6 -6
- package/node_modules/undici-types/handlers.d.ts +1 -2
- package/node_modules/undici-types/header.d.ts +5 -0
- package/node_modules/undici-types/index.d.ts +3 -1
- package/node_modules/undici-types/interceptors.d.ts +1 -1
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/pool.d.ts +0 -2
- package/node_modules/undici-types/proxy-agent.d.ts +2 -2
- package/node_modules/undici-types/round-robin-pool.d.ts +0 -2
- package/node_modules/undici-types/snapshot-agent.d.ts +4 -0
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +2 -2
- package/node_modules/undici-types/webidl.d.ts +0 -1
- package/npm-shrinkwrap.json +49 -41
- package/openclaw.plugin.json +12 -0
- package/package.json +5 -5
- package/node_modules/@cacheable/memory/dist/index.d.ts +0 -310
- package/node_modules/@cacheable/memory/dist/index.js +0 -807
- package/node_modules/@cacheable/utils/dist/index.d.ts +0 -307
- package/node_modules/@cacheable/utils/dist/index.js +0 -630
- package/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/cacheable/dist/index.d.ts +0 -494
- package/node_modules/cacheable/dist/index.js +0 -1141
- package/node_modules/content-type/HISTORY.md +0 -29
- package/node_modules/content-type/index.js +0 -225
- package/node_modules/media-typer/HISTORY.md +0 -50
- package/node_modules/media-typer/index.js +0 -143
- package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
- package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
- package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
- package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
- package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
- package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
- package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
- package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
- package/node_modules/typebox/build/type/action/options.d.mts +0 -11
- package/node_modules/typebox/build/type/action/options.mjs +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
- package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
- package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
- package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/base.d.mts +0 -50
- package/node_modules/typebox/build/type/types/base.mjs +0 -84
- package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
- package/node_modules/typebox/build/type/types/promise.mjs +0 -29
- package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
- package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
- package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
- package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
- package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
- package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
- package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
- package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
- package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
- package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
- package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
- package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
- package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
- package/dist/{approval-resolver-e1hAVRRy.js → approval-resolver-DF-lu8k5.js} +1 -1
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
|
@@ -1,494 +0,0 @@
|
|
|
1
|
-
import { Stats, CacheableItem, WrapFunctionOptions, GetOrSetKey, GetOrSetFunctionOptions, HashAlgorithm } from '@cacheable/utils';
|
|
2
|
-
export { CacheableItem, Stats as CacheableStats, GetOrSetFunctionOptions, GetOrSetKey, GetOrSetOptions, HashAlgorithm, WrapOptions, WrapSyncOptions, calculateTtlFromExpiration, getCascadingTtl, getOrSet, hash, shorthandToMilliseconds, shorthandToTime, wrap, wrapSync } from '@cacheable/utils';
|
|
3
|
-
import { Hookified, HookifiedOptions } from 'hookified';
|
|
4
|
-
import { Keyv, KeyvStoreAdapter, StoredDataRaw } from 'keyv';
|
|
5
|
-
export { Keyv, KeyvHooks, KeyvOptions, KeyvStoreAdapter } from 'keyv';
|
|
6
|
-
import { Qified, MessageProvider } from 'qified';
|
|
7
|
-
export { CacheableMemory, CacheableMemoryOptions, KeyvCacheableMemory, KeyvCacheableMemoryOptions, createKeyv } from '@cacheable/memory';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Events emitted by CacheableSync
|
|
11
|
-
*/
|
|
12
|
-
declare enum CacheableSyncEvents {
|
|
13
|
-
ERROR = "error",
|
|
14
|
-
SET = "cache:set",
|
|
15
|
-
DELETE = "cache:delete"
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Configuration options for CacheableSync
|
|
19
|
-
*/
|
|
20
|
-
type CacheableSyncOptions = {
|
|
21
|
-
/**
|
|
22
|
-
* Qified instance or message provider(s) for synchronization
|
|
23
|
-
*/
|
|
24
|
-
qified: Qified | MessageProvider | MessageProvider[];
|
|
25
|
-
/**
|
|
26
|
-
* The namespace for sync events. It can be a string or a function that returns a string.
|
|
27
|
-
* When set, event names will be prefixed with the namespace (e.g., "my-namespace::cache:set")
|
|
28
|
-
*/
|
|
29
|
-
namespace?: string | (() => string);
|
|
30
|
-
} & HookifiedOptions;
|
|
31
|
-
type CacheableSyncItem = {
|
|
32
|
-
cacheId: string;
|
|
33
|
-
key: string;
|
|
34
|
-
value?: unknown;
|
|
35
|
-
ttl?: number;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* CacheableSync provides synchronization capabilities for cacheable items
|
|
39
|
-
* using message providers from Qified
|
|
40
|
-
*/
|
|
41
|
-
declare class CacheableSync extends Hookified {
|
|
42
|
-
private _qified;
|
|
43
|
-
private _namespace?;
|
|
44
|
-
private _storage?;
|
|
45
|
-
private _cacheId?;
|
|
46
|
-
/**
|
|
47
|
-
* Creates an instance of CacheableSync
|
|
48
|
-
* @param options - Configuration options for CacheableSync
|
|
49
|
-
*/
|
|
50
|
-
constructor(options: CacheableSyncOptions);
|
|
51
|
-
/**
|
|
52
|
-
* Gets the Qified instance used for synchronization
|
|
53
|
-
* @returns The Qified instance
|
|
54
|
-
*/
|
|
55
|
-
get qified(): Qified;
|
|
56
|
-
/**
|
|
57
|
-
* Sets the Qified instance used for synchronization
|
|
58
|
-
* @param value - Either an existing Qified instance or MessageProvider(s)
|
|
59
|
-
*/
|
|
60
|
-
set qified(value: Qified | MessageProvider | MessageProvider[]);
|
|
61
|
-
/**
|
|
62
|
-
* Gets the namespace for sync events
|
|
63
|
-
* @returns The namespace or undefined if not set
|
|
64
|
-
*/
|
|
65
|
-
get namespace(): string | (() => string) | undefined;
|
|
66
|
-
/**
|
|
67
|
-
* Sets the namespace for sync events and resubscribes if needed
|
|
68
|
-
* @param namespace - The namespace string or function
|
|
69
|
-
*/
|
|
70
|
-
set namespace(namespace: string | (() => string) | undefined);
|
|
71
|
-
/**
|
|
72
|
-
* Publishes a cache event to all the cache instances
|
|
73
|
-
* @param data - The cache item data containing cacheId, key, value, and optional ttl
|
|
74
|
-
*/
|
|
75
|
-
publish(event: CacheableSyncEvents, data: CacheableSyncItem): Promise<void>;
|
|
76
|
-
/**
|
|
77
|
-
* Subscribes to sync events and updates the provided storage
|
|
78
|
-
* @param storage - The Keyv storage instance to update
|
|
79
|
-
* @param cacheId - The cache ID to identify this instance
|
|
80
|
-
*/
|
|
81
|
-
subscribe(storage: Keyv, cacheId: string): void;
|
|
82
|
-
/**
|
|
83
|
-
* Creates or returns a Qified instance from the provided value
|
|
84
|
-
* @param value - Either an existing Qified instance or MessageProvider(s)
|
|
85
|
-
* @returns A Qified instance configured with the provided message provider(s)
|
|
86
|
-
*/
|
|
87
|
-
createQified(value: Qified | MessageProvider | MessageProvider[]): Qified;
|
|
88
|
-
/**
|
|
89
|
-
* Gets the namespace prefix to use for event names
|
|
90
|
-
* @returns The resolved namespace string or undefined
|
|
91
|
-
*/
|
|
92
|
-
private getNamespace;
|
|
93
|
-
/**
|
|
94
|
-
* Prefixes an event name with the namespace if one is set
|
|
95
|
-
* @param event - The event to prefix
|
|
96
|
-
* @returns The prefixed event name or the original event
|
|
97
|
-
*/
|
|
98
|
-
private getPrefixedEvent;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
type CacheableOptions = {
|
|
102
|
-
/**
|
|
103
|
-
* The primary store for the cacheable instance
|
|
104
|
-
*/
|
|
105
|
-
primary?: Keyv | KeyvStoreAdapter;
|
|
106
|
-
/**
|
|
107
|
-
* The secondary store for the cacheable instance
|
|
108
|
-
*/
|
|
109
|
-
secondary?: Keyv | KeyvStoreAdapter;
|
|
110
|
-
/**
|
|
111
|
-
* Whether to enable statistics for the cacheable instance
|
|
112
|
-
*/
|
|
113
|
-
stats?: boolean;
|
|
114
|
-
/**
|
|
115
|
-
* Whether the secondary store is non-blocking mode. It is set to false by default.
|
|
116
|
-
* If it is set to true then the secondary store will not block the primary store.
|
|
117
|
-
*/
|
|
118
|
-
nonBlocking?: boolean;
|
|
119
|
-
/**
|
|
120
|
-
* The time-to-live for the cacheable instance and will be used as the default value.
|
|
121
|
-
* can be a number in milliseconds or a human-readable format such as `1s` for 1 second or `1h` for 1 hour
|
|
122
|
-
* or undefined if there is no time-to-live.
|
|
123
|
-
*/
|
|
124
|
-
ttl?: number | string;
|
|
125
|
-
/**
|
|
126
|
-
* The namespace for the cacheable instance. It can be a string or a function that returns a string.
|
|
127
|
-
*/
|
|
128
|
-
namespace?: string | (() => string);
|
|
129
|
-
/**
|
|
130
|
-
* The cacheId for the cacheable instance. This is primarily used for the wrap function to not have conflicts.
|
|
131
|
-
* If it is not set then it will be a random string that is generated
|
|
132
|
-
*/
|
|
133
|
-
cacheId?: string;
|
|
134
|
-
/**
|
|
135
|
-
* The sync instance for the cacheable instance to enable synchronization across cache instances
|
|
136
|
-
*/
|
|
137
|
-
sync?: CacheableSync | CacheableSyncOptions;
|
|
138
|
-
};
|
|
139
|
-
type GetOptions = {
|
|
140
|
-
/**
|
|
141
|
-
* If set, this will bypass the instances nonBlocking setting.
|
|
142
|
-
* @type {boolean}
|
|
143
|
-
*/
|
|
144
|
-
nonBlocking?: boolean;
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
declare enum CacheableHooks {
|
|
148
|
-
BEFORE_SET = "BEFORE_SET",
|
|
149
|
-
AFTER_SET = "AFTER_SET",
|
|
150
|
-
BEFORE_SET_MANY = "BEFORE_SET_MANY",
|
|
151
|
-
AFTER_SET_MANY = "AFTER_SET_MANY",
|
|
152
|
-
BEFORE_GET = "BEFORE_GET",
|
|
153
|
-
AFTER_GET = "AFTER_GET",
|
|
154
|
-
BEFORE_GET_MANY = "BEFORE_GET_MANY",
|
|
155
|
-
AFTER_GET_MANY = "AFTER_GET_MANY",
|
|
156
|
-
BEFORE_SECONDARY_SETS_PRIMARY = "BEFORE_SECONDARY_SETS_PRIMARY"
|
|
157
|
-
}
|
|
158
|
-
declare enum CacheableEvents {
|
|
159
|
-
ERROR = "error",
|
|
160
|
-
CACHE_HIT = "cache:hit",
|
|
161
|
-
CACHE_MISS = "cache:miss"
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
declare class Cacheable extends Hookified {
|
|
165
|
-
private _primary;
|
|
166
|
-
private _secondary;
|
|
167
|
-
private _nonBlocking;
|
|
168
|
-
private _ttl?;
|
|
169
|
-
private readonly _stats;
|
|
170
|
-
private _namespace?;
|
|
171
|
-
private _cacheId;
|
|
172
|
-
private _sync?;
|
|
173
|
-
/**
|
|
174
|
-
* Creates a new cacheable instance
|
|
175
|
-
* @param {CacheableOptions} [options] The options for the cacheable instance
|
|
176
|
-
*/
|
|
177
|
-
constructor(options?: CacheableOptions);
|
|
178
|
-
/**
|
|
179
|
-
* The namespace for the cacheable instance
|
|
180
|
-
* @returns {string | (() => string) | undefined} The namespace for the cacheable instance
|
|
181
|
-
*/
|
|
182
|
-
get namespace(): string | (() => string) | undefined;
|
|
183
|
-
/**
|
|
184
|
-
* Sets the namespace for the cacheable instance
|
|
185
|
-
* @param {string | (() => string) | undefined} namespace The namespace for the cacheable instance
|
|
186
|
-
* @returns {void}
|
|
187
|
-
*/
|
|
188
|
-
set namespace(namespace: string | (() => string) | undefined);
|
|
189
|
-
/**
|
|
190
|
-
* The statistics for the cacheable instance
|
|
191
|
-
* @returns {CacheableStats} The statistics for the cacheable instance
|
|
192
|
-
*/
|
|
193
|
-
get stats(): Stats;
|
|
194
|
-
/**
|
|
195
|
-
* The primary store for the cacheable instance
|
|
196
|
-
* @returns {Keyv} The primary store for the cacheable instance
|
|
197
|
-
*/
|
|
198
|
-
get primary(): Keyv;
|
|
199
|
-
/**
|
|
200
|
-
* Sets the primary store for the cacheable instance
|
|
201
|
-
* @param {Keyv} primary The primary store for the cacheable instance
|
|
202
|
-
*/
|
|
203
|
-
set primary(primary: Keyv);
|
|
204
|
-
/**
|
|
205
|
-
* The secondary store for the cacheable instance
|
|
206
|
-
* @returns {Keyv | undefined} The secondary store for the cacheable instance
|
|
207
|
-
*/
|
|
208
|
-
get secondary(): Keyv | undefined;
|
|
209
|
-
/**
|
|
210
|
-
* Sets the secondary store for the cacheable instance. If it is set to undefined then the secondary store is disabled.
|
|
211
|
-
* @param {Keyv | undefined} secondary The secondary store for the cacheable instance
|
|
212
|
-
* @returns {void}
|
|
213
|
-
*/
|
|
214
|
-
set secondary(secondary: Keyv | undefined);
|
|
215
|
-
/**
|
|
216
|
-
* Gets whether the secondary store is non-blocking mode. It is set to false by default.
|
|
217
|
-
* If it is set to true then the secondary store will not block the primary store.
|
|
218
|
-
*
|
|
219
|
-
* [Learn more about non-blocking mode](https://cacheable.org/docs/cacheable/#non-blocking-operations).
|
|
220
|
-
*
|
|
221
|
-
* @returns {boolean} Whether the cacheable instance is non-blocking
|
|
222
|
-
*/
|
|
223
|
-
get nonBlocking(): boolean;
|
|
224
|
-
/**
|
|
225
|
-
* Sets whether the secondary store is non-blocking mode. It is set to false by default.
|
|
226
|
-
* If it is set to true then the secondary store will not block the primary store.
|
|
227
|
-
*
|
|
228
|
-
* [Learn more about non-blocking mode](https://cacheable.org/docs/cacheable/#non-blocking-operations).
|
|
229
|
-
*
|
|
230
|
-
* @param {boolean} nonBlocking Whether the cacheable instance is non-blocking
|
|
231
|
-
* @returns {void}
|
|
232
|
-
*/
|
|
233
|
-
set nonBlocking(nonBlocking: boolean);
|
|
234
|
-
/**
|
|
235
|
-
* The time-to-live for the cacheable instance and will be used as the default value.
|
|
236
|
-
* can be a number in milliseconds or a human-readable format such as `1s` for 1 second or `1h` for 1 hour
|
|
237
|
-
* or undefined if there is no time-to-live.
|
|
238
|
-
*
|
|
239
|
-
* [Learn more about time-to-live](https://cacheable.org/docs/cacheable/#shorthand-for-time-to-live-ttl).
|
|
240
|
-
*
|
|
241
|
-
* @returns {number | string | undefined} The time-to-live for the cacheable instance in milliseconds, human-readable format or undefined
|
|
242
|
-
* @example
|
|
243
|
-
* ```typescript
|
|
244
|
-
* const cacheable = new Cacheable({ ttl: '1h' });
|
|
245
|
-
* console.log(cacheable.ttl); // 1h
|
|
246
|
-
* ```
|
|
247
|
-
*/
|
|
248
|
-
get ttl(): number | string | undefined;
|
|
249
|
-
/**
|
|
250
|
-
* Sets the time-to-live for the cacheable instance and will be used as the default value.
|
|
251
|
-
* If you set a number it is miliseconds, if you set a string it is a human-readable
|
|
252
|
-
* format such as `1s` for 1 second or `1h` for 1 hour. Setting undefined means that
|
|
253
|
-
* there is no time-to-live.
|
|
254
|
-
*
|
|
255
|
-
* [Learn more about time-to-live](https://cacheable.org/docs/cacheable/#shorthand-for-time-to-live-ttl).
|
|
256
|
-
*
|
|
257
|
-
* @param {number | string | undefined} ttl The time-to-live for the cacheable instance
|
|
258
|
-
* @example
|
|
259
|
-
* ```typescript
|
|
260
|
-
* const cacheable = new Cacheable();
|
|
261
|
-
* cacheable.ttl = '1h'; // Set the time-to-live to 1 hour
|
|
262
|
-
* ```
|
|
263
|
-
* or setting the time-to-live in milliseconds
|
|
264
|
-
* ```typescript
|
|
265
|
-
* const cacheable = new Cacheable();
|
|
266
|
-
* cacheable.ttl = 3600000; // Set the time-to-live to 1 hour
|
|
267
|
-
* ```
|
|
268
|
-
*/
|
|
269
|
-
set ttl(ttl: number | string | undefined);
|
|
270
|
-
/**
|
|
271
|
-
* The cacheId for the cacheable instance. This is primarily used for the wrap function to not have conflicts.
|
|
272
|
-
* If it is not set then it will be a random string that is generated
|
|
273
|
-
* @returns {string} The cacheId for the cacheable instance
|
|
274
|
-
*/
|
|
275
|
-
get cacheId(): string;
|
|
276
|
-
/**
|
|
277
|
-
* Sets the cacheId for the cacheable instance. This is primarily used for the wrap function to not have conflicts.
|
|
278
|
-
* If it is not set then it will be a random string that is generated
|
|
279
|
-
* @param {string} cacheId The cacheId for the cacheable instance
|
|
280
|
-
*/
|
|
281
|
-
set cacheId(cacheId: string);
|
|
282
|
-
/**
|
|
283
|
-
* Gets the sync instance for the cacheable instance
|
|
284
|
-
* @returns {CacheableSync | undefined} The sync instance for the cacheable instance
|
|
285
|
-
*/
|
|
286
|
-
get sync(): CacheableSync | undefined;
|
|
287
|
-
/**
|
|
288
|
-
* Sets the sync instance for the cacheable instance
|
|
289
|
-
* @param {CacheableSync | undefined} sync The sync instance for the cacheable instance
|
|
290
|
-
*/
|
|
291
|
-
set sync(sync: CacheableSync | undefined);
|
|
292
|
-
/**
|
|
293
|
-
* Sets the primary store for the cacheable instance
|
|
294
|
-
* @param {Keyv | KeyvStoreAdapter} primary The primary store for the cacheable instance
|
|
295
|
-
* @returns {void}
|
|
296
|
-
*/
|
|
297
|
-
setPrimary(primary: Keyv | KeyvStoreAdapter): void;
|
|
298
|
-
/**
|
|
299
|
-
* Sets the secondary store for the cacheable instance. If it is set to undefined then the secondary store is disabled.
|
|
300
|
-
* @param {Keyv | KeyvStoreAdapter} secondary The secondary store for the cacheable instance
|
|
301
|
-
* @returns {void}
|
|
302
|
-
*/
|
|
303
|
-
setSecondary(secondary: Keyv | KeyvStoreAdapter): void;
|
|
304
|
-
getNameSpace(): string | undefined;
|
|
305
|
-
/**
|
|
306
|
-
* Retrieves an entry from the cache.
|
|
307
|
-
*
|
|
308
|
-
* Checks the primary store first; if not found and a secondary store is configured,
|
|
309
|
-
* it will fetch from the secondary, repopulate the primary, and return the result.
|
|
310
|
-
*
|
|
311
|
-
* @typeParam T - The expected type of the stored value.
|
|
312
|
-
* @param {string} key - The cache key to retrieve.
|
|
313
|
-
* @param {GetOptions} - options such as to bypass `nonBlocking` for this call
|
|
314
|
-
* @returns {Promise<T | undefined>}
|
|
315
|
-
* A promise that resolves to the cached value if found, or `undefined`.
|
|
316
|
-
*/
|
|
317
|
-
get<T>(key: string, options?: GetOptions): Promise<T | undefined>;
|
|
318
|
-
/**
|
|
319
|
-
* Retrieves the raw entry from the cache including metadata like expiration.
|
|
320
|
-
*
|
|
321
|
-
* Checks the primary store first; if not found and a secondary store is configured,
|
|
322
|
-
* it will fetch from the secondary, repopulate the primary, and return the result.
|
|
323
|
-
*
|
|
324
|
-
* @typeParam T - The expected type of the stored value.
|
|
325
|
-
* @param {string} key - The cache key to retrieve.
|
|
326
|
-
* @param {GetOptions} - options such as to bypass `nonBlocking` for this call
|
|
327
|
-
* @returns {Promise<StoredDataRaw<T>>}
|
|
328
|
-
* A promise that resolves to the full raw data object if found, or undefined.
|
|
329
|
-
*/
|
|
330
|
-
getRaw<T>(key: string, options?: GetOptions): Promise<StoredDataRaw<T>>;
|
|
331
|
-
/**
|
|
332
|
-
* Retrieves multiple raw entries from the cache including metadata like expiration.
|
|
333
|
-
*
|
|
334
|
-
* Checks the primary store for each key; if a key is missing and a secondary store is configured,
|
|
335
|
-
* it will fetch from the secondary store, repopulate the primary store, and return the results.
|
|
336
|
-
*
|
|
337
|
-
* @typeParam T - The expected type of the stored values.
|
|
338
|
-
* @param {string[]} keys - The cache keys to retrieve.
|
|
339
|
-
* @param {GetOptions} - options such as to bypass `nonBlocking` on this call
|
|
340
|
-
* @returns {Promise<Array<StoredDataRaw<T>>>}
|
|
341
|
-
* A promise that resolves to an array of raw data objects.
|
|
342
|
-
*/
|
|
343
|
-
getManyRaw<T>(keys: string[], options?: GetOptions): Promise<Array<StoredDataRaw<T>>>;
|
|
344
|
-
/**
|
|
345
|
-
* Retrieves multiple entries from the cache.
|
|
346
|
-
* Checks the primary store for each key; if a key is missing and a secondary store is configured,
|
|
347
|
-
* it will fetch from the secondary store, repopulate the primary store, and return the results.
|
|
348
|
-
*
|
|
349
|
-
* @typeParam T - The expected type of the stored values.
|
|
350
|
-
* @param {string[]} keys - The cache keys to retrieve.
|
|
351
|
-
* @param {GetOptions} - options such as to bypass `nonBlocking` on this call
|
|
352
|
-
* @returns {Promise<Array<T | undefined>>}
|
|
353
|
-
* A promise that resolves to an array of cached values or `undefined` for misses.
|
|
354
|
-
*/
|
|
355
|
-
getMany<T>(keys: string[], options?: GetOptions): Promise<Array<T | undefined>>;
|
|
356
|
-
/**
|
|
357
|
-
* Sets the value of the key. If the secondary store is set then it will also set the value in the secondary store.
|
|
358
|
-
* @param {string} key the key to set the value of
|
|
359
|
-
* @param {T} value The value to set
|
|
360
|
-
* @param {number | string} [ttl] set a number it is miliseconds, set a string it is a human-readable
|
|
361
|
-
* format such as `1s` for 1 second or `1h` for 1 hour. Setting undefined means that it will use the default time-to-live.
|
|
362
|
-
* @returns {boolean} Whether the value was set
|
|
363
|
-
*/
|
|
364
|
-
set<T>(key: string, value: T, ttl?: number | string): Promise<boolean>;
|
|
365
|
-
/**
|
|
366
|
-
* Sets the values of the keys. If the secondary store is set then it will also set the values in the secondary store.
|
|
367
|
-
* @param {CacheableItem[]} items The items to set
|
|
368
|
-
* @returns {boolean} Whether the values were set
|
|
369
|
-
*/
|
|
370
|
-
setMany(items: CacheableItem[]): Promise<boolean>;
|
|
371
|
-
/**
|
|
372
|
-
* Takes the value of the key and deletes the key. If the key does not exist then it will return undefined.
|
|
373
|
-
* @param {string} key The key to take the value of
|
|
374
|
-
* @returns {Promise<T | undefined>} The value of the key or undefined if the key does not exist
|
|
375
|
-
*/
|
|
376
|
-
take<T>(key: string): Promise<T | undefined>;
|
|
377
|
-
/**
|
|
378
|
-
* Takes the values of the keys and deletes the keys. If the key does not exist then it will return undefined.
|
|
379
|
-
* @param {string[]} keys The keys to take the values of
|
|
380
|
-
* @returns {Promise<Array<T | undefined>>} The values of the keys or undefined if the key does not exist
|
|
381
|
-
*/
|
|
382
|
-
takeMany<T>(keys: string[]): Promise<Array<T | undefined>>;
|
|
383
|
-
/**
|
|
384
|
-
* Checks if the key exists in the primary store. If it does not exist then it will check the secondary store.
|
|
385
|
-
* @param {string} key The key to check
|
|
386
|
-
* @returns {Promise<boolean>} Whether the key exists
|
|
387
|
-
*/
|
|
388
|
-
has(key: string): Promise<boolean>;
|
|
389
|
-
/**
|
|
390
|
-
* Checks if the keys exist in the primary store. If it does not exist then it will check the secondary store.
|
|
391
|
-
* @param {string[]} keys The keys to check
|
|
392
|
-
* @returns {Promise<boolean[]>} Whether the keys exist
|
|
393
|
-
*/
|
|
394
|
-
hasMany(keys: string[]): Promise<boolean[]>;
|
|
395
|
-
/**
|
|
396
|
-
* Deletes the key from the primary store. If the secondary store is set then it will also delete the key from the secondary store.
|
|
397
|
-
* @param {string} key The key to delete
|
|
398
|
-
* @returns {Promise<boolean>} Whether the key was deleted
|
|
399
|
-
*/
|
|
400
|
-
delete(key: string): Promise<boolean>;
|
|
401
|
-
/**
|
|
402
|
-
* Deletes the keys from the primary store. If the secondary store is set then it will also delete the keys from the secondary store.
|
|
403
|
-
* @param {string[]} keys The keys to delete
|
|
404
|
-
* @returns {Promise<boolean>} Whether the keys were deleted
|
|
405
|
-
*/
|
|
406
|
-
deleteMany(keys: string[]): Promise<boolean>;
|
|
407
|
-
/**
|
|
408
|
-
* Clears the primary store. If the secondary store is set then it will also clear the secondary store.
|
|
409
|
-
* @returns {Promise<void>}
|
|
410
|
-
*/
|
|
411
|
-
clear(): Promise<void>;
|
|
412
|
-
/**
|
|
413
|
-
* Disconnects the primary store. If the secondary store is set then it will also disconnect the secondary store.
|
|
414
|
-
* @returns {Promise<void>}
|
|
415
|
-
*/
|
|
416
|
-
disconnect(): Promise<void>;
|
|
417
|
-
/**
|
|
418
|
-
* Wraps a function with caching
|
|
419
|
-
*
|
|
420
|
-
* [Learn more about wrapping functions](https://cacheable.org/docs/cacheable/#wrap--memoization-for-sync-and-async-functions).
|
|
421
|
-
* @param {Function} function_ The function to wrap
|
|
422
|
-
* @param {WrapOptions} [options] The options for the wrap function
|
|
423
|
-
* @returns {Function} The wrapped function
|
|
424
|
-
*/
|
|
425
|
-
wrap<T, Arguments extends any[]>(function_: (...arguments_: Arguments) => T, options?: WrapFunctionOptions): (...arguments_: Arguments) => T;
|
|
426
|
-
/**
|
|
427
|
-
* Retrieves the value associated with the given key from the cache. If the key is not found,
|
|
428
|
-
* invokes the provided function to calculate the value, stores it in the cache, and then returns it.
|
|
429
|
-
*
|
|
430
|
-
* @param {GetOrSetKey} key - The key to retrieve or set in the cache. This can also be a function that returns a string key.
|
|
431
|
-
* If a function is provided, it will be called with the cache options to generate the key.
|
|
432
|
-
* @param {() => Promise<T>} function_ - The asynchronous function that computes the value to be cached if the key does not exist.
|
|
433
|
-
* @param {GetOrSetFunctionOptions} [options] - Optional settings for caching, such as the time to live (TTL) or whether to cache errors.
|
|
434
|
-
* @return {Promise<T | undefined>} - A promise that resolves to the cached or newly computed value, or undefined if an error occurs and caching is not configured for errors.
|
|
435
|
-
*/
|
|
436
|
-
getOrSet<T>(key: GetOrSetKey, function_: () => Promise<T>, options?: GetOrSetFunctionOptions): Promise<T | undefined>;
|
|
437
|
-
/**
|
|
438
|
-
* Will hash an object asynchronously using the specified cryptographic algorithm.
|
|
439
|
-
* Use this for cryptographic algorithms (SHA-256, SHA-384, SHA-512).
|
|
440
|
-
* For non-cryptographic algorithms, use hashSync() for better performance.
|
|
441
|
-
* @param {any} object the object to hash
|
|
442
|
-
* @param {string} algorithm the hash algorithm to use. The default is 'SHA-256'
|
|
443
|
-
* @returns {Promise<string>} the hash of the object
|
|
444
|
-
*/
|
|
445
|
-
hash(object: any, algorithm?: HashAlgorithm): Promise<string>;
|
|
446
|
-
/**
|
|
447
|
-
* Will hash an object synchronously using the specified non-cryptographic algorithm.
|
|
448
|
-
* Use this for non-cryptographic algorithms (DJB2, FNV1, MURMER, CRC32).
|
|
449
|
-
* For cryptographic algorithms, use hash() instead.
|
|
450
|
-
* @param {any} object the object to hash
|
|
451
|
-
* @param {string} algorithm the hash algorithm to use. The default is 'djb2'
|
|
452
|
-
* @returns {string} the hash of the object
|
|
453
|
-
*/
|
|
454
|
-
hashSync(object: any, algorithm?: HashAlgorithm): string;
|
|
455
|
-
private setManyKeyv;
|
|
456
|
-
/**
|
|
457
|
-
* Processes a single key from secondary store for getRaw operation
|
|
458
|
-
* @param primary - the primary store to use
|
|
459
|
-
* @param secondary - the secondary store to use
|
|
460
|
-
* @param key - The key to retrieve from secondary store
|
|
461
|
-
* @returns Promise containing the result and TTL information
|
|
462
|
-
*/
|
|
463
|
-
private processSecondaryForGetRaw;
|
|
464
|
-
/**
|
|
465
|
-
* Processes a single key from secondary store for getRaw operation in non-blocking mode
|
|
466
|
-
* Non-blocking mode means we don't wait for secondary operations that update primary store
|
|
467
|
-
* @param primary - the primary store to use
|
|
468
|
-
* @param secondary - the secondary store to use
|
|
469
|
-
* @param key - The key to retrieve from secondary store
|
|
470
|
-
* @returns Promise containing the result and TTL information
|
|
471
|
-
*/
|
|
472
|
-
private processSecondaryForGetRawNonBlocking;
|
|
473
|
-
/**
|
|
474
|
-
* Processes missing keys from secondary store for getManyRaw operation
|
|
475
|
-
* @param primary - the primary store to use
|
|
476
|
-
* @param secondary - the secondary store to use
|
|
477
|
-
* @param keys - The original array of keys requested
|
|
478
|
-
* @param result - The result array from primary store (will be modified)
|
|
479
|
-
* @returns Promise<void>
|
|
480
|
-
*/
|
|
481
|
-
private processSecondaryForGetManyRaw;
|
|
482
|
-
/**
|
|
483
|
-
* Processes missing keys from secondary store for getManyRaw operation in non-blocking mode
|
|
484
|
-
* Non-blocking mode means we don't wait for secondary operations that update primary store
|
|
485
|
-
* @param secondary - the secondary store to use
|
|
486
|
-
* @param keys - The original array of keys requested
|
|
487
|
-
* @param result - The result array from primary store (will be modified)
|
|
488
|
-
* @returns Promise<void>
|
|
489
|
-
*/
|
|
490
|
-
private processSecondaryForGetManyRawNonBlocking;
|
|
491
|
-
private setTtl;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
export { Cacheable, CacheableEvents, CacheableHooks, type CacheableOptions, CacheableSync, CacheableSyncEvents, type CacheableSyncItem, type CacheableSyncOptions };
|