@qqbrowser/openclaw-qbot 0.10.8 → 0.10.10
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/README.md +1 -54
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/canvas-host/a2ui/a2ui.bundle.js +72 -71
- package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +21 -21
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +17 -7
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +18 -6
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +0 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js +15 -6
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js +2 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +0 -1
- package/node_modules/@aws-sdk/core/package.json +7 -5
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +157 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/constants.js +2 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromEnvSigningName.js +16 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +81 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js +8 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js +11 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js +10 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/index.js +4 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js +5 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js +7 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js +7 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js +8 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +70 -0
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js +9 -25
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/toStream.browser.js +11 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/toStream.js +7 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/throw-200-exceptions.js +9 -25
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/toStream.browser.js +8 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/toStream.js +4 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +15 -8
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +5 -5
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/models/errors.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/errors.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/package.json +18 -18
- package/node_modules/@aws-sdk/region-config-resolver/package.json +2 -2
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/util-endpoints/package.json +2 -2
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-external/nodable_entities.js +336 -0
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +26 -2
- package/node_modules/@aws-sdk/xml-builder/dist-es/xml-external/nodable_entities.js +332 -0
- package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.js +26 -2
- package/node_modules/@aws-sdk/xml-builder/package.json +3 -2
- package/node_modules/@clack/core/dist/index.mjs +16 -10
- package/node_modules/@clack/core/package.json +5 -2
- package/node_modules/@clack/prompts/dist/index.mjs +114 -107
- package/node_modules/@clack/prompts/package.json +7 -4
- package/node_modules/@google/genai/dist/index.cjs +207 -146
- package/node_modules/@google/genai/dist/index.mjs +208 -147
- package/node_modules/@google/genai/dist/node/index.cjs +235 -156
- package/node_modules/@google/genai/dist/node/index.mjs +236 -157
- package/node_modules/@google/genai/dist/tokenizer/node.cjs +15 -1
- package/node_modules/@google/genai/dist/tokenizer/node.mjs +15 -1
- package/node_modules/@google/genai/dist/vertex_internal/index.cjs +130 -117
- package/node_modules/@google/genai/dist/vertex_internal/index.js +130 -117
- package/node_modules/@google/genai/dist/web/index.mjs +201 -145
- package/node_modules/@google/genai/package.json +6 -1
- package/node_modules/@line/bot-sdk/node_modules/@types/node/package.json +2 -2
- package/node_modules/@nodable/entities/package.json +54 -0
- package/node_modules/@nodable/entities/src/EntityDecoder.js +543 -0
- package/node_modules/@nodable/entities/src/EntityEncoder.js +194 -0
- package/node_modules/@nodable/entities/src/entities.js +1177 -0
- package/node_modules/@nodable/entities/src/entityTries.js +49 -0
- package/node_modules/@nodable/entities/src/index.js +29 -0
- package/node_modules/@opentelemetry/context-async-hooks/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/context-async-hooks/package.json +2 -2
- package/node_modules/@opentelemetry/resources/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/resources/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/resources/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core/build/esm/propagation/composite.js +8 -3
- package/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js +101 -51
- package/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core/build/esnext/propagation/composite.js +8 -3
- package/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core/build/esnext/trace/TraceState.js +101 -51
- package/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core/build/src/propagation/composite.js +8 -3
- package/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core/build/src/trace/TraceState.js +101 -51
- package/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core/package.json +2 -2
- package/node_modules/@opentelemetry/resources/package.json +3 -3
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/exemplar/ExemplarReservoir.js +6 -5
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/state/AsyncMetricStorage.js +2 -2
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/state/DeltaMetricProcessor.js +4 -2
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/state/MultiWritableMetricStorage.js +4 -3
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/view/AttributesProcessor.js +10 -8
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/exemplar/ExemplarReservoir.js +6 -5
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/state/AsyncMetricStorage.js +2 -2
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/state/DeltaMetricProcessor.js +4 -2
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/state/MultiWritableMetricStorage.js +4 -3
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/view/AttributesProcessor.js +10 -8
- package/node_modules/@opentelemetry/sdk-metrics/build/src/exemplar/ExemplarReservoir.js +6 -5
- package/node_modules/@opentelemetry/sdk-metrics/build/src/state/AsyncMetricStorage.js +2 -2
- package/node_modules/@opentelemetry/sdk-metrics/build/src/state/DeltaMetricProcessor.js +4 -2
- package/node_modules/@opentelemetry/sdk-metrics/build/src/state/MultiWritableMetricStorage.js +4 -3
- package/node_modules/@opentelemetry/sdk-metrics/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/src/view/AttributesProcessor.js +10 -8
- package/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/build/esm/propagation/composite.js +8 -3
- package/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js +101 -51
- package/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/build/esnext/propagation/composite.js +8 -3
- package/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/build/esnext/trace/TraceState.js +101 -51
- package/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/build/src/propagation/composite.js +8 -3
- package/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/build/src/trace/TraceState.js +101 -51
- package/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/package.json +2 -2
- package/node_modules/@opentelemetry/sdk-metrics/package.json +4 -4
- package/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/TraceIdRatioBasedSampler.js +8 -3
- package/node_modules/@opentelemetry/sdk-trace-base/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/sampler/TraceIdRatioBasedSampler.js +8 -3
- package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/TraceIdRatioBasedSampler.js +8 -3
- package/node_modules/@opentelemetry/sdk-trace-base/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/core/build/esm/propagation/composite.js +8 -3
- package/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js +101 -51
- package/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/core/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/core/build/esnext/propagation/composite.js +8 -3
- package/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/core/build/esnext/trace/TraceState.js +101 -51
- package/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/core/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/core/build/src/propagation/composite.js +8 -3
- package/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/core/build/src/trace/TraceState.js +101 -51
- package/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/core/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/core/package.json +2 -2
- package/node_modules/@opentelemetry/sdk-trace-base/package.json +5 -5
- package/node_modules/@opentelemetry/sdk-trace-node/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/propagation/composite.js +8 -3
- package/node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js +101 -51
- package/node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esnext/propagation/composite.js +8 -3
- package/node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esnext/trace/TraceState.js +101 -51
- package/node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/src/propagation/composite.js +8 -3
- package/node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/src/trace/TraceState.js +101 -51
- package/node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/package.json +2 -2
- package/node_modules/@opentelemetry/sdk-trace-node/package.json +6 -6
- package/node_modules/@protobufjs/codegen/index.js +14 -1
- package/node_modules/@protobufjs/codegen/package.json +1 -1
- package/node_modules/@protobufjs/inquire/index.js +25 -5
- package/node_modules/@protobufjs/inquire/package.json +2 -2
- package/node_modules/@protobufjs/utf8/index.js +27 -28
- package/node_modules/@protobufjs/utf8/package.json +21 -21
- package/node_modules/@slack/bolt/dist/conversation-store.js +2 -0
- package/node_modules/@slack/bolt/dist/errors.js +1 -1
- package/node_modules/@slack/bolt/dist/receivers/HTTPModuleFunctions.js +7 -2
- package/node_modules/@slack/bolt/dist/receivers/HTTPReceiver.js +4 -3
- package/node_modules/@slack/bolt/package.json +12 -6
- package/node_modules/@slack/socket-mode/dist/package.json +1 -1
- package/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.js +7 -1
- package/node_modules/@slack/socket-mode/package.json +1 -1
- package/node_modules/@slack/types/package.json +1 -1
- package/node_modules/@slack/web-api/package.json +4 -5
- package/node_modules/@smithy/config-resolver/dist-cjs/index.js +22 -198
- package/node_modules/@smithy/config-resolver/dist-es/index.js +1 -3
- package/node_modules/@smithy/config-resolver/package.json +5 -30
- package/node_modules/@smithy/core/checksum.js +5 -0
- package/node_modules/@smithy/core/client.js +6 -0
- package/node_modules/@smithy/core/config.js +5 -0
- package/node_modules/@smithy/core/dist-cjs/index.js +6 -7
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/httpSigningMiddleware.js +4 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +8 -12
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.browser.js +202 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +259 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.native.js +229 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +1136 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +375 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +735 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +364 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +860 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +873 -3
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +866 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +627 -3
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +297 -20
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +800 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +827 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +5 -5
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +1452 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +996 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +1452 -0
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +2 -2
- package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +1 -3
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +2 -3
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js +1 -2
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +1 -2
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +2 -3
- package/node_modules/@smithy/core/dist-es/submodules/checksum/chunked-blob-reader/chunked-blob-reader.js +9 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/chunked-blob-reader/chunked-blob-reader.native.js +27 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/hash-blob-browser/blobHasher.js +8 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/HashCalculator.js +18 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/fileStreamHasher.js +24 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/readableStreamHasher.js +19 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/index.browser.js +6 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/index.js +5 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/index.native.js +6 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/md5-js/constants.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/md5-js/md5.js +168 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/index.js +26 -0
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/client.js +1 -1
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/command.js +2 -2
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/extensions/checksum.js +1 -1
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/extensions/defaultExtensionConfiguration.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/circularReplacer.js +12 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/createWaiter.js +48 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/poller.js +87 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/sleep.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/validate.js +17 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/waiter.js +35 -0
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js +2 -1
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/endpointsConfig/NodeUseFipsEndpointConfigOptions.js +2 -1
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/endpointsConfig/resolveCustomEndpointsConfig.js +1 -1
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/endpointsConfig/resolveEndpointsConfig.js +1 -1
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/regionConfig/checkRegion.js +1 -1
- package/node_modules/@smithy/{util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js → core/dist-es/submodules/config/defaults-mode/resolveDefaultsModeConfig.browser.js} +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/resolveDefaultsModeConfig.js +98 -0
- package/node_modules/@smithy/{util-defaults-mode-browser/dist-es → core/dist-es/submodules/config/defaults-mode}/resolveDefaultsModeConfig.native.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/config/index.browser.js +43 -0
- package/node_modules/@smithy/core/dist-es/submodules/config/index.js +29 -0
- package/node_modules/@smithy/core/dist-es/submodules/config/index.native.js +43 -0
- package/node_modules/@smithy/{node-config-provider/dist-es → core/dist-es/submodules/config/node-config-provider}/configLoader.js +2 -1
- package/node_modules/@smithy/{node-config-provider/dist-es → core/dist-es/submodules/config/node-config-provider}/fromEnv.js +1 -1
- package/node_modules/@smithy/{node-config-provider/dist-es → core/dist-es/submodules/config/node-config-provider}/fromSharedConfigFiles.js +3 -2
- package/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromStatic.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/config/property-provider/fromValue.js +1 -0
- package/node_modules/@smithy/{shared-ini-file-loader/dist-es → core/dist-es/submodules/config/shared-ini-file-loader}/getConfigFilepath.js +1 -1
- package/node_modules/@smithy/{shared-ini-file-loader/dist-es → core/dist-es/submodules/config/shared-ini-file-loader}/getCredentialsFilepath.js +1 -1
- package/node_modules/@smithy/{shared-ini-file-loader/dist-es → core/dist-es/submodules/config/shared-ini-file-loader}/getHomeDir.js +2 -2
- package/node_modules/@smithy/{shared-ini-file-loader/dist-es → core/dist-es/submodules/config/shared-ini-file-loader}/getSSOTokenFilepath.js +2 -2
- package/node_modules/@smithy/{shared-ini-file-loader/dist-es → core/dist-es/submodules/config/shared-ini-file-loader}/getSSOTokenFromFile.js +1 -1
- package/node_modules/@smithy/{shared-ini-file-loader/dist-es → core/dist-es/submodules/config/shared-ini-file-loader}/loadSharedConfigFiles.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.browser.js +22 -0
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.js +21 -0
- package/node_modules/@smithy/{middleware-endpoint/dist-es → core/dist-es/submodules/endpoints/middleware-endpoint}/adaptors/getEndpointFromConfig.js +1 -1
- package/node_modules/@smithy/{middleware-endpoint/dist-es → core/dist-es/submodules/endpoints/middleware-endpoint}/adaptors/getEndpointFromInstructions.js +28 -27
- package/node_modules/@smithy/{middleware-endpoint/dist-es → core/dist-es/submodules/endpoints/middleware-endpoint}/adaptors/getEndpointUrlConfig.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/toEndpointV1.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js +47 -0
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/getEndpointPlugin.js +26 -0
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointConfig.js +25 -0
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js +1 -1
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/utils/evaluateExpression.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +1 -1
- package/node_modules/@smithy/{eventstream-codec/dist-es → core/dist-es/submodules/event-streams/eventstream-codec}/HeaderMarshaller.js +1 -1
- package/node_modules/@smithy/{eventstream-codec/dist-es → core/dist-es/submodules/event-streams/eventstream-codec}/Int64.js +1 -1
- package/node_modules/@smithy/{eventstream-serde-browser/dist-es/EventStreamMarshaller.js → core/dist-es/submodules/event-streams/eventstream-serde/EventStreamMarshaller.browser.js} +6 -5
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/EventStreamMarshaller.js +45 -0
- package/node_modules/@smithy/{eventstream-serde-browser/dist-es → core/dist-es/submodules/event-streams/eventstream-serde}/utils.js +1 -1
- package/node_modules/@smithy/{eventstream-serde-universal/dist-es → core/dist-es/submodules/event-streams/eventstream-serde-universal}/EventStreamMarshaller.js +6 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/index.browser.js +14 -0
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/index.js +14 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +3 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +3 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +12 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/middleware-content-length/contentLengthMiddleware.js +39 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/querystring-builder/buildQueryString.js +21 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +1 -3
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +1 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/url-parser/parseUrl.js +18 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/index.browser.js +27 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/index.js +20 -0
- package/node_modules/@smithy/{middleware-retry/dist-es → core/dist-es/submodules/retry/middleware-retry}/configurations.js +4 -2
- package/node_modules/@smithy/{middleware-retry/dist-es → core/dist-es/submodules/retry/middleware-retry}/isStreamingPayload/isStreamingPayload.js +1 -1
- package/node_modules/@smithy/{middleware-retry/dist-es → core/dist-es/submodules/retry/middleware-retry}/omitRetryHeadersMiddleware.js +2 -2
- package/node_modules/@smithy/{middleware-retry/dist-es → core/dist-es/submodules/retry/middleware-retry}/parseRetryAfterHeader.js +1 -1
- package/node_modules/@smithy/{middleware-retry/dist-es → core/dist-es/submodules/retry/middleware-retry}/retry-pre-sra-deprecated/AdaptiveRetryStrategy.js +2 -1
- package/node_modules/@smithy/{middleware-retry/dist-es → core/dist-es/submodules/retry/middleware-retry}/retry-pre-sra-deprecated/StandardRetryStrategy.js +5 -4
- package/node_modules/@smithy/{middleware-retry/dist-es → core/dist-es/submodules/retry/middleware-retry}/retry-pre-sra-deprecated/defaultRetryQuota.js +1 -1
- package/node_modules/@smithy/{middleware-retry/dist-es → core/dist-es/submodules/retry/middleware-retry}/retry-pre-sra-deprecated/delayDecider.js +1 -1
- package/node_modules/@smithy/{middleware-retry/dist-es → core/dist-es/submodules/retry/middleware-retry}/retry-pre-sra-deprecated/retryDecider.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +109 -0
- package/node_modules/@smithy/{service-error-classification/dist-es/index.js → core/dist-es/submodules/retry/service-error-classification/service-error-classification.js} +1 -0
- package/node_modules/@smithy/{util-retry/dist-es → core/dist-es/submodules/retry/util-retry}/AdaptiveRetryStrategy.js +6 -3
- package/node_modules/@smithy/{util-retry/dist-es → core/dist-es/submodules/retry/util-retry}/DefaultRateLimiter.js +3 -2
- package/node_modules/@smithy/{util-retry/dist-es → core/dist-es/submodules/retry/util-retry}/StandardRetryStrategy.js +22 -12
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/generateIdempotencyToken.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/hash-node/hash-node.js +36 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +34 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +33 -10
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +34 -0
- package/node_modules/@smithy/{middleware-serde/dist-es → core/dist-es/submodules/serde/middleware-serde}/deserializerMiddleware.js +1 -1
- package/node_modules/@smithy/{util-base64/dist-es → core/dist-es/submodules/serde/util-base64}/fromBase64.browser.js +1 -1
- package/node_modules/@smithy/{util-base64/dist-es → core/dist-es/submodules/serde/util-base64}/fromBase64.js +1 -1
- package/node_modules/@smithy/{util-base64/dist-es → core/dist-es/submodules/serde/util-base64}/toBase64.browser.js +2 -2
- package/node_modules/@smithy/{util-base64/dist-es → core/dist-es/submodules/serde/util-base64}/toBase64.js +2 -2
- package/node_modules/@smithy/{util-body-length-node/dist-es → core/dist-es/submodules/serde/util-body-length}/calculateBodyLength.js +1 -1
- package/node_modules/{@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from/dist-es/index.js → @smithy/core/dist-es/submodules/serde/util-buffer-from/buffer-from.js} +1 -2
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-hex-encoding/hex-encoding.js +33 -0
- package/node_modules/@smithy/{util-stream/dist-es → core/dist-es/submodules/serde/util-stream}/blob/Uint8ArrayBlobAdapter.js +4 -2
- package/node_modules/@smithy/{util-stream/dist-es → core/dist-es/submodules/serde/util-stream}/checksum/ChecksumStream.js +2 -2
- package/node_modules/@smithy/{util-stream/dist-es → core/dist-es/submodules/serde/util-stream}/checksum/createChecksumStream.browser.js +1 -1
- package/node_modules/@smithy/{util-stream/dist-es → core/dist-es/submodules/serde/util-stream}/checksum/createChecksumStream.js +1 -1
- package/node_modules/@smithy/{util-stream/dist-es → core/dist-es/submodules/serde/util-stream}/createBufferedReadable.js +1 -1
- package/node_modules/@smithy/{util-stream/dist-es → core/dist-es/submodules/serde/util-stream}/headStream.js +1 -1
- package/node_modules/@smithy/{util-stream/dist-es → core/dist-es/submodules/serde/util-stream}/sdk-stream-mixin.browser.js +4 -4
- package/node_modules/@smithy/{util-stream/dist-es → core/dist-es/submodules/serde/util-stream}/sdk-stream-mixin.js +3 -3
- package/node_modules/@smithy/{util-stream/dist-es → core/dist-es/submodules/serde/util-stream}/splitStream.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.browser.js +53 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.js +48 -0
- package/node_modules/@smithy/{util-utf8/dist-es → core/dist-es/submodules/serde/util-utf8}/fromUtf8.js +1 -1
- package/node_modules/@smithy/{util-utf8/dist-es → core/dist-es/submodules/serde/util-utf8}/toUtf8.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/uuid/randomUUID.js +3 -0
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +2 -2
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +1 -1
- package/node_modules/@smithy/core/package.json +110 -11
- package/node_modules/@smithy/core/retry.js +5 -0
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +39 -41
- package/node_modules/@smithy/credential-provider-imds/dist-es/error/InstanceMetadataV1FallbackError.js +1 -1
- package/node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js +3 -3
- package/node_modules/@smithy/credential-provider-imds/dist-es/fromInstanceMetadata.js +2 -3
- package/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/httpRequest.js +2 -3
- package/node_modules/@smithy/credential-provider-imds/dist-es/utils/getInstanceMetadataEndpoint.js +2 -2
- package/node_modules/@smithy/credential-provider-imds/package.json +2 -4
- package/node_modules/@smithy/eventstream-codec/dist-cjs/index.js +11 -401
- package/node_modules/@smithy/eventstream-codec/dist-es/index.js +1 -8
- package/node_modules/@smithy/eventstream-codec/package.json +5 -26
- package/node_modules/@smithy/eventstream-serde-browser/dist-cjs/index.js +9 -58
- package/node_modules/@smithy/eventstream-serde-browser/dist-es/index.js +3 -3
- package/node_modules/@smithy/eventstream-serde-browser/package.json +7 -24
- package/node_modules/@smithy/eventstream-serde-config-resolver/dist-cjs/index.js +5 -7
- package/node_modules/@smithy/eventstream-serde-config-resolver/dist-es/index.js +1 -1
- package/node_modules/@smithy/eventstream-serde-config-resolver/package.json +7 -25
- package/node_modules/@smithy/eventstream-serde-node/dist-cjs/index.js +6 -53
- package/node_modules/@smithy/eventstream-serde-node/dist-es/index.js +1 -2
- package/node_modules/@smithy/eventstream-serde-node/package.json +5 -23
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +6 -7
- package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +1 -2
- package/node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js +1 -1
- package/node_modules/@smithy/fetch-http-handler/package.json +2 -4
- package/node_modules/@smithy/hash-node/dist-cjs/index.js +5 -42
- package/node_modules/@smithy/hash-node/dist-es/index.js +1 -37
- package/node_modules/@smithy/hash-node/package.json +5 -29
- package/node_modules/@smithy/invalid-dependency/dist-cjs/index.js +6 -10
- package/node_modules/@smithy/invalid-dependency/dist-es/index.js +1 -2
- package/node_modules/@smithy/invalid-dependency/package.json +5 -25
- package/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +30 -4
- package/node_modules/@smithy/is-array-buffer/package.json +12 -13
- package/node_modules/@smithy/middleware-content-length/dist-cjs/index.js +7 -46
- package/node_modules/@smithy/middleware-content-length/dist-es/index.js +1 -39
- package/node_modules/@smithy/middleware-content-length/package.json +5 -28
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +12 -264
- package/node_modules/@smithy/middleware-endpoint/dist-es/index.js +1 -6
- package/node_modules/@smithy/middleware-endpoint/package.json +5 -39
- package/node_modules/@smithy/middleware-retry/dist-cjs/index.js +22 -396
- package/node_modules/@smithy/middleware-retry/dist-es/index.js +1 -8
- package/node_modules/@smithy/middleware-retry/package.json +5 -44
- package/node_modules/@smithy/middleware-serde/dist-cjs/index.js +9 -104
- package/node_modules/@smithy/middleware-serde/dist-es/index.js +1 -3
- package/node_modules/@smithy/middleware-serde/package.json +5 -30
- package/node_modules/@smithy/middleware-stack/dist-cjs/index.js +5 -285
- package/node_modules/@smithy/middleware-stack/dist-es/index.js +1 -1
- package/node_modules/@smithy/middleware-stack/package.json +5 -26
- package/node_modules/@smithy/node-config-provider/dist-cjs/index.js +5 -62
- package/node_modules/@smithy/node-config-provider/dist-es/index.js +1 -1
- package/node_modules/@smithy/node-config-provider/package.json +5 -28
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +72 -41
- package/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +1 -1
- package/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +5 -0
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +26 -16
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +31 -18
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +6 -4
- package/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +1 -1
- package/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +2 -2
- package/node_modules/@smithy/node-http-handler/package.json +2 -3
- package/node_modules/@smithy/property-provider/dist-cjs/index.js +10 -117
- package/node_modules/@smithy/property-provider/dist-es/index.js +1 -6
- package/node_modules/@smithy/property-provider/package.json +5 -25
- package/node_modules/@smithy/protocol-http/dist-cjs/index.js +11 -169
- package/node_modules/@smithy/protocol-http/dist-es/index.js +1 -8
- package/node_modules/@smithy/protocol-http/package.json +5 -25
- package/node_modules/@smithy/querystring-builder/dist-cjs/index.js +5 -26
- package/node_modules/@smithy/querystring-builder/dist-es/index.js +1 -21
- package/node_modules/@smithy/querystring-builder/package.json +5 -25
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +16 -196
- package/node_modules/@smithy/shared-ini-file-loader/dist-es/index.js +1 -10
- package/node_modules/@smithy/shared-ini-file-loader/package.json +5 -37
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +167 -170
- package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +1 -2
- package/node_modules/@smithy/signature-v4/dist-es/SignatureV4.js +3 -4
- package/node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +3 -4
- package/node_modules/@smithy/signature-v4/dist-es/credentialDerivation.js +1 -2
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +1 -1
- package/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +1 -3
- package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +1 -1
- package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +1 -1
- package/node_modules/@smithy/signature-v4/package.json +2 -7
- package/node_modules/@smithy/smithy-client/dist-cjs/index.js +75 -642
- package/node_modules/@smithy/smithy-client/dist-es/index.js +3 -20
- package/node_modules/@smithy/smithy-client/package.json +5 -33
- package/node_modules/@smithy/url-parser/dist-cjs/index.js +5 -23
- package/node_modules/@smithy/url-parser/dist-es/index.js +1 -18
- package/node_modules/@smithy/url-parser/package.json +5 -26
- package/node_modules/@smithy/util-base64/dist-cjs/index.js +6 -27
- package/node_modules/@smithy/util-base64/dist-es/index.js +1 -2
- package/node_modules/@smithy/util-base64/package.json +5 -38
- package/node_modules/@smithy/util-body-length-browser/dist-cjs/index.js +5 -30
- package/node_modules/@smithy/util-body-length-browser/dist-es/index.js +1 -1
- package/node_modules/@smithy/util-body-length-browser/package.json +5 -25
- package/node_modules/@smithy/util-body-length-node/dist-cjs/index.js +5 -32
- package/node_modules/@smithy/util-body-length-node/dist-es/index.js +1 -1
- package/node_modules/@smithy/util-body-length-node/package.json +5 -26
- package/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +44 -17
- package/node_modules/@smithy/util-buffer-from/package.json +14 -15
- package/node_modules/@smithy/util-config-provider/dist-cjs/index.js +7 -30
- package/node_modules/@smithy/util-config-provider/dist-es/index.js +1 -3
- package/node_modules/@smithy/util-config-provider/package.json +5 -26
- package/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/index.js +5 -16
- package/node_modules/@smithy/util-defaults-mode-browser/dist-es/index.js +1 -1
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +5 -30
- package/node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js +5 -74
- package/node_modules/@smithy/util-defaults-mode-node/dist-es/index.js +1 -1
- package/node_modules/@smithy/util-defaults-mode-node/package.json +5 -31
- package/node_modules/@smithy/util-endpoints/dist-cjs/index.js +12 -573
- package/node_modules/@smithy/util-endpoints/dist-es/index.js +1 -8
- package/node_modules/@smithy/util-endpoints/package.json +5 -29
- package/node_modules/@smithy/util-hex-encoding/dist-cjs/index.js +6 -38
- package/node_modules/@smithy/util-hex-encoding/dist-es/index.js +1 -33
- package/node_modules/@smithy/util-hex-encoding/package.json +5 -25
- package/node_modules/@smithy/util-middleware/dist-cjs/index.js +6 -15
- package/node_modules/@smithy/util-middleware/dist-es/index.js +1 -2
- package/node_modules/@smithy/util-middleware/package.json +5 -26
- package/node_modules/@smithy/util-retry/dist-cjs/index.js +21 -333
- package/node_modules/@smithy/util-retry/dist-es/index.js +1 -8
- package/node_modules/@smithy/util-retry/package.json +5 -30
- package/node_modules/@smithy/util-stream/dist-cjs/index.js +14 -108
- package/node_modules/@smithy/util-stream/dist-es/index.js +1 -9
- package/node_modules/@smithy/util-stream/package.json +7 -63
- package/node_modules/@smithy/util-utf8/dist-cjs/index.js +7 -32
- package/node_modules/@smithy/util-utf8/dist-es/index.js +1 -3
- package/node_modules/@smithy/util-utf8/package.json +5 -31
- package/node_modules/@whiskeysockets/baileys/node_modules/p-queue/dist/priority-queue.js +53 -6
- package/node_modules/@whiskeysockets/baileys/node_modules/p-queue/package.json +3 -3
- package/node_modules/ajv/dist/core.js +1 -1
- package/node_modules/ajv/package.json +2 -3
- package/node_modules/axios/dist/axios.js +1416 -1075
- package/node_modules/axios/dist/axios.min.js +3 -3
- package/node_modules/axios/dist/browser/axios.cjs +1511 -1122
- package/node_modules/axios/dist/esm/axios.js +1513 -1123
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/node/axios.cjs +1150 -737
- package/node_modules/axios/index.d.cts +26 -13
- package/node_modules/axios/index.js +2 -0
- package/node_modules/axios/lib/adapters/adapters.js +4 -2
- package/node_modules/axios/lib/adapters/fetch.js +126 -10
- package/node_modules/axios/lib/adapters/http.js +232 -66
- package/node_modules/axios/lib/adapters/xhr.js +6 -2
- package/node_modules/axios/lib/core/Axios.js +7 -3
- package/node_modules/axios/lib/core/AxiosError.js +86 -1
- package/node_modules/axios/lib/core/AxiosHeaders.js +3 -0
- package/node_modules/axios/lib/core/dispatchRequest.js +19 -7
- package/node_modules/axios/lib/core/mergeConfig.js +16 -1
- package/node_modules/axios/lib/core/settle.js +7 -11
- package/node_modules/axios/lib/defaults/index.js +1 -1
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/buildURL.js +1 -1
- package/node_modules/axios/lib/helpers/cookies.js +14 -2
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +28 -1
- package/node_modules/axios/lib/helpers/formDataToStream.js +1 -1
- package/node_modules/axios/lib/helpers/parseProtocol.js +1 -1
- package/node_modules/axios/lib/helpers/resolveConfig.js +46 -18
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +26 -1
- package/node_modules/axios/lib/helpers/validator.js +3 -1
- package/node_modules/axios/lib/utils.js +27 -15
- package/node_modules/axios/package.json +17 -24
- package/node_modules/basic-ftp/dist/FtpContext.js +7 -1
- package/node_modules/basic-ftp/package.json +5 -5
- package/node_modules/brace-expansion/dist/commonjs/index.js +1 -1
- package/node_modules/brace-expansion/dist/esm/index.js +1 -1
- package/node_modules/brace-expansion/package.json +1 -1
- package/node_modules/cacheable/dist/index.cjs +17 -6
- package/node_modules/cacheable/dist/index.js +17 -6
- package/node_modules/cacheable/package.json +6 -6
- package/node_modules/express-rate-limit/dist/index.cjs +51 -10
- package/node_modules/express-rate-limit/dist/index.d.cts +31 -1
- package/node_modules/express-rate-limit/dist/index.mjs +51 -10
- package/node_modules/express-rate-limit/package.json +3 -2
- package/node_modules/fast-string-truncated-width/dist/index.js +36 -96
- package/node_modules/fast-string-truncated-width/dist/utils.js +14 -9
- package/node_modules/fast-string-truncated-width/package.json +1 -1
- package/node_modules/fast-string-width/package.json +2 -2
- package/node_modules/fast-uri/.github/workflows/ci.yml +12 -7
- package/node_modules/fast-uri/.github/workflows/lock-threads.yml +19 -0
- package/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +1 -1
- package/node_modules/fast-uri/index.js +90 -24
- package/node_modules/fast-uri/lib/utils.js +129 -22
- package/node_modules/fast-uri/package.json +3 -4
- package/node_modules/fast-wrap-ansi/lib/main.js +4 -1
- package/node_modules/fast-wrap-ansi/package.json +2 -2
- package/node_modules/fast-xml-builder/lib/fxb.cjs +1 -1
- package/node_modules/fast-xml-builder/lib/fxb.d.cts +91 -1
- package/node_modules/fast-xml-builder/lib/fxb.min.js +1 -1
- package/node_modules/fast-xml-builder/package.json +3 -2
- package/node_modules/fast-xml-builder/src/fxb.js +106 -40
- package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +95 -42
- package/node_modules/fast-xml-builder/src/util.js +16 -0
- package/node_modules/fast-xml-parser/lib/fxbuilder.min.js +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.d.cts +172 -6
- package/node_modules/fast-xml-parser/lib/fxp.min.js +1 -1
- package/node_modules/fast-xml-parser/lib/fxparser.min.js +1 -1
- package/node_modules/fast-xml-parser/package.json +5 -4
- package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +2 -5
- package/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +15 -11
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +174 -245
- package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +2 -2
- package/node_modules/get-east-asian-width/lookup-data.js +15 -12
- package/node_modules/get-east-asian-width/lookup.js +25 -22
- package/node_modules/get-east-asian-width/package.json +1 -1
- package/node_modules/hosted-git-info/lib/hosts.js +2 -2
- package/node_modules/hosted-git-info/package.json +13 -17
- package/node_modules/ip-address/dist/common.js +21 -0
- package/node_modules/ip-address/dist/ipv4.js +193 -68
- package/node_modules/ip-address/dist/ipv6.js +345 -131
- package/node_modules/ip-address/dist/v6/constants.js +5 -0
- package/node_modules/ip-address/dist/v6/helpers.js +12 -3
- package/node_modules/ip-address/package.json +45 -35
- package/node_modules/ipaddr.js/ipaddr.min.js +1 -1
- package/node_modules/ipaddr.js/lib/ipaddr.js +21 -6
- package/node_modules/ipaddr.js/package.json +1 -1
- package/node_modules/jiti/dist/babel.cjs +38 -27
- package/node_modules/jiti/dist/jiti.cjs +1 -1
- package/node_modules/jiti/lib/jiti-static.mjs +23 -0
- package/node_modules/jiti/package.json +56 -43
- package/node_modules/jose/dist/webapi/jwks/remote.js +1 -1
- package/node_modules/jose/dist/webapi/lib/pbes2kw.js +3 -0
- package/node_modules/jose/package.json +1 -1
- package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.js +7 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.js +1686 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.min.js +2 -0
- package/node_modules/lru-cache/dist/commonjs/browser/perf.js +11 -0
- package/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.d.cts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +4 -7
- package/node_modules/lru-cache/dist/commonjs/index.js +10 -16
- package/node_modules/lru-cache/dist/commonjs/index.min.js +1 -1
- package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.js +9 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.js +1686 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.min.js +2 -0
- package/node_modules/lru-cache/dist/commonjs/node/perf.js +11 -0
- package/node_modules/lru-cache/dist/commonjs/perf.js +11 -0
- package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +1 -1
- package/node_modules/lru-cache/dist/esm/browser/index.js +9 -15
- package/node_modules/lru-cache/dist/esm/browser/index.min.js +1 -1
- package/node_modules/lru-cache/dist/esm/browser/perf.js +8 -0
- package/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.d.mts.map +1 -1
- package/node_modules/lru-cache/dist/esm/index.js +9 -15
- package/node_modules/lru-cache/dist/esm/index.min.js +1 -1
- package/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +2 -3
- package/node_modules/lru-cache/dist/esm/node/index.js +9 -15
- package/node_modules/lru-cache/dist/esm/node/index.min.js +1 -1
- package/node_modules/lru-cache/dist/esm/node/perf.js +8 -0
- package/node_modules/lru-cache/dist/esm/perf.js +8 -0
- package/node_modules/lru-cache/package.json +44 -16
- package/node_modules/protobufjs/dist/light/protobuf.js +233 -109
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/minimal/protobuf.js +90 -38
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.js +237 -112
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/ext/descriptor/index.js +35 -16
- package/node_modules/protobufjs/package.json +7 -4
- package/node_modules/protobufjs/src/converter.js +14 -5
- package/node_modules/protobufjs/src/decoder.js +17 -9
- package/node_modules/protobufjs/src/enum.js +4 -1
- package/node_modules/protobufjs/src/namespace.js +13 -7
- package/node_modules/protobufjs/src/object.js +4 -0
- package/node_modules/protobufjs/src/parse.js +4 -3
- package/node_modules/protobufjs/src/reader.js +12 -2
- package/node_modules/protobufjs/src/service.js +8 -4
- package/node_modules/protobufjs/src/type.js +22 -12
- package/node_modules/protobufjs/src/types.js +1 -1
- package/node_modules/protobufjs/src/util/minimal.js +24 -1
- package/node_modules/protobufjs/src/util/patterns.js +8 -0
- package/node_modules/protobufjs/src/util.js +9 -9
- package/node_modules/protobufjs/src/verifier.js +7 -4
- package/node_modules/protobufjs/src/wrappers.js +4 -3
- package/node_modules/qified/dist/index.cjs +129 -24
- package/node_modules/qified/dist/index.d.cts +41 -14
- package/node_modules/qified/dist/index.mjs +129 -24
- package/node_modules/qified/node_modules/hookified/dist/browser/index.global.js +949 -890
- package/node_modules/qified/node_modules/hookified/dist/browser/index.js +934 -886
- package/node_modules/qified/node_modules/hookified/dist/node/index.cjs +900 -912
- package/node_modules/qified/node_modules/hookified/dist/node/index.d.cts +730 -631
- package/node_modules/qified/node_modules/hookified/dist/node/index.js +895 -882
- package/node_modules/qified/node_modules/hookified/package.json +12 -11
- package/node_modules/qified/package.json +1 -1
- package/node_modules/semver/bin/semver.js +14 -10
- package/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/semver/index.js +2 -0
- package/node_modules/semver/internal/re.js +1 -1
- package/node_modules/semver/package.json +3 -3
- package/node_modules/semver/range.bnf +5 -4
- package/node_modules/socks/package.json +3 -3
- package/node_modules/strnum/package.json +3 -2
- package/node_modules/strnum/strnum.js +12 -10
- package/node_modules/xml-naming/package.json +54 -0
- package/node_modules/xml-naming/src/index.js +270 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +5 -3
- package/node_modules/yaml/browser/dist/nodes/Alias.js +2 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +11 -8
- package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +2 -1
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +5 -3
- package/node_modules/yaml/dist/nodes/Alias.js +2 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +10 -7
- package/node_modules/yaml/dist/stringify/stringifyNumber.js +2 -1
- package/node_modules/yaml/package.json +1 -1
- package/node_modules/zod/locales/package.json +2 -1
- package/node_modules/zod/mini/package.json +2 -1
- package/node_modules/zod/package.json +1 -1
- package/node_modules/zod/v3/package.json +2 -1
- package/node_modules/zod/v4/classic/errors.js +2 -2
- package/node_modules/zod/v4/classic/external.d.cts +1 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +31 -16
- package/node_modules/zod/v4/classic/from-json-schema.js +31 -16
- package/node_modules/zod/v4/classic/package.json +2 -1
- package/node_modules/zod/v4/classic/schemas.cjs +358 -119
- package/node_modules/zod/v4/classic/schemas.d.cts +42 -14
- package/node_modules/zod/v4/classic/schemas.js +356 -118
- package/node_modules/zod/v4/core/api.cjs +7 -2
- package/node_modules/zod/v4/core/api.d.cts +26 -5
- package/node_modules/zod/v4/core/api.js +7 -2
- package/node_modules/zod/v4/core/checks.d.cts +1 -1
- package/node_modules/zod/v4/core/core.cjs +3 -1
- package/node_modules/zod/v4/core/core.js +4 -2
- package/node_modules/zod/v4/core/errors.cjs +26 -23
- package/node_modules/zod/v4/core/errors.d.cts +1 -0
- package/node_modules/zod/v4/core/errors.js +26 -23
- package/node_modules/zod/v4/core/json-schema-processors.cjs +16 -20
- package/node_modules/zod/v4/core/json-schema-processors.js +16 -20
- package/node_modules/zod/v4/core/package.json +2 -1
- package/node_modules/zod/v4/core/parse.cjs +7 -7
- package/node_modules/zod/v4/core/parse.js +7 -7
- package/node_modules/zod/v4/core/regexes.cjs +9 -3
- package/node_modules/zod/v4/core/regexes.d.cts +6 -0
- package/node_modules/zod/v4/core/regexes.js +7 -1
- package/node_modules/zod/v4/core/schemas.cjs +211 -65
- package/node_modules/zod/v4/core/schemas.d.cts +39 -1
- package/node_modules/zod/v4/core/schemas.js +210 -64
- package/node_modules/zod/v4/core/to-json-schema.cjs +12 -1
- package/node_modules/zod/v4/core/to-json-schema.js +12 -1
- package/node_modules/zod/v4/core/util.cjs +54 -30
- package/node_modules/zod/v4/core/util.d.cts +1 -0
- package/node_modules/zod/v4/core/util.js +55 -32
- package/node_modules/zod/v4/core/versions.cjs +2 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/locales/el.cjs +136 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.js +109 -0
- package/node_modules/zod/v4/locales/en.cjs +4 -0
- package/node_modules/zod/v4/locales/en.js +4 -0
- package/node_modules/zod/v4/locales/fr.cjs +24 -7
- package/node_modules/zod/v4/locales/fr.js +24 -7
- package/node_modules/zod/v4/locales/hr.cjs +149 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.js +122 -0
- package/node_modules/zod/v4/locales/index.cjs +8 -1
- package/node_modules/zod/v4/locales/index.d.cts +3 -0
- package/node_modules/zod/v4/locales/index.js +3 -0
- package/node_modules/zod/v4/locales/it.cjs +1 -1
- package/node_modules/zod/v4/locales/it.js +1 -1
- package/node_modules/zod/v4/locales/ka.cjs +8 -8
- package/node_modules/zod/v4/locales/ka.js +8 -8
- package/node_modules/zod/v4/locales/package.json +2 -1
- package/node_modules/zod/v4/locales/ro.cjs +146 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.js +119 -0
- package/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/node_modules/zod/v4/locales/uz.js +1 -0
- package/node_modules/zod/v4/mini/external.d.cts +1 -0
- package/node_modules/zod/v4/mini/package.json +2 -1
- package/node_modules/zod/v4/mini/schemas.cjs +41 -4
- package/node_modules/zod/v4/mini/schemas.d.cts +28 -10
- package/node_modules/zod/v4/mini/schemas.js +40 -4
- package/node_modules/zod/v4/package.json +2 -1
- package/node_modules/zod/v4-mini/package.json +2 -1
- package/package.json +2 -2
- package/skills/news-fetcher/SKILL.md +278 -0
- package/skills/qqbrowser-skill/SKILL.md +15 -4
- package/skills/social-publish/SKILL.md +115 -0
- package/node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +0 -32
- package/node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer/package.json +0 -60
- package/node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +0 -47
- package/node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from/package.json +0 -61
- package/node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +0 -32
- package/node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer/dist-es/index.js +0 -2
- package/node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer/package.json +0 -60
- package/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +0 -47
- package/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from/dist-es/index.js +0 -14
- package/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from/package.json +0 -61
- package/node_modules/@protobufjs/inquire/.npmignore +0 -3
- package/node_modules/@protobufjs/utf8/.npmignore +0 -3
- package/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/index.js +0 -4
- package/node_modules/@smithy/config-resolver/dist-es/regionConfig/index.js +0 -2
- package/node_modules/@smithy/config-resolver/dist-es/regionInfo/index.js +0 -3
- package/node_modules/@smithy/eventstream-serde-browser/dist-es/provider.js +0 -2
- package/node_modules/@smithy/eventstream-serde-node/dist-es/EventStreamMarshaller.js +0 -19
- package/node_modules/@smithy/eventstream-serde-node/dist-es/provider.js +0 -2
- package/node_modules/@smithy/eventstream-serde-node/dist-es/utils.js +0 -26
- package/node_modules/@smithy/eventstream-serde-universal/dist-cjs/index.js +0 -132
- package/node_modules/@smithy/eventstream-serde-universal/dist-es/index.js +0 -2
- package/node_modules/@smithy/eventstream-serde-universal/dist-es/provider.js +0 -2
- package/node_modules/@smithy/eventstream-serde-universal/package.json +0 -65
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.browser.js +0 -5
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js +0 -7
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js +0 -35
- package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/index.js +0 -2
- package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js +0 -17
- package/node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js +0 -36
- package/node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js +0 -18
- package/node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointConfig.js +0 -24
- package/node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.browser.js +0 -5
- package/node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js +0 -7
- package/node_modules/@smithy/middleware-retry/dist-es/retryMiddleware.js +0 -105
- package/node_modules/@smithy/node-config-provider/dist-es/fromStatic.js +0 -3
- package/node_modules/@smithy/property-provider/dist-es/fromStatic.js +0 -1
- package/node_modules/@smithy/protocol-http/dist-es/extensions/index.js +0 -1
- package/node_modules/@smithy/querystring-parser/dist-cjs/index.js +0 -27
- package/node_modules/@smithy/querystring-parser/package.json +0 -60
- package/node_modules/@smithy/service-error-classification/dist-cjs/index.js +0 -82
- package/node_modules/@smithy/service-error-classification/package.json +0 -59
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js +0 -26
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js +0 -12
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js +0 -15
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/readFile.js +0 -16
- package/node_modules/@smithy/smithy-client/dist-es/collect-stream-body.js +0 -1
- package/node_modules/@smithy/smithy-client/dist-es/extended-encode-uri-component.js +0 -1
- package/node_modules/@smithy/smithy-client/dist-es/extensions/index.js +0 -1
- package/node_modules/@smithy/smithy-client/dist-es/resolve-path.js +0 -1
- package/node_modules/@smithy/util-base64/dist-cjs/constants.browser.js +0 -12
- package/node_modules/@smithy/util-base64/dist-cjs/fromBase64.browser.js +0 -40
- package/node_modules/@smithy/util-base64/dist-cjs/fromBase64.js +0 -16
- package/node_modules/@smithy/util-base64/dist-cjs/toBase64.browser.js +0 -38
- package/node_modules/@smithy/util-base64/dist-cjs/toBase64.js +0 -19
- package/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/constants.js +0 -4
- package/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/resolveDefaultsModeConfig.js +0 -34
- package/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/resolveDefaultsModeConfig.native.js +0 -23
- package/node_modules/@smithy/util-defaults-mode-browser/dist-es/constants.js +0 -1
- package/node_modules/@smithy/util-defaults-mode-node/dist-es/resolveDefaultsModeConfig.js +0 -52
- package/node_modules/@smithy/util-stream/dist-cjs/ByteArrayCollector.js +0 -36
- package/node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.browser.js +0 -7
- package/node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js +0 -64
- package/node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js +0 -39
- package/node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.js +0 -12
- package/node_modules/@smithy/util-stream/dist-cjs/createBufferedReadable.js +0 -60
- package/node_modules/@smithy/util-stream/dist-cjs/createBufferedReadableStream.js +0 -103
- package/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.browser.js +0 -31
- package/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js +0 -41
- package/node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js +0 -34
- package/node_modules/@smithy/util-stream/dist-cjs/headStream.js +0 -42
- package/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js +0 -68
- package/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js +0 -54
- package/node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js +0 -10
- package/node_modules/@smithy/util-stream/dist-cjs/splitStream.js +0 -16
- package/node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js +0 -10
- package/node_modules/@smithy/util-uri-escape/dist-cjs/index.js +0 -9
- package/node_modules/@smithy/util-uri-escape/dist-es/index.js +0 -2
- package/node_modules/@smithy/util-uri-escape/package.json +0 -60
- package/node_modules/@smithy/uuid/dist-cjs/index.js +0 -36
- package/node_modules/@smithy/uuid/dist-cjs/randomUUID.js +0 -6
- package/node_modules/@smithy/uuid/dist-cjs/randomUUID.native.js +0 -4
- package/node_modules/@smithy/uuid/dist-es/index.js +0 -1
- package/node_modules/@smithy/uuid/dist-es/randomUUID.browser.js +0 -1
- package/node_modules/@smithy/uuid/dist-es/randomUUID.js +0 -2
- package/node_modules/@smithy/uuid/dist-es/randomUUID.native.js +0 -1
- package/node_modules/@smithy/uuid/package.json +0 -66
- package/node_modules/fast-uri/.github/.stale.yml +0 -21
- package/node_modules/fast-uri/.github/tests_checker.yml +0 -8
- package/node_modules/fast-xml-parser/lib/pem.d.cts +0 -148
- package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.d.mts.map +0 -1
- package/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.d.mts.map +0 -1
- package/node_modules/@smithy/{invalid-dependency/dist-es → core/dist-es/submodules/client/invalid-dependency}/invalidFunction.js +0 -0
- package/node_modules/@smithy/{invalid-dependency/dist-es → core/dist-es/submodules/client/invalid-dependency}/invalidProvider.js +0 -0
- package/node_modules/@smithy/{middleware-stack/dist-es → core/dist-es/submodules/client/middleware-stack}/MiddlewareStack.js +0 -0
- package/node_modules/@smithy/{middleware-endpoint/dist-es → core/dist-es/submodules/client/middleware-stack}/types.js +0 -0
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/NoOpLogger.js +0 -0
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/constants.js +0 -0
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/create-aggregated-client.js +0 -0
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/default-error-handler.js +0 -0
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/defaults-mode.js +0 -0
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/emitWarningIfUnsupportedVersion.js +0 -0
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/exceptions.js +0 -0
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/extensions/retry.js +0 -0
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/get-array-if-single-item.js +0 -0
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/get-value-from-text-node.js +0 -0
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/is-serializable-header-value.js +0 -0
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/object-mapping.js +0 -0
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/schemaLogFilter.js +0 -0
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/ser-utils.js +0 -0
- package/node_modules/@smithy/{smithy-client/dist-es → core/dist-es/submodules/client/smithy-client}/serde-json.js +0 -0
- package/node_modules/@smithy/{util-middleware/dist-es → core/dist-es/submodules/client/util-middleware}/getSmithyContext.js +0 -0
- package/node_modules/@smithy/{util-middleware/dist-es → core/dist-es/submodules/client/util-middleware}/normalizeProvider.js +0 -0
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/endpointsConfig/utils/getEndpointFromRegion.js +0 -0
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/regionConfig/config.js +0 -0
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/regionConfig/getRealRegion.js +0 -0
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/regionConfig/isFipsRegion.js +0 -0
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/regionConfig/resolveRegionConfig.js +0 -0
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/regionInfo/EndpointVariant.js +0 -0
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/regionInfo/EndpointVariantTag.js +0 -0
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/regionInfo/PartitionHash.js +0 -0
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/regionInfo/RegionHash.js +0 -0
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/regionInfo/getHostnameFromVariants.js +0 -0
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/regionInfo/getRegionInfo.js +0 -0
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/regionInfo/getResolvedHostname.js +0 -0
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/regionInfo/getResolvedPartition.js +0 -0
- package/node_modules/@smithy/{config-resolver/dist-es → core/dist-es/submodules/config/config-resolver}/regionInfo/getResolvedSigningRegion.js +0 -0
- package/node_modules/@smithy/{util-defaults-mode-node/dist-es → core/dist-es/submodules/config/defaults-mode}/constants.js +0 -0
- package/node_modules/@smithy/{util-defaults-mode-node/dist-es → core/dist-es/submodules/config/defaults-mode}/defaultsModeConfig.js +0 -0
- package/node_modules/@smithy/{node-config-provider/dist-es → core/dist-es/submodules/config/node-config-provider}/getSelectorName.js +0 -0
- package/node_modules/@smithy/{property-provider/dist-es → core/dist-es/submodules/config/property-provider}/CredentialsProviderError.js +0 -0
- package/node_modules/@smithy/{property-provider/dist-es → core/dist-es/submodules/config/property-provider}/ProviderError.js +0 -0
- package/node_modules/@smithy/{property-provider/dist-es → core/dist-es/submodules/config/property-provider}/TokenProviderError.js +0 -0
- package/node_modules/@smithy/{property-provider/dist-es → core/dist-es/submodules/config/property-provider}/chain.js +0 -0
- package/node_modules/@smithy/{property-provider/dist-es → core/dist-es/submodules/config/property-provider}/memoize.js +0 -0
- package/node_modules/@smithy/{shared-ini-file-loader/dist-es → core/dist-es/submodules/config/shared-ini-file-loader}/constants.js +0 -0
- package/node_modules/@smithy/{shared-ini-file-loader/dist-es → core/dist-es/submodules/config/shared-ini-file-loader}/externalDataInterceptor.js +0 -0
- package/node_modules/@smithy/{shared-ini-file-loader/dist-es → core/dist-es/submodules/config/shared-ini-file-loader}/getConfigData.js +0 -0
- package/node_modules/@smithy/{shared-ini-file-loader/dist-es → core/dist-es/submodules/config/shared-ini-file-loader}/getProfileName.js +0 -0
- package/node_modules/@smithy/{shared-ini-file-loader/dist-es → core/dist-es/submodules/config/shared-ini-file-loader}/getSsoSessionData.js +0 -0
- package/node_modules/@smithy/{shared-ini-file-loader/dist-es → core/dist-es/submodules/config/shared-ini-file-loader}/loadSsoSessionData.js +0 -0
- package/node_modules/@smithy/{shared-ini-file-loader/dist-es → core/dist-es/submodules/config/shared-ini-file-loader}/mergeConfigFiles.js +0 -0
- package/node_modules/@smithy/{shared-ini-file-loader/dist-es → core/dist-es/submodules/config/shared-ini-file-loader}/parseIni.js +0 -0
- package/node_modules/@smithy/{shared-ini-file-loader/dist-es → core/dist-es/submodules/config/shared-ini-file-loader}/parseKnownFiles.js +0 -0
- package/node_modules/@smithy/{shared-ini-file-loader/dist-es → core/dist-es/submodules/config/shared-ini-file-loader}/readFile.js +0 -0
- package/node_modules/@smithy/{middleware-retry/dist-es/retry-pre-sra-deprecated → core/dist-es/submodules/config/shared-ini-file-loader}/types.js +0 -0
- package/node_modules/@smithy/{util-config-provider/dist-es → core/dist-es/submodules/config/util-config-provider}/booleanSelector.js +0 -0
- package/node_modules/@smithy/{util-config-provider/dist-es → core/dist-es/submodules/config/util-config-provider}/numberSelector.js +0 -0
- package/node_modules/@smithy/{util-config-provider/dist-es → core/dist-es/submodules/config/util-config-provider}/types.js +0 -0
- package/node_modules/@smithy/{middleware-endpoint/dist-es → core/dist-es/submodules/endpoints/middleware-endpoint}/adaptors/createConfigValueProvider.js +0 -0
- package/node_modules/@smithy/{middleware-endpoint/dist-es → core/dist-es/submodules/endpoints/middleware-endpoint}/adaptors/getEndpointFromConfig.browser.js +0 -0
- package/node_modules/@smithy/{middleware-endpoint/dist-es → core/dist-es/submodules/endpoints/middleware-endpoint}/resolveEndpointRequiredConfig.js +0 -0
- package/node_modules/@smithy/{middleware-endpoint/dist-es → core/dist-es/submodules/endpoints/middleware-endpoint}/service-customizations/index.js +0 -0
- package/node_modules/@smithy/{middleware-endpoint/dist-es → core/dist-es/submodules/endpoints/middleware-endpoint}/service-customizations/s3.js +0 -0
- package/node_modules/@smithy/{middleware-stack/dist-es → core/dist-es/submodules/endpoints/middleware-endpoint}/types.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/bdd/BinaryDecisionDiagram.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/cache/EndpointCache.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/debug/debugId.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/debug/index.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/debug/toDebugString.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/decideEndpoint.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/getEndpointUrlConfig.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/lib/booleanEquals.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/lib/coalesce.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/lib/getAttr.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/lib/getAttrPathList.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/lib/index.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/lib/isIpAddress.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/lib/isSet.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/lib/isValidHostLabel.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/lib/ite.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/lib/not.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/lib/parseURL.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/lib/split.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/lib/stringEquals.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/lib/substring.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/lib/uriEncode.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/resolveEndpoint.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/types/EndpointError.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/types/EndpointFunctions.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/types/EndpointRuleObject.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/types/ErrorRuleObject.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/types/RuleSetObject.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/types/TreeRuleObject.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/types/index.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/types/shared.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/utils/callFunction.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/utils/customEndpointFunctions.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/utils/endpointFunctions.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/utils/evaluateCondition.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/utils/evaluateConditions.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/utils/evaluateEndpointRule.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/utils/evaluateErrorRule.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/utils/evaluateRules.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/utils/evaluateTemplate.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/utils/evaluateTreeRule.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/utils/getEndpointHeaders.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/utils/getEndpointProperties.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/utils/getEndpointProperty.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/utils/getEndpointUrl.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/utils/getReferenceValue.js +0 -0
- package/node_modules/@smithy/{util-endpoints/dist-es → core/dist-es/submodules/endpoints/util-endpoints}/utils/index.js +0 -0
- package/node_modules/@smithy/{eventstream-codec/dist-es → core/dist-es/submodules/event-streams/eventstream-codec}/EventStreamCodec.js +0 -0
- package/node_modules/@smithy/{eventstream-codec/dist-es → core/dist-es/submodules/event-streams/eventstream-codec}/Message.js +0 -0
- package/node_modules/@smithy/{eventstream-codec/dist-es → core/dist-es/submodules/event-streams/eventstream-codec}/MessageDecoderStream.js +0 -0
- package/node_modules/@smithy/{eventstream-codec/dist-es → core/dist-es/submodules/event-streams/eventstream-codec}/MessageEncoderStream.js +0 -0
- package/node_modules/@smithy/{eventstream-codec/dist-es → core/dist-es/submodules/event-streams/eventstream-codec}/SmithyMessageDecoderStream.js +0 -0
- package/node_modules/@smithy/{eventstream-codec/dist-es → core/dist-es/submodules/event-streams/eventstream-codec}/SmithyMessageEncoderStream.js +0 -0
- package/node_modules/@smithy/{eventstream-codec/dist-es → core/dist-es/submodules/event-streams/eventstream-codec}/TestVectors.fixture.js +0 -0
- package/node_modules/@smithy/{eventstream-codec/dist-es → core/dist-es/submodules/event-streams/eventstream-codec}/splitMessage.js +0 -0
- package/node_modules/@smithy/{eventstream-codec/dist-es → core/dist-es/submodules/event-streams/eventstream-codec}/vectorTypes.fixture.js +0 -0
- package/node_modules/@smithy/{eventstream-serde-config-resolver/dist-es → core/dist-es/submodules/event-streams/eventstream-serde-config-resolver}/EventStreamSerdeConfig.js +0 -0
- package/node_modules/@smithy/{eventstream-serde-universal/dist-es → core/dist-es/submodules/event-streams/eventstream-serde-universal}/getChunkedStream.js +0 -0
- package/node_modules/@smithy/{eventstream-serde-universal/dist-es → core/dist-es/submodules/event-streams/eventstream-serde-universal}/getUnmarshalledStream.js +0 -0
- package/node_modules/@smithy/{protocol-http/dist-es → core/dist-es/submodules/protocols/protocol-http}/Field.js +0 -0
- package/node_modules/@smithy/{protocol-http/dist-es → core/dist-es/submodules/protocols/protocol-http}/Fields.js +0 -0
- package/node_modules/@smithy/{protocol-http/dist-es → core/dist-es/submodules/protocols/protocol-http}/extensions/httpExtensionConfiguration.js +0 -0
- package/node_modules/@smithy/{protocol-http/dist-es → core/dist-es/submodules/protocols/protocol-http}/httpHandler.js +0 -0
- package/node_modules/@smithy/{protocol-http/dist-es → core/dist-es/submodules/protocols/protocol-http}/httpRequest.js +0 -0
- package/node_modules/@smithy/{protocol-http/dist-es → core/dist-es/submodules/protocols/protocol-http}/httpResponse.js +0 -0
- package/node_modules/@smithy/{protocol-http/dist-es → core/dist-es/submodules/protocols/protocol-http}/isValidHostname.js +0 -0
- package/node_modules/@smithy/{protocol-http/dist-es → core/dist-es/submodules/protocols/protocol-http}/types.js +0 -0
- package/node_modules/@smithy/{querystring-parser/dist-es/index.js → core/dist-es/submodules/protocols/querystring-parser/parseQueryString.js} +0 -0
- package/node_modules/@smithy/{util-uri-escape/dist-es → core/dist-es/submodules/protocols/util-uri-escape}/escape-uri-path.js +0 -0
- package/node_modules/@smithy/{util-uri-escape/dist-es → core/dist-es/submodules/protocols/util-uri-escape}/escape-uri.js +0 -0
- package/node_modules/@smithy/{middleware-retry/dist-es → core/dist-es/submodules/retry/middleware-retry}/isStreamingPayload/isStreamingPayload.browser.js +0 -0
- package/node_modules/@smithy/{middleware-retry/dist-es → core/dist-es/submodules/retry/middleware-retry}/longPollMiddleware.js +0 -0
- package/node_modules/@smithy/{shared-ini-file-loader/dist-es → core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated}/types.js +0 -0
- package/node_modules/@smithy/{middleware-retry/dist-es → core/dist-es/submodules/retry/middleware-retry}/util.js +0 -0
- package/node_modules/@smithy/{service-error-classification/dist-es → core/dist-es/submodules/retry/service-error-classification}/constants.js +0 -0
- package/node_modules/@smithy/{util-retry/dist-es → core/dist-es/submodules/retry/util-retry}/ConfiguredRetryStrategy.js +1 -1
- /package/node_modules/@smithy/{util-retry/dist-es → core/dist-es/submodules/retry/util-retry}/DefaultRetryBackoffStrategy.js +0 -0
- /package/node_modules/@smithy/{util-retry/dist-es → core/dist-es/submodules/retry/util-retry}/DefaultRetryToken.js +0 -0
- /package/node_modules/@smithy/{util-retry/dist-es → core/dist-es/submodules/retry/util-retry}/config.js +0 -0
- /package/node_modules/@smithy/{util-retry/dist-es → core/dist-es/submodules/retry/util-retry}/constants.js +0 -0
- /package/node_modules/@smithy/{util-retry/dist-es → core/dist-es/submodules/retry/util-retry}/retries-2026-config.js +0 -0
- /package/node_modules/@smithy/{util-retry/dist-es → core/dist-es/submodules/retry/util-retry}/types.js +0 -0
- /package/node_modules/{@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer/dist-es/index.js → @smithy/core/dist-es/submodules/serde/is-array-buffer/is-array-buffer.js} +0 -0
- /package/node_modules/@smithy/{middleware-serde/dist-es → core/dist-es/submodules/serde/middleware-serde}/serdePlugin.js +0 -0
- /package/node_modules/@smithy/{middleware-serde/dist-es → core/dist-es/submodules/serde/middleware-serde}/serializerMiddleware.js +0 -0
- /package/node_modules/@smithy/{util-base64/dist-es/constants.browser.js → core/dist-es/submodules/serde/util-base64/constants-for-browser.js} +0 -0
- /package/node_modules/@smithy/{util-body-length-browser/dist-es/calculateBodyLength.js → core/dist-es/submodules/serde/util-body-length/calculateBodyLength.browser.js} +0 -0
- /package/node_modules/@smithy/{util-stream/dist-es → core/dist-es/submodules/serde/util-stream}/ByteArrayCollector.js +0 -0
- /package/node_modules/@smithy/{util-stream/dist-es → core/dist-es/submodules/serde/util-stream}/checksum/ChecksumStream.browser.js +0 -0
- /package/node_modules/@smithy/{util-stream/dist-es/createBufferedReadableStream.js → core/dist-es/submodules/serde/util-stream/createBufferedReadable.browser.js} +0 -0
- /package/node_modules/@smithy/{util-stream/dist-es → core/dist-es/submodules/serde/util-stream}/getAwsChunkedEncodingStream.browser.js +0 -0
- /package/node_modules/@smithy/{util-stream/dist-es → core/dist-es/submodules/serde/util-stream}/getAwsChunkedEncodingStream.js +0 -0
- /package/node_modules/@smithy/{util-stream/dist-es → core/dist-es/submodules/serde/util-stream}/headStream.browser.js +0 -0
- /package/node_modules/@smithy/{util-stream/dist-es → core/dist-es/submodules/serde/util-stream}/splitStream.browser.js +0 -0
- /package/node_modules/@smithy/{util-stream/dist-es → core/dist-es/submodules/serde/util-stream}/stream-type-check.js +0 -0
- /package/node_modules/@smithy/{util-utf8/dist-es → core/dist-es/submodules/serde/util-utf8}/fromUtf8.browser.js +0 -0
- /package/node_modules/@smithy/{util-utf8/dist-es → core/dist-es/submodules/serde/util-utf8}/toUint8Array.js +0 -0
- /package/node_modules/@smithy/{util-utf8/dist-es → core/dist-es/submodules/serde/util-utf8}/toUtf8.browser.js +0 -0
- /package/node_modules/@smithy/{uuid/dist-es → core/dist-es/submodules/serde/uuid}/v4.js +0 -0
|
@@ -0,0 +1,1686 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @module LRUCache
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LRUCache = void 0;
|
|
7
|
+
const diagnostics_channel_js_1 = require("./diagnostics-channel.js");
|
|
8
|
+
const perf_js_1 = require("./perf.js");
|
|
9
|
+
const hasSubscribers = () => diagnostics_channel_js_1.metrics.hasSubscribers || diagnostics_channel_js_1.tracing.hasSubscribers;
|
|
10
|
+
const warned = new Set();
|
|
11
|
+
/* c8 ignore start */
|
|
12
|
+
const PROCESS = (typeof process === 'object' && !!process ?
|
|
13
|
+
process
|
|
14
|
+
: {});
|
|
15
|
+
/* c8 ignore stop */
|
|
16
|
+
const emitWarning = (msg, type, code, fn) => {
|
|
17
|
+
if (typeof PROCESS.emitWarning === 'function') {
|
|
18
|
+
PROCESS.emitWarning(msg, type, code, fn);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
//oxlint-disable-next-line no-console
|
|
22
|
+
console.error(`[${code}] ${type}: ${msg}`);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const shouldWarn = (code) => !warned.has(code);
|
|
26
|
+
const TYPE = Symbol('type');
|
|
27
|
+
const isPosInt = (n) => !!n && n === Math.floor(n) && n > 0 && isFinite(n);
|
|
28
|
+
// This is a little bit ridiculous, tbh.
|
|
29
|
+
// The maximum array length is 2^32-1 or thereabouts on most JS impls.
|
|
30
|
+
// And well before that point, you're caching the entire world, I mean,
|
|
31
|
+
// that's ~32GB of just integers for the next/prev links, plus whatever
|
|
32
|
+
// else to hold that many keys and values. Just filling the memory with
|
|
33
|
+
// zeroes at init time is brutal when you get that big.
|
|
34
|
+
// But why not be complete?
|
|
35
|
+
// Maybe in the future, these limits will have expanded.
|
|
36
|
+
/* c8 ignore start */
|
|
37
|
+
const getUintArray = (max) => !isPosInt(max) ? null
|
|
38
|
+
: max <= Math.pow(2, 8) ? Uint8Array
|
|
39
|
+
: max <= Math.pow(2, 16) ? Uint16Array
|
|
40
|
+
: max <= Math.pow(2, 32) ? Uint32Array
|
|
41
|
+
: max <= Number.MAX_SAFE_INTEGER ? ZeroArray
|
|
42
|
+
: null;
|
|
43
|
+
/* c8 ignore stop */
|
|
44
|
+
class ZeroArray extends Array {
|
|
45
|
+
constructor(size) {
|
|
46
|
+
super(size);
|
|
47
|
+
this.fill(0);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
class Stack {
|
|
51
|
+
/* c8 ignore start - not sure why this is showing up uncovered?? */
|
|
52
|
+
heap;
|
|
53
|
+
/* c8 ignore stop */
|
|
54
|
+
length;
|
|
55
|
+
// private constructor
|
|
56
|
+
static #constructing = false;
|
|
57
|
+
static create(max) {
|
|
58
|
+
const HeapCls = getUintArray(max);
|
|
59
|
+
if (!HeapCls)
|
|
60
|
+
return [];
|
|
61
|
+
Stack.#constructing = true;
|
|
62
|
+
const s = new Stack(max, HeapCls);
|
|
63
|
+
Stack.#constructing = false;
|
|
64
|
+
return s;
|
|
65
|
+
}
|
|
66
|
+
constructor(max, HeapCls) {
|
|
67
|
+
/* c8 ignore start */
|
|
68
|
+
if (!Stack.#constructing) {
|
|
69
|
+
throw new TypeError('instantiate Stack using Stack.create(n)');
|
|
70
|
+
}
|
|
71
|
+
/* c8 ignore stop */
|
|
72
|
+
this.heap = new HeapCls(max);
|
|
73
|
+
this.length = 0;
|
|
74
|
+
}
|
|
75
|
+
push(n) {
|
|
76
|
+
this.heap[this.length++] = n;
|
|
77
|
+
}
|
|
78
|
+
pop() {
|
|
79
|
+
return this.heap[--this.length];
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Default export, the thing you're using this module to get.
|
|
84
|
+
*
|
|
85
|
+
* The `K` and `V` types define the key and value types, respectively. The
|
|
86
|
+
* optional `FC` type defines the type of the `context` object passed to
|
|
87
|
+
* `cache.fetch()` and `cache.memo()`.
|
|
88
|
+
*
|
|
89
|
+
* Keys and values **must not** be `null` or `undefined`.
|
|
90
|
+
*
|
|
91
|
+
* All properties from the options object (with the exception of `max`,
|
|
92
|
+
* `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are
|
|
93
|
+
* added as normal public members. (The listed options are read-only getters.)
|
|
94
|
+
*
|
|
95
|
+
* Changing any of these will alter the defaults for subsequent method calls.
|
|
96
|
+
*/
|
|
97
|
+
class LRUCache {
|
|
98
|
+
// options that cannot be changed without disaster
|
|
99
|
+
#max;
|
|
100
|
+
#maxSize;
|
|
101
|
+
#dispose;
|
|
102
|
+
#onInsert;
|
|
103
|
+
#disposeAfter;
|
|
104
|
+
#fetchMethod;
|
|
105
|
+
#memoMethod;
|
|
106
|
+
#perf;
|
|
107
|
+
/**
|
|
108
|
+
* {@link LRUCache.OptionsBase.perf}
|
|
109
|
+
*/
|
|
110
|
+
get perf() {
|
|
111
|
+
return this.#perf;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* {@link LRUCache.OptionsBase.ttl}
|
|
115
|
+
*/
|
|
116
|
+
ttl;
|
|
117
|
+
/**
|
|
118
|
+
* {@link LRUCache.OptionsBase.ttlResolution}
|
|
119
|
+
*/
|
|
120
|
+
ttlResolution;
|
|
121
|
+
/**
|
|
122
|
+
* {@link LRUCache.OptionsBase.ttlAutopurge}
|
|
123
|
+
*/
|
|
124
|
+
ttlAutopurge;
|
|
125
|
+
/**
|
|
126
|
+
* {@link LRUCache.OptionsBase.updateAgeOnGet}
|
|
127
|
+
*/
|
|
128
|
+
updateAgeOnGet;
|
|
129
|
+
/**
|
|
130
|
+
* {@link LRUCache.OptionsBase.updateAgeOnHas}
|
|
131
|
+
*/
|
|
132
|
+
updateAgeOnHas;
|
|
133
|
+
/**
|
|
134
|
+
* {@link LRUCache.OptionsBase.allowStale}
|
|
135
|
+
*/
|
|
136
|
+
allowStale;
|
|
137
|
+
/**
|
|
138
|
+
* {@link LRUCache.OptionsBase.noDisposeOnSet}
|
|
139
|
+
*/
|
|
140
|
+
noDisposeOnSet;
|
|
141
|
+
/**
|
|
142
|
+
* {@link LRUCache.OptionsBase.noUpdateTTL}
|
|
143
|
+
*/
|
|
144
|
+
noUpdateTTL;
|
|
145
|
+
/**
|
|
146
|
+
* {@link LRUCache.OptionsBase.maxEntrySize}
|
|
147
|
+
*/
|
|
148
|
+
maxEntrySize;
|
|
149
|
+
/**
|
|
150
|
+
* {@link LRUCache.OptionsBase.sizeCalculation}
|
|
151
|
+
*/
|
|
152
|
+
sizeCalculation;
|
|
153
|
+
/**
|
|
154
|
+
* {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}
|
|
155
|
+
*/
|
|
156
|
+
noDeleteOnFetchRejection;
|
|
157
|
+
/**
|
|
158
|
+
* {@link LRUCache.OptionsBase.noDeleteOnStaleGet}
|
|
159
|
+
*/
|
|
160
|
+
noDeleteOnStaleGet;
|
|
161
|
+
/**
|
|
162
|
+
* {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}
|
|
163
|
+
*/
|
|
164
|
+
allowStaleOnFetchAbort;
|
|
165
|
+
/**
|
|
166
|
+
* {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}
|
|
167
|
+
*/
|
|
168
|
+
allowStaleOnFetchRejection;
|
|
169
|
+
/**
|
|
170
|
+
* {@link LRUCache.OptionsBase.ignoreFetchAbort}
|
|
171
|
+
*/
|
|
172
|
+
ignoreFetchAbort;
|
|
173
|
+
// computed properties
|
|
174
|
+
#size;
|
|
175
|
+
#calculatedSize;
|
|
176
|
+
#keyMap;
|
|
177
|
+
#keyList;
|
|
178
|
+
#valList;
|
|
179
|
+
#next;
|
|
180
|
+
#prev;
|
|
181
|
+
#head;
|
|
182
|
+
#tail;
|
|
183
|
+
#free;
|
|
184
|
+
#disposed;
|
|
185
|
+
#sizes;
|
|
186
|
+
#starts;
|
|
187
|
+
#ttls;
|
|
188
|
+
#autopurgeTimers;
|
|
189
|
+
#hasDispose;
|
|
190
|
+
#hasFetchMethod;
|
|
191
|
+
#hasDisposeAfter;
|
|
192
|
+
#hasOnInsert;
|
|
193
|
+
/**
|
|
194
|
+
* Do not call this method unless you need to inspect the
|
|
195
|
+
* inner workings of the cache. If anything returned by this
|
|
196
|
+
* object is modified in any way, strange breakage may occur.
|
|
197
|
+
*
|
|
198
|
+
* These fields are private for a reason!
|
|
199
|
+
*
|
|
200
|
+
* @internal
|
|
201
|
+
*/
|
|
202
|
+
static unsafeExposeInternals(c) {
|
|
203
|
+
return {
|
|
204
|
+
// properties
|
|
205
|
+
starts: c.#starts,
|
|
206
|
+
ttls: c.#ttls,
|
|
207
|
+
autopurgeTimers: c.#autopurgeTimers,
|
|
208
|
+
sizes: c.#sizes,
|
|
209
|
+
keyMap: c.#keyMap,
|
|
210
|
+
keyList: c.#keyList,
|
|
211
|
+
valList: c.#valList,
|
|
212
|
+
next: c.#next,
|
|
213
|
+
prev: c.#prev,
|
|
214
|
+
get head() {
|
|
215
|
+
return c.#head;
|
|
216
|
+
},
|
|
217
|
+
get tail() {
|
|
218
|
+
return c.#tail;
|
|
219
|
+
},
|
|
220
|
+
free: c.#free,
|
|
221
|
+
// methods
|
|
222
|
+
isBackgroundFetch: (p) => c.#isBackgroundFetch(p),
|
|
223
|
+
backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context),
|
|
224
|
+
moveToTail: (index) => c.#moveToTail(index),
|
|
225
|
+
indexes: (options) => c.#indexes(options),
|
|
226
|
+
rindexes: (options) => c.#rindexes(options),
|
|
227
|
+
isStale: (index) => c.#isStale(index),
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
// Protected read-only members
|
|
231
|
+
/**
|
|
232
|
+
* {@link LRUCache.OptionsBase.max} (read-only)
|
|
233
|
+
*/
|
|
234
|
+
get max() {
|
|
235
|
+
return this.#max;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* {@link LRUCache.OptionsBase.maxSize} (read-only)
|
|
239
|
+
*/
|
|
240
|
+
get maxSize() {
|
|
241
|
+
return this.#maxSize;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* The total computed size of items in the cache (read-only)
|
|
245
|
+
*/
|
|
246
|
+
get calculatedSize() {
|
|
247
|
+
return this.#calculatedSize;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* The number of items stored in the cache (read-only)
|
|
251
|
+
*/
|
|
252
|
+
get size() {
|
|
253
|
+
return this.#size;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* {@link LRUCache.OptionsBase.fetchMethod} (read-only)
|
|
257
|
+
*/
|
|
258
|
+
get fetchMethod() {
|
|
259
|
+
return this.#fetchMethod;
|
|
260
|
+
}
|
|
261
|
+
get memoMethod() {
|
|
262
|
+
return this.#memoMethod;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* {@link LRUCache.OptionsBase.dispose} (read-only)
|
|
266
|
+
*/
|
|
267
|
+
get dispose() {
|
|
268
|
+
return this.#dispose;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* {@link LRUCache.OptionsBase.onInsert} (read-only)
|
|
272
|
+
*/
|
|
273
|
+
get onInsert() {
|
|
274
|
+
return this.#onInsert;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* {@link LRUCache.OptionsBase.disposeAfter} (read-only)
|
|
278
|
+
*/
|
|
279
|
+
get disposeAfter() {
|
|
280
|
+
return this.#disposeAfter;
|
|
281
|
+
}
|
|
282
|
+
constructor(options) {
|
|
283
|
+
const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, onInsert, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, perf, } = options;
|
|
284
|
+
if (perf !== undefined) {
|
|
285
|
+
if (typeof perf?.now !== 'function') {
|
|
286
|
+
throw new TypeError('perf option must have a now() method if specified');
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
this.#perf = perf ?? perf_js_1.defaultPerf;
|
|
290
|
+
if (max !== 0 && !isPosInt(max)) {
|
|
291
|
+
throw new TypeError('max option must be a nonnegative integer');
|
|
292
|
+
}
|
|
293
|
+
const UintArray = max ? getUintArray(max) : Array;
|
|
294
|
+
if (!UintArray) {
|
|
295
|
+
throw new Error('invalid max value: ' + max);
|
|
296
|
+
}
|
|
297
|
+
this.#max = max;
|
|
298
|
+
this.#maxSize = maxSize;
|
|
299
|
+
this.maxEntrySize = maxEntrySize || this.#maxSize;
|
|
300
|
+
this.sizeCalculation = sizeCalculation;
|
|
301
|
+
if (this.sizeCalculation) {
|
|
302
|
+
if (!this.#maxSize && !this.maxEntrySize) {
|
|
303
|
+
throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize');
|
|
304
|
+
}
|
|
305
|
+
if (typeof this.sizeCalculation !== 'function') {
|
|
306
|
+
throw new TypeError('sizeCalculation set to non-function');
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
if (memoMethod !== undefined && typeof memoMethod !== 'function') {
|
|
310
|
+
throw new TypeError('memoMethod must be a function if defined');
|
|
311
|
+
}
|
|
312
|
+
this.#memoMethod = memoMethod;
|
|
313
|
+
if (fetchMethod !== undefined && typeof fetchMethod !== 'function') {
|
|
314
|
+
throw new TypeError('fetchMethod must be a function if specified');
|
|
315
|
+
}
|
|
316
|
+
this.#fetchMethod = fetchMethod;
|
|
317
|
+
this.#hasFetchMethod = !!fetchMethod;
|
|
318
|
+
this.#keyMap = new Map();
|
|
319
|
+
this.#keyList = Array.from({ length: max }).fill(undefined);
|
|
320
|
+
this.#valList = Array.from({ length: max }).fill(undefined);
|
|
321
|
+
this.#next = new UintArray(max);
|
|
322
|
+
this.#prev = new UintArray(max);
|
|
323
|
+
this.#head = 0;
|
|
324
|
+
this.#tail = 0;
|
|
325
|
+
this.#free = Stack.create(max);
|
|
326
|
+
this.#size = 0;
|
|
327
|
+
this.#calculatedSize = 0;
|
|
328
|
+
if (typeof dispose === 'function') {
|
|
329
|
+
this.#dispose = dispose;
|
|
330
|
+
}
|
|
331
|
+
if (typeof onInsert === 'function') {
|
|
332
|
+
this.#onInsert = onInsert;
|
|
333
|
+
}
|
|
334
|
+
if (typeof disposeAfter === 'function') {
|
|
335
|
+
this.#disposeAfter = disposeAfter;
|
|
336
|
+
this.#disposed = [];
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
this.#disposeAfter = undefined;
|
|
340
|
+
this.#disposed = undefined;
|
|
341
|
+
}
|
|
342
|
+
this.#hasDispose = !!this.#dispose;
|
|
343
|
+
this.#hasOnInsert = !!this.#onInsert;
|
|
344
|
+
this.#hasDisposeAfter = !!this.#disposeAfter;
|
|
345
|
+
this.noDisposeOnSet = !!noDisposeOnSet;
|
|
346
|
+
this.noUpdateTTL = !!noUpdateTTL;
|
|
347
|
+
this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection;
|
|
348
|
+
this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection;
|
|
349
|
+
this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort;
|
|
350
|
+
this.ignoreFetchAbort = !!ignoreFetchAbort;
|
|
351
|
+
// NB: maxEntrySize is set to maxSize if it's set
|
|
352
|
+
if (this.maxEntrySize !== 0) {
|
|
353
|
+
if (this.#maxSize !== 0) {
|
|
354
|
+
if (!isPosInt(this.#maxSize)) {
|
|
355
|
+
throw new TypeError('maxSize must be a positive integer if specified');
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
if (!isPosInt(this.maxEntrySize)) {
|
|
359
|
+
throw new TypeError('maxEntrySize must be a positive integer if specified');
|
|
360
|
+
}
|
|
361
|
+
this.#initializeSizeTracking();
|
|
362
|
+
}
|
|
363
|
+
this.allowStale = !!allowStale;
|
|
364
|
+
this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;
|
|
365
|
+
this.updateAgeOnGet = !!updateAgeOnGet;
|
|
366
|
+
this.updateAgeOnHas = !!updateAgeOnHas;
|
|
367
|
+
this.ttlResolution =
|
|
368
|
+
isPosInt(ttlResolution) || ttlResolution === 0 ? ttlResolution : 1;
|
|
369
|
+
this.ttlAutopurge = !!ttlAutopurge;
|
|
370
|
+
this.ttl = ttl || 0;
|
|
371
|
+
if (this.ttl) {
|
|
372
|
+
if (!isPosInt(this.ttl)) {
|
|
373
|
+
throw new TypeError('ttl must be a positive integer if specified');
|
|
374
|
+
}
|
|
375
|
+
this.#initializeTTLTracking();
|
|
376
|
+
}
|
|
377
|
+
// do not allow completely unbounded caches
|
|
378
|
+
if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {
|
|
379
|
+
throw new TypeError('At least one of max, maxSize, or ttl is required');
|
|
380
|
+
}
|
|
381
|
+
if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {
|
|
382
|
+
const code = 'LRU_CACHE_UNBOUNDED';
|
|
383
|
+
if (shouldWarn(code)) {
|
|
384
|
+
warned.add(code);
|
|
385
|
+
const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' +
|
|
386
|
+
'result in unbounded memory consumption.';
|
|
387
|
+
emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Return the number of ms left in the item's TTL. If item is not in cache,
|
|
393
|
+
* returns `0`. Returns `Infinity` if item is in cache without a defined TTL.
|
|
394
|
+
*/
|
|
395
|
+
getRemainingTTL(key) {
|
|
396
|
+
return this.#keyMap.has(key) ? Infinity : 0;
|
|
397
|
+
}
|
|
398
|
+
#initializeTTLTracking() {
|
|
399
|
+
const ttls = new ZeroArray(this.#max);
|
|
400
|
+
const starts = new ZeroArray(this.#max);
|
|
401
|
+
this.#ttls = ttls;
|
|
402
|
+
this.#starts = starts;
|
|
403
|
+
const purgeTimers = this.ttlAutopurge ?
|
|
404
|
+
Array.from({
|
|
405
|
+
length: this.#max,
|
|
406
|
+
})
|
|
407
|
+
: undefined;
|
|
408
|
+
this.#autopurgeTimers = purgeTimers;
|
|
409
|
+
this.#setItemTTL = (index, ttl, start = this.#perf.now()) => {
|
|
410
|
+
starts[index] = ttl !== 0 ? start : 0;
|
|
411
|
+
ttls[index] = ttl;
|
|
412
|
+
setPurgetTimer(index, ttl);
|
|
413
|
+
};
|
|
414
|
+
this.#updateItemAge = index => {
|
|
415
|
+
starts[index] = ttls[index] !== 0 ? this.#perf.now() : 0;
|
|
416
|
+
setPurgetTimer(index, ttls[index]);
|
|
417
|
+
};
|
|
418
|
+
// clear out the purge timer if we're setting TTL to 0, and
|
|
419
|
+
// previously had a ttl purge timer running, so it doesn't
|
|
420
|
+
// fire unnecessarily. Don't need to do this if we're not doing
|
|
421
|
+
// autopurge.
|
|
422
|
+
const setPurgetTimer = !this.ttlAutopurge ?
|
|
423
|
+
() => { }
|
|
424
|
+
: (index, ttl) => {
|
|
425
|
+
if (purgeTimers?.[index]) {
|
|
426
|
+
clearTimeout(purgeTimers[index]);
|
|
427
|
+
purgeTimers[index] = undefined;
|
|
428
|
+
}
|
|
429
|
+
if (ttl && ttl !== 0 && purgeTimers) {
|
|
430
|
+
const t = setTimeout(() => {
|
|
431
|
+
if (this.#isStale(index)) {
|
|
432
|
+
this.#delete(this.#keyList[index], 'expire');
|
|
433
|
+
}
|
|
434
|
+
}, ttl + 1);
|
|
435
|
+
// unref() not supported on all platforms
|
|
436
|
+
/* c8 ignore start */
|
|
437
|
+
if (t.unref) {
|
|
438
|
+
t.unref();
|
|
439
|
+
}
|
|
440
|
+
/* c8 ignore stop */
|
|
441
|
+
purgeTimers[index] = t;
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
this.#statusTTL = (status, index) => {
|
|
445
|
+
if (ttls[index]) {
|
|
446
|
+
const ttl = ttls[index];
|
|
447
|
+
const start = starts[index];
|
|
448
|
+
/* c8 ignore start */
|
|
449
|
+
if (!ttl || !start) {
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
/* c8 ignore stop */
|
|
453
|
+
status.ttl = ttl;
|
|
454
|
+
status.start = start;
|
|
455
|
+
status.now = cachedNow || getNow();
|
|
456
|
+
const age = status.now - start;
|
|
457
|
+
status.remainingTTL = ttl - age;
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
// debounce calls to perf.now() to 1s so we're not hitting
|
|
461
|
+
// that costly call repeatedly.
|
|
462
|
+
let cachedNow = 0;
|
|
463
|
+
const getNow = () => {
|
|
464
|
+
const n = this.#perf.now();
|
|
465
|
+
if (this.ttlResolution > 0) {
|
|
466
|
+
cachedNow = n;
|
|
467
|
+
const t = setTimeout(() => (cachedNow = 0), this.ttlResolution);
|
|
468
|
+
// not available on all platforms
|
|
469
|
+
/* c8 ignore start */
|
|
470
|
+
if (t.unref) {
|
|
471
|
+
t.unref();
|
|
472
|
+
}
|
|
473
|
+
/* c8 ignore stop */
|
|
474
|
+
}
|
|
475
|
+
return n;
|
|
476
|
+
};
|
|
477
|
+
this.getRemainingTTL = key => {
|
|
478
|
+
const index = this.#keyMap.get(key);
|
|
479
|
+
if (index === undefined) {
|
|
480
|
+
return 0;
|
|
481
|
+
}
|
|
482
|
+
const ttl = ttls[index];
|
|
483
|
+
const start = starts[index];
|
|
484
|
+
if (!ttl || !start) {
|
|
485
|
+
return Infinity;
|
|
486
|
+
}
|
|
487
|
+
const age = (cachedNow || getNow()) - start;
|
|
488
|
+
return ttl - age;
|
|
489
|
+
};
|
|
490
|
+
this.#isStale = index => {
|
|
491
|
+
const s = starts[index];
|
|
492
|
+
const t = ttls[index];
|
|
493
|
+
return !!t && !!s && (cachedNow || getNow()) - s > t;
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
// conditionally set private methods related to TTL
|
|
497
|
+
#updateItemAge = () => { };
|
|
498
|
+
#statusTTL = () => { };
|
|
499
|
+
#setItemTTL = () => { };
|
|
500
|
+
/* c8 ignore stop */
|
|
501
|
+
#isStale = () => false;
|
|
502
|
+
#initializeSizeTracking() {
|
|
503
|
+
const sizes = new ZeroArray(this.#max);
|
|
504
|
+
this.#calculatedSize = 0;
|
|
505
|
+
this.#sizes = sizes;
|
|
506
|
+
this.#removeItemSize = index => {
|
|
507
|
+
this.#calculatedSize -= sizes[index];
|
|
508
|
+
sizes[index] = 0;
|
|
509
|
+
};
|
|
510
|
+
this.#requireSize = (k, v, size, sizeCalculation) => {
|
|
511
|
+
// provisionally accept background fetches.
|
|
512
|
+
// actual value size will be checked when they return.
|
|
513
|
+
if (this.#isBackgroundFetch(v)) {
|
|
514
|
+
return 0;
|
|
515
|
+
}
|
|
516
|
+
if (!isPosInt(size)) {
|
|
517
|
+
if (sizeCalculation) {
|
|
518
|
+
if (typeof sizeCalculation !== 'function') {
|
|
519
|
+
throw new TypeError('sizeCalculation must be a function');
|
|
520
|
+
}
|
|
521
|
+
size = sizeCalculation(v, k);
|
|
522
|
+
if (!isPosInt(size)) {
|
|
523
|
+
throw new TypeError('sizeCalculation return invalid (expect positive integer)');
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
else {
|
|
527
|
+
throw new TypeError('invalid size value (must be positive integer). ' +
|
|
528
|
+
'When maxSize or maxEntrySize is used, sizeCalculation ' +
|
|
529
|
+
'or size must be set.');
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
return size;
|
|
533
|
+
};
|
|
534
|
+
this.#addItemSize = (index, size, status) => {
|
|
535
|
+
sizes[index] = size;
|
|
536
|
+
if (this.#maxSize) {
|
|
537
|
+
const maxSize = this.#maxSize - sizes[index];
|
|
538
|
+
while (this.#calculatedSize > maxSize) {
|
|
539
|
+
this.#evict(true);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
this.#calculatedSize += sizes[index];
|
|
543
|
+
if (status) {
|
|
544
|
+
status.entrySize = size;
|
|
545
|
+
status.totalCalculatedSize = this.#calculatedSize;
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
#removeItemSize = _i => { };
|
|
550
|
+
#addItemSize = (_i, _s, _st) => { };
|
|
551
|
+
#requireSize = (_k, _v, size, sizeCalculation) => {
|
|
552
|
+
if (size || sizeCalculation) {
|
|
553
|
+
throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache');
|
|
554
|
+
}
|
|
555
|
+
return 0;
|
|
556
|
+
};
|
|
557
|
+
*#indexes({ allowStale = this.allowStale } = {}) {
|
|
558
|
+
if (this.#size) {
|
|
559
|
+
for (let i = this.#tail; this.#isValidIndex(i);) {
|
|
560
|
+
if (allowStale || !this.#isStale(i)) {
|
|
561
|
+
yield i;
|
|
562
|
+
}
|
|
563
|
+
if (i === this.#head) {
|
|
564
|
+
break;
|
|
565
|
+
}
|
|
566
|
+
else {
|
|
567
|
+
i = this.#prev[i];
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
*#rindexes({ allowStale = this.allowStale } = {}) {
|
|
573
|
+
if (this.#size) {
|
|
574
|
+
for (let i = this.#head; this.#isValidIndex(i);) {
|
|
575
|
+
if (allowStale || !this.#isStale(i)) {
|
|
576
|
+
yield i;
|
|
577
|
+
}
|
|
578
|
+
if (i === this.#tail) {
|
|
579
|
+
break;
|
|
580
|
+
}
|
|
581
|
+
else {
|
|
582
|
+
i = this.#next[i];
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
#isValidIndex(index) {
|
|
588
|
+
return (index !== undefined &&
|
|
589
|
+
this.#keyMap.get(this.#keyList[index]) === index);
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Return a generator yielding `[key, value]` pairs,
|
|
593
|
+
* in order from most recently used to least recently used.
|
|
594
|
+
*/
|
|
595
|
+
*entries() {
|
|
596
|
+
for (const i of this.#indexes()) {
|
|
597
|
+
if (this.#valList[i] !== undefined &&
|
|
598
|
+
this.#keyList[i] !== undefined &&
|
|
599
|
+
!this.#isBackgroundFetch(this.#valList[i])) {
|
|
600
|
+
yield [this.#keyList[i], this.#valList[i]];
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* Inverse order version of {@link LRUCache.entries}
|
|
606
|
+
*
|
|
607
|
+
* Return a generator yielding `[key, value]` pairs,
|
|
608
|
+
* in order from least recently used to most recently used.
|
|
609
|
+
*/
|
|
610
|
+
*rentries() {
|
|
611
|
+
for (const i of this.#rindexes()) {
|
|
612
|
+
if (this.#valList[i] !== undefined &&
|
|
613
|
+
this.#keyList[i] !== undefined &&
|
|
614
|
+
!this.#isBackgroundFetch(this.#valList[i])) {
|
|
615
|
+
yield [this.#keyList[i], this.#valList[i]];
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* Return a generator yielding the keys in the cache,
|
|
621
|
+
* in order from most recently used to least recently used.
|
|
622
|
+
*/
|
|
623
|
+
*keys() {
|
|
624
|
+
for (const i of this.#indexes()) {
|
|
625
|
+
const k = this.#keyList[i];
|
|
626
|
+
if (k !== undefined && !this.#isBackgroundFetch(this.#valList[i])) {
|
|
627
|
+
yield k;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Inverse order version of {@link LRUCache.keys}
|
|
633
|
+
*
|
|
634
|
+
* Return a generator yielding the keys in the cache,
|
|
635
|
+
* in order from least recently used to most recently used.
|
|
636
|
+
*/
|
|
637
|
+
*rkeys() {
|
|
638
|
+
for (const i of this.#rindexes()) {
|
|
639
|
+
const k = this.#keyList[i];
|
|
640
|
+
if (k !== undefined && !this.#isBackgroundFetch(this.#valList[i])) {
|
|
641
|
+
yield k;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Return a generator yielding the values in the cache,
|
|
647
|
+
* in order from most recently used to least recently used.
|
|
648
|
+
*/
|
|
649
|
+
*values() {
|
|
650
|
+
for (const i of this.#indexes()) {
|
|
651
|
+
const v = this.#valList[i];
|
|
652
|
+
if (v !== undefined && !this.#isBackgroundFetch(this.#valList[i])) {
|
|
653
|
+
yield this.#valList[i];
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* Inverse order version of {@link LRUCache.values}
|
|
659
|
+
*
|
|
660
|
+
* Return a generator yielding the values in the cache,
|
|
661
|
+
* in order from least recently used to most recently used.
|
|
662
|
+
*/
|
|
663
|
+
*rvalues() {
|
|
664
|
+
for (const i of this.#rindexes()) {
|
|
665
|
+
const v = this.#valList[i];
|
|
666
|
+
if (v !== undefined && !this.#isBackgroundFetch(this.#valList[i])) {
|
|
667
|
+
yield this.#valList[i];
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* Iterating over the cache itself yields the same results as
|
|
673
|
+
* {@link LRUCache.entries}
|
|
674
|
+
*/
|
|
675
|
+
[Symbol.iterator]() {
|
|
676
|
+
return this.entries();
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* A String value that is used in the creation of the default string
|
|
680
|
+
* description of an object. Called by the built-in method
|
|
681
|
+
* `Object.prototype.toString`.
|
|
682
|
+
*/
|
|
683
|
+
[Symbol.toStringTag] = 'LRUCache';
|
|
684
|
+
/**
|
|
685
|
+
* Find a value for which the supplied fn method returns a truthy value,
|
|
686
|
+
* similar to `Array.find()`. fn is called as `fn(value, key, cache)`.
|
|
687
|
+
*/
|
|
688
|
+
find(fn, getOptions = {}) {
|
|
689
|
+
for (const i of this.#indexes()) {
|
|
690
|
+
const v = this.#valList[i];
|
|
691
|
+
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
692
|
+
if (value === undefined)
|
|
693
|
+
continue;
|
|
694
|
+
if (fn(value, this.#keyList[i], this)) {
|
|
695
|
+
return this.#get(this.#keyList[i], getOptions);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* Call the supplied function on each item in the cache, in order from most
|
|
701
|
+
* recently used to least recently used.
|
|
702
|
+
*
|
|
703
|
+
* `fn` is called as `fn(value, key, cache)`.
|
|
704
|
+
*
|
|
705
|
+
* If `thisp` is provided, function will be called in the `this`-context of
|
|
706
|
+
* the provided object, or the cache if no `thisp` object is provided.
|
|
707
|
+
*
|
|
708
|
+
* Does not update age or recenty of use, or iterate over stale values.
|
|
709
|
+
*/
|
|
710
|
+
forEach(fn, thisp = this) {
|
|
711
|
+
for (const i of this.#indexes()) {
|
|
712
|
+
const v = this.#valList[i];
|
|
713
|
+
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
714
|
+
if (value === undefined)
|
|
715
|
+
continue;
|
|
716
|
+
fn.call(thisp, value, this.#keyList[i], this);
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* The same as {@link LRUCache.forEach} but items are iterated over in
|
|
721
|
+
* reverse order. (ie, less recently used items are iterated over first.)
|
|
722
|
+
*/
|
|
723
|
+
rforEach(fn, thisp = this) {
|
|
724
|
+
for (const i of this.#rindexes()) {
|
|
725
|
+
const v = this.#valList[i];
|
|
726
|
+
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
727
|
+
if (value === undefined)
|
|
728
|
+
continue;
|
|
729
|
+
fn.call(thisp, value, this.#keyList[i], this);
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
/**
|
|
733
|
+
* Delete any stale entries. Returns true if anything was removed,
|
|
734
|
+
* false otherwise.
|
|
735
|
+
*/
|
|
736
|
+
purgeStale() {
|
|
737
|
+
let deleted = false;
|
|
738
|
+
for (const i of this.#rindexes({ allowStale: true })) {
|
|
739
|
+
if (this.#isStale(i)) {
|
|
740
|
+
this.#delete(this.#keyList[i], 'expire');
|
|
741
|
+
deleted = true;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
return deleted;
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* Get the extended info about a given entry, to get its value, size, and
|
|
748
|
+
* TTL info simultaneously. Returns `undefined` if the key is not present.
|
|
749
|
+
*
|
|
750
|
+
* Unlike {@link LRUCache#dump}, which is designed to be portable and survive
|
|
751
|
+
* serialization, the `start` value is always the current timestamp, and the
|
|
752
|
+
* `ttl` is a calculated remaining time to live (negative if expired).
|
|
753
|
+
*
|
|
754
|
+
* Always returns stale values, if their info is found in the cache, so be
|
|
755
|
+
* sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})
|
|
756
|
+
* if relevant.
|
|
757
|
+
*/
|
|
758
|
+
info(key) {
|
|
759
|
+
const i = this.#keyMap.get(key);
|
|
760
|
+
if (i === undefined)
|
|
761
|
+
return undefined;
|
|
762
|
+
const v = this.#valList[i];
|
|
763
|
+
/* c8 ignore start - this isn't tested for the info function,
|
|
764
|
+
* but it's the same logic as found in other places. */
|
|
765
|
+
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
766
|
+
if (value === undefined)
|
|
767
|
+
return undefined;
|
|
768
|
+
/* c8 ignore stop */
|
|
769
|
+
const entry = { value };
|
|
770
|
+
if (this.#ttls && this.#starts) {
|
|
771
|
+
const ttl = this.#ttls[i];
|
|
772
|
+
const start = this.#starts[i];
|
|
773
|
+
if (ttl && start) {
|
|
774
|
+
const remain = ttl - (this.#perf.now() - start);
|
|
775
|
+
entry.ttl = remain;
|
|
776
|
+
entry.start = Date.now();
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
if (this.#sizes) {
|
|
780
|
+
entry.size = this.#sizes[i];
|
|
781
|
+
}
|
|
782
|
+
return entry;
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* Return an array of [key, {@link LRUCache.Entry}] tuples which can be
|
|
786
|
+
* passed to {@link LRUCache#load}.
|
|
787
|
+
*
|
|
788
|
+
* The `start` fields are calculated relative to a portable `Date.now()`
|
|
789
|
+
* timestamp, even if `performance.now()` is available.
|
|
790
|
+
*
|
|
791
|
+
* Stale entries are always included in the `dump`, even if
|
|
792
|
+
* {@link LRUCache.OptionsBase.allowStale} is false.
|
|
793
|
+
*
|
|
794
|
+
* Note: this returns an actual array, not a generator, so it can be more
|
|
795
|
+
* easily passed around.
|
|
796
|
+
*/
|
|
797
|
+
dump() {
|
|
798
|
+
const arr = [];
|
|
799
|
+
for (const i of this.#indexes({ allowStale: true })) {
|
|
800
|
+
const key = this.#keyList[i];
|
|
801
|
+
const v = this.#valList[i];
|
|
802
|
+
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
803
|
+
if (value === undefined || key === undefined)
|
|
804
|
+
continue;
|
|
805
|
+
const entry = { value };
|
|
806
|
+
if (this.#ttls && this.#starts) {
|
|
807
|
+
entry.ttl = this.#ttls[i];
|
|
808
|
+
// always dump the start relative to a portable timestamp
|
|
809
|
+
// it's ok for this to be a bit slow, it's a rare operation.
|
|
810
|
+
const age = this.#perf.now() - this.#starts[i];
|
|
811
|
+
entry.start = Math.floor(Date.now() - age);
|
|
812
|
+
}
|
|
813
|
+
if (this.#sizes) {
|
|
814
|
+
entry.size = this.#sizes[i];
|
|
815
|
+
}
|
|
816
|
+
arr.unshift([key, entry]);
|
|
817
|
+
}
|
|
818
|
+
return arr;
|
|
819
|
+
}
|
|
820
|
+
/**
|
|
821
|
+
* Reset the cache and load in the items in entries in the order listed.
|
|
822
|
+
*
|
|
823
|
+
* The shape of the resulting cache may be different if the same options are
|
|
824
|
+
* not used in both caches.
|
|
825
|
+
*
|
|
826
|
+
* The `start` fields are assumed to be calculated relative to a portable
|
|
827
|
+
* `Date.now()` timestamp, even if `performance.now()` is available.
|
|
828
|
+
*/
|
|
829
|
+
load(arr) {
|
|
830
|
+
this.clear();
|
|
831
|
+
for (const [key, entry] of arr) {
|
|
832
|
+
if (entry.start) {
|
|
833
|
+
// entry.start is a portable timestamp, but we may be using
|
|
834
|
+
// node's performance.now(), so calculate the offset, so that
|
|
835
|
+
// we get the intended remaining TTL, no matter how long it's
|
|
836
|
+
// been on ice.
|
|
837
|
+
//
|
|
838
|
+
// it's ok for this to be a bit slow, it's a rare operation.
|
|
839
|
+
const age = Date.now() - entry.start;
|
|
840
|
+
entry.start = this.#perf.now() - age;
|
|
841
|
+
}
|
|
842
|
+
this.#set(key, entry.value, entry);
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
/**
|
|
846
|
+
* Add a value to the cache.
|
|
847
|
+
*
|
|
848
|
+
* Note: if `undefined` is specified as a value, this is an alias for
|
|
849
|
+
* {@link LRUCache#delete}
|
|
850
|
+
*
|
|
851
|
+
* Fields on the {@link LRUCache.SetOptions} options param will override
|
|
852
|
+
* their corresponding values in the constructor options for the scope
|
|
853
|
+
* of this single `set()` operation.
|
|
854
|
+
*
|
|
855
|
+
* If `start` is provided, then that will set the effective start
|
|
856
|
+
* time for the TTL calculation. Note that this must be a previous
|
|
857
|
+
* value of `performance.now()` if supported, or a previous value of
|
|
858
|
+
* `Date.now()` if not.
|
|
859
|
+
*
|
|
860
|
+
* Options object may also include `size`, which will prevent
|
|
861
|
+
* calling the `sizeCalculation` function and just use the specified
|
|
862
|
+
* number if it is a positive integer, and `noDisposeOnSet` which
|
|
863
|
+
* will prevent calling a `dispose` function in the case of
|
|
864
|
+
* overwrites.
|
|
865
|
+
*
|
|
866
|
+
* If the `size` (or return value of `sizeCalculation`) for a given
|
|
867
|
+
* entry is greater than `maxEntrySize`, then the item will not be
|
|
868
|
+
* added to the cache.
|
|
869
|
+
*
|
|
870
|
+
* Will update the recency of the entry.
|
|
871
|
+
*
|
|
872
|
+
* If the value is `undefined`, then this is an alias for
|
|
873
|
+
* `cache.delete(key)`. `undefined` is never stored in the cache.
|
|
874
|
+
*/
|
|
875
|
+
set(k, v, setOptions = {}) {
|
|
876
|
+
const { status = diagnostics_channel_js_1.metrics.hasSubscribers ? {} : undefined } = setOptions;
|
|
877
|
+
setOptions.status = status;
|
|
878
|
+
if (status) {
|
|
879
|
+
status.op = 'set';
|
|
880
|
+
status.key = k;
|
|
881
|
+
if (v !== undefined)
|
|
882
|
+
status.value = v;
|
|
883
|
+
}
|
|
884
|
+
const result = this.#set(k, v, setOptions);
|
|
885
|
+
if (status && diagnostics_channel_js_1.metrics.hasSubscribers) {
|
|
886
|
+
diagnostics_channel_js_1.metrics.publish(status);
|
|
887
|
+
}
|
|
888
|
+
return result;
|
|
889
|
+
}
|
|
890
|
+
#set(k, v, setOptions = {}) {
|
|
891
|
+
const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions;
|
|
892
|
+
if (v === undefined) {
|
|
893
|
+
if (status)
|
|
894
|
+
status.set = 'deleted';
|
|
895
|
+
this.delete(k);
|
|
896
|
+
return this;
|
|
897
|
+
}
|
|
898
|
+
let { noUpdateTTL = this.noUpdateTTL } = setOptions;
|
|
899
|
+
if (status && !this.#isBackgroundFetch(v))
|
|
900
|
+
status.value = v;
|
|
901
|
+
const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation, status);
|
|
902
|
+
// if the item doesn't fit, don't do anything
|
|
903
|
+
// NB: maxEntrySize set to maxSize by default
|
|
904
|
+
if (this.maxEntrySize && size > this.maxEntrySize) {
|
|
905
|
+
// have to delete, in case something is there already.
|
|
906
|
+
this.#delete(k, 'set');
|
|
907
|
+
if (status) {
|
|
908
|
+
status.set = 'miss';
|
|
909
|
+
status.maxEntrySizeExceeded = true;
|
|
910
|
+
}
|
|
911
|
+
return this;
|
|
912
|
+
}
|
|
913
|
+
let index = this.#size === 0 ? undefined : this.#keyMap.get(k);
|
|
914
|
+
if (index === undefined) {
|
|
915
|
+
// addition
|
|
916
|
+
index = (this.#size === 0 ? this.#tail
|
|
917
|
+
: this.#free.length !== 0 ? this.#free.pop()
|
|
918
|
+
: this.#size === this.#max ? this.#evict(false)
|
|
919
|
+
: this.#size);
|
|
920
|
+
this.#keyList[index] = k;
|
|
921
|
+
this.#valList[index] = v;
|
|
922
|
+
this.#keyMap.set(k, index);
|
|
923
|
+
this.#next[this.#tail] = index;
|
|
924
|
+
this.#prev[index] = this.#tail;
|
|
925
|
+
this.#tail = index;
|
|
926
|
+
this.#size++;
|
|
927
|
+
this.#addItemSize(index, size, status);
|
|
928
|
+
if (status)
|
|
929
|
+
status.set = 'add';
|
|
930
|
+
noUpdateTTL = false;
|
|
931
|
+
if (this.#hasOnInsert) {
|
|
932
|
+
this.#onInsert?.(v, k, 'add');
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
else {
|
|
936
|
+
// update
|
|
937
|
+
this.#moveToTail(index);
|
|
938
|
+
const oldVal = this.#valList[index];
|
|
939
|
+
if (v !== oldVal) {
|
|
940
|
+
if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {
|
|
941
|
+
oldVal.__abortController.abort(new Error('replaced'));
|
|
942
|
+
const { __staleWhileFetching: s } = oldVal;
|
|
943
|
+
if (s !== undefined && !noDisposeOnSet) {
|
|
944
|
+
if (this.#hasDispose) {
|
|
945
|
+
this.#dispose?.(s, k, 'set');
|
|
946
|
+
}
|
|
947
|
+
if (this.#hasDisposeAfter) {
|
|
948
|
+
this.#disposed?.push([s, k, 'set']);
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
else if (!noDisposeOnSet) {
|
|
953
|
+
if (this.#hasDispose) {
|
|
954
|
+
this.#dispose?.(oldVal, k, 'set');
|
|
955
|
+
}
|
|
956
|
+
if (this.#hasDisposeAfter) {
|
|
957
|
+
this.#disposed?.push([oldVal, k, 'set']);
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
this.#removeItemSize(index);
|
|
961
|
+
this.#addItemSize(index, size, status);
|
|
962
|
+
this.#valList[index] = v;
|
|
963
|
+
if (status) {
|
|
964
|
+
status.set = 'replace';
|
|
965
|
+
const oldValue = oldVal && this.#isBackgroundFetch(oldVal) ?
|
|
966
|
+
oldVal.__staleWhileFetching
|
|
967
|
+
: oldVal;
|
|
968
|
+
if (oldValue !== undefined)
|
|
969
|
+
status.oldValue = oldValue;
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
else if (status) {
|
|
973
|
+
status.set = 'update';
|
|
974
|
+
}
|
|
975
|
+
if (this.#hasOnInsert) {
|
|
976
|
+
this.onInsert?.(v, k, v === oldVal ? 'update' : 'replace');
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
if (ttl !== 0 && !this.#ttls) {
|
|
980
|
+
this.#initializeTTLTracking();
|
|
981
|
+
}
|
|
982
|
+
if (this.#ttls) {
|
|
983
|
+
if (!noUpdateTTL) {
|
|
984
|
+
this.#setItemTTL(index, ttl, start);
|
|
985
|
+
}
|
|
986
|
+
if (status)
|
|
987
|
+
this.#statusTTL(status, index);
|
|
988
|
+
}
|
|
989
|
+
if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {
|
|
990
|
+
const dt = this.#disposed;
|
|
991
|
+
let task;
|
|
992
|
+
while ((task = dt?.shift())) {
|
|
993
|
+
this.#disposeAfter?.(...task);
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
return this;
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* Evict the least recently used item, returning its value or
|
|
1000
|
+
* `undefined` if cache is empty.
|
|
1001
|
+
*/
|
|
1002
|
+
pop() {
|
|
1003
|
+
try {
|
|
1004
|
+
while (this.#size) {
|
|
1005
|
+
const val = this.#valList[this.#head];
|
|
1006
|
+
this.#evict(true);
|
|
1007
|
+
if (this.#isBackgroundFetch(val)) {
|
|
1008
|
+
if (val.__staleWhileFetching) {
|
|
1009
|
+
return val.__staleWhileFetching;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
else if (val !== undefined) {
|
|
1013
|
+
return val;
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
finally {
|
|
1018
|
+
if (this.#hasDisposeAfter && this.#disposed) {
|
|
1019
|
+
const dt = this.#disposed;
|
|
1020
|
+
let task;
|
|
1021
|
+
while ((task = dt?.shift())) {
|
|
1022
|
+
this.#disposeAfter?.(...task);
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
#evict(free) {
|
|
1028
|
+
const head = this.#head;
|
|
1029
|
+
const k = this.#keyList[head];
|
|
1030
|
+
const v = this.#valList[head];
|
|
1031
|
+
if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {
|
|
1032
|
+
v.__abortController.abort(new Error('evicted'));
|
|
1033
|
+
}
|
|
1034
|
+
else if (this.#hasDispose || this.#hasDisposeAfter) {
|
|
1035
|
+
if (this.#hasDispose) {
|
|
1036
|
+
this.#dispose?.(v, k, 'evict');
|
|
1037
|
+
}
|
|
1038
|
+
if (this.#hasDisposeAfter) {
|
|
1039
|
+
this.#disposed?.push([v, k, 'evict']);
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
this.#removeItemSize(head);
|
|
1043
|
+
if (this.#autopurgeTimers?.[head]) {
|
|
1044
|
+
clearTimeout(this.#autopurgeTimers[head]);
|
|
1045
|
+
this.#autopurgeTimers[head] = undefined;
|
|
1046
|
+
}
|
|
1047
|
+
// if we aren't about to use the index, then null these out
|
|
1048
|
+
if (free) {
|
|
1049
|
+
this.#keyList[head] = undefined;
|
|
1050
|
+
this.#valList[head] = undefined;
|
|
1051
|
+
this.#free.push(head);
|
|
1052
|
+
}
|
|
1053
|
+
if (this.#size === 1) {
|
|
1054
|
+
this.#head = this.#tail = 0;
|
|
1055
|
+
this.#free.length = 0;
|
|
1056
|
+
}
|
|
1057
|
+
else {
|
|
1058
|
+
this.#head = this.#next[head];
|
|
1059
|
+
}
|
|
1060
|
+
this.#keyMap.delete(k);
|
|
1061
|
+
this.#size--;
|
|
1062
|
+
return head;
|
|
1063
|
+
}
|
|
1064
|
+
/**
|
|
1065
|
+
* Check if a key is in the cache, without updating the recency of use.
|
|
1066
|
+
* Will return false if the item is stale, even though it is technically
|
|
1067
|
+
* in the cache.
|
|
1068
|
+
*
|
|
1069
|
+
* Check if a key is in the cache, without updating the recency of
|
|
1070
|
+
* use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set
|
|
1071
|
+
* to `true` in either the options or the constructor.
|
|
1072
|
+
*
|
|
1073
|
+
* Will return `false` if the item is stale, even though it is technically in
|
|
1074
|
+
* the cache. The difference can be determined (if it matters) by using a
|
|
1075
|
+
* `status` argument, and inspecting the `has` field.
|
|
1076
|
+
*
|
|
1077
|
+
* Will not update item age unless
|
|
1078
|
+
* {@link LRUCache.OptionsBase.updateAgeOnHas} is set.
|
|
1079
|
+
*/
|
|
1080
|
+
has(k, hasOptions = {}) {
|
|
1081
|
+
const { status = diagnostics_channel_js_1.metrics.hasSubscribers ? {} : undefined } = hasOptions;
|
|
1082
|
+
hasOptions.status = status;
|
|
1083
|
+
if (status) {
|
|
1084
|
+
status.op = 'has';
|
|
1085
|
+
status.key = k;
|
|
1086
|
+
}
|
|
1087
|
+
const result = this.#has(k, hasOptions);
|
|
1088
|
+
if (diagnostics_channel_js_1.metrics.hasSubscribers)
|
|
1089
|
+
diagnostics_channel_js_1.metrics.publish(status);
|
|
1090
|
+
return result;
|
|
1091
|
+
}
|
|
1092
|
+
#has(k, hasOptions = {}) {
|
|
1093
|
+
const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions;
|
|
1094
|
+
const index = this.#keyMap.get(k);
|
|
1095
|
+
if (index !== undefined) {
|
|
1096
|
+
const v = this.#valList[index];
|
|
1097
|
+
if (this.#isBackgroundFetch(v) &&
|
|
1098
|
+
v.__staleWhileFetching === undefined) {
|
|
1099
|
+
return false;
|
|
1100
|
+
}
|
|
1101
|
+
if (!this.#isStale(index)) {
|
|
1102
|
+
if (updateAgeOnHas) {
|
|
1103
|
+
this.#updateItemAge(index);
|
|
1104
|
+
}
|
|
1105
|
+
if (status) {
|
|
1106
|
+
status.has = 'hit';
|
|
1107
|
+
this.#statusTTL(status, index);
|
|
1108
|
+
}
|
|
1109
|
+
return true;
|
|
1110
|
+
}
|
|
1111
|
+
else if (status) {
|
|
1112
|
+
status.has = 'stale';
|
|
1113
|
+
this.#statusTTL(status, index);
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
else if (status) {
|
|
1117
|
+
status.has = 'miss';
|
|
1118
|
+
}
|
|
1119
|
+
return false;
|
|
1120
|
+
}
|
|
1121
|
+
/**
|
|
1122
|
+
* Like {@link LRUCache#get} but doesn't update recency or delete stale
|
|
1123
|
+
* items.
|
|
1124
|
+
*
|
|
1125
|
+
* Returns `undefined` if the item is stale, unless
|
|
1126
|
+
* {@link LRUCache.OptionsBase.allowStale} is set.
|
|
1127
|
+
*/
|
|
1128
|
+
peek(k, peekOptions = {}) {
|
|
1129
|
+
const { status = hasSubscribers() ? {} : undefined } = peekOptions;
|
|
1130
|
+
if (status) {
|
|
1131
|
+
status.op = 'peek';
|
|
1132
|
+
status.key = k;
|
|
1133
|
+
}
|
|
1134
|
+
peekOptions.status = status;
|
|
1135
|
+
const result = this.#peek(k, peekOptions);
|
|
1136
|
+
if (diagnostics_channel_js_1.metrics.hasSubscribers) {
|
|
1137
|
+
diagnostics_channel_js_1.metrics.publish(status);
|
|
1138
|
+
}
|
|
1139
|
+
return result;
|
|
1140
|
+
}
|
|
1141
|
+
#peek(k, peekOptions) {
|
|
1142
|
+
const { status, allowStale = this.allowStale } = peekOptions;
|
|
1143
|
+
const index = this.#keyMap.get(k);
|
|
1144
|
+
if (index === undefined || (!allowStale && this.#isStale(index))) {
|
|
1145
|
+
if (status)
|
|
1146
|
+
status.peek = index === undefined ? 'miss' : 'stale';
|
|
1147
|
+
return undefined;
|
|
1148
|
+
}
|
|
1149
|
+
const v = this.#valList[index];
|
|
1150
|
+
const val = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
1151
|
+
if (status) {
|
|
1152
|
+
if (val !== undefined) {
|
|
1153
|
+
status.peek = 'hit';
|
|
1154
|
+
status.value = val;
|
|
1155
|
+
}
|
|
1156
|
+
else {
|
|
1157
|
+
status.peek = 'miss';
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
return val;
|
|
1161
|
+
}
|
|
1162
|
+
#backgroundFetch(k, index, options, context) {
|
|
1163
|
+
const v = index === undefined ? undefined : this.#valList[index];
|
|
1164
|
+
if (this.#isBackgroundFetch(v)) {
|
|
1165
|
+
return v;
|
|
1166
|
+
}
|
|
1167
|
+
const ac = new AbortController();
|
|
1168
|
+
const { signal } = options;
|
|
1169
|
+
// when/if our AC signals, then stop listening to theirs.
|
|
1170
|
+
signal?.addEventListener('abort', () => ac.abort(signal.reason), {
|
|
1171
|
+
signal: ac.signal,
|
|
1172
|
+
});
|
|
1173
|
+
const fetchOpts = {
|
|
1174
|
+
signal: ac.signal,
|
|
1175
|
+
options,
|
|
1176
|
+
context,
|
|
1177
|
+
};
|
|
1178
|
+
const cb = (v, updateCache = false) => {
|
|
1179
|
+
const { aborted } = ac.signal;
|
|
1180
|
+
const ignoreAbort = options.ignoreFetchAbort && v !== undefined;
|
|
1181
|
+
const proceed = options.ignoreFetchAbort ||
|
|
1182
|
+
!!(options.allowStaleOnFetchAbort && v !== undefined);
|
|
1183
|
+
if (options.status) {
|
|
1184
|
+
if (aborted && !updateCache) {
|
|
1185
|
+
options.status.fetchAborted = true;
|
|
1186
|
+
options.status.fetchError = ac.signal.reason;
|
|
1187
|
+
if (ignoreAbort)
|
|
1188
|
+
options.status.fetchAbortIgnored = true;
|
|
1189
|
+
}
|
|
1190
|
+
else {
|
|
1191
|
+
options.status.fetchResolved = true;
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
if (aborted && !ignoreAbort && !updateCache) {
|
|
1195
|
+
return fetchFail(ac.signal.reason, proceed);
|
|
1196
|
+
}
|
|
1197
|
+
// either we didn't abort, and are still here, or we did, and ignored
|
|
1198
|
+
const bf = p;
|
|
1199
|
+
// if nothing else has been written there but we're set to update the
|
|
1200
|
+
// cache and ignore the abort, or if it's still pending on this specific
|
|
1201
|
+
// background request, then write it to the cache.
|
|
1202
|
+
const vl = this.#valList[index];
|
|
1203
|
+
if (vl === p || (vl === undefined && ignoreAbort && updateCache)) {
|
|
1204
|
+
if (v === undefined) {
|
|
1205
|
+
if (bf.__staleWhileFetching !== undefined) {
|
|
1206
|
+
this.#valList[index] = bf.__staleWhileFetching;
|
|
1207
|
+
}
|
|
1208
|
+
else {
|
|
1209
|
+
this.#delete(k, 'fetch');
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
else {
|
|
1213
|
+
if (options.status)
|
|
1214
|
+
options.status.fetchUpdated = true;
|
|
1215
|
+
this.#set(k, v, fetchOpts.options);
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
return v;
|
|
1219
|
+
};
|
|
1220
|
+
const eb = (er) => {
|
|
1221
|
+
if (options.status) {
|
|
1222
|
+
options.status.fetchRejected = true;
|
|
1223
|
+
options.status.fetchError = er;
|
|
1224
|
+
}
|
|
1225
|
+
// do not pass go, do not collect $200
|
|
1226
|
+
return fetchFail(er, false);
|
|
1227
|
+
};
|
|
1228
|
+
const fetchFail = (er, proceed) => {
|
|
1229
|
+
const { aborted } = ac.signal;
|
|
1230
|
+
const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
|
|
1231
|
+
const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
|
|
1232
|
+
const noDelete = allowStale || options.noDeleteOnFetchRejection;
|
|
1233
|
+
const bf = p;
|
|
1234
|
+
if (this.#valList[index] === p) {
|
|
1235
|
+
// if we allow stale on fetch rejections, then we need to ensure that
|
|
1236
|
+
// the stale value is not removed from the cache when the fetch fails.
|
|
1237
|
+
const del = !noDelete || (!proceed && bf.__staleWhileFetching === undefined);
|
|
1238
|
+
if (del) {
|
|
1239
|
+
this.#delete(k, 'fetch');
|
|
1240
|
+
}
|
|
1241
|
+
else if (!allowStaleAborted) {
|
|
1242
|
+
// still replace the *promise* with the stale value,
|
|
1243
|
+
// since we are done with the promise at this point.
|
|
1244
|
+
// leave it untouched if we're still waiting for an
|
|
1245
|
+
// aborted background fetch that hasn't yet returned.
|
|
1246
|
+
this.#valList[index] = bf.__staleWhileFetching;
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
if (allowStale) {
|
|
1250
|
+
if (options.status && bf.__staleWhileFetching !== undefined) {
|
|
1251
|
+
options.status.returnedStale = true;
|
|
1252
|
+
}
|
|
1253
|
+
return bf.__staleWhileFetching;
|
|
1254
|
+
}
|
|
1255
|
+
else if (bf.__returned === bf) {
|
|
1256
|
+
throw er;
|
|
1257
|
+
}
|
|
1258
|
+
};
|
|
1259
|
+
const pcall = (res, rej) => {
|
|
1260
|
+
const fmp = this.#fetchMethod?.(k, v, fetchOpts);
|
|
1261
|
+
if (fmp && fmp instanceof Promise) {
|
|
1262
|
+
fmp.then(v => res(v === undefined ? undefined : v), rej);
|
|
1263
|
+
}
|
|
1264
|
+
// ignored, we go until we finish, regardless.
|
|
1265
|
+
// defer check until we are actually aborting,
|
|
1266
|
+
// so fetchMethod can override.
|
|
1267
|
+
ac.signal.addEventListener('abort', () => {
|
|
1268
|
+
if (!options.ignoreFetchAbort || options.allowStaleOnFetchAbort) {
|
|
1269
|
+
res(undefined);
|
|
1270
|
+
// when it eventually resolves, update the cache.
|
|
1271
|
+
if (options.allowStaleOnFetchAbort) {
|
|
1272
|
+
res = v => cb(v, true);
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
});
|
|
1276
|
+
};
|
|
1277
|
+
if (options.status)
|
|
1278
|
+
options.status.fetchDispatched = true;
|
|
1279
|
+
const p = new Promise(pcall).then(cb, eb);
|
|
1280
|
+
const bf = Object.assign(p, {
|
|
1281
|
+
__abortController: ac,
|
|
1282
|
+
__staleWhileFetching: v,
|
|
1283
|
+
__returned: undefined,
|
|
1284
|
+
});
|
|
1285
|
+
if (index === undefined) {
|
|
1286
|
+
// internal, don't expose status.
|
|
1287
|
+
this.#set(k, bf, { ...fetchOpts.options, status: undefined });
|
|
1288
|
+
index = this.#keyMap.get(k);
|
|
1289
|
+
}
|
|
1290
|
+
else {
|
|
1291
|
+
this.#valList[index] = bf;
|
|
1292
|
+
}
|
|
1293
|
+
return bf;
|
|
1294
|
+
}
|
|
1295
|
+
#isBackgroundFetch(p) {
|
|
1296
|
+
if (!this.#hasFetchMethod)
|
|
1297
|
+
return false;
|
|
1298
|
+
const b = p;
|
|
1299
|
+
return (!!b &&
|
|
1300
|
+
b instanceof Promise &&
|
|
1301
|
+
b.hasOwnProperty('__staleWhileFetching') &&
|
|
1302
|
+
b.__abortController instanceof AbortController);
|
|
1303
|
+
}
|
|
1304
|
+
fetch(k, fetchOptions = {}) {
|
|
1305
|
+
const ths = diagnostics_channel_js_1.tracing.hasSubscribers;
|
|
1306
|
+
const { status = hasSubscribers() ? {} : undefined } = fetchOptions;
|
|
1307
|
+
fetchOptions.status = status;
|
|
1308
|
+
if (status && fetchOptions.context) {
|
|
1309
|
+
status.context = fetchOptions.context;
|
|
1310
|
+
}
|
|
1311
|
+
const p = this.#fetch(k, fetchOptions);
|
|
1312
|
+
if (status && ths) {
|
|
1313
|
+
status.trace = true;
|
|
1314
|
+
diagnostics_channel_js_1.tracing.tracePromise(() => p, status).catch(() => { });
|
|
1315
|
+
}
|
|
1316
|
+
return p;
|
|
1317
|
+
}
|
|
1318
|
+
async #fetch(k, fetchOptions = {}) {
|
|
1319
|
+
const {
|
|
1320
|
+
// get options
|
|
1321
|
+
allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet,
|
|
1322
|
+
// set options
|
|
1323
|
+
ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL,
|
|
1324
|
+
// fetch exclusive options
|
|
1325
|
+
noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions;
|
|
1326
|
+
if (status) {
|
|
1327
|
+
status.op = 'fetch';
|
|
1328
|
+
status.key = k;
|
|
1329
|
+
if (forceRefresh)
|
|
1330
|
+
status.forceRefresh = true;
|
|
1331
|
+
}
|
|
1332
|
+
if (!this.#hasFetchMethod) {
|
|
1333
|
+
if (status)
|
|
1334
|
+
status.fetch = 'get';
|
|
1335
|
+
return this.#get(k, {
|
|
1336
|
+
allowStale,
|
|
1337
|
+
updateAgeOnGet,
|
|
1338
|
+
noDeleteOnStaleGet,
|
|
1339
|
+
status,
|
|
1340
|
+
});
|
|
1341
|
+
}
|
|
1342
|
+
const options = {
|
|
1343
|
+
allowStale,
|
|
1344
|
+
updateAgeOnGet,
|
|
1345
|
+
noDeleteOnStaleGet,
|
|
1346
|
+
ttl,
|
|
1347
|
+
noDisposeOnSet,
|
|
1348
|
+
size,
|
|
1349
|
+
sizeCalculation,
|
|
1350
|
+
noUpdateTTL,
|
|
1351
|
+
noDeleteOnFetchRejection,
|
|
1352
|
+
allowStaleOnFetchRejection,
|
|
1353
|
+
allowStaleOnFetchAbort,
|
|
1354
|
+
ignoreFetchAbort,
|
|
1355
|
+
status,
|
|
1356
|
+
signal,
|
|
1357
|
+
};
|
|
1358
|
+
let index = this.#keyMap.get(k);
|
|
1359
|
+
if (index === undefined) {
|
|
1360
|
+
if (status)
|
|
1361
|
+
status.fetch = 'miss';
|
|
1362
|
+
const p = this.#backgroundFetch(k, index, options, context);
|
|
1363
|
+
return (p.__returned = p);
|
|
1364
|
+
}
|
|
1365
|
+
else {
|
|
1366
|
+
// in cache, maybe already fetching
|
|
1367
|
+
const v = this.#valList[index];
|
|
1368
|
+
if (this.#isBackgroundFetch(v)) {
|
|
1369
|
+
const stale = allowStale && v.__staleWhileFetching !== undefined;
|
|
1370
|
+
if (status) {
|
|
1371
|
+
status.fetch = 'inflight';
|
|
1372
|
+
if (stale)
|
|
1373
|
+
status.returnedStale = true;
|
|
1374
|
+
}
|
|
1375
|
+
return stale ? v.__staleWhileFetching : (v.__returned = v);
|
|
1376
|
+
}
|
|
1377
|
+
// if we force a refresh, that means do NOT serve the cached value,
|
|
1378
|
+
// unless we are already in the process of refreshing the cache.
|
|
1379
|
+
const isStale = this.#isStale(index);
|
|
1380
|
+
if (!forceRefresh && !isStale) {
|
|
1381
|
+
if (status)
|
|
1382
|
+
status.fetch = 'hit';
|
|
1383
|
+
this.#moveToTail(index);
|
|
1384
|
+
if (updateAgeOnGet) {
|
|
1385
|
+
this.#updateItemAge(index);
|
|
1386
|
+
}
|
|
1387
|
+
if (status)
|
|
1388
|
+
this.#statusTTL(status, index);
|
|
1389
|
+
return v;
|
|
1390
|
+
}
|
|
1391
|
+
// ok, it is stale or a forced refresh, and not already fetching.
|
|
1392
|
+
// refresh the cache.
|
|
1393
|
+
const p = this.#backgroundFetch(k, index, options, context);
|
|
1394
|
+
const hasStale = p.__staleWhileFetching !== undefined;
|
|
1395
|
+
const staleVal = hasStale && allowStale;
|
|
1396
|
+
if (status) {
|
|
1397
|
+
status.fetch = isStale ? 'stale' : 'refresh';
|
|
1398
|
+
if (staleVal && isStale)
|
|
1399
|
+
status.returnedStale = true;
|
|
1400
|
+
}
|
|
1401
|
+
return staleVal ? p.__staleWhileFetching : (p.__returned = p);
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
forceFetch(k, fetchOptions = {}) {
|
|
1405
|
+
const ths = diagnostics_channel_js_1.tracing.hasSubscribers;
|
|
1406
|
+
const { status = hasSubscribers() ? {} : undefined } = fetchOptions;
|
|
1407
|
+
fetchOptions.status = status;
|
|
1408
|
+
if (status && fetchOptions.context) {
|
|
1409
|
+
status.context = fetchOptions.context;
|
|
1410
|
+
}
|
|
1411
|
+
const p = this.#forceFetch(k, fetchOptions);
|
|
1412
|
+
if (status && ths) {
|
|
1413
|
+
status.trace = true;
|
|
1414
|
+
diagnostics_channel_js_1.tracing.tracePromise(() => p, status).catch(() => { });
|
|
1415
|
+
}
|
|
1416
|
+
return p;
|
|
1417
|
+
}
|
|
1418
|
+
async #forceFetch(k, fetchOptions = {}) {
|
|
1419
|
+
const v = await this.#fetch(k, fetchOptions);
|
|
1420
|
+
if (v === undefined)
|
|
1421
|
+
throw new Error('fetch() returned undefined');
|
|
1422
|
+
return v;
|
|
1423
|
+
}
|
|
1424
|
+
memo(k, memoOptions = {}) {
|
|
1425
|
+
const { status = diagnostics_channel_js_1.metrics.hasSubscribers ? {} : undefined } = memoOptions;
|
|
1426
|
+
memoOptions.status = status;
|
|
1427
|
+
if (status) {
|
|
1428
|
+
status.op = 'memo';
|
|
1429
|
+
status.key = k;
|
|
1430
|
+
if (memoOptions.context) {
|
|
1431
|
+
status.context = memoOptions.context;
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
const result = this.#memo(k, memoOptions);
|
|
1435
|
+
if (status)
|
|
1436
|
+
status.value = result;
|
|
1437
|
+
if (diagnostics_channel_js_1.metrics.hasSubscribers)
|
|
1438
|
+
diagnostics_channel_js_1.metrics.publish(status);
|
|
1439
|
+
return result;
|
|
1440
|
+
}
|
|
1441
|
+
#memo(k, memoOptions = {}) {
|
|
1442
|
+
const memoMethod = this.#memoMethod;
|
|
1443
|
+
if (!memoMethod) {
|
|
1444
|
+
throw new Error('no memoMethod provided to constructor');
|
|
1445
|
+
}
|
|
1446
|
+
const { context, status, forceRefresh, ...options } = memoOptions;
|
|
1447
|
+
if (status && forceRefresh)
|
|
1448
|
+
status.forceRefresh = true;
|
|
1449
|
+
const v = this.#get(k, options);
|
|
1450
|
+
const refresh = forceRefresh || v === undefined;
|
|
1451
|
+
if (status) {
|
|
1452
|
+
status.memo = refresh ? 'miss' : 'hit';
|
|
1453
|
+
if (!refresh)
|
|
1454
|
+
status.value = v;
|
|
1455
|
+
}
|
|
1456
|
+
if (!refresh)
|
|
1457
|
+
return v;
|
|
1458
|
+
const vv = memoMethod(k, v, {
|
|
1459
|
+
options,
|
|
1460
|
+
context,
|
|
1461
|
+
});
|
|
1462
|
+
if (status)
|
|
1463
|
+
status.value = vv;
|
|
1464
|
+
this.#set(k, vv, options);
|
|
1465
|
+
return vv;
|
|
1466
|
+
}
|
|
1467
|
+
/**
|
|
1468
|
+
* Return a value from the cache. Will update the recency of the cache
|
|
1469
|
+
* entry found.
|
|
1470
|
+
*
|
|
1471
|
+
* If the key is not found, get() will return `undefined`.
|
|
1472
|
+
*/
|
|
1473
|
+
get(k, getOptions = {}) {
|
|
1474
|
+
const { status = diagnostics_channel_js_1.metrics.hasSubscribers ? {} : undefined } = getOptions;
|
|
1475
|
+
getOptions.status = status;
|
|
1476
|
+
if (status) {
|
|
1477
|
+
status.op = 'get';
|
|
1478
|
+
status.key = k;
|
|
1479
|
+
}
|
|
1480
|
+
const result = this.#get(k, getOptions);
|
|
1481
|
+
if (status) {
|
|
1482
|
+
if (result !== undefined)
|
|
1483
|
+
status.value = result;
|
|
1484
|
+
if (diagnostics_channel_js_1.metrics.hasSubscribers)
|
|
1485
|
+
diagnostics_channel_js_1.metrics.publish(status);
|
|
1486
|
+
}
|
|
1487
|
+
return result;
|
|
1488
|
+
}
|
|
1489
|
+
#get(k, getOptions = {}) {
|
|
1490
|
+
const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions;
|
|
1491
|
+
const index = this.#keyMap.get(k);
|
|
1492
|
+
if (index === undefined) {
|
|
1493
|
+
if (status)
|
|
1494
|
+
status.get = 'miss';
|
|
1495
|
+
return undefined;
|
|
1496
|
+
}
|
|
1497
|
+
const value = this.#valList[index];
|
|
1498
|
+
const fetching = this.#isBackgroundFetch(value);
|
|
1499
|
+
if (status)
|
|
1500
|
+
this.#statusTTL(status, index);
|
|
1501
|
+
if (this.#isStale(index)) {
|
|
1502
|
+
// delete only if not an in-flight background fetch
|
|
1503
|
+
if (!fetching) {
|
|
1504
|
+
if (!noDeleteOnStaleGet) {
|
|
1505
|
+
this.#delete(k, 'expire');
|
|
1506
|
+
}
|
|
1507
|
+
if (status)
|
|
1508
|
+
status.get = 'stale';
|
|
1509
|
+
if (allowStale) {
|
|
1510
|
+
if (status)
|
|
1511
|
+
status.returnedStale = true;
|
|
1512
|
+
return value;
|
|
1513
|
+
}
|
|
1514
|
+
return undefined;
|
|
1515
|
+
}
|
|
1516
|
+
if (status)
|
|
1517
|
+
status.get = 'stale-fetching';
|
|
1518
|
+
if (allowStale && value.__staleWhileFetching !== undefined) {
|
|
1519
|
+
if (status)
|
|
1520
|
+
status.returnedStale = true;
|
|
1521
|
+
return value.__staleWhileFetching;
|
|
1522
|
+
}
|
|
1523
|
+
return undefined;
|
|
1524
|
+
}
|
|
1525
|
+
// not stale
|
|
1526
|
+
if (status)
|
|
1527
|
+
status.get = fetching ? 'fetching' : 'hit';
|
|
1528
|
+
// if we're currently fetching it, we don't actually have it yet
|
|
1529
|
+
// it's not stale, which means this isn't a staleWhileRefetching.
|
|
1530
|
+
// If it's not stale, and fetching, AND has a __staleWhileFetching
|
|
1531
|
+
// value, then that means the user fetched with {forceRefresh:true},
|
|
1532
|
+
// so it's safe to return that value.
|
|
1533
|
+
this.#moveToTail(index);
|
|
1534
|
+
if (updateAgeOnGet) {
|
|
1535
|
+
this.#updateItemAge(index);
|
|
1536
|
+
}
|
|
1537
|
+
return fetching ? value.__staleWhileFetching : value;
|
|
1538
|
+
}
|
|
1539
|
+
#connect(p, n) {
|
|
1540
|
+
this.#prev[n] = p;
|
|
1541
|
+
this.#next[p] = n;
|
|
1542
|
+
}
|
|
1543
|
+
#moveToTail(index) {
|
|
1544
|
+
// if tail already, nothing to do
|
|
1545
|
+
// if head, move head to next[index]
|
|
1546
|
+
// else
|
|
1547
|
+
// move next[prev[index]] to next[index] (head has no prev)
|
|
1548
|
+
// move prev[next[index]] to prev[index]
|
|
1549
|
+
// prev[index] = tail
|
|
1550
|
+
// next[tail] = index
|
|
1551
|
+
// tail = index
|
|
1552
|
+
if (index !== this.#tail) {
|
|
1553
|
+
if (index === this.#head) {
|
|
1554
|
+
this.#head = this.#next[index];
|
|
1555
|
+
}
|
|
1556
|
+
else {
|
|
1557
|
+
this.#connect(this.#prev[index], this.#next[index]);
|
|
1558
|
+
}
|
|
1559
|
+
this.#connect(this.#tail, index);
|
|
1560
|
+
this.#tail = index;
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
/**
|
|
1564
|
+
* Deletes a key out of the cache.
|
|
1565
|
+
*
|
|
1566
|
+
* Returns true if the key was deleted, false otherwise.
|
|
1567
|
+
*/
|
|
1568
|
+
delete(k) {
|
|
1569
|
+
return this.#delete(k, 'delete');
|
|
1570
|
+
}
|
|
1571
|
+
#delete(k, reason) {
|
|
1572
|
+
if (diagnostics_channel_js_1.metrics.hasSubscribers) {
|
|
1573
|
+
diagnostics_channel_js_1.metrics.publish({
|
|
1574
|
+
op: 'delete',
|
|
1575
|
+
delete: reason,
|
|
1576
|
+
key: k,
|
|
1577
|
+
});
|
|
1578
|
+
}
|
|
1579
|
+
let deleted = false;
|
|
1580
|
+
if (this.#size !== 0) {
|
|
1581
|
+
const index = this.#keyMap.get(k);
|
|
1582
|
+
if (index !== undefined) {
|
|
1583
|
+
if (this.#autopurgeTimers?.[index]) {
|
|
1584
|
+
clearTimeout(this.#autopurgeTimers?.[index]);
|
|
1585
|
+
this.#autopurgeTimers[index] = undefined;
|
|
1586
|
+
}
|
|
1587
|
+
deleted = true;
|
|
1588
|
+
if (this.#size === 1) {
|
|
1589
|
+
this.#clear(reason);
|
|
1590
|
+
}
|
|
1591
|
+
else {
|
|
1592
|
+
this.#removeItemSize(index);
|
|
1593
|
+
const v = this.#valList[index];
|
|
1594
|
+
if (this.#isBackgroundFetch(v)) {
|
|
1595
|
+
v.__abortController.abort(new Error('deleted'));
|
|
1596
|
+
}
|
|
1597
|
+
else if (this.#hasDispose || this.#hasDisposeAfter) {
|
|
1598
|
+
if (this.#hasDispose) {
|
|
1599
|
+
this.#dispose?.(v, k, reason);
|
|
1600
|
+
}
|
|
1601
|
+
if (this.#hasDisposeAfter) {
|
|
1602
|
+
this.#disposed?.push([v, k, reason]);
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
this.#keyMap.delete(k);
|
|
1606
|
+
this.#keyList[index] = undefined;
|
|
1607
|
+
this.#valList[index] = undefined;
|
|
1608
|
+
if (index === this.#tail) {
|
|
1609
|
+
this.#tail = this.#prev[index];
|
|
1610
|
+
}
|
|
1611
|
+
else if (index === this.#head) {
|
|
1612
|
+
this.#head = this.#next[index];
|
|
1613
|
+
}
|
|
1614
|
+
else {
|
|
1615
|
+
const pi = this.#prev[index];
|
|
1616
|
+
this.#next[pi] = this.#next[index];
|
|
1617
|
+
const ni = this.#next[index];
|
|
1618
|
+
this.#prev[ni] = this.#prev[index];
|
|
1619
|
+
}
|
|
1620
|
+
this.#size--;
|
|
1621
|
+
this.#free.push(index);
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
if (this.#hasDisposeAfter && this.#disposed?.length) {
|
|
1626
|
+
const dt = this.#disposed;
|
|
1627
|
+
let task;
|
|
1628
|
+
while ((task = dt?.shift())) {
|
|
1629
|
+
this.#disposeAfter?.(...task);
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
return deleted;
|
|
1633
|
+
}
|
|
1634
|
+
/**
|
|
1635
|
+
* Clear the cache entirely, throwing away all values.
|
|
1636
|
+
*/
|
|
1637
|
+
clear() {
|
|
1638
|
+
return this.#clear('delete');
|
|
1639
|
+
}
|
|
1640
|
+
#clear(reason) {
|
|
1641
|
+
for (const index of this.#rindexes({ allowStale: true })) {
|
|
1642
|
+
const v = this.#valList[index];
|
|
1643
|
+
if (this.#isBackgroundFetch(v)) {
|
|
1644
|
+
v.__abortController.abort(new Error('deleted'));
|
|
1645
|
+
}
|
|
1646
|
+
else {
|
|
1647
|
+
const k = this.#keyList[index];
|
|
1648
|
+
if (this.#hasDispose) {
|
|
1649
|
+
this.#dispose?.(v, k, reason);
|
|
1650
|
+
}
|
|
1651
|
+
if (this.#hasDisposeAfter) {
|
|
1652
|
+
this.#disposed?.push([v, k, reason]);
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
this.#keyMap.clear();
|
|
1657
|
+
this.#valList.fill(undefined);
|
|
1658
|
+
this.#keyList.fill(undefined);
|
|
1659
|
+
if (this.#ttls && this.#starts) {
|
|
1660
|
+
this.#ttls.fill(0);
|
|
1661
|
+
this.#starts.fill(0);
|
|
1662
|
+
for (const t of this.#autopurgeTimers ?? []) {
|
|
1663
|
+
if (t !== undefined)
|
|
1664
|
+
clearTimeout(t);
|
|
1665
|
+
}
|
|
1666
|
+
this.#autopurgeTimers?.fill(undefined);
|
|
1667
|
+
}
|
|
1668
|
+
if (this.#sizes) {
|
|
1669
|
+
this.#sizes.fill(0);
|
|
1670
|
+
}
|
|
1671
|
+
this.#head = 0;
|
|
1672
|
+
this.#tail = 0;
|
|
1673
|
+
this.#free.length = 0;
|
|
1674
|
+
this.#calculatedSize = 0;
|
|
1675
|
+
this.#size = 0;
|
|
1676
|
+
if (this.#hasDisposeAfter && this.#disposed) {
|
|
1677
|
+
const dt = this.#disposed;
|
|
1678
|
+
let task;
|
|
1679
|
+
while ((task = dt?.shift())) {
|
|
1680
|
+
this.#disposeAfter?.(...task);
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
exports.LRUCache = LRUCache;
|
|
1686
|
+
//# sourceMappingURL=index.js.map
|