@qqbrowser/openclaw-qbot 0.10.11 → 0.10.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/canvas-host/a2ui/a2ui.bundle.js +67 -57
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/auth/httpAuthSchemeProvider.js +4 -4
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/endpoint/bdd.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/endpoint/endpointResolver.js +5 -5
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +46 -50
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/models/BedrockRuntimeServiceException.js +3 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.browser.js +16 -18
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.js +21 -26
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.native.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.shared.js +9 -10
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/schemas/schemas_0.js +7 -4
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/BedrockRuntime.js +1 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/BedrockRuntimeClient.js +7 -10
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/auth/httpAuthSchemeProvider.js +1 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/ApplyGuardrailCommand.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/ConverseCommand.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/ConverseStreamCommand.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/CountTokensCommand.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/GetAsyncInvokeCommand.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/InvokeModelCommand.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/InvokeModelWithBidirectionalStreamCommand.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/InvokeModelWithResponseStreamCommand.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/ListAsyncInvokesCommand.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/StartAsyncInvokeCommand.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/endpoint/bdd.js +1 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/endpoint/endpointResolver.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/models/BedrockRuntimeServiceException.js +1 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/models/enums.js +1 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/runtimeConfig.browser.js +6 -8
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/runtimeConfig.js +6 -11
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/runtimeConfig.native.js +1 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/runtimeConfig.shared.js +3 -4
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/runtimeExtensions.js +3 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/schemas/schemas_0.js +7 -4
- package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +13 -46
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +67 -55
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js +2 -2
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.browser.js +595 -0
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +717 -2
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.native.js +588 -0
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +7 -7
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +54 -39
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +59 -0
- package/node_modules/@aws-sdk/core/dist-es/index.js +3 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.browser.js +36 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +26 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.native.js +37 -0
- package/node_modules/@aws-sdk/{middleware-host-header/dist-es/index.js → core/dist-es/submodules/client/middleware-host-header/hostHeaderMiddleware.js} +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.browser.js +3 -0
- package/node_modules/@aws-sdk/{middleware-recursion-detection/dist-es → core/dist-es/submodules/client/middleware-recursion-detection}/recursionDetectionMiddleware.js +1 -1
- package/node_modules/@aws-sdk/{middleware-user-agent/dist-es → core/dist-es/submodules/client/middleware-user-agent}/check-features.js +2 -2
- package/node_modules/@aws-sdk/{middleware-user-agent/dist-es → core/dist-es/submodules/client/middleware-user-agent}/user-agent-middleware.js +2 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/region-config-resolver/awsRegionConfig.js +2 -0
- package/node_modules/@aws-sdk/{region-config-resolver/dist-es/regionConfig → core/dist-es/submodules/client/region-config-resolver}/stsRegionDefaultResolver.js +1 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js +1 -1
- package/node_modules/@aws-sdk/{util-endpoints/dist-es → core/dist-es/submodules/client/util-endpoints}/aws.js +1 -1
- package/node_modules/@aws-sdk/{util-endpoints/dist-es → core/dist-es/submodules/client/util-endpoints}/lib/aws/isVirtualHostableS3Bucket.js +1 -1
- package/node_modules/@aws-sdk/{util-endpoints/dist-es → core/dist-es/submodules/client/util-endpoints}/lib/aws/partition.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/partitions.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/isIpAddress.js +1 -0
- package/node_modules/@aws-sdk/{util-endpoints/dist-es → core/dist-es/submodules/client/util-endpoints}/resolveDefaultAwsRegionalEndpointsConfig.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/resolveEndpoint.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/types/EndpointError.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.browser.js +1 -0
- package/node_modules/@aws-sdk/{util-user-agent-node/dist-es → core/dist-es/submodules/client/util-user-agent-node}/getTypeScriptUserAgentPair.js +1 -1
- package/node_modules/@aws-sdk/{util-user-agent-node/dist-es → core/dist-es/submodules/client/util-user-agent-node}/nodeAppIdConfigOptions.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js +2 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +7 -6
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +1 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/experimental/SinglePassJsonShapeSerializer.js +1 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +26 -11
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js +2 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js +2 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +2 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +2 -0
- package/node_modules/@aws-sdk/{util-format-url/dist-es/index.js → core/dist-es/submodules/util/util-format-url/format-url.js} +1 -1
- package/node_modules/@aws-sdk/core/package.json +39 -17
- package/node_modules/@aws-sdk/core/util.js +5 -0
- package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +2 -2
- package/node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.browser.js +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +15 -9
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +10 -10
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +7 -5
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/checkUrl.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.browser.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js +13 -7
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/requestHelpers.js +4 -4
- package/node_modules/@aws-sdk/credential-provider-http/package.json +18 -12
- package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +9 -10
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js +1 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -14
- package/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +14 -15
- package/node_modules/@aws-sdk/credential-provider-login/dist-es/LoginCredentialsFetcher.js +2 -3
- package/node_modules/@aws-sdk/credential-provider-login/dist-es/fromLoginCredentials.js +1 -2
- package/node_modules/@aws-sdk/credential-provider-login/package.json +6 -8
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +19 -9
- package/node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js +1 -2
- package/node_modules/@aws-sdk/credential-provider-node/dist-es/remoteProvider.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js +12 -1
- package/node_modules/@aws-sdk/credential-provider-node/package.json +11 -12
- package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +7 -8
- package/node_modules/@aws-sdk/credential-provider-process/dist-es/fromProcess.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js +1 -2
- package/node_modules/@aws-sdk/credential-provider-process/package.json +5 -6
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +16 -17
- package/node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js +1 -2
- package/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js +2 -3
- package/node_modules/@aws-sdk/credential-provider-sso/dist-es/validateSsoProfile.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +7 -8
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +3 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +1 -34
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromTokenFile.js +1 -2
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +6 -7
- package/node_modules/@aws-sdk/eventstream-handler-node/dist-cjs/index.js +2 -2
- package/node_modules/@aws-sdk/eventstream-handler-node/dist-es/EventStreamPayloadHandler.js +1 -1
- package/node_modules/@aws-sdk/eventstream-handler-node/package.json +4 -5
- package/node_modules/@aws-sdk/middleware-eventstream/dist-cjs/index.js +3 -3
- package/node_modules/@aws-sdk/middleware-eventstream/dist-es/eventStreamHandlingMiddleware.js +1 -1
- package/node_modules/@aws-sdk/middleware-eventstream/dist-es/eventStreamHeaderMiddleware.js +1 -1
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-websocket/dist-cjs/index.js +13 -15
- package/node_modules/@aws-sdk/middleware-websocket/dist-es/WebSocketFetchHandler.js +5 -5
- package/node_modules/@aws-sdk/middleware-websocket/dist-es/WebsocketSignatureV4.js +1 -1
- package/node_modules/@aws-sdk/middleware-websocket/dist-es/middlewares/websocketEndpointMiddleware.js +1 -1
- package/node_modules/@aws-sdk/middleware-websocket/dist-es/ws-eventstream/EventSigningTransformStream.js +1 -1
- package/node_modules/@aws-sdk/middleware-websocket/dist-es/ws-eventstream/EventStreamPayloadHandler.js +1 -1
- package/node_modules/@aws-sdk/middleware-websocket/package.json +7 -12
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +524 -63
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +458 -60
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +403 -60
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +597 -60
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +831 -58
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/CognitoIdentity.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/CognitoIdentityClient.js +6 -9
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/auth/httpAuthSchemeProvider.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/commands/GetCredentialsForIdentityCommand.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/commands/GetIdCommand.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/endpoint/bdd.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/endpoint/endpointResolver.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/models/CognitoIdentityServiceException.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.browser.js +5 -7
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.js +5 -10
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.shared.js +3 -4
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeExtensions.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/Signin.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/SigninClient.js +6 -9
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/auth/httpAuthSchemeProvider.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/SigninServiceException.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.browser.js +5 -7
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js +5 -10
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.shared.js +3 -4
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeExtensions.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSO.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSOClient.js +6 -9
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/auth/httpAuthSchemeProvider.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/commands/GetRoleCredentialsCommand.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/bdd.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/endpointResolver.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/SSOServiceException.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.browser.js +5 -7
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js +5 -10
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.shared.js +3 -4
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeExtensions.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDC.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDCClient.js +6 -9
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/bdd.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.browser.js +5 -7
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js +5 -10
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.shared.js +3 -4
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeExtensions.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STS.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js +6 -9
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js +5 -10
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js +1 -7
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/bdd.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.browser.js +5 -7
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js +5 -10
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js +3 -4
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeExtensions.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/package.json +8 -37
- package/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +38 -2
- package/node_modules/@aws-sdk/signature-v4-multi-region/dist-es/SignatureV4MultiRegion.js +2 -2
- package/node_modules/@aws-sdk/{middleware-sdk-s3/dist-es/s3-express/classes/SignatureV4S3Express.js → signature-v4-multi-region/dist-es/SignatureV4SignWithCredentials.js} +5 -10
- package/node_modules/@aws-sdk/signature-v4-multi-region/dist-es/index.js +3 -2
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +4 -6
- package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +18 -19
- package/node_modules/@aws-sdk/token-providers/dist-es/fromEnvSigningName.js +1 -1
- package/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +1 -2
- package/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js +1 -1
- package/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js +1 -1
- package/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js +1 -1
- package/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js +1 -1
- package/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js +1 -1
- package/node_modules/@aws-sdk/token-providers/package.json +6 -7
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.browser.js +60 -0
- package/node_modules/@aws-sdk/xml-builder/package.json +6 -6
- package/node_modules/@babel/runtime/package.json +1 -1
- package/node_modules/@cacheable/memory/package.json +2 -6
- package/node_modules/@clack/core/dist/index.mjs +9 -9
- package/node_modules/@clack/core/package.json +2 -1
- package/node_modules/@clack/prompts/dist/index.mjs +122 -121
- package/node_modules/@clack/prompts/package.json +2 -2
- package/node_modules/@grammyjs/types/package.json +1 -1
- package/node_modules/@nodable/entities/package.json +1 -1
- package/node_modules/@nodable/entities/src/EntityDecoder.js +1 -1
- package/node_modules/@nodable/entities/src/entities.js +0 -18
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js +440 -73
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.js +71 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js +298 -35
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/index-incubating.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/index.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/internal/utils.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/resource/SemanticResourceAttributes.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/resource/index.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js +78 -13
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_events.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_metrics.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/trace/SemanticAttributes.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/trace/index.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js +2 -13
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js +440 -73
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.js +71 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js +298 -35
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index-incubating.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/internal/utils.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/resource/SemanticResourceAttributes.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/resource/index.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js +78 -13
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_events.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_metrics.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/trace/SemanticAttributes.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/trace/index.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js +2 -13
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js +469 -97
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.js +72 -13
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js +307 -43
- package/node_modules/@opentelemetry/semantic-conventions/build/src/index-incubating.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/src/index.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/src/internal/utils.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/src/resource/SemanticResourceAttributes.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/src/resource/index.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js +81 -16
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_events.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_metrics.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/src/trace/SemanticAttributes.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/src/trace/index.js +1 -12
- package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js +2 -13
- package/node_modules/@opentelemetry/semantic-conventions/package.json +2 -2
- package/node_modules/@protobufjs/eventemitter/index.js +17 -7
- package/node_modules/@protobufjs/eventemitter/package.json +2 -2
- package/node_modules/@protobufjs/fetch/index.js +4 -7
- package/node_modules/@protobufjs/fetch/package.json +7 -5
- package/node_modules/@protobufjs/fetch/util/fs.js +11 -0
- package/node_modules/@protobufjs/inquire/index.js +1 -0
- package/node_modules/@protobufjs/inquire/package.json +1 -1
- package/node_modules/@slack/bolt/dist/App.js +8 -12
- package/node_modules/@slack/bolt/dist/context/index.js +7 -7
- package/node_modules/@slack/bolt/dist/index.js +16 -16
- package/node_modules/@slack/bolt/dist/receivers/AwsLambdaReceiver.js +2 -0
- package/node_modules/@slack/bolt/dist/receivers/ExpressReceiver.js +8 -1
- package/node_modules/@slack/bolt/dist/receivers/HTTPReceiver.js +4 -2
- package/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.js +1 -1
- package/node_modules/@slack/bolt/dist/receivers/verify-request.js +3 -0
- package/node_modules/@slack/bolt/dist/receivers/verify-signing-secret.js +12 -0
- package/node_modules/@slack/bolt/dist/types/actions/index.js +1 -1
- package/node_modules/@slack/bolt/dist/types/index.js +3 -3
- package/node_modules/@slack/bolt/package.json +4 -4
- package/node_modules/@slack/web-api/dist/file-upload.js +4 -2
- package/node_modules/@slack/web-api/package.json +2 -2
- package/node_modules/@smithy/core/cbor.js +0 -1
- package/node_modules/@smithy/core/checksum.js +1 -1
- package/node_modules/@smithy/core/client.js +0 -1
- package/node_modules/@smithy/core/config.js +1 -1
- package/node_modules/@smithy/core/dist-cjs/index.js +3 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +1 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +3 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +9 -40
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +9 -40
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +12 -142
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +39 -22
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +39 -22
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +7 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +128 -176
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +183 -87
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +128 -176
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +184 -0
- package/node_modules/@smithy/core/dist-es/index.js +6 -6
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/index.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/checkRegion.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.browser.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/toEndpointV1.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointConfig.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/index.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +1 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +5 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/middleware-content-length/contentLengthMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js +19 -6
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +4 -5
- package/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/constants.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/ConfiguredRetryStrategy.js +4 -5
- package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRetryToken.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/StandardRetryStrategy.js +9 -5
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +3 -4
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +1 -2
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +12 -7
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +9 -5
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +10 -3
- package/node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/deserializerMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.browser.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/blob/Uint8ArrayBlobAdapter.js +19 -21
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/createChecksumStream.browser.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.browser.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.browser.js +1 -1
- package/node_modules/{@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js → @smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.browser.js} +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/transport/index.js +9 -0
- package/node_modules/@smithy/core/dist-es/submodules/{protocols/url-parser → transport}/parseUrl.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/{endpoints → transport}/toEndpointV1.js +1 -1
- package/node_modules/@smithy/core/endpoints.js +0 -1
- package/node_modules/@smithy/core/event-streams.js +0 -1
- package/node_modules/@smithy/core/package.json +20 -11
- package/node_modules/@smithy/core/protocols.js +0 -1
- package/node_modules/@smithy/core/retry.js +1 -1
- package/node_modules/@smithy/core/schema.js +0 -1
- package/node_modules/@smithy/core/serde.js +0 -1
- package/node_modules/@smithy/core/transport.js +5 -0
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +14 -13
- package/node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js +14 -13
- package/node_modules/@smithy/credential-provider-imds/package.json +3 -3
- package/node_modules/@smithy/fetch-http-handler/package.json +4 -4
- package/node_modules/@smithy/node-http-handler/package.json +4 -4
- package/node_modules/@smithy/signature-v4/package.json +3 -3
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/@smithy/util-utf8/dist-cjs/index.js +65 -7
- package/node_modules/@smithy/util-utf8/dist-es/index.js +3 -1
- package/node_modules/@smithy/util-utf8/package.json +33 -9
- package/node_modules/@whiskeysockets/baileys/node_modules/p-queue/dist/index.js +10 -5
- package/node_modules/@whiskeysockets/baileys/node_modules/p-queue/package.json +1 -1
- package/node_modules/axios/dist/axios.js +81 -53
- package/node_modules/axios/dist/axios.min.js +2 -2
- package/node_modules/axios/dist/browser/axios.cjs +96 -64
- package/node_modules/axios/dist/esm/axios.js +96 -64
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/node/axios.cjs +206 -85
- package/node_modules/axios/index.d.cts +1 -1
- package/node_modules/axios/lib/adapters/fetch.js +6 -2
- package/node_modules/axios/lib/adapters/http.js +139 -29
- package/node_modules/axios/lib/adapters/xhr.js +2 -1
- package/node_modules/axios/lib/core/AxiosHeaders.js +1 -33
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/composeSignals.js +48 -47
- package/node_modules/axios/lib/helpers/formDataToJSON.js +1 -1
- package/node_modules/axios/lib/helpers/fromDataURI.js +18 -5
- package/node_modules/axios/lib/helpers/progressEventReducer.js +3 -0
- package/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
- package/node_modules/axios/lib/utils.js +8 -7
- package/node_modules/axios/node_modules/agent-base/dist/src/index.js +203 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.js +18 -0
- package/node_modules/axios/node_modules/agent-base/package.json +64 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.js +177 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.js +14 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
- package/node_modules/axios/node_modules/https-proxy-agent/package.json +56 -0
- package/node_modules/axios/package.json +3 -1
- package/node_modules/discord-api-types/package.json +8 -8
- package/node_modules/discord-api-types/payloads/v10/oauth2.js +7 -0
- package/node_modules/discord-api-types/payloads/v9/oauth2.js +7 -0
- package/node_modules/discord-api-types/rest/v10/index.js +3 -2
- package/node_modules/discord-api-types/rest/v9/index.js +3 -2
- package/node_modules/es-object-atoms/package.json +6 -7
- package/node_modules/es-object-atoms/tsconfig.json +1 -0
- package/node_modules/eventsource-parser/dist/index.cjs +21 -10
- package/node_modules/eventsource-parser/dist/index.d.cts +33 -10
- package/node_modules/eventsource-parser/dist/index.js +21 -10
- package/node_modules/eventsource-parser/dist/stream.cjs +4 -3
- package/node_modules/eventsource-parser/dist/stream.d.cts +16 -3
- package/node_modules/eventsource-parser/dist/stream.js +4 -3
- package/node_modules/eventsource-parser/package.json +8 -8
- package/node_modules/express-rate-limit/dist/index.cjs +1 -1
- package/node_modules/express-rate-limit/dist/index.mjs +1 -1
- package/node_modules/express-rate-limit/package.json +9 -9
- package/node_modules/fast-wrap-ansi/lib/main.js +0 -1
- package/node_modules/fast-wrap-ansi/package.json +10 -10
- 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 +1 -0
- 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 +2 -4
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +1 -1
- package/node_modules/fast-xml-parser/src/xmlparser/node2json.js +4 -0
- package/node_modules/grammy/out/bot.js +1 -0
- package/node_modules/grammy/out/context.js +236 -74
- package/node_modules/grammy/out/convenience/constants.js +1 -0
- package/node_modules/grammy/out/convenience/frameworks.js +21 -17
- package/node_modules/grammy/out/core/api.js +280 -141
- package/node_modules/grammy/out/filter.js +5 -1
- package/node_modules/grammy/out/web.mjs +191 -61
- package/node_modules/grammy/package.json +2 -2
- package/node_modules/hasown/package.json +4 -5
- package/node_modules/linkify-it/build/index.cjs.js +99 -94
- package/node_modules/linkify-it/index.mjs +99 -94
- package/node_modules/linkify-it/package.json +11 -1
- package/node_modules/lru-cache/dist/commonjs/browser/index.js +81 -41
- package/node_modules/lru-cache/dist/commonjs/browser/index.min.js +1 -1
- package/node_modules/lru-cache/dist/commonjs/browser/perf.js +1 -2
- package/node_modules/lru-cache/dist/commonjs/index.js +81 -41
- package/node_modules/lru-cache/dist/commonjs/index.min.js +1 -1
- package/node_modules/lru-cache/dist/commonjs/node/index.js +81 -41
- package/node_modules/lru-cache/dist/commonjs/node/index.min.js +1 -1
- package/node_modules/lru-cache/dist/commonjs/node/perf.js +1 -2
- package/node_modules/lru-cache/dist/commonjs/perf.js +1 -2
- package/node_modules/lru-cache/dist/esm/browser/index.js +81 -41
- package/node_modules/lru-cache/dist/esm/browser/index.min.js +1 -1
- package/node_modules/lru-cache/dist/esm/browser/perf.js +1 -2
- package/node_modules/lru-cache/dist/esm/index.js +81 -41
- package/node_modules/lru-cache/dist/esm/index.min.js +1 -1
- package/node_modules/lru-cache/dist/esm/node/index.js +81 -41
- package/node_modules/lru-cache/dist/esm/node/index.min.js +1 -1
- package/node_modules/lru-cache/dist/esm/node/perf.js +1 -2
- package/node_modules/lru-cache/dist/esm/perf.js +1 -2
- package/node_modules/lru-cache/package.json +8 -8
- package/node_modules/markdown-it/dist/index.cjs.js +111 -31
- package/node_modules/markdown-it/dist/markdown-it.js +117 -31
- package/node_modules/markdown-it/dist/markdown-it.min.js +2 -2
- package/node_modules/markdown-it/lib/common/utils.mjs +30 -1
- package/node_modules/markdown-it/lib/index.mjs +1 -1
- package/node_modules/markdown-it/lib/rules_block/heading.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_block/html_block.mjs +12 -1
- package/node_modules/markdown-it/lib/rules_block/lheading.mjs +4 -1
- package/node_modules/markdown-it/lib/rules_block/paragraph.mjs +3 -1
- package/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +37 -21
- package/node_modules/markdown-it/lib/rules_inline/entity.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +37 -6
- package/node_modules/markdown-it/package.json +14 -3
- package/node_modules/protobufjs/dist/light/protobuf.js +354 -234
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/minimal/protobuf.js +75 -29
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.js +425 -286
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/ext/descriptor/index.js +7 -2
- package/node_modules/protobufjs/package.json +8 -5
- package/node_modules/protobufjs/src/converter.js +17 -10
- package/node_modules/protobufjs/src/encoder.js +8 -5
- package/node_modules/protobufjs/src/enum.js +2 -2
- package/node_modules/protobufjs/src/field.js +1 -1
- package/node_modules/protobufjs/src/namespace.js +10 -4
- package/node_modules/protobufjs/src/object.js +6 -6
- package/node_modules/protobufjs/src/parse.js +49 -30
- package/node_modules/protobufjs/src/root.js +18 -10
- package/node_modules/protobufjs/src/roots.js +1 -1
- package/node_modules/protobufjs/src/service.js +4 -2
- package/node_modules/protobufjs/src/type.js +12 -7
- package/node_modules/protobufjs/src/util/fs.js +11 -0
- package/node_modules/protobufjs/src/util/minimal.js +42 -9
- package/node_modules/protobufjs/src/util/patterns.js +0 -1
- package/node_modules/protobufjs/src/util.js +19 -4
- package/node_modules/protobufjs/src/wrappers.js +11 -7
- package/node_modules/protobufjs/src/writer.js +11 -9
- package/node_modules/qs/dist/qs.js +15 -15
- package/node_modules/qs/eslint.config.mjs +1 -0
- package/node_modules/qs/lib/parse.js +52 -22
- package/node_modules/qs/lib/stringify.js +11 -4
- package/node_modules/qs/package.json +2 -2
- package/node_modules/semver/classes/range.js +7 -0
- package/node_modules/semver/package.json +1 -1
- package/node_modules/semver/ranges/subset.js +2 -2
- package/node_modules/shell-quote/package.json +5 -6
- package/node_modules/shell-quote/quote.js +43 -1
- package/node_modules/thread-stream/.claude/settings.local.json +15 -0
- package/node_modules/thread-stream/CLAUDE.md +64 -0
- package/node_modules/thread-stream/index.js +41 -13
- package/node_modules/thread-stream/lib/indexes.js +3 -1
- package/node_modules/thread-stream/lib/worker.js +20 -8
- package/node_modules/thread-stream/package.json +1 -1
- package/node_modules/type-is/index.js +8 -18
- package/node_modules/type-is/node_modules/content-type/dist/index.js +170 -0
- package/node_modules/type-is/node_modules/content-type/package.json +52 -0
- package/node_modules/type-is/package.json +9 -5
- package/node_modules/undici/lib/api/api-request.js +1 -1
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +3 -3
- package/node_modules/undici/lib/core/connect.js +16 -0
- package/node_modules/undici/lib/core/request.js +17 -2
- package/node_modules/undici/lib/core/socks5-client.js +10 -5
- package/node_modules/undici/lib/core/socks5-utils.js +17 -22
- package/node_modules/undici/lib/dispatcher/client-h1.js +64 -20
- package/node_modules/undici/lib/dispatcher/client.js +6 -2
- package/node_modules/undici/lib/dispatcher/h2c-client.js +1 -1
- package/node_modules/undici/lib/global.js +10 -1
- package/node_modules/undici/lib/mock/mock-call-history.js +15 -15
- package/node_modules/undici/lib/util/cache.js +8 -7
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +17 -6
- package/node_modules/undici/lib/web/fetch/index.js +5 -2
- package/node_modules/undici/lib/web/webidl/index.js +5 -5
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +1 -7
- package/node_modules/undici/package.json +1 -1
- package/node_modules/ws/lib/receiver.js +54 -0
- package/node_modules/ws/lib/sender.js +6 -1
- package/node_modules/ws/lib/websocket-server.js +8 -0
- package/node_modules/ws/lib/websocket.js +14 -0
- package/node_modules/ws/package.json +1 -1
- package/package.json +1 -1
- package/skills/qqbrowser-playbook/SKILL.md +330 -0
- package/skills/qqbrowser-skill/SKILL.md +355 -160
- package/node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8/dist-cjs/index.js +0 -65
- package/node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8/dist-es/index.js +0 -3
- package/node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8/package.json +0 -66
- package/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.browser.js +0 -1
- package/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.js +0 -1
- package/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-cjs/index.js +0 -65
- package/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-cjs/toUint8Array.js +0 -1
- package/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.browser.js +0 -1
- package/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.js +0 -1
- package/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js +0 -1
- package/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/fromUtf8.js +0 -5
- package/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/index.js +0 -3
- package/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js +0 -9
- package/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUtf8.js +0 -10
- package/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/package.json +0 -66
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttpTypes.js +0 -2
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +0 -157
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/constants.js +0 -2
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromEnvSigningName.js +0 -16
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +0 -81
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js +0 -8
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js +0 -11
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js +0 -10
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/index.js +0 -4
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js +0 -5
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js +0 -7
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js +0 -7
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js +0 -8
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +0 -70
- package/node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js +0 -41
- package/node_modules/@aws-sdk/middleware-host-header/package.json +0 -59
- package/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js +0 -48
- package/node_modules/@aws-sdk/middleware-logger/dist-es/index.js +0 -1
- package/node_modules/@aws-sdk/middleware-logger/package.json +0 -59
- package/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js +0 -29
- package/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/recursionDetectionMiddleware.js +0 -33
- package/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/recursionDetectionMiddleware.native.js +0 -5
- package/node_modules/@aws-sdk/middleware-recursion-detection/dist-es/index.js +0 -2
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +0 -63
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js +0 -581
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/toStream.browser.js +0 -11
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/toStream.js +0 -7
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/bucket-endpoint-middleware.js +0 -36
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/check-content-length-header.js +0 -32
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/index.js +0 -9
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/protocol/S3RestXmlProtocol.js +0 -25
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-endpoint-middleware.js +0 -41
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-middleware.js +0 -42
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-expires-middleware.js +0 -33
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCache.js +0 -39
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCacheEntry.js +0 -14
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityProviderImpl.js +0 -49
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/constants.js +0 -13
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressHttpSigningMiddleware.js +0 -38
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressMiddleware.js +0 -41
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/signS3Express.js +0 -7
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/index.js +0 -7
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/interfaces/S3ExpressIdentity.js +0 -1
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/interfaces/S3ExpressIdentityProvider.js +0 -1
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3Configuration.js +0 -17
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/throw-200-exceptions.js +0 -51
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/toStream.browser.js +0 -8
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/toStream.js +0 -4
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/validate-bucket-name.js +0 -25
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +0 -79
- package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +0 -194
- package/node_modules/@aws-sdk/middleware-user-agent/dist-es/index.js +0 -2
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +0 -63
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/auth/httpAuthSchemeProvider.js +0 -60
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/endpoint/bdd.js +0 -100
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/endpoint/endpointResolver.js +0 -18
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/models/CognitoIdentityServiceException.js +0 -12
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/models/errors.js +0 -121
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/runtimeConfig.browser.js +0 -38
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/runtimeConfig.js +0 -54
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/runtimeConfig.native.js +0 -15
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/runtimeConfig.shared.js +0 -50
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/schemas/schemas_0.js +0 -110
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/auth/httpAuthSchemeProvider.js +0 -56
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/bdd.js +0 -90
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/endpointResolver.js +0 -18
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/models/SigninServiceException.js +0 -12
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/models/errors.js +0 -64
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/runtimeConfig.browser.js +0 -39
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/runtimeConfig.js +0 -54
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/runtimeConfig.native.js +0 -15
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/runtimeConfig.shared.js +0 -49
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/schemas/schemas_0.js +0 -125
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/auth/httpAuthSchemeProvider.js +0 -56
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/endpoint/bdd.js +0 -80
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/endpoint/endpointResolver.js +0 -18
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/models/SSOServiceException.js +0 -12
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/models/errors.js +0 -56
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/runtimeConfig.browser.js +0 -38
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/runtimeConfig.js +0 -54
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/runtimeConfig.native.js +0 -15
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/runtimeConfig.shared.js +0 -49
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/schemas/schemas_0.js +0 -90
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/auth/httpAuthSchemeProvider.js +0 -56
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/bdd.js +0 -80
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/endpointResolver.js +0 -18
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/models/SSOOIDCServiceException.js +0 -12
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/models/errors.js +0 -195
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/runtimeConfig.browser.js +0 -38
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/runtimeConfig.js +0 -54
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/runtimeConfig.native.js +0 -15
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/runtimeConfig.shared.js +0 -49
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/schemas/schemas_0.js +0 -140
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/STSClient.js +0 -55
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/auth/httpAuthExtensionConfiguration.js +0 -43
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/auth/httpAuthSchemeProvider.js +0 -144
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/EndpointParameters.js +0 -19
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/bdd.js +0 -150
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/endpointResolver.js +0 -18
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/models/STSServiceException.js +0 -12
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/models/errors.js +0 -96
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.browser.js +0 -39
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.js +0 -74
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.native.js +0 -15
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.shared.js +0 -57
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeExtensions.js +0 -13
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/schemas/schemas_0.js +0 -195
- package/node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js +0 -38
- package/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/stsRegionDefaultResolver.js +0 -20
- package/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/stsRegionDefaultResolver.native.js +0 -6
- package/node_modules/@aws-sdk/region-config-resolver/dist-es/index.js +0 -3
- package/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/awsRegionConfig.js +0 -2
- package/node_modules/@aws-sdk/region-config-resolver/package.json +0 -62
- package/node_modules/@aws-sdk/util-arn-parser/dist-cjs/index.js +0 -27
- package/node_modules/@aws-sdk/util-arn-parser/package.json +0 -55
- package/node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js +0 -406
- package/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/partitions.json +0 -267
- package/node_modules/@aws-sdk/util-endpoints/dist-es/index.js +0 -6
- package/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/index.js +0 -3
- package/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json +0 -267
- package/node_modules/@aws-sdk/util-endpoints/dist-es/lib/isIpAddress.js +0 -1
- package/node_modules/@aws-sdk/util-endpoints/dist-es/resolveEndpoint.js +0 -1
- package/node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointError.js +0 -1
- package/node_modules/@aws-sdk/util-endpoints/dist-es/types/index.js +0 -6
- package/node_modules/@aws-sdk/util-endpoints/package.json +0 -60
- package/node_modules/@aws-sdk/util-format-url/dist-cjs/index.js +0 -34
- package/node_modules/@aws-sdk/util-format-url/package.json +0 -56
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/configurations.js +0 -2
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/createUserAgentStringParsingProvider.js +0 -57
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/index.js +0 -58
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/index.native.js +0 -22
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +0 -55
- package/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +0 -185
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/index.js +0 -2
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +0 -69
- package/node_modules/@smithy/config-resolver/dist-cjs/index.js +0 -22
- package/node_modules/@smithy/config-resolver/dist-es/index.js +0 -1
- package/node_modules/@smithy/config-resolver/package.json +0 -41
- package/node_modules/@smithy/core/dist-cjs/getSmithyContext.js +0 -6
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +0 -21
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +0 -21
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +0 -46
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/index.js +0 -6
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/resolveAuthOptions.js +0 -24
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/getHttpSigningMiddleware.js +0 -19
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/httpSigningMiddleware.js +0 -27
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/index.js +0 -5
- package/node_modules/@smithy/core/dist-cjs/normalizeProvider.js +0 -10
- package/node_modules/@smithy/core/dist-cjs/pagination/createPaginator.js +0 -44
- package/node_modules/@smithy/core/dist-cjs/request-builder/requestBuilder.js +0 -5
- package/node_modules/@smithy/core/dist-cjs/setFeature.js +0 -14
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js +0 -18
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +0 -38
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +0 -15
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/index.js +0 -6
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/noAuth.js +0 -9
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/index.js +0 -6
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/memoizeIdentityProvider.js +0 -61
- package/node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js +0 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/util-middleware/getSmithyContext.js +0 -2
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/TestVectors.fixture.js +0 -146
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/vectorTypes.fixture.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/index.js +0 -2
- package/node_modules/@smithy/eventstream-codec/dist-cjs/index.js +0 -11
- package/node_modules/@smithy/eventstream-codec/dist-es/index.js +0 -1
- package/node_modules/@smithy/eventstream-codec/package.json +0 -44
- package/node_modules/@smithy/eventstream-serde-browser/dist-cjs/index.js +0 -9
- package/node_modules/@smithy/eventstream-serde-browser/dist-es/index.js +0 -3
- package/node_modules/@smithy/eventstream-serde-browser/package.json +0 -44
- package/node_modules/@smithy/eventstream-serde-config-resolver/dist-cjs/index.js +0 -5
- package/node_modules/@smithy/eventstream-serde-config-resolver/dist-es/index.js +0 -1
- package/node_modules/@smithy/eventstream-serde-config-resolver/package.json +0 -44
- package/node_modules/@smithy/eventstream-serde-node/dist-cjs/index.js +0 -6
- package/node_modules/@smithy/eventstream-serde-node/dist-es/index.js +0 -1
- package/node_modules/@smithy/eventstream-serde-node/package.json +0 -44
- package/node_modules/@smithy/hash-node/dist-cjs/index.js +0 -5
- package/node_modules/@smithy/hash-node/dist-es/index.js +0 -1
- package/node_modules/@smithy/hash-node/package.json +0 -41
- package/node_modules/@smithy/invalid-dependency/dist-cjs/index.js +0 -6
- package/node_modules/@smithy/invalid-dependency/dist-es/index.js +0 -1
- package/node_modules/@smithy/invalid-dependency/package.json +0 -41
- package/node_modules/@smithy/middleware-content-length/dist-cjs/index.js +0 -7
- package/node_modules/@smithy/middleware-content-length/dist-es/index.js +0 -1
- package/node_modules/@smithy/middleware-content-length/package.json +0 -41
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +0 -12
- package/node_modules/@smithy/middleware-endpoint/dist-es/index.js +0 -1
- package/node_modules/@smithy/middleware-endpoint/package.json +0 -41
- package/node_modules/@smithy/middleware-retry/dist-cjs/index.js +0 -22
- package/node_modules/@smithy/middleware-retry/dist-es/index.js +0 -1
- package/node_modules/@smithy/middleware-retry/package.json +0 -41
- package/node_modules/@smithy/middleware-serde/dist-cjs/index.js +0 -9
- package/node_modules/@smithy/middleware-serde/dist-es/index.js +0 -1
- package/node_modules/@smithy/middleware-serde/package.json +0 -41
- package/node_modules/@smithy/middleware-stack/dist-cjs/index.js +0 -5
- package/node_modules/@smithy/middleware-stack/dist-es/index.js +0 -1
- package/node_modules/@smithy/middleware-stack/package.json +0 -43
- package/node_modules/@smithy/node-config-provider/dist-cjs/index.js +0 -5
- package/node_modules/@smithy/node-config-provider/dist-es/index.js +0 -1
- package/node_modules/@smithy/node-config-provider/package.json +0 -43
- package/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +0 -21
- package/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +0 -88
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +0 -21
- package/node_modules/@smithy/property-provider/dist-cjs/index.js +0 -10
- package/node_modules/@smithy/property-provider/dist-es/index.js +0 -1
- package/node_modules/@smithy/property-provider/package.json +0 -41
- package/node_modules/@smithy/protocol-http/dist-cjs/index.js +0 -11
- package/node_modules/@smithy/protocol-http/dist-es/index.js +0 -1
- package/node_modules/@smithy/protocol-http/package.json +0 -42
- package/node_modules/@smithy/querystring-builder/dist-cjs/index.js +0 -5
- package/node_modules/@smithy/querystring-builder/dist-es/index.js +0 -1
- package/node_modules/@smithy/querystring-builder/package.json +0 -41
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +0 -16
- package/node_modules/@smithy/shared-ini-file-loader/dist-es/index.js +0 -1
- package/node_modules/@smithy/shared-ini-file-loader/package.json +0 -41
- package/node_modules/@smithy/signature-v4/dist-es/suite.fixture.js +0 -399
- package/node_modules/@smithy/smithy-client/dist-cjs/index.js +0 -75
- package/node_modules/@smithy/smithy-client/dist-es/index.js +0 -3
- package/node_modules/@smithy/smithy-client/package.json +0 -42
- package/node_modules/@smithy/url-parser/dist-cjs/index.js +0 -5
- package/node_modules/@smithy/url-parser/dist-es/index.js +0 -1
- package/node_modules/@smithy/url-parser/package.json +0 -41
- package/node_modules/@smithy/util-base64/dist-cjs/index.js +0 -6
- package/node_modules/@smithy/util-base64/dist-es/index.js +0 -1
- package/node_modules/@smithy/util-base64/package.json +0 -42
- package/node_modules/@smithy/util-body-length-browser/dist-cjs/index.js +0 -5
- package/node_modules/@smithy/util-body-length-browser/dist-es/index.js +0 -1
- package/node_modules/@smithy/util-body-length-browser/package.json +0 -42
- package/node_modules/@smithy/util-body-length-node/dist-cjs/index.js +0 -5
- package/node_modules/@smithy/util-body-length-node/dist-es/index.js +0 -1
- package/node_modules/@smithy/util-body-length-node/package.json +0 -42
- package/node_modules/@smithy/util-config-provider/dist-cjs/index.js +0 -7
- package/node_modules/@smithy/util-config-provider/dist-es/index.js +0 -1
- package/node_modules/@smithy/util-config-provider/package.json +0 -43
- package/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/index.js +0 -5
- package/node_modules/@smithy/util-defaults-mode-browser/dist-es/index.js +0 -1
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +0 -41
- package/node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js +0 -5
- package/node_modules/@smithy/util-defaults-mode-node/dist-es/index.js +0 -1
- package/node_modules/@smithy/util-defaults-mode-node/package.json +0 -41
- package/node_modules/@smithy/util-endpoints/dist-cjs/index.js +0 -12
- package/node_modules/@smithy/util-endpoints/dist-es/index.js +0 -1
- package/node_modules/@smithy/util-endpoints/package.json +0 -45
- package/node_modules/@smithy/util-hex-encoding/dist-cjs/index.js +0 -6
- package/node_modules/@smithy/util-hex-encoding/dist-es/index.js +0 -1
- package/node_modules/@smithy/util-hex-encoding/package.json +0 -42
- package/node_modules/@smithy/util-middleware/dist-cjs/index.js +0 -6
- package/node_modules/@smithy/util-middleware/dist-es/index.js +0 -1
- package/node_modules/@smithy/util-middleware/package.json +0 -46
- package/node_modules/@smithy/util-retry/dist-cjs/index.js +0 -21
- package/node_modules/@smithy/util-retry/dist-es/index.js +0 -1
- package/node_modules/@smithy/util-retry/package.json +0 -46
- package/node_modules/@smithy/util-stream/dist-cjs/index.js +0 -14
- package/node_modules/@smithy/util-stream/dist-es/index.js +0 -1
- package/node_modules/@smithy/util-stream/package.json +0 -43
- package/node_modules/shell-quote/print.py +0 -3
- /package/node_modules/@aws-sdk/{middleware-logger/dist-es → core/dist-es/submodules/client/middleware-logger}/loggerMiddleware.js +0 -0
- /package/node_modules/@aws-sdk/{middleware-recursion-detection/dist-es → core/dist-es/submodules/client/middleware-recursion-detection}/configuration.js +0 -0
- /package/node_modules/@aws-sdk/{middleware-recursion-detection/dist-es → core/dist-es/submodules/client/middleware-recursion-detection}/getRecursionDetectionPlugin.js +0 -0
- /package/node_modules/@aws-sdk/{middleware-recursion-detection/dist-es → core/dist-es/submodules/client/middleware-recursion-detection}/recursionDetectionMiddleware.browser.js +0 -0
- /package/node_modules/@aws-sdk/{middleware-recursion-detection/dist-es → core/dist-es/submodules/client/middleware-recursion-detection}/recursionDetectionMiddleware.native.js +0 -0
- /package/node_modules/@aws-sdk/{middleware-user-agent/dist-es → core/dist-es/submodules/client/middleware-user-agent}/configurations.js +0 -0
- /package/node_modules/@aws-sdk/{middleware-user-agent/dist-es → core/dist-es/submodules/client/middleware-user-agent}/constants.js +0 -0
- /package/node_modules/@aws-sdk/{middleware-user-agent/dist-es → core/dist-es/submodules/client/middleware-user-agent}/encode-features.js +0 -0
- /package/node_modules/@aws-sdk/{region-config-resolver/dist-es/extensions/index.js → core/dist-es/submodules/client/region-config-resolver/extensions.js} +0 -0
- /package/node_modules/@aws-sdk/{region-config-resolver/dist-es/regionConfig → core/dist-es/submodules/client/region-config-resolver}/stsRegionDefaultResolver.browser.js +0 -0
- /package/node_modules/@aws-sdk/{region-config-resolver/dist-es/regionConfig → core/dist-es/submodules/client/region-config-resolver}/stsRegionDefaultResolver.native.js +0 -0
- /package/node_modules/@aws-sdk/{util-endpoints/dist-es → core/dist-es/submodules/client/util-endpoints}/lib/aws/parseArn.js +0 -0
- /package/node_modules/@aws-sdk/{util-endpoints/dist-es → core/dist-es/submodules/client/util-endpoints}/types/EndpointRuleObject.js +0 -0
- /package/node_modules/@aws-sdk/{util-endpoints/dist-es → core/dist-es/submodules/client/util-endpoints}/types/ErrorRuleObject.js +0 -0
- /package/node_modules/@aws-sdk/{util-endpoints/dist-es → core/dist-es/submodules/client/util-endpoints}/types/RuleSetObject.js +0 -0
- /package/node_modules/@aws-sdk/{util-endpoints/dist-es → core/dist-es/submodules/client/util-endpoints}/types/TreeRuleObject.js +0 -0
- /package/node_modules/@aws-sdk/{util-endpoints/dist-es → core/dist-es/submodules/client/util-endpoints}/types/shared.js +0 -0
- /package/node_modules/@aws-sdk/{util-user-agent-browser/dist-es → core/dist-es/submodules/client/util-user-agent-browser}/configurations.js +0 -0
- /package/node_modules/@aws-sdk/{util-user-agent-browser/dist-es → core/dist-es/submodules/client/util-user-agent-browser}/createUserAgentStringParsingProvider.js +0 -0
- /package/node_modules/@aws-sdk/{util-user-agent-browser/dist-es/index.js → core/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.js} +0 -0
- /package/node_modules/@aws-sdk/{util-user-agent-browser/dist-es/index.native.js → core/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.native.js} +0 -0
- /package/node_modules/@aws-sdk/{util-user-agent-node/dist-es → core/dist-es/submodules/client/util-user-agent-node}/crt-availability.js +0 -0
- /package/node_modules/@aws-sdk/{util-user-agent-node/dist-es → core/dist-es/submodules/client/util-user-agent-node}/defaultUserAgent.js +0 -0
- /package/node_modules/@aws-sdk/{util-user-agent-node/dist-es → core/dist-es/submodules/client/util-user-agent-node}/getNodeModulesParentDirs.js +0 -0
- /package/node_modules/@aws-sdk/{util-user-agent-node/dist-es → core/dist-es/submodules/client/util-user-agent-node}/getRuntimeUserAgentPair.js +0 -0
- /package/node_modules/@aws-sdk/{util-user-agent-node/dist-es → core/dist-es/submodules/client/util-user-agent-node}/getSanitizedDevTypeScriptVersion.js +0 -0
- /package/node_modules/@aws-sdk/{util-user-agent-node/dist-es → core/dist-es/submodules/client/util-user-agent-node}/getSanitizedTypeScriptVersion.js +0 -0
- /package/node_modules/@aws-sdk/{util-user-agent-node/dist-es → core/dist-es/submodules/client/util-user-agent-node}/is-crt-available.js +0 -0
- /package/node_modules/@aws-sdk/{util-arn-parser/dist-es/index.js → core/dist-es/submodules/util/util-arn-parser/arn.js} +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/getHttpAuthSchemeEndpointRuleSetPlugin.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/getHttpAuthSchemePlugin.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/httpAuthSchemeMiddleware.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/index.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/resolveAuthOptions.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-signing → legacy-root-exports/middleware-http-signing}/getHttpSigningMiddleware.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-signing → legacy-root-exports/middleware-http-signing}/httpSigningMiddleware.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-signing → legacy-root-exports/middleware-http-signing}/index.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{pagination → legacy-root-exports/pagination}/createPaginator.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/DefaultIdentityProviderConfig.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/httpApiKeyAuth.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/httpBearerAuth.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/index.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/noAuth.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/index.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/memoizeIdentityProvider.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{getSmithyContext.js → submodules/transport/getSmithyContext.js} +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols/protocol-http → transport}/httpRequest.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols/protocol-http → transport}/httpResponse.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{endpoints/util-endpoints/lib → transport}/isValidHostLabel.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols/protocol-http → transport}/isValidHostname.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{client/util-middleware → transport}/normalizeProvider.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols/querystring-parser → transport}/parseQueryString.js +0 -0
- /package/node_modules/{@aws-crypto/sha256-browser/node_modules/@smithy → @smithy}/util-utf8/dist-cjs/fromUtf8.browser.js +0 -0
- /package/node_modules/{@aws-crypto/sha256-browser/node_modules/@smithy → @smithy}/util-utf8/dist-cjs/fromUtf8.js +0 -0
- /package/node_modules/{@aws-crypto/sha256-browser/node_modules/@smithy → @smithy}/util-utf8/dist-cjs/toUint8Array.js +0 -0
- /package/node_modules/{@aws-crypto/sha256-browser/node_modules/@smithy → @smithy}/util-utf8/dist-cjs/toUtf8.browser.js +0 -0
- /package/node_modules/{@aws-crypto/sha256-browser/node_modules/@smithy → @smithy}/util-utf8/dist-cjs/toUtf8.js +0 -0
- /package/node_modules/{@aws-crypto/sha256-browser/node_modules/@smithy → @smithy}/util-utf8/dist-es/fromUtf8.browser.js +0 -0
- /package/node_modules/{@aws-crypto/sha256-browser/node_modules/@smithy → @smithy}/util-utf8/dist-es/fromUtf8.js +0 -0
- /package/node_modules/{@aws-crypto/sha256-browser/node_modules/@smithy → @smithy}/util-utf8/dist-es/toUint8Array.js +0 -0
- /package/node_modules/{@aws-crypto/sha256-browser/node_modules/@smithy → @smithy}/util-utf8/dist-es/toUtf8.browser.js +0 -0
- /package/node_modules/{@aws-crypto/sha256-browser/node_modules/@smithy → @smithy}/util-utf8/dist-es/toUtf8.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var M=(c,t)=>()=>(t||c((t={exports:{}}).exports,t),t.exports);var U=M(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.tracing=O.metrics=void 0;var j=require("node:diagnostics_channel");O.metrics=(0,j.channel)("lru-cache:metrics");O.tracing=(0,j.tracingChannel)("lru-cache")});var I=M(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.defaultPerf=void 0;R.defaultPerf=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date});Object.defineProperty(exports,"__esModule",{value:!0});exports.LRUCache=void 0;var u=U(),N=I(),C=()=>u.metrics.hasSubscribers||u.tracing.hasSubscribers,G=new Set,P=typeof process=="object"&&process?process:{},k=(c,t,e,i)=>{typeof P.emitWarning=="function"?P.emitWarning(c,t,e,i):console.error(`[${e}] ${t}: ${c}`)},q=c=>!G.has(c),Y=Symbol("type"),F=c=>!!c&&c===Math.floor(c)&&c>0&&isFinite(c),H=c=>F(c)?c<=Math.pow(2,8)?Uint8Array:c<=Math.pow(2,16)?Uint16Array:c<=Math.pow(2,32)?Uint32Array:c<=Number.MAX_SAFE_INTEGER?W:null:null,W=class extends Array{constructor(t){super(t),this.fill(0)}},x=class c{heap;length;static#o=!1;static create(t){let e=H(t);if(!e)return[];c.#o=!0;let i=new c(t,e);return c.#o=!1,i}constructor(t,e){if(!c.#o)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},L=class c{#o;#c;#m;#D;#w;#M;#j;#S;get perf(){return this.#S}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#b;#s;#i;#t;#l;#u;#a;#h;#_;#r;#y;#F;#d;#g;#T;#O;#f;#U;static unsafeExposeInternals(t){return{starts:t.#F,ttls:t.#d,autopurgeTimers:t.#g,sizes:t.#y,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#u,get head(){return t.#a},get tail(){return t.#h},free:t.#_,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,n)=>t.#G(e,i,s,n),moveToTail:e=>t.#L(e),indexes:e=>t.#A(e),rindexes:e=>t.#v(e),isStale:e=>t.#p(e)}}get max(){return this.#o}get maxSize(){return this.#c}get calculatedSize(){return this.#b}get size(){return this.#n}get fetchMethod(){return this.#M}get memoMethod(){return this.#j}get dispose(){return this.#m}get onInsert(){return this.#D}get disposeAfter(){return this.#w}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:r,allowStale:h,dispose:a,onInsert:d,disposeAfter:f,noDisposeOnSet:p,noUpdateTTL:m,maxSize:T=0,maxEntrySize:w=0,sizeCalculation:_,fetchMethod:l,memoMethod:S,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:g,allowStaleOnFetchAbort:A,ignoreFetchAbort:v,perf:D}=t;if(D!==void 0&&typeof D?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#S=D??N.defaultPerf,e!==0&&!F(e))throw new TypeError("max option must be a nonnegative integer");let z=e?H(e):Array;if(!z)throw new Error("invalid max value: "+e);if(this.#o=e,this.#c=T,this.maxEntrySize=w||this.#c,this.sizeCalculation=_,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#j=S,l!==void 0&&typeof l!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#M=l,this.#O=!!l,this.#s=new Map,this.#i=Array.from({length:e}).fill(void 0),this.#t=Array.from({length:e}).fill(void 0),this.#l=new z(e),this.#u=new z(e),this.#a=0,this.#h=0,this.#_=x.create(e),this.#n=0,this.#b=0,typeof a=="function"&&(this.#m=a),typeof d=="function"&&(this.#D=d),typeof f=="function"?(this.#w=f,this.#r=[]):(this.#w=void 0,this.#r=void 0),this.#T=!!this.#m,this.#U=!!this.#D,this.#f=!!this.#w,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!y,this.allowStaleOnFetchRejection=!!g,this.allowStaleOnFetchAbort=!!A,this.ignoreFetchAbort=!!v,this.maxEntrySize!==0){if(this.#c!==0&&!F(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!F(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#X()}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!r,this.ttlResolution=F(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!F(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#H()}if(this.#o===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#o&&!this.#c){let E="LRU_CACHE_UNBOUNDED";q(E)&&(G.add(E),k("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",E,c))}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#H(){let t=new W(this.#o),e=new W(this.#o);this.#d=t,this.#F=e;let i=this.ttlAutopurge?Array.from({length:this.#o}):void 0;this.#g=i,this.#N=(r,h,a=this.#S.now())=>{e[r]=h!==0?a:0,t[r]=h,s(r,h)},this.#R=r=>{e[r]=t[r]!==0?this.#S.now():0,s(r,t[r])};let s=this.ttlAutopurge?(r,h)=>{if(i?.[r]&&(clearTimeout(i[r]),i[r]=void 0),h&&h!==0&&i){let a=setTimeout(()=>{this.#p(r)&&this.#z(this.#i[r],"expire")},h+1);a.unref&&a.unref(),i[r]=a}}:()=>{};this.#E=(r,h)=>{if(t[h]){let a=t[h],d=e[h];if(!a||!d)return;r.ttl=a,r.start=d,r.now=n||o();let f=r.now-d;r.remainingTTL=a-f}};let n=0,o=()=>{let r=this.#S.now();if(this.ttlResolution>0){n=r;let h=setTimeout(()=>n=0,this.ttlResolution);h.unref&&h.unref()}return r};this.getRemainingTTL=r=>{let h=this.#s.get(r);if(h===void 0)return 0;let a=t[h],d=e[h];if(!a||!d)return 1/0;let f=(n||o())-d;return a-f},this.#p=r=>{let h=e[r],a=t[r];return!!a&&!!h&&(n||o())-h>a}}#R=()=>{};#E=()=>{};#N=()=>{};#p=()=>!1;#X(){let t=new W(this.#o);this.#b=0,this.#y=t,this.#C=e=>{this.#b-=t[e],t[e]=0},this.#k=(e,i,s,n)=>{if(this.#e(i))return 0;if(!F(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,e),!F(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#I=(e,i,s)=>{if(t[e]=i,this.#c){let n=this.#c-t[e];for(;this.#b>n;)this.#P(!0)}this.#b+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#b)}}#C=t=>{};#I=(t,e,i)=>{};#k=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#h;this.#q(e)&&((t||!this.#p(e))&&(yield e),e!==this.#a);)e=this.#u[e]}*#v({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#a;this.#q(e)&&((t||!this.#p(e))&&(yield e),e!==this.#h);)e=this.#l[e]}#q(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#A())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*rentries(){for(let t of this.#v())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*keys(){for(let t of this.#A()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(let t of this.#v()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(let t of this.#A())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(let t of this.#v())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&t(n,this.#i[i],this))return this.#x(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}rforEach(t,e=this){for(let i of this.#v()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}purgeStale(){let t=!1;for(let e of this.#v({allowStale:!0}))this.#p(e)&&(this.#z(this.#i[e],"expire"),t=!0);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#d&&this.#F){let o=this.#d[e],r=this.#F[e];if(o&&r){let h=o-(this.#S.now()-r);n.ttl=h,n.start=Date.now()}}return this.#y&&(n.size=this.#y[e]),n}dump(){let t=[];for(let e of this.#A({allowStale:!0})){let i=this.#i[e],s=this.#t[e],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let o={value:n};if(this.#d&&this.#F){o.ttl=this.#d[e];let r=this.#S.now()-this.#F[e];o.start=Math.floor(Date.now()-r)}this.#y&&(o.size=this.#y[e]),t.unshift([i,o])}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=this.#S.now()-s}this.#W(e,i.value,i)}}set(t,e,i={}){let{status:s=u.metrics.hasSubscribers?{}:void 0}=i;i.status=s,s&&(s.op="set",s.key=t,e!==void 0&&(s.value=e));let n=this.#W(t,e,i);return s&&u.metrics.hasSubscribers&&u.metrics.publish(s),n}#W(t,e,i={}){let{ttl:s=this.ttl,start:n,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:r=this.sizeCalculation,status:h}=i;if(e===void 0)return h&&(h.set="deleted"),this.delete(t),this;let{noUpdateTTL:a=this.noUpdateTTL}=i;h&&!this.#e(e)&&(h.value=e);let d=this.#k(t,e,i.size||0,r,h);if(this.maxEntrySize&&d>this.maxEntrySize)return this.#z(t,"set"),h&&(h.set="miss",h.maxEntrySizeExceeded=!0),this;let f=this.#n===0?void 0:this.#s.get(t);if(f===void 0)f=this.#n===0?this.#h:this.#_.length!==0?this.#_.pop():this.#n===this.#o?this.#P(!1):this.#n,this.#i[f]=t,this.#t[f]=e,this.#s.set(t,f),this.#l[this.#h]=f,this.#u[f]=this.#h,this.#h=f,this.#n++,this.#I(f,d,h),h&&(h.set="add"),a=!1,this.#U&&this.#D?.(e,t,"add");else{this.#L(f);let p=this.#t[f];if(e!==p){if(this.#O&&this.#e(p)){p.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=p;m!==void 0&&!o&&(this.#T&&this.#m?.(m,t,"set"),this.#f&&this.#r?.push([m,t,"set"]))}else o||(this.#T&&this.#m?.(p,t,"set"),this.#f&&this.#r?.push([p,t,"set"]));if(this.#C(f),this.#I(f,d,h),this.#t[f]=e,h){h.set="replace";let m=p&&this.#e(p)?p.__staleWhileFetching:p;m!==void 0&&(h.oldValue=m)}}else h&&(h.set="update");this.#U&&this.onInsert?.(e,t,e===p?"update":"replace")}if(s!==0&&!this.#d&&this.#H(),this.#d&&(a||this.#N(f,s,n),h&&this.#E(h,f)),!o&&this.#f&&this.#r){let p=this.#r,m;for(;m=p?.shift();)this.#w?.(...m)}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#a];if(this.#P(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#f&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#w?.(...e)}}}#P(t){let e=this.#a,i=this.#i[e],s=this.#t[e];return this.#O&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#T||this.#f)&&(this.#T&&this.#m?.(s,i,"evict"),this.#f&&this.#r?.push([s,i,"evict"])),this.#C(e),this.#g?.[e]&&(clearTimeout(this.#g[e]),this.#g[e]=void 0),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#_.push(e)),this.#n===1?(this.#a=this.#h=0,this.#_.length=0):this.#a=this.#l[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{status:i=u.metrics.hasSubscribers?{}:void 0}=e;e.status=i,i&&(i.op="has",i.key=t);let s=this.#Y(t,e);return u.metrics.hasSubscribers&&u.metrics.publish(i),s}#Y(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,n=this.#s.get(t);if(n!==void 0){let o=this.#t[n];if(this.#e(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#p(n))s&&(s.has="stale",this.#E(s,n));else return i&&this.#R(n),s&&(s.has="hit",this.#E(s,n)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){let{status:i=C()?{}:void 0}=e;i&&(i.op="peek",i.key=t),e.status=i;let s=this.#J(t,e);return u.metrics.hasSubscribers&&u.metrics.publish(i),s}#J(t,e){let{status:i,allowStale:s=this.allowStale}=e,n=this.#s.get(t);if(n===void 0||!s&&this.#p(n)){i&&(i.peek=n===void 0?"miss":"stale");return}let o=this.#t[n],r=this.#e(o)?o.__staleWhileFetching:o;return i&&(r!==void 0?(i.peek="hit",i.value=r):i.peek="miss"),r}#G(t,e,i,s){let n=e===void 0?void 0:this.#t[e];if(this.#e(n))return n;let o=new AbortController,{signal:r}=i;r?.addEventListener("abort",()=>o.abort(r.reason),{signal:o.signal});let h={signal:o.signal,options:i,context:s},a=(w,_=!1)=>{let{aborted:l}=o.signal,S=i.ignoreFetchAbort&&w!==void 0,y=i.ignoreFetchAbort||!!(i.allowStaleOnFetchAbort&&w!==void 0);if(i.status&&(l&&!_?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,S&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),l&&!S&&!_)return f(o.signal.reason,y);let b=m,g=this.#t[e];return(g===m||g===void 0&&S&&_)&&(w===void 0?b.__staleWhileFetching!==void 0?this.#t[e]=b.__staleWhileFetching:this.#z(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.#W(t,w,h.options))),w},d=w=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=w),f(w,!1)),f=(w,_)=>{let{aborted:l}=o.signal,S=l&&i.allowStaleOnFetchAbort,y=S||i.allowStaleOnFetchRejection,b=y||i.noDeleteOnFetchRejection,g=m;if(this.#t[e]===m&&(!b||!_&&g.__staleWhileFetching===void 0?this.#z(t,"fetch"):S||(this.#t[e]=g.__staleWhileFetching)),y)return i.status&&g.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),g.__staleWhileFetching;if(g.__returned===g)throw w},p=(w,_)=>{let l=this.#M?.(t,n,h);l&&l instanceof Promise&&l.then(S=>w(S===void 0?void 0:S),_),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(w(void 0),i.allowStaleOnFetchAbort&&(w=S=>a(S,!0)))})};i.status&&(i.status.fetchDispatched=!0);let m=new Promise(p).then(a,d),T=Object.assign(m,{__abortController:o,__staleWhileFetching:n,__returned:void 0});return e===void 0?(this.#W(t,T,{...h.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=T,T}#e(t){if(!this.#O)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof AbortController}fetch(t,e={}){let i=u.tracing.hasSubscribers,{status:s=C()?{}:void 0}=e;e.status=s,s&&e.context&&(s.context=e.context);let n=this.#V(t,e);return s&&i&&(s.trace=!0,u.tracing.tracePromise(()=>n,s).catch(()=>{})),n}async#V(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:r=this.noDisposeOnSet,size:h=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:T=this.allowStaleOnFetchAbort,context:w,forceRefresh:_=!1,status:l,signal:S}=e;if(l&&(l.op="fetch",l.key=t,_&&(l.forceRefresh=!0)),!this.#O)return l&&(l.fetch="get"),this.#x(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:l});let y={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:r,size:h,sizeCalculation:a,noUpdateTTL:d,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:T,ignoreFetchAbort:m,status:l,signal:S},b=this.#s.get(t);if(b===void 0){l&&(l.fetch="miss");let g=this.#G(t,b,y,w);return g.__returned=g}else{let g=this.#t[b];if(this.#e(g)){let E=i&&g.__staleWhileFetching!==void 0;return l&&(l.fetch="inflight",E&&(l.returnedStale=!0)),E?g.__staleWhileFetching:g.__returned=g}let A=this.#p(b);if(!_&&!A)return l&&(l.fetch="hit"),this.#L(b),s&&this.#R(b),l&&this.#E(l,b),g;let v=this.#G(t,b,y,w),z=v.__staleWhileFetching!==void 0&&i;return l&&(l.fetch=A?"stale":"refresh",z&&A&&(l.returnedStale=!0)),z?v.__staleWhileFetching:v.__returned=v}}forceFetch(t,e={}){let i=u.tracing.hasSubscribers,{status:s=C()?{}:void 0}=e;e.status=s,s&&e.context&&(s.context=e.context);let n=this.#K(t,e);return s&&i&&(s.trace=!0,u.tracing.tracePromise(()=>n,s).catch(()=>{})),n}async#K(t,e={}){let i=await this.#V(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let{status:i=u.metrics.hasSubscribers?{}:void 0}=e;e.status=i,i&&(i.op="memo",i.key=t,e.context&&(i.context=e.context));let s=this.#Q(t,e);return i&&(i.value=s),u.metrics.hasSubscribers&&u.metrics.publish(i),s}#Q(t,e={}){let i=this.#j;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,status:n,forceRefresh:o,...r}=e;n&&o&&(n.forceRefresh=!0);let h=this.#x(t,r),a=o||h===void 0;if(n&&(n.memo=a?"miss":"hit",a||(n.value=h)),!a)return h;let d=i(t,h,{options:r,context:s});return n&&(n.value=d),this.#W(t,d,r),d}get(t,e={}){let{status:i=u.metrics.hasSubscribers?{}:void 0}=e;e.status=i,i&&(i.op="get",i.key=t);let s=this.#x(t,e);return i&&(s!==void 0&&(i.value=s),u.metrics.hasSubscribers&&u.metrics.publish(i)),s}#x(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=e,r=this.#s.get(t);if(r===void 0){o&&(o.get="miss");return}let h=this.#t[r],a=this.#e(h);return o&&this.#E(o,r),this.#p(r)?a?(o&&(o.get="stale-fetching"),i&&h.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),h.__staleWhileFetching):void 0):(n||this.#z(t,"expire"),o&&(o.get="stale"),i?(o&&(o.returnedStale=!0),h):void 0):(o&&(o.get=a?"fetching":"hit"),this.#L(r),s&&this.#R(r),a?h.__staleWhileFetching:h)}#B(t,e){this.#u[e]=t,this.#l[t]=e}#L(t){t!==this.#h&&(t===this.#a?this.#a=this.#l[t]:this.#B(this.#u[t],this.#l[t]),this.#B(this.#h,t),this.#h=t)}delete(t){return this.#z(t,"delete")}#z(t,e){u.metrics.hasSubscribers&&u.metrics.publish({op:"delete",delete:e,key:t});let i=!1;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(this.#g?.[s]&&(clearTimeout(this.#g?.[s]),this.#g[s]=void 0),i=!0,this.#n===1)this.#$(e);else{this.#C(s);let n=this.#t[s];if(this.#e(n)?n.__abortController.abort(new Error("deleted")):(this.#T||this.#f)&&(this.#T&&this.#m?.(n,t,e),this.#f&&this.#r?.push([n,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#h)this.#h=this.#u[s];else if(s===this.#a)this.#a=this.#l[s];else{let o=this.#u[s];this.#l[o]=this.#l[s];let r=this.#l[s];this.#u[r]=this.#u[s]}this.#n--,this.#_.push(s)}}if(this.#f&&this.#r?.length){let s=this.#r,n;for(;n=s?.shift();)this.#w?.(...n)}return i}clear(){return this.#$("delete")}#$(t){for(let e of this.#v({allowStale:!0})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else{let s=this.#i[e];this.#T&&this.#m?.(i,s,t),this.#f&&this.#r?.push([i,s,t])}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#F){this.#d.fill(0),this.#F.fill(0);for(let e of this.#g??[])e!==void 0&&clearTimeout(e);this.#g?.fill(void 0)}if(this.#y&&this.#y.fill(0),this.#a=0,this.#h=0,this.#_.length=0,this.#b=0,this.#n=0,this.#f&&this.#r){let e=this.#r,i;for(;i=e?.shift();)this.#w?.(...i)}}};exports.LRUCache=L;
|
|
1
|
+
"use strict";var j=(c,t)=>()=>(t||c((t={exports:{}}).exports,t),t.exports);var I=j(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.tracing=O.metrics=void 0;var U=require("node:diagnostics_channel");O.metrics=(0,U.channel)("lru-cache:metrics");O.tracing=(0,U.tracingChannel)("lru-cache")});var P=j(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.defaultPerf=void 0;D.defaultPerf=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date});Object.defineProperty(exports,"__esModule",{value:!0});exports.LRUCache=void 0;var g=I(),N=P(),C=()=>g.metrics.hasSubscribers||g.tracing.hasSubscribers,k=new Set,G=typeof process=="object"&&process?process:{},V=(c,t,e,i)=>{typeof G.emitWarning=="function"?G.emitWarning(c,t,e,i):console.error(`[${e}] ${t}: ${c}`)},q=c=>!k.has(c);var T=c=>!!c&&c===Math.floor(c)&&c>0&&isFinite(c),H=c=>T(c)?c<=Math.pow(2,8)?Uint8Array:c<=Math.pow(2,16)?Uint16Array:c<=Math.pow(2,32)?Uint32Array:c<=Number.MAX_SAFE_INTEGER?W:null:null,W=class extends Array{constructor(t){super(t),this.fill(0)}},x=class c{heap;length;static#o=!1;static create(t){let e=H(t);if(!e)return[];c.#o=!0;let i=new c(t,e);return c.#o=!1,i}constructor(t,e){if(!c.#o)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},L=class c{#o;#c;#m;#W;#S;#M;#j;#w;get perf(){return this.#w}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#n;#b;#s;#i;#t;#l;#u;#a;#h;#_;#r;#y;#F;#d;#g;#T;#U;#f;#D;static unsafeExposeInternals(t){return{starts:t.#F,ttls:t.#d,autopurgeTimers:t.#g,sizes:t.#y,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#u,get head(){return t.#a},get tail(){return t.#h},free:t.#_,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,n)=>t.#G(e,i,s,n),moveToTail:e=>t.#L(e),indexes:e=>t.#A(e),rindexes:e=>t.#z(e),isStale:e=>t.#p(e)}}get max(){return this.#o}get maxSize(){return this.#c}get calculatedSize(){return this.#b}get size(){return this.#n}get fetchMethod(){return this.#M}get memoMethod(){return this.#j}get dispose(){return this.#m}get onInsert(){return this.#W}get disposeAfter(){return this.#S}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:r,updateAgeOnHas:h,allowStale:a,dispose:o,onInsert:d,disposeAfter:_,noDisposeOnSet:y,noUpdateTTL:u,maxSize:p=0,maxEntrySize:f=0,sizeCalculation:b,fetchMethod:l,memoMethod:S,noDeleteOnFetchRejection:F,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:A,ignoreFetchAbort:z,backgroundFetchSize:M=1,perf:v}=t;if(this.backgroundFetchSize=M,v!==void 0&&typeof v?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#w=v??N.defaultPerf,e!==0&&!T(e))throw new TypeError("max option must be a nonnegative integer");let E=e?H(e):Array;if(!E)throw new Error("invalid max value: "+e);if(this.#o=e,this.#c=p,this.maxEntrySize=f||this.#c,this.sizeCalculation=b,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#j=S,l!==void 0&&typeof l!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#M=l,this.#U=!!l,this.#s=new Map,this.#i=Array.from({length:e}).fill(void 0),this.#t=Array.from({length:e}).fill(void 0),this.#l=new E(e),this.#u=new E(e),this.#a=0,this.#h=0,this.#_=x.create(e),this.#n=0,this.#b=0,typeof o=="function"&&(this.#m=o),typeof d=="function"&&(this.#W=d),typeof _=="function"?(this.#S=_,this.#r=[]):(this.#S=void 0,this.#r=void 0),this.#T=!!this.#m,this.#D=!!this.#W,this.#f=!!this.#S,this.noDisposeOnSet=!!y,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!F,this.allowStaleOnFetchRejection=!!m,this.allowStaleOnFetchAbort=!!A,this.ignoreFetchAbort=!!z,this.maxEntrySize!==0){if(this.#c!==0&&!T(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!T(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#X()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!r,this.updateAgeOnHas=!!h,this.ttlResolution=T(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!T(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#k()}if(this.#o===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#o&&!this.#c){let R="LRU_CACHE_UNBOUNDED";q(R)&&(k.add(R),V("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",R,c))}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#k(){let t=new W(this.#o),e=new W(this.#o);this.#d=t,this.#F=e;let i=this.ttlAutopurge?Array.from({length:this.#o}):void 0;this.#g=i,this.#H=(h,a,o=this.#w.now())=>{e[h]=a!==0?o:0,t[h]=a,s(h,a)},this.#R=h=>{e[h]=t[h]!==0?this.#w.now():0,s(h,t[h])};let s=this.ttlAutopurge?(h,a)=>{if(i?.[h]&&(clearTimeout(i[h]),i[h]=void 0),a&&a!==0&&i){let o=setTimeout(()=>{this.#p(h)&&this.#v(this.#i[h],"expire")},a+1);o.unref&&o.unref(),i[h]=o}}:()=>{};this.#E=(h,a)=>{if(t[a]){let o=t[a],d=e[a];if(!o||!d)return;h.ttl=o,h.start=d,h.now=n||r();let _=h.now-d;h.remainingTTL=o-_}};let n=0,r=()=>{let h=this.#w.now();if(this.ttlResolution>0){n=h;let a=setTimeout(()=>n=0,this.ttlResolution);a.unref&&a.unref()}return h};this.getRemainingTTL=h=>{let a=this.#s.get(h);if(a===void 0)return 0;let o=t[a],d=e[a];if(!o||!d)return 1/0;let _=(n||r())-d;return o-_},this.#p=h=>{let a=e[h],o=t[h];return!!o&&!!a&&(n||r())-a>o}}#R=()=>{};#E=()=>{};#H=()=>{};#p=()=>!1;#X(){let t=new W(this.#o);this.#b=0,this.#y=t,this.#C=e=>{this.#b-=t[e],t[e]=0},this.#N=(e,i,s,n)=>{if(!T(s)){if(this.#e(i))return this.backgroundFetchSize;if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,e),!T(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return s},this.#I=(e,i,s)=>{if(t[e]=i,this.#c){let n=this.#c-t[e];for(;this.#b>n;)this.#P(!0)}this.#b+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#b)}}#C=t=>{};#I=(t,e,i)=>{};#N=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#h;this.#V(e)&&((t||!this.#p(e))&&(yield e),e!==this.#a);)e=this.#u[e]}*#z({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#a;this.#V(e)&&((t||!this.#p(e))&&(yield e),e!==this.#h);)e=this.#l[e]}#V(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#A())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*rentries(){for(let t of this.#z())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*keys(){for(let t of this.#A()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(let t of this.#z()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(let t of this.#A())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(let t of this.#z())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&t(n,this.#i[i],this))return this.#x(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}rforEach(t,e=this){for(let i of this.#z()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}purgeStale(){let t=!1;for(let e of this.#z({allowStale:!0}))this.#p(e)&&(this.#v(this.#i[e],"expire"),t=!0);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#d&&this.#F){let r=this.#d[e],h=this.#F[e];if(r&&h){let a=r-(this.#w.now()-h);n.ttl=a,n.start=Date.now()}}return this.#y&&(n.size=this.#y[e]),n}dump(){let t=[];for(let e of this.#A({allowStale:!0})){let i=this.#i[e],s=this.#t[e],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let r={value:n};if(this.#d&&this.#F){r.ttl=this.#d[e];let h=this.#w.now()-this.#F[e];r.start=Math.floor(Date.now()-h)}this.#y&&(r.size=this.#y[e]),t.unshift([i,r])}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=this.#w.now()-s}this.#O(e,i.value,i)}}set(t,e,i={}){let{status:s=g.metrics.hasSubscribers?{}:void 0}=i;i.status=s,s&&(s.op="set",s.key=t,e!==void 0&&(s.value=e),s.cache=this);let n=this.#O(t,e,i);return s&&g.metrics.hasSubscribers&&g.metrics.publish(s),n}#O(t,e,i,s){let{ttl:n=this.ttl,start:r,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:o}=i,d=this.#e(e);if(e===void 0)return o&&(o.set="deleted"),this.delete(t),this;let{noUpdateTTL:_=this.noUpdateTTL}=i;o&&!d&&(o.value=e);let y=this.#N(t,e,i.size||0,a,o);if(this.maxEntrySize&&y>this.maxEntrySize)return this.#v(t,"set"),o&&(o.set="miss",o.maxEntrySizeExceeded=!0),this;let u=this.#n===0?void 0:this.#s.get(t);if(u===void 0)u=this.#n===0?this.#h:this.#_.length!==0?this.#_.pop():this.#n===this.#o?this.#P(!1):this.#n,this.#i[u]=t,this.#t[u]=e,this.#s.set(t,u),this.#l[this.#h]=u,this.#u[u]=this.#h,this.#h=u,this.#n++,this.#I(u,y,o),o&&(o.set="add"),_=!1,this.#D&&!d&&this.#W?.(e,t,"add");else{this.#L(u);let p=this.#t[u];if(e!==p){if(!h)if(this.#e(p)){p!==s&&p.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=p;f!==void 0&&f!==e&&(this.#T&&this.#m?.(f,t,"set"),this.#f&&this.#r?.push([f,t,"set"]))}else this.#T&&this.#m?.(p,t,"set"),this.#f&&this.#r?.push([p,t,"set"]);if(this.#C(u),this.#I(u,y,o),this.#t[u]=e,!d){let f=p&&this.#e(p)?p.__staleWhileFetching:p,b=f===void 0?"add":e!==f?"replace":"update";o&&(o.set=b,f!==void 0&&(o.oldValue=f)),this.#D&&this.onInsert?.(e,t,b)}}else d||(o&&(o.set="update"),this.#D&&this.onInsert?.(e,t,"update"))}if(n!==0&&!this.#d&&this.#k(),this.#d&&(_||this.#H(u,n,r),o&&this.#E(o,u)),!h&&this.#f&&this.#r){let p=this.#r,f;for(;f=p?.shift();)this.#S?.(...f)}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#a];if(this.#P(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#f&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#S?.(...e)}}}#P(t){let e=this.#a,i=this.#i[e],s=this.#t[e],n=this.#e(s);n&&s.__abortController.abort(new Error("evicted"));let r=n?s.__staleWhileFetching:s;return(this.#T||this.#f)&&r!==void 0&&(this.#T&&this.#m?.(r,i,"evict"),this.#f&&this.#r?.push([r,i,"evict"])),this.#C(e),this.#g?.[e]&&(clearTimeout(this.#g[e]),this.#g[e]=void 0),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#_.push(e)),this.#n===1?(this.#a=this.#h=0,this.#_.length=0):this.#a=this.#l[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{status:i=g.metrics.hasSubscribers?{}:void 0}=e;e.status=i,i&&(i.op="has",i.key=t,i.cache=this);let s=this.#Y(t,e);return g.metrics.hasSubscribers&&g.metrics.publish(i),s}#Y(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,n=this.#s.get(t);if(n!==void 0){let r=this.#t[n];if(this.#e(r)&&r.__staleWhileFetching===void 0)return!1;if(this.#p(n))s&&(s.has="stale",this.#E(s,n));else return i&&this.#R(n),s&&(s.has="hit",this.#E(s,n)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){let{status:i=C()?{}:void 0}=e;i&&(i.op="peek",i.key=t,i.cache=this),e.status=i;let s=this.#J(t,e);return g.metrics.hasSubscribers&&g.metrics.publish(i),s}#J(t,e){let{status:i,allowStale:s=this.allowStale}=e,n=this.#s.get(t);if(n===void 0||!s&&this.#p(n)){i&&(i.peek=n===void 0?"miss":"stale");return}let r=this.#t[n],h=this.#e(r)?r.__staleWhileFetching:r;return i&&(h!==void 0?(i.peek="hit",i.value=h):i.peek="miss"),h}#G(t,e,i,s){let n=e===void 0?void 0:this.#t[e];if(this.#e(n))return n;let r=new AbortController,{signal:h}=i;h?.addEventListener("abort",()=>r.abort(h.reason),{signal:r.signal});let a={signal:r.signal,options:i,context:s},o=(f,b=!1)=>{let{aborted:l}=r.signal,S=i.ignoreFetchAbort&&f!==void 0,F=i.ignoreFetchAbort||!!(i.allowStaleOnFetchAbort&&f!==void 0);if(i.status&&(l&&!b?(i.status.fetchAborted=!0,i.status.fetchError=r.signal.reason,S&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),l&&!S&&!b)return _(r.signal.reason,F);let w=u,m=this.#t[e];return(m===u||m===void 0&&S&&b)&&(f===void 0?w.__staleWhileFetching!==void 0?this.#t[e]=w.__staleWhileFetching:this.#v(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.#O(t,f,a.options,w))),f},d=f=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=f),_(f,!1)),_=(f,b)=>{let{aborted:l}=r.signal,S=l&&i.allowStaleOnFetchAbort,F=S||i.allowStaleOnFetchRejection,w=F||i.noDeleteOnFetchRejection,m=u;if(this.#t[e]===u&&(!w||!b&&m.__staleWhileFetching===void 0?this.#v(t,"fetch"):S||(this.#t[e]=m.__staleWhileFetching)),F)return i.status&&m.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),m.__staleWhileFetching;if(m.__returned===m)throw f},y=(f,b)=>{let l=this.#M?.(t,n,a);r.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(f(void 0),i.allowStaleOnFetchAbort&&(f=S=>o(S,!0)))}),l&&l instanceof Promise?l.then(S=>f(S===void 0?void 0:S),b):l!==void 0&&f(l)};i.status&&(i.status.fetchDispatched=!0);let u=new Promise(y).then(o,d),p=Object.assign(u,{__abortController:r,__staleWhileFetching:n,__returned:void 0});return e===void 0?(this.#O(t,p,{...a.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=p,p}#e(t){if(!this.#U)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof AbortController}fetch(t,e={}){let i=g.tracing.hasSubscribers,{status:s=C()?{}:void 0}=e;e.status=s,s&&e.context&&(s.context=e.context);let n=this.#q(t,e);return s&&i&&(s.trace=!0,g.tracing.tracePromise(()=>n,s).catch(()=>{})),n}async#q(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:a=0,sizeCalculation:o=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:_=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:y=this.allowStaleOnFetchRejection,ignoreFetchAbort:u=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:f,forceRefresh:b=!1,status:l,signal:S}=e;if(l&&(l.op="fetch",l.key=t,b&&(l.forceRefresh=!0),l.cache=this),!this.#U)return l&&(l.fetch="get"),this.#x(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:l});let F={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:r,noDisposeOnSet:h,size:a,sizeCalculation:o,noUpdateTTL:d,noDeleteOnFetchRejection:_,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:p,ignoreFetchAbort:u,status:l,signal:S},w=this.#s.get(t);if(w===void 0){l&&(l.fetch="miss");let m=this.#G(t,w,F,f);return m.__returned=m}else{let m=this.#t[w];if(this.#e(m)){let E=i&&m.__staleWhileFetching!==void 0;return l&&(l.fetch="inflight",E&&(l.returnedStale=!0)),E?m.__staleWhileFetching:m.__returned=m}let A=this.#p(w);if(!b&&!A)return l&&(l.fetch="hit"),this.#L(w),s&&this.#R(w),l&&this.#E(l,w),m;let z=this.#G(t,w,F,f),v=z.__staleWhileFetching!==void 0&&i;return l&&(l.fetch=A?"stale":"refresh",v&&A&&(l.returnedStale=!0)),v?z.__staleWhileFetching:z.__returned=z}}forceFetch(t,e={}){let i=g.tracing.hasSubscribers,{status:s=C()?{}:void 0}=e;e.status=s,s&&e.context&&(s.context=e.context);let n=this.#K(t,e);return s&&i&&(s.trace=!0,g.tracing.tracePromise(()=>n,s).catch(()=>{})),n}async#K(t,e={}){let i=await this.#q(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let{status:i=g.metrics.hasSubscribers?{}:void 0}=e;e.status=i,i&&(i.op="memo",i.key=t,e.context&&(i.context=e.context),i.cache=this);let s=this.#Q(t,e);return i&&(i.value=s),g.metrics.hasSubscribers&&g.metrics.publish(i),s}#Q(t,e={}){let i=this.#j;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,status:n,forceRefresh:r,...h}=e;n&&r&&(n.forceRefresh=!0);let a=this.#x(t,h),o=r||a===void 0;if(n&&(n.memo=o?"miss":"hit",o||(n.value=a)),!o)return a;let d=i(t,a,{options:h,context:s});return n&&(n.value=d),this.#O(t,d,h),d}get(t,e={}){let{status:i=g.metrics.hasSubscribers?{}:void 0}=e;e.status=i,i&&(i.op="get",i.key=t,i.cache=this);let s=this.#x(t,e);return i&&(s!==void 0&&(i.value=s),g.metrics.hasSubscribers&&g.metrics.publish(i)),s}#x(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:r}=e,h=this.#s.get(t);if(h===void 0){r&&(r.get="miss");return}let a=this.#t[h],o=this.#e(a);return r&&this.#E(r,h),this.#p(h)?o?(r&&(r.get="stale-fetching"),i&&a.__staleWhileFetching!==void 0?(r&&(r.returnedStale=!0),a.__staleWhileFetching):void 0):(n||this.#v(t,"expire"),r&&(r.get="stale"),i?(r&&(r.returnedStale=!0),a):void 0):(r&&(r.get=o?"fetching":"hit"),this.#L(h),s&&this.#R(h),o?a.__staleWhileFetching:a)}#B(t,e){this.#u[e]=t,this.#l[t]=e}#L(t){t!==this.#h&&(t===this.#a?this.#a=this.#l[t]:this.#B(this.#u[t],this.#l[t]),this.#B(this.#h,t),this.#h=t)}delete(t){return this.#v(t,"delete")}#v(t,e){g.metrics.hasSubscribers&&g.metrics.publish({op:"delete",delete:e,key:t,cache:this});let i=!1;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(this.#g?.[s]&&(clearTimeout(this.#g?.[s]),this.#g[s]=void 0),i=!0,this.#n===1)this.#$(e);else{this.#C(s);let n=this.#t[s];if(this.#e(n)?n.__abortController.abort(new Error("deleted")):(this.#T||this.#f)&&(this.#T&&this.#m?.(n,t,e),this.#f&&this.#r?.push([n,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#h)this.#h=this.#u[s];else if(s===this.#a)this.#a=this.#l[s];else{let r=this.#u[s];this.#l[r]=this.#l[s];let h=this.#l[s];this.#u[h]=this.#u[s]}this.#n--,this.#_.push(s)}}if(this.#f&&this.#r?.length){let s=this.#r,n;for(;n=s?.shift();)this.#S?.(...n)}return i}clear(){return this.#$("delete")}#$(t){for(let e of this.#z({allowStale:!0})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else{let s=this.#i[e];this.#T&&this.#m?.(i,s,t),this.#f&&this.#r?.push([i,s,t])}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#F){this.#d.fill(0),this.#F.fill(0);for(let e of this.#g??[])e!==void 0&&clearTimeout(e);this.#g?.fill(void 0)}if(this.#y&&this.#y.fill(0),this.#a=0,this.#h=0,this.#_.length=0,this.#b=0,this.#n=0,this.#f&&this.#r){let e=this.#r,i;for(;i=e?.shift();)this.#S?.(...i)}}};exports.LRUCache=L;
|
|
2
2
|
//# sourceMappingURL=index.min.js.map
|
|
@@ -6,6 +6,5 @@ exports.defaultPerf = (typeof performance === 'object' &&
|
|
|
6
6
|
typeof performance.now === 'function') ?
|
|
7
7
|
/* c8 ignore start - this gets covered, but c8 gets confused */
|
|
8
8
|
performance
|
|
9
|
-
: /* c8 ignore stop */
|
|
10
|
-
Date;
|
|
9
|
+
: /* c8 ignore stop */ Date;
|
|
11
10
|
//# sourceMappingURL=perf.js.map
|
|
@@ -6,6 +6,5 @@ exports.defaultPerf = (typeof performance === 'object' &&
|
|
|
6
6
|
typeof performance.now === 'function') ?
|
|
7
7
|
/* c8 ignore start - this gets covered, but c8 gets confused */
|
|
8
8
|
performance
|
|
9
|
-
: /* c8 ignore stop */
|
|
10
|
-
Date;
|
|
9
|
+
: /* c8 ignore stop */ Date;
|
|
11
10
|
//# sourceMappingURL=perf.js.map
|
|
@@ -167,6 +167,8 @@ export class LRUCache {
|
|
|
167
167
|
* {@link LRUCache.OptionsBase.ignoreFetchAbort}
|
|
168
168
|
*/
|
|
169
169
|
ignoreFetchAbort;
|
|
170
|
+
/** {@link LRUCache.OptionsBase.backgroundFetchSize} */
|
|
171
|
+
backgroundFetchSize;
|
|
170
172
|
// computed properties
|
|
171
173
|
#size;
|
|
172
174
|
#calculatedSize;
|
|
@@ -277,7 +279,8 @@ export class LRUCache {
|
|
|
277
279
|
return this.#disposeAfter;
|
|
278
280
|
}
|
|
279
281
|
constructor(options) {
|
|
280
|
-
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;
|
|
282
|
+
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, backgroundFetchSize = 1, perf, } = options;
|
|
283
|
+
this.backgroundFetchSize = backgroundFetchSize;
|
|
281
284
|
if (perf !== undefined) {
|
|
282
285
|
if (typeof perf?.now !== 'function') {
|
|
283
286
|
throw new TypeError('perf option must have a now() method if specified');
|
|
@@ -505,12 +508,15 @@ export class LRUCache {
|
|
|
505
508
|
sizes[index] = 0;
|
|
506
509
|
};
|
|
507
510
|
this.#requireSize = (k, v, size, sizeCalculation) => {
|
|
508
|
-
// provisionally accept background fetches.
|
|
509
|
-
// actual value size will be checked when they return.
|
|
510
|
-
if (this.#isBackgroundFetch(v)) {
|
|
511
|
-
return 0;
|
|
512
|
-
}
|
|
513
511
|
if (!isPosInt(size)) {
|
|
512
|
+
// provisionally accept background fetches.
|
|
513
|
+
// actual value size will be checked when they return.
|
|
514
|
+
if (this.#isBackgroundFetch(v)) {
|
|
515
|
+
// NB: this cannot occur if v.__staleWhileFetching is set,
|
|
516
|
+
// because in that case, it would take on the size of the
|
|
517
|
+
// existing entry that it temporarily replaces.
|
|
518
|
+
return this.backgroundFetchSize;
|
|
519
|
+
}
|
|
514
520
|
if (sizeCalculation) {
|
|
515
521
|
if (typeof sizeCalculation !== 'function') {
|
|
516
522
|
throw new TypeError('sizeCalculation must be a function');
|
|
@@ -877,6 +883,7 @@ export class LRUCache {
|
|
|
877
883
|
status.key = k;
|
|
878
884
|
if (v !== undefined)
|
|
879
885
|
status.value = v;
|
|
886
|
+
status.cache = this;
|
|
880
887
|
}
|
|
881
888
|
const result = this.#set(k, v, setOptions);
|
|
882
889
|
if (status && metrics.hasSubscribers) {
|
|
@@ -884,8 +891,9 @@ export class LRUCache {
|
|
|
884
891
|
}
|
|
885
892
|
return result;
|
|
886
893
|
}
|
|
887
|
-
#set(k, v, setOptions
|
|
894
|
+
#set(k, v, setOptions, bf) {
|
|
888
895
|
const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions;
|
|
896
|
+
const isBF = this.#isBackgroundFetch(v);
|
|
889
897
|
if (v === undefined) {
|
|
890
898
|
if (status)
|
|
891
899
|
status.set = 'deleted';
|
|
@@ -893,7 +901,7 @@ export class LRUCache {
|
|
|
893
901
|
return this;
|
|
894
902
|
}
|
|
895
903
|
let { noUpdateTTL = this.noUpdateTTL } = setOptions;
|
|
896
|
-
if (status && !
|
|
904
|
+
if (status && !isBF)
|
|
897
905
|
status.value = v;
|
|
898
906
|
const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation, status);
|
|
899
907
|
// if the item doesn't fit, don't do anything
|
|
@@ -925,52 +933,68 @@ export class LRUCache {
|
|
|
925
933
|
if (status)
|
|
926
934
|
status.set = 'add';
|
|
927
935
|
noUpdateTTL = false;
|
|
928
|
-
if (this.#hasOnInsert) {
|
|
936
|
+
if (this.#hasOnInsert && !isBF) {
|
|
929
937
|
this.#onInsert?.(v, k, 'add');
|
|
930
938
|
}
|
|
931
939
|
}
|
|
932
940
|
else {
|
|
933
941
|
// update
|
|
942
|
+
// might be updating a background fetch!
|
|
934
943
|
this.#moveToTail(index);
|
|
935
944
|
const oldVal = this.#valList[index];
|
|
936
945
|
if (v !== oldVal) {
|
|
937
|
-
if (
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
946
|
+
if (!noDisposeOnSet) {
|
|
947
|
+
if (this.#isBackgroundFetch(oldVal)) {
|
|
948
|
+
if (oldVal !== bf) {
|
|
949
|
+
// setting over a background fetch, not merely resolving it.
|
|
950
|
+
oldVal.__abortController.abort(new Error('replaced'));
|
|
951
|
+
}
|
|
952
|
+
const { __staleWhileFetching: s } = oldVal;
|
|
953
|
+
if (s !== undefined && s !== v) {
|
|
954
|
+
if (this.#hasDispose) {
|
|
955
|
+
this.#dispose?.(s, k, 'set');
|
|
956
|
+
}
|
|
957
|
+
if (this.#hasDisposeAfter) {
|
|
958
|
+
this.#disposed?.push([s, k, 'set']);
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
else {
|
|
941
963
|
if (this.#hasDispose) {
|
|
942
|
-
this.#dispose?.(
|
|
964
|
+
this.#dispose?.(oldVal, k, 'set');
|
|
943
965
|
}
|
|
944
966
|
if (this.#hasDisposeAfter) {
|
|
945
|
-
this.#disposed?.push([
|
|
967
|
+
this.#disposed?.push([oldVal, k, 'set']);
|
|
946
968
|
}
|
|
947
969
|
}
|
|
948
970
|
}
|
|
949
|
-
else if (!noDisposeOnSet) {
|
|
950
|
-
if (this.#hasDispose) {
|
|
951
|
-
this.#dispose?.(oldVal, k, 'set');
|
|
952
|
-
}
|
|
953
|
-
if (this.#hasDisposeAfter) {
|
|
954
|
-
this.#disposed?.push([oldVal, k, 'set']);
|
|
955
|
-
}
|
|
956
|
-
}
|
|
957
971
|
this.#removeItemSize(index);
|
|
958
972
|
this.#addItemSize(index, size, status);
|
|
959
973
|
this.#valList[index] = v;
|
|
960
|
-
if (
|
|
961
|
-
status.set = 'replace';
|
|
974
|
+
if (!isBF) {
|
|
962
975
|
const oldValue = oldVal && this.#isBackgroundFetch(oldVal) ?
|
|
963
976
|
oldVal.__staleWhileFetching
|
|
964
977
|
: oldVal;
|
|
965
|
-
|
|
966
|
-
|
|
978
|
+
const setType = oldValue === undefined ? 'add'
|
|
979
|
+
: v !== oldValue ? 'replace'
|
|
980
|
+
: 'update';
|
|
981
|
+
if (status) {
|
|
982
|
+
status.set = setType;
|
|
983
|
+
if (oldValue !== undefined)
|
|
984
|
+
status.oldValue = oldValue;
|
|
985
|
+
}
|
|
986
|
+
if (this.#hasOnInsert) {
|
|
987
|
+
this.onInsert?.(v, k, setType);
|
|
988
|
+
}
|
|
967
989
|
}
|
|
968
990
|
}
|
|
969
|
-
else if (
|
|
970
|
-
status
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
this
|
|
991
|
+
else if (!isBF) {
|
|
992
|
+
if (status) {
|
|
993
|
+
status.set = 'update';
|
|
994
|
+
}
|
|
995
|
+
if (this.#hasOnInsert) {
|
|
996
|
+
this.onInsert?.(v, k, 'update');
|
|
997
|
+
}
|
|
974
998
|
}
|
|
975
999
|
}
|
|
976
1000
|
if (ttl !== 0 && !this.#ttls) {
|
|
@@ -1025,15 +1049,18 @@ export class LRUCache {
|
|
|
1025
1049
|
const head = this.#head;
|
|
1026
1050
|
const k = this.#keyList[head];
|
|
1027
1051
|
const v = this.#valList[head];
|
|
1028
|
-
|
|
1052
|
+
const isBF = this.#isBackgroundFetch(v);
|
|
1053
|
+
if (isBF) {
|
|
1029
1054
|
v.__abortController.abort(new Error('evicted'));
|
|
1030
1055
|
}
|
|
1031
|
-
|
|
1056
|
+
const oldValue = isBF ? v.__staleWhileFetching : v;
|
|
1057
|
+
if ((this.#hasDispose || this.#hasDisposeAfter) &&
|
|
1058
|
+
oldValue !== undefined) {
|
|
1032
1059
|
if (this.#hasDispose) {
|
|
1033
|
-
this.#dispose?.(
|
|
1060
|
+
this.#dispose?.(oldValue, k, 'evict');
|
|
1034
1061
|
}
|
|
1035
1062
|
if (this.#hasDisposeAfter) {
|
|
1036
|
-
this.#disposed?.push([
|
|
1063
|
+
this.#disposed?.push([oldValue, k, 'evict']);
|
|
1037
1064
|
}
|
|
1038
1065
|
}
|
|
1039
1066
|
this.#removeItemSize(head);
|
|
@@ -1080,6 +1107,7 @@ export class LRUCache {
|
|
|
1080
1107
|
if (status) {
|
|
1081
1108
|
status.op = 'has';
|
|
1082
1109
|
status.key = k;
|
|
1110
|
+
status.cache = this;
|
|
1083
1111
|
}
|
|
1084
1112
|
const result = this.#has(k, hasOptions);
|
|
1085
1113
|
if (metrics.hasSubscribers)
|
|
@@ -1127,6 +1155,7 @@ export class LRUCache {
|
|
|
1127
1155
|
if (status) {
|
|
1128
1156
|
status.op = 'peek';
|
|
1129
1157
|
status.key = k;
|
|
1158
|
+
status.cache = this;
|
|
1130
1159
|
}
|
|
1131
1160
|
peekOptions.status = status;
|
|
1132
1161
|
const result = this.#peek(k, peekOptions);
|
|
@@ -1209,7 +1238,7 @@ export class LRUCache {
|
|
|
1209
1238
|
else {
|
|
1210
1239
|
if (options.status)
|
|
1211
1240
|
options.status.fetchUpdated = true;
|
|
1212
|
-
this.#set(k, v, fetchOpts.options);
|
|
1241
|
+
this.#set(k, v, fetchOpts.options, bf);
|
|
1213
1242
|
}
|
|
1214
1243
|
}
|
|
1215
1244
|
return v;
|
|
@@ -1255,9 +1284,6 @@ export class LRUCache {
|
|
|
1255
1284
|
};
|
|
1256
1285
|
const pcall = (res, rej) => {
|
|
1257
1286
|
const fmp = this.#fetchMethod?.(k, v, fetchOpts);
|
|
1258
|
-
if (fmp && fmp instanceof Promise) {
|
|
1259
|
-
fmp.then(v => res(v === undefined ? undefined : v), rej);
|
|
1260
|
-
}
|
|
1261
1287
|
// ignored, we go until we finish, regardless.
|
|
1262
1288
|
// defer check until we are actually aborting,
|
|
1263
1289
|
// so fetchMethod can override.
|
|
@@ -1270,6 +1296,12 @@ export class LRUCache {
|
|
|
1270
1296
|
}
|
|
1271
1297
|
}
|
|
1272
1298
|
});
|
|
1299
|
+
if (fmp && fmp instanceof Promise) {
|
|
1300
|
+
fmp.then(v => res(v === undefined ? undefined : v), rej);
|
|
1301
|
+
}
|
|
1302
|
+
else if (fmp !== undefined) {
|
|
1303
|
+
res(fmp);
|
|
1304
|
+
}
|
|
1273
1305
|
};
|
|
1274
1306
|
if (options.status)
|
|
1275
1307
|
options.status.fetchDispatched = true;
|
|
@@ -1285,6 +1317,10 @@ export class LRUCache {
|
|
|
1285
1317
|
index = this.#keyMap.get(k);
|
|
1286
1318
|
}
|
|
1287
1319
|
else {
|
|
1320
|
+
// do not call #set, because we do not want to adjust its place
|
|
1321
|
+
// in the lru queue, as it has not yet been "used". Also, we don't
|
|
1322
|
+
// need to worry about evicting for size, because a background fetch
|
|
1323
|
+
// over a stale value is treated as the same size as its stale value.
|
|
1288
1324
|
this.#valList[index] = bf;
|
|
1289
1325
|
}
|
|
1290
1326
|
return bf;
|
|
@@ -1325,6 +1361,7 @@ export class LRUCache {
|
|
|
1325
1361
|
status.key = k;
|
|
1326
1362
|
if (forceRefresh)
|
|
1327
1363
|
status.forceRefresh = true;
|
|
1364
|
+
status.cache = this;
|
|
1328
1365
|
}
|
|
1329
1366
|
if (!this.#hasFetchMethod) {
|
|
1330
1367
|
if (status)
|
|
@@ -1427,6 +1464,7 @@ export class LRUCache {
|
|
|
1427
1464
|
if (memoOptions.context) {
|
|
1428
1465
|
status.context = memoOptions.context;
|
|
1429
1466
|
}
|
|
1467
|
+
status.cache = this;
|
|
1430
1468
|
}
|
|
1431
1469
|
const result = this.#memo(k, memoOptions);
|
|
1432
1470
|
if (status)
|
|
@@ -1473,6 +1511,7 @@ export class LRUCache {
|
|
|
1473
1511
|
if (status) {
|
|
1474
1512
|
status.op = 'get';
|
|
1475
1513
|
status.key = k;
|
|
1514
|
+
status.cache = this;
|
|
1476
1515
|
}
|
|
1477
1516
|
const result = this.#get(k, getOptions);
|
|
1478
1517
|
if (status) {
|
|
@@ -1571,6 +1610,7 @@ export class LRUCache {
|
|
|
1571
1610
|
op: 'delete',
|
|
1572
1611
|
delete: reason,
|
|
1573
1612
|
key: k,
|
|
1613
|
+
cache: this,
|
|
1574
1614
|
});
|
|
1575
1615
|
}
|
|
1576
1616
|
let deleted = false;
|
|
@@ -1651,7 +1691,7 @@ export class LRUCache {
|
|
|
1651
1691
|
}
|
|
1652
1692
|
}
|
|
1653
1693
|
this.#keyMap.clear();
|
|
1654
|
-
this.#valList.fill(undefined);
|
|
1694
|
+
void this.#valList.fill(undefined);
|
|
1655
1695
|
this.#keyList.fill(undefined);
|
|
1656
1696
|
if (this.#ttls && this.#starts) {
|
|
1657
1697
|
this.#ttls.fill(0);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var C={hasSubscribers:!1},S=C,W=C;var L=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date;var D=()=>S.hasSubscribers||W.hasSubscribers,j=new Set,M=typeof process=="object"&&process?process:{},G=(u,e,t,i)=>{typeof M.emitWarning=="function"?M.emitWarning(u,e,t,i):console.error(`[${t}] ${e}: ${u}`)},P=u=>!j.has(u),$=Symbol("type"),F=u=>!!u&&u===Math.floor(u)&&u>0&&isFinite(u),I=u=>F(u)?u<=Math.pow(2,8)?Uint8Array:u<=Math.pow(2,16)?Uint16Array:u<=Math.pow(2,32)?Uint32Array:u<=Number.MAX_SAFE_INTEGER?O:null:null,O=class extends Array{constructor(e){super(e),this.fill(0)}},R=class u{heap;length;static#o=!1;static create(e){let t=I(e);if(!t)return[];u.#o=!0;let i=new u(e,t);return u.#o=!1,i}constructor(e,t){if(!u.#o)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},U=class u{#o;#u;#w;#x;#S;#M;#U;#m;get perf(){return this.#m}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#b;#s;#i;#t;#a;#c;#l;#h;#y;#r;#_;#F;#d;#g;#T;#W;#f;#j;static unsafeExposeInternals(e){return{starts:e.#F,ttls:e.#d,autopurgeTimers:e.#g,sizes:e.#_,keyMap:e.#s,keyList:e.#i,valList:e.#t,next:e.#a,prev:e.#c,get head(){return e.#l},get tail(){return e.#h},free:e.#y,isBackgroundFetch:t=>e.#e(t),backgroundFetch:(t,i,s,n)=>e.#P(t,i,s,n),moveToTail:t=>e.#L(t),indexes:t=>e.#A(t),rindexes:t=>e.#z(t),isStale:t=>e.#p(t)}}get max(){return this.#o}get maxSize(){return this.#u}get calculatedSize(){return this.#b}get size(){return this.#n}get fetchMethod(){return this.#M}get memoMethod(){return this.#U}get dispose(){return this.#w}get onInsert(){return this.#x}get disposeAfter(){return this.#S}constructor(e){let{max:t=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:r,allowStale:h,dispose:l,onInsert:c,disposeAfter:f,noDisposeOnSet:g,noUpdateTTL:p,maxSize:T=0,maxEntrySize:w=0,sizeCalculation:y,fetchMethod:a,memoMethod:m,noDeleteOnFetchRejection:_,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:A,ignoreFetchAbort:z,perf:x}=e;if(x!==void 0&&typeof x?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#m=x??L,t!==0&&!F(t))throw new TypeError("max option must be a nonnegative integer");let v=t?I(t):Array;if(!v)throw new Error("invalid max value: "+t);if(this.#o=t,this.#u=T,this.maxEntrySize=w||this.#u,this.sizeCalculation=y,this.sizeCalculation){if(!this.#u&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(m!==void 0&&typeof m!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#U=m,a!==void 0&&typeof a!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#M=a,this.#W=!!a,this.#s=new Map,this.#i=Array.from({length:t}).fill(void 0),this.#t=Array.from({length:t}).fill(void 0),this.#a=new v(t),this.#c=new v(t),this.#l=0,this.#h=0,this.#y=R.create(t),this.#n=0,this.#b=0,typeof l=="function"&&(this.#w=l),typeof c=="function"&&(this.#x=c),typeof f=="function"?(this.#S=f,this.#r=[]):(this.#S=void 0,this.#r=void 0),this.#T=!!this.#w,this.#j=!!this.#x,this.#f=!!this.#S,this.noDisposeOnSet=!!g,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!_,this.allowStaleOnFetchRejection=!!d,this.allowStaleOnFetchAbort=!!A,this.ignoreFetchAbort=!!z,this.maxEntrySize!==0){if(this.#u!==0&&!F(this.#u))throw new TypeError("maxSize must be a positive integer if specified");if(!F(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#X()}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!r,this.ttlResolution=F(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!F(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#H()}if(this.#o===0&&this.ttl===0&&this.#u===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#o&&!this.#u){let E="LRU_CACHE_UNBOUNDED";P(E)&&(j.add(E),G("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",E,u))}}getRemainingTTL(e){return this.#s.has(e)?1/0:0}#H(){let e=new O(this.#o),t=new O(this.#o);this.#d=e,this.#F=t;let i=this.ttlAutopurge?Array.from({length:this.#o}):void 0;this.#g=i,this.#N=(r,h,l=this.#m.now())=>{t[r]=h!==0?l:0,e[r]=h,s(r,h)},this.#D=r=>{t[r]=e[r]!==0?this.#m.now():0,s(r,e[r])};let s=this.ttlAutopurge?(r,h)=>{if(i?.[r]&&(clearTimeout(i[r]),i[r]=void 0),h&&h!==0&&i){let l=setTimeout(()=>{this.#p(r)&&this.#v(this.#i[r],"expire")},h+1);l.unref&&l.unref(),i[r]=l}}:()=>{};this.#E=(r,h)=>{if(e[h]){let l=e[h],c=t[h];if(!l||!c)return;r.ttl=l,r.start=c,r.now=n||o();let f=r.now-c;r.remainingTTL=l-f}};let n=0,o=()=>{let r=this.#m.now();if(this.ttlResolution>0){n=r;let h=setTimeout(()=>n=0,this.ttlResolution);h.unref&&h.unref()}return r};this.getRemainingTTL=r=>{let h=this.#s.get(r);if(h===void 0)return 0;let l=e[h],c=t[h];if(!l||!c)return 1/0;let f=(n||o())-c;return l-f},this.#p=r=>{let h=t[r],l=e[r];return!!l&&!!h&&(n||o())-h>l}}#D=()=>{};#E=()=>{};#N=()=>{};#p=()=>!1;#X(){let e=new O(this.#o);this.#b=0,this.#_=e,this.#R=t=>{this.#b-=e[t],e[t]=0},this.#k=(t,i,s,n)=>{if(this.#e(i))return 0;if(!F(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,t),!F(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#I=(t,i,s)=>{if(e[t]=i,this.#u){let n=this.#u-e[t];for(;this.#b>n;)this.#G(!0)}this.#b+=e[t],s&&(s.entrySize=i,s.totalCalculatedSize=this.#b)}}#R=e=>{};#I=(e,t,i)=>{};#k=(e,t,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:e=this.allowStale}={}){if(this.#n)for(let t=this.#h;this.#V(t)&&((e||!this.#p(t))&&(yield t),t!==this.#l);)t=this.#c[t]}*#z({allowStale:e=this.allowStale}={}){if(this.#n)for(let t=this.#l;this.#V(t)&&((e||!this.#p(t))&&(yield t),t!==this.#h);)t=this.#a[t]}#V(e){return e!==void 0&&this.#s.get(this.#i[e])===e}*entries(){for(let e of this.#A())this.#t[e]!==void 0&&this.#i[e]!==void 0&&!this.#e(this.#t[e])&&(yield[this.#i[e],this.#t[e]])}*rentries(){for(let e of this.#z())this.#t[e]!==void 0&&this.#i[e]!==void 0&&!this.#e(this.#t[e])&&(yield[this.#i[e],this.#t[e]])}*keys(){for(let e of this.#A()){let t=this.#i[e];t!==void 0&&!this.#e(this.#t[e])&&(yield t)}}*rkeys(){for(let e of this.#z()){let t=this.#i[e];t!==void 0&&!this.#e(this.#t[e])&&(yield t)}}*values(){for(let e of this.#A())this.#t[e]!==void 0&&!this.#e(this.#t[e])&&(yield this.#t[e])}*rvalues(){for(let e of this.#z())this.#t[e]!==void 0&&!this.#e(this.#t[e])&&(yield this.#t[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&e(n,this.#i[i],this))return this.#C(this.#i[i],t)}}forEach(e,t=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#i[i],this)}}rforEach(e,t=this){for(let i of this.#z()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#i[i],this)}}purgeStale(){let e=!1;for(let t of this.#z({allowStale:!0}))this.#p(t)&&(this.#v(this.#i[t],"expire"),e=!0);return e}info(e){let t=this.#s.get(e);if(t===void 0)return;let i=this.#t[t],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#d&&this.#F){let o=this.#d[t],r=this.#F[t];if(o&&r){let h=o-(this.#m.now()-r);n.ttl=h,n.start=Date.now()}}return this.#_&&(n.size=this.#_[t]),n}dump(){let e=[];for(let t of this.#A({allowStale:!0})){let i=this.#i[t],s=this.#t[t],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let o={value:n};if(this.#d&&this.#F){o.ttl=this.#d[t];let r=this.#m.now()-this.#F[t];o.start=Math.floor(Date.now()-r)}this.#_&&(o.size=this.#_[t]),e.unshift([i,o])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let s=Date.now()-i.start;i.start=this.#m.now()-s}this.#O(t,i.value,i)}}set(e,t,i={}){let{status:s=S.hasSubscribers?{}:void 0}=i;i.status=s,s&&(s.op="set",s.key=e,t!==void 0&&(s.value=t));let n=this.#O(e,t,i);return s&&S.hasSubscribers&&S.publish(s),n}#O(e,t,i={}){let{ttl:s=this.ttl,start:n,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:r=this.sizeCalculation,status:h}=i;if(t===void 0)return h&&(h.set="deleted"),this.delete(e),this;let{noUpdateTTL:l=this.noUpdateTTL}=i;h&&!this.#e(t)&&(h.value=t);let c=this.#k(e,t,i.size||0,r,h);if(this.maxEntrySize&&c>this.maxEntrySize)return this.#v(e,"set"),h&&(h.set="miss",h.maxEntrySizeExceeded=!0),this;let f=this.#n===0?void 0:this.#s.get(e);if(f===void 0)f=this.#n===0?this.#h:this.#y.length!==0?this.#y.pop():this.#n===this.#o?this.#G(!1):this.#n,this.#i[f]=e,this.#t[f]=t,this.#s.set(e,f),this.#a[this.#h]=f,this.#c[f]=this.#h,this.#h=f,this.#n++,this.#I(f,c,h),h&&(h.set="add"),l=!1,this.#j&&this.#x?.(t,e,"add");else{this.#L(f);let g=this.#t[f];if(t!==g){if(this.#W&&this.#e(g)){g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:p}=g;p!==void 0&&!o&&(this.#T&&this.#w?.(p,e,"set"),this.#f&&this.#r?.push([p,e,"set"]))}else o||(this.#T&&this.#w?.(g,e,"set"),this.#f&&this.#r?.push([g,e,"set"]));if(this.#R(f),this.#I(f,c,h),this.#t[f]=t,h){h.set="replace";let p=g&&this.#e(g)?g.__staleWhileFetching:g;p!==void 0&&(h.oldValue=p)}}else h&&(h.set="update");this.#j&&this.onInsert?.(t,e,t===g?"update":"replace")}if(s!==0&&!this.#d&&this.#H(),this.#d&&(l||this.#N(f,s,n),h&&this.#E(h,f)),!o&&this.#f&&this.#r){let g=this.#r,p;for(;p=g?.shift();)this.#S?.(...p)}return this}pop(){try{for(;this.#n;){let e=this.#t[this.#l];if(this.#G(!0),this.#e(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#f&&this.#r){let e=this.#r,t;for(;t=e?.shift();)this.#S?.(...t)}}}#G(e){let t=this.#l,i=this.#i[t],s=this.#t[t];return this.#W&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#T||this.#f)&&(this.#T&&this.#w?.(s,i,"evict"),this.#f&&this.#r?.push([s,i,"evict"])),this.#R(t),this.#g?.[t]&&(clearTimeout(this.#g[t]),this.#g[t]=void 0),e&&(this.#i[t]=void 0,this.#t[t]=void 0,this.#y.push(t)),this.#n===1?(this.#l=this.#h=0,this.#y.length=0):this.#l=this.#a[t],this.#s.delete(i),this.#n--,t}has(e,t={}){let{status:i=S.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="has",i.key=e);let s=this.#Y(e,t);return S.hasSubscribers&&S.publish(i),s}#Y(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=t,n=this.#s.get(e);if(n!==void 0){let o=this.#t[n];if(this.#e(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#p(n))s&&(s.has="stale",this.#E(s,n));else return i&&this.#D(n),s&&(s.has="hit",this.#E(s,n)),!0}else s&&(s.has="miss");return!1}peek(e,t={}){let{status:i=D()?{}:void 0}=t;i&&(i.op="peek",i.key=e),t.status=i;let s=this.#J(e,t);return S.hasSubscribers&&S.publish(i),s}#J(e,t){let{status:i,allowStale:s=this.allowStale}=t,n=this.#s.get(e);if(n===void 0||!s&&this.#p(n)){i&&(i.peek=n===void 0?"miss":"stale");return}let o=this.#t[n],r=this.#e(o)?o.__staleWhileFetching:o;return i&&(r!==void 0?(i.peek="hit",i.value=r):i.peek="miss"),r}#P(e,t,i,s){let n=t===void 0?void 0:this.#t[t];if(this.#e(n))return n;let o=new AbortController,{signal:r}=i;r?.addEventListener("abort",()=>o.abort(r.reason),{signal:o.signal});let h={signal:o.signal,options:i,context:s},l=(w,y=!1)=>{let{aborted:a}=o.signal,m=i.ignoreFetchAbort&&w!==void 0,_=i.ignoreFetchAbort||!!(i.allowStaleOnFetchAbort&&w!==void 0);if(i.status&&(a&&!y?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,m&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),a&&!m&&!y)return f(o.signal.reason,_);let b=p,d=this.#t[t];return(d===p||d===void 0&&m&&y)&&(w===void 0?b.__staleWhileFetching!==void 0?this.#t[t]=b.__staleWhileFetching:this.#v(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.#O(e,w,h.options))),w},c=w=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=w),f(w,!1)),f=(w,y)=>{let{aborted:a}=o.signal,m=a&&i.allowStaleOnFetchAbort,_=m||i.allowStaleOnFetchRejection,b=_||i.noDeleteOnFetchRejection,d=p;if(this.#t[t]===p&&(!b||!y&&d.__staleWhileFetching===void 0?this.#v(e,"fetch"):m||(this.#t[t]=d.__staleWhileFetching)),_)return i.status&&d.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),d.__staleWhileFetching;if(d.__returned===d)throw w},g=(w,y)=>{let a=this.#M?.(e,n,h);a&&a instanceof Promise&&a.then(m=>w(m===void 0?void 0:m),y),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(w(void 0),i.allowStaleOnFetchAbort&&(w=m=>l(m,!0)))})};i.status&&(i.status.fetchDispatched=!0);let p=new Promise(g).then(l,c),T=Object.assign(p,{__abortController:o,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.#O(e,T,{...h.options,status:void 0}),t=this.#s.get(e)):this.#t[t]=T,T}#e(e){if(!this.#W)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let i=W.hasSubscribers,{status:s=D()?{}:void 0}=t;t.status=s,s&&t.context&&(s.context=t.context);let n=this.#B(e,t);return s&&i&&(s.trace=!0,W.tracePromise(()=>n,s).catch(()=>{})),n}async#B(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:r=this.noDisposeOnSet,size:h=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:g=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:T=this.allowStaleOnFetchAbort,context:w,forceRefresh:y=!1,status:a,signal:m}=t;if(a&&(a.op="fetch",a.key=e,y&&(a.forceRefresh=!0)),!this.#W)return a&&(a.fetch="get"),this.#C(e,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:a});let _={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:r,size:h,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:g,allowStaleOnFetchAbort:T,ignoreFetchAbort:p,status:a,signal:m},b=this.#s.get(e);if(b===void 0){a&&(a.fetch="miss");let d=this.#P(e,b,_,w);return d.__returned=d}else{let d=this.#t[b];if(this.#e(d)){let E=i&&d.__staleWhileFetching!==void 0;return a&&(a.fetch="inflight",E&&(a.returnedStale=!0)),E?d.__staleWhileFetching:d.__returned=d}let A=this.#p(b);if(!y&&!A)return a&&(a.fetch="hit"),this.#L(b),s&&this.#D(b),a&&this.#E(a,b),d;let z=this.#P(e,b,_,w),v=z.__staleWhileFetching!==void 0&&i;return a&&(a.fetch=A?"stale":"refresh",v&&A&&(a.returnedStale=!0)),v?z.__staleWhileFetching:z.__returned=z}}forceFetch(e,t={}){let i=W.hasSubscribers,{status:s=D()?{}:void 0}=t;t.status=s,s&&t.context&&(s.context=t.context);let n=this.#K(e,t);return s&&i&&(s.trace=!0,W.tracePromise(()=>n,s).catch(()=>{})),n}async#K(e,t={}){let i=await this.#B(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let{status:i=S.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="memo",i.key=e,t.context&&(i.context=t.context));let s=this.#Q(e,t);return i&&(i.value=s),S.hasSubscribers&&S.publish(i),s}#Q(e,t={}){let i=this.#U;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,status:n,forceRefresh:o,...r}=t;n&&o&&(n.forceRefresh=!0);let h=this.#C(e,r),l=o||h===void 0;if(n&&(n.memo=l?"miss":"hit",l||(n.value=h)),!l)return h;let c=i(e,h,{options:r,context:s});return n&&(n.value=c),this.#O(e,c,r),c}get(e,t={}){let{status:i=S.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="get",i.key=e);let s=this.#C(e,t);return i&&(s!==void 0&&(i.value=s),S.hasSubscribers&&S.publish(i)),s}#C(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=t,r=this.#s.get(e);if(r===void 0){o&&(o.get="miss");return}let h=this.#t[r],l=this.#e(h);return o&&this.#E(o,r),this.#p(r)?l?(o&&(o.get="stale-fetching"),i&&h.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),h.__staleWhileFetching):void 0):(n||this.#v(e,"expire"),o&&(o.get="stale"),i?(o&&(o.returnedStale=!0),h):void 0):(o&&(o.get=l?"fetching":"hit"),this.#L(r),s&&this.#D(r),l?h.__staleWhileFetching:h)}#$(e,t){this.#c[t]=e,this.#a[e]=t}#L(e){e!==this.#h&&(e===this.#l?this.#l=this.#a[e]:this.#$(this.#c[e],this.#a[e]),this.#$(this.#h,e),this.#h=e)}delete(e){return this.#v(e,"delete")}#v(e,t){S.hasSubscribers&&S.publish({op:"delete",delete:t,key:e});let i=!1;if(this.#n!==0){let s=this.#s.get(e);if(s!==void 0)if(this.#g?.[s]&&(clearTimeout(this.#g?.[s]),this.#g[s]=void 0),i=!0,this.#n===1)this.#q(t);else{this.#R(s);let n=this.#t[s];if(this.#e(n)?n.__abortController.abort(new Error("deleted")):(this.#T||this.#f)&&(this.#T&&this.#w?.(n,e,t),this.#f&&this.#r?.push([n,e,t])),this.#s.delete(e),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#h)this.#h=this.#c[s];else if(s===this.#l)this.#l=this.#a[s];else{let o=this.#c[s];this.#a[o]=this.#a[s];let r=this.#a[s];this.#c[r]=this.#c[s]}this.#n--,this.#y.push(s)}}if(this.#f&&this.#r?.length){let s=this.#r,n;for(;n=s?.shift();)this.#S?.(...n)}return i}clear(){return this.#q("delete")}#q(e){for(let t of this.#z({allowStale:!0})){let i=this.#t[t];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else{let s=this.#i[t];this.#T&&this.#w?.(i,s,e),this.#f&&this.#r?.push([i,s,e])}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#F){this.#d.fill(0),this.#F.fill(0);for(let t of this.#g??[])t!==void 0&&clearTimeout(t);this.#g?.fill(void 0)}if(this.#_&&this.#_.fill(0),this.#l=0,this.#h=0,this.#y.length=0,this.#b=0,this.#n=0,this.#f&&this.#r){let t=this.#r,i;for(;i=t?.shift();)this.#S?.(...i)}}};export{U as LRUCache};
|
|
1
|
+
var L={hasSubscribers:!1},S=L,W=L;var M=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date;var D=()=>S.hasSubscribers||W.hasSubscribers,j=new Set,I=typeof process=="object"&&process?process:{},P=(u,e,t,i)=>{typeof I.emitWarning=="function"?I.emitWarning(u,e,t,i):console.error(`[${t}] ${e}: ${u}`)},k=u=>!j.has(u);var T=u=>!!u&&u===Math.floor(u)&&u>0&&isFinite(u),G=u=>T(u)?u<=Math.pow(2,8)?Uint8Array:u<=Math.pow(2,16)?Uint16Array:u<=Math.pow(2,32)?Uint32Array:u<=Number.MAX_SAFE_INTEGER?O:null:null,O=class extends Array{constructor(e){super(e),this.fill(0)}},R=class u{heap;length;static#o=!1;static create(e){let t=G(e);if(!t)return[];u.#o=!0;let i=new u(e,t);return u.#o=!1,i}constructor(e,t){if(!u.#o)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},U=class u{#o;#c;#S;#O;#w;#M;#I;#m;get perf(){return this.#m}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#n;#b;#s;#i;#t;#l;#u;#a;#h;#y;#r;#_;#F;#d;#g;#T;#U;#f;#x;static unsafeExposeInternals(e){return{starts:e.#F,ttls:e.#d,autopurgeTimers:e.#g,sizes:e.#_,keyMap:e.#s,keyList:e.#i,valList:e.#t,next:e.#l,prev:e.#u,get head(){return e.#a},get tail(){return e.#h},free:e.#y,isBackgroundFetch:t=>e.#e(t),backgroundFetch:(t,i,s,n)=>e.#P(t,i,s,n),moveToTail:t=>e.#L(t),indexes:t=>e.#A(t),rindexes:t=>e.#z(t),isStale:t=>e.#p(t)}}get max(){return this.#o}get maxSize(){return this.#c}get calculatedSize(){return this.#b}get size(){return this.#n}get fetchMethod(){return this.#M}get memoMethod(){return this.#I}get dispose(){return this.#S}get onInsert(){return this.#O}get disposeAfter(){return this.#w}constructor(e){let{max:t=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:r,updateAgeOnHas:h,allowStale:a,dispose:o,onInsert:d,disposeAfter:y,noDisposeOnSet:_,noUpdateTTL:c,maxSize:g=0,maxEntrySize:f=0,sizeCalculation:b,fetchMethod:l,memoMethod:w,noDeleteOnFetchRejection:F,noDeleteOnStaleGet:m,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:A,ignoreFetchAbort:z,backgroundFetchSize:C=1,perf:E}=e;if(this.backgroundFetchSize=C,E!==void 0&&typeof E?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#m=E??M,t!==0&&!T(t))throw new TypeError("max option must be a nonnegative integer");let v=t?G(t):Array;if(!v)throw new Error("invalid max value: "+t);if(this.#o=t,this.#c=g,this.maxEntrySize=f||this.#c,this.sizeCalculation=b,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#I=w,l!==void 0&&typeof l!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#M=l,this.#U=!!l,this.#s=new Map,this.#i=Array.from({length:t}).fill(void 0),this.#t=Array.from({length:t}).fill(void 0),this.#l=new v(t),this.#u=new v(t),this.#a=0,this.#h=0,this.#y=R.create(t),this.#n=0,this.#b=0,typeof o=="function"&&(this.#S=o),typeof d=="function"&&(this.#O=d),typeof y=="function"?(this.#w=y,this.#r=[]):(this.#w=void 0,this.#r=void 0),this.#T=!!this.#S,this.#x=!!this.#O,this.#f=!!this.#w,this.noDisposeOnSet=!!_,this.noUpdateTTL=!!c,this.noDeleteOnFetchRejection=!!F,this.allowStaleOnFetchRejection=!!p,this.allowStaleOnFetchAbort=!!A,this.ignoreFetchAbort=!!z,this.maxEntrySize!==0){if(this.#c!==0&&!T(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!T(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#X()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!m,this.updateAgeOnGet=!!r,this.updateAgeOnHas=!!h,this.ttlResolution=T(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!T(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#k()}if(this.#o===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#o&&!this.#c){let x="LRU_CACHE_UNBOUNDED";k(x)&&(j.add(x),P("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",x,u))}}getRemainingTTL(e){return this.#s.has(e)?1/0:0}#k(){let e=new O(this.#o),t=new O(this.#o);this.#d=e,this.#F=t;let i=this.ttlAutopurge?Array.from({length:this.#o}):void 0;this.#g=i,this.#H=(h,a,o=this.#m.now())=>{t[h]=a!==0?o:0,e[h]=a,s(h,a)},this.#D=h=>{t[h]=e[h]!==0?this.#m.now():0,s(h,e[h])};let s=this.ttlAutopurge?(h,a)=>{if(i?.[h]&&(clearTimeout(i[h]),i[h]=void 0),a&&a!==0&&i){let o=setTimeout(()=>{this.#p(h)&&this.#E(this.#i[h],"expire")},a+1);o.unref&&o.unref(),i[h]=o}}:()=>{};this.#v=(h,a)=>{if(e[a]){let o=e[a],d=t[a];if(!o||!d)return;h.ttl=o,h.start=d,h.now=n||r();let y=h.now-d;h.remainingTTL=o-y}};let n=0,r=()=>{let h=this.#m.now();if(this.ttlResolution>0){n=h;let a=setTimeout(()=>n=0,this.ttlResolution);a.unref&&a.unref()}return h};this.getRemainingTTL=h=>{let a=this.#s.get(h);if(a===void 0)return 0;let o=e[a],d=t[a];if(!o||!d)return 1/0;let y=(n||r())-d;return o-y},this.#p=h=>{let a=t[h],o=e[h];return!!o&&!!a&&(n||r())-a>o}}#D=()=>{};#v=()=>{};#H=()=>{};#p=()=>!1;#X(){let e=new O(this.#o);this.#b=0,this.#_=e,this.#R=t=>{this.#b-=e[t],e[t]=0},this.#N=(t,i,s,n)=>{if(!T(s)){if(this.#e(i))return this.backgroundFetchSize;if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,t),!T(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return s},this.#j=(t,i,s)=>{if(e[t]=i,this.#c){let n=this.#c-e[t];for(;this.#b>n;)this.#G(!0)}this.#b+=e[t],s&&(s.entrySize=i,s.totalCalculatedSize=this.#b)}}#R=e=>{};#j=(e,t,i)=>{};#N=(e,t,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:e=this.allowStale}={}){if(this.#n)for(let t=this.#h;this.#V(t)&&((e||!this.#p(t))&&(yield t),t!==this.#a);)t=this.#u[t]}*#z({allowStale:e=this.allowStale}={}){if(this.#n)for(let t=this.#a;this.#V(t)&&((e||!this.#p(t))&&(yield t),t!==this.#h);)t=this.#l[t]}#V(e){return e!==void 0&&this.#s.get(this.#i[e])===e}*entries(){for(let e of this.#A())this.#t[e]!==void 0&&this.#i[e]!==void 0&&!this.#e(this.#t[e])&&(yield[this.#i[e],this.#t[e]])}*rentries(){for(let e of this.#z())this.#t[e]!==void 0&&this.#i[e]!==void 0&&!this.#e(this.#t[e])&&(yield[this.#i[e],this.#t[e]])}*keys(){for(let e of this.#A()){let t=this.#i[e];t!==void 0&&!this.#e(this.#t[e])&&(yield t)}}*rkeys(){for(let e of this.#z()){let t=this.#i[e];t!==void 0&&!this.#e(this.#t[e])&&(yield t)}}*values(){for(let e of this.#A())this.#t[e]!==void 0&&!this.#e(this.#t[e])&&(yield this.#t[e])}*rvalues(){for(let e of this.#z())this.#t[e]!==void 0&&!this.#e(this.#t[e])&&(yield this.#t[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&e(n,this.#i[i],this))return this.#C(this.#i[i],t)}}forEach(e,t=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#i[i],this)}}rforEach(e,t=this){for(let i of this.#z()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#i[i],this)}}purgeStale(){let e=!1;for(let t of this.#z({allowStale:!0}))this.#p(t)&&(this.#E(this.#i[t],"expire"),e=!0);return e}info(e){let t=this.#s.get(e);if(t===void 0)return;let i=this.#t[t],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#d&&this.#F){let r=this.#d[t],h=this.#F[t];if(r&&h){let a=r-(this.#m.now()-h);n.ttl=a,n.start=Date.now()}}return this.#_&&(n.size=this.#_[t]),n}dump(){let e=[];for(let t of this.#A({allowStale:!0})){let i=this.#i[t],s=this.#t[t],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let r={value:n};if(this.#d&&this.#F){r.ttl=this.#d[t];let h=this.#m.now()-this.#F[t];r.start=Math.floor(Date.now()-h)}this.#_&&(r.size=this.#_[t]),e.unshift([i,r])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let s=Date.now()-i.start;i.start=this.#m.now()-s}this.#W(t,i.value,i)}}set(e,t,i={}){let{status:s=S.hasSubscribers?{}:void 0}=i;i.status=s,s&&(s.op="set",s.key=e,t!==void 0&&(s.value=t),s.cache=this);let n=this.#W(e,t,i);return s&&S.hasSubscribers&&S.publish(s),n}#W(e,t,i,s){let{ttl:n=this.ttl,start:r,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:o}=i,d=this.#e(t);if(t===void 0)return o&&(o.set="deleted"),this.delete(e),this;let{noUpdateTTL:y=this.noUpdateTTL}=i;o&&!d&&(o.value=t);let _=this.#N(e,t,i.size||0,a,o);if(this.maxEntrySize&&_>this.maxEntrySize)return this.#E(e,"set"),o&&(o.set="miss",o.maxEntrySizeExceeded=!0),this;let c=this.#n===0?void 0:this.#s.get(e);if(c===void 0)c=this.#n===0?this.#h:this.#y.length!==0?this.#y.pop():this.#n===this.#o?this.#G(!1):this.#n,this.#i[c]=e,this.#t[c]=t,this.#s.set(e,c),this.#l[this.#h]=c,this.#u[c]=this.#h,this.#h=c,this.#n++,this.#j(c,_,o),o&&(o.set="add"),y=!1,this.#x&&!d&&this.#O?.(t,e,"add");else{this.#L(c);let g=this.#t[c];if(t!==g){if(!h)if(this.#e(g)){g!==s&&g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=g;f!==void 0&&f!==t&&(this.#T&&this.#S?.(f,e,"set"),this.#f&&this.#r?.push([f,e,"set"]))}else this.#T&&this.#S?.(g,e,"set"),this.#f&&this.#r?.push([g,e,"set"]);if(this.#R(c),this.#j(c,_,o),this.#t[c]=t,!d){let f=g&&this.#e(g)?g.__staleWhileFetching:g,b=f===void 0?"add":t!==f?"replace":"update";o&&(o.set=b,f!==void 0&&(o.oldValue=f)),this.#x&&this.onInsert?.(t,e,b)}}else d||(o&&(o.set="update"),this.#x&&this.onInsert?.(t,e,"update"))}if(n!==0&&!this.#d&&this.#k(),this.#d&&(y||this.#H(c,n,r),o&&this.#v(o,c)),!h&&this.#f&&this.#r){let g=this.#r,f;for(;f=g?.shift();)this.#w?.(...f)}return this}pop(){try{for(;this.#n;){let e=this.#t[this.#a];if(this.#G(!0),this.#e(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#f&&this.#r){let e=this.#r,t;for(;t=e?.shift();)this.#w?.(...t)}}}#G(e){let t=this.#a,i=this.#i[t],s=this.#t[t],n=this.#e(s);n&&s.__abortController.abort(new Error("evicted"));let r=n?s.__staleWhileFetching:s;return(this.#T||this.#f)&&r!==void 0&&(this.#T&&this.#S?.(r,i,"evict"),this.#f&&this.#r?.push([r,i,"evict"])),this.#R(t),this.#g?.[t]&&(clearTimeout(this.#g[t]),this.#g[t]=void 0),e&&(this.#i[t]=void 0,this.#t[t]=void 0,this.#y.push(t)),this.#n===1?(this.#a=this.#h=0,this.#y.length=0):this.#a=this.#l[t],this.#s.delete(i),this.#n--,t}has(e,t={}){let{status:i=S.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="has",i.key=e,i.cache=this);let s=this.#Y(e,t);return S.hasSubscribers&&S.publish(i),s}#Y(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=t,n=this.#s.get(e);if(n!==void 0){let r=this.#t[n];if(this.#e(r)&&r.__staleWhileFetching===void 0)return!1;if(this.#p(n))s&&(s.has="stale",this.#v(s,n));else return i&&this.#D(n),s&&(s.has="hit",this.#v(s,n)),!0}else s&&(s.has="miss");return!1}peek(e,t={}){let{status:i=D()?{}:void 0}=t;i&&(i.op="peek",i.key=e,i.cache=this),t.status=i;let s=this.#J(e,t);return S.hasSubscribers&&S.publish(i),s}#J(e,t){let{status:i,allowStale:s=this.allowStale}=t,n=this.#s.get(e);if(n===void 0||!s&&this.#p(n)){i&&(i.peek=n===void 0?"miss":"stale");return}let r=this.#t[n],h=this.#e(r)?r.__staleWhileFetching:r;return i&&(h!==void 0?(i.peek="hit",i.value=h):i.peek="miss"),h}#P(e,t,i,s){let n=t===void 0?void 0:this.#t[t];if(this.#e(n))return n;let r=new AbortController,{signal:h}=i;h?.addEventListener("abort",()=>r.abort(h.reason),{signal:r.signal});let a={signal:r.signal,options:i,context:s},o=(f,b=!1)=>{let{aborted:l}=r.signal,w=i.ignoreFetchAbort&&f!==void 0,F=i.ignoreFetchAbort||!!(i.allowStaleOnFetchAbort&&f!==void 0);if(i.status&&(l&&!b?(i.status.fetchAborted=!0,i.status.fetchError=r.signal.reason,w&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),l&&!w&&!b)return y(r.signal.reason,F);let m=c,p=this.#t[t];return(p===c||p===void 0&&w&&b)&&(f===void 0?m.__staleWhileFetching!==void 0?this.#t[t]=m.__staleWhileFetching:this.#E(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.#W(e,f,a.options,m))),f},d=f=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=f),y(f,!1)),y=(f,b)=>{let{aborted:l}=r.signal,w=l&&i.allowStaleOnFetchAbort,F=w||i.allowStaleOnFetchRejection,m=F||i.noDeleteOnFetchRejection,p=c;if(this.#t[t]===c&&(!m||!b&&p.__staleWhileFetching===void 0?this.#E(e,"fetch"):w||(this.#t[t]=p.__staleWhileFetching)),F)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw f},_=(f,b)=>{let l=this.#M?.(e,n,a);r.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(f(void 0),i.allowStaleOnFetchAbort&&(f=w=>o(w,!0)))}),l&&l instanceof Promise?l.then(w=>f(w===void 0?void 0:w),b):l!==void 0&&f(l)};i.status&&(i.status.fetchDispatched=!0);let c=new Promise(_).then(o,d),g=Object.assign(c,{__abortController:r,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.#W(e,g,{...a.options,status:void 0}),t=this.#s.get(e)):this.#t[t]=g,g}#e(e){if(!this.#U)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let i=W.hasSubscribers,{status:s=D()?{}:void 0}=t;t.status=s,s&&t.context&&(s.context=t.context);let n=this.#B(e,t);return s&&i&&(s.trace=!0,W.tracePromise(()=>n,s).catch(()=>{})),n}async#B(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:a=0,sizeCalculation:o=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:y=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:_=this.allowStaleOnFetchRejection,ignoreFetchAbort:c=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:f,forceRefresh:b=!1,status:l,signal:w}=t;if(l&&(l.op="fetch",l.key=e,b&&(l.forceRefresh=!0),l.cache=this),!this.#U)return l&&(l.fetch="get"),this.#C(e,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:l});let F={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:r,noDisposeOnSet:h,size:a,sizeCalculation:o,noUpdateTTL:d,noDeleteOnFetchRejection:y,allowStaleOnFetchRejection:_,allowStaleOnFetchAbort:g,ignoreFetchAbort:c,status:l,signal:w},m=this.#s.get(e);if(m===void 0){l&&(l.fetch="miss");let p=this.#P(e,m,F,f);return p.__returned=p}else{let p=this.#t[m];if(this.#e(p)){let v=i&&p.__staleWhileFetching!==void 0;return l&&(l.fetch="inflight",v&&(l.returnedStale=!0)),v?p.__staleWhileFetching:p.__returned=p}let A=this.#p(m);if(!b&&!A)return l&&(l.fetch="hit"),this.#L(m),s&&this.#D(m),l&&this.#v(l,m),p;let z=this.#P(e,m,F,f),E=z.__staleWhileFetching!==void 0&&i;return l&&(l.fetch=A?"stale":"refresh",E&&A&&(l.returnedStale=!0)),E?z.__staleWhileFetching:z.__returned=z}}forceFetch(e,t={}){let i=W.hasSubscribers,{status:s=D()?{}:void 0}=t;t.status=s,s&&t.context&&(s.context=t.context);let n=this.#K(e,t);return s&&i&&(s.trace=!0,W.tracePromise(()=>n,s).catch(()=>{})),n}async#K(e,t={}){let i=await this.#B(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let{status:i=S.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="memo",i.key=e,t.context&&(i.context=t.context),i.cache=this);let s=this.#Q(e,t);return i&&(i.value=s),S.hasSubscribers&&S.publish(i),s}#Q(e,t={}){let i=this.#I;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,status:n,forceRefresh:r,...h}=t;n&&r&&(n.forceRefresh=!0);let a=this.#C(e,h),o=r||a===void 0;if(n&&(n.memo=o?"miss":"hit",o||(n.value=a)),!o)return a;let d=i(e,a,{options:h,context:s});return n&&(n.value=d),this.#W(e,d,h),d}get(e,t={}){let{status:i=S.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="get",i.key=e,i.cache=this);let s=this.#C(e,t);return i&&(s!==void 0&&(i.value=s),S.hasSubscribers&&S.publish(i)),s}#C(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:r}=t,h=this.#s.get(e);if(h===void 0){r&&(r.get="miss");return}let a=this.#t[h],o=this.#e(a);return r&&this.#v(r,h),this.#p(h)?o?(r&&(r.get="stale-fetching"),i&&a.__staleWhileFetching!==void 0?(r&&(r.returnedStale=!0),a.__staleWhileFetching):void 0):(n||this.#E(e,"expire"),r&&(r.get="stale"),i?(r&&(r.returnedStale=!0),a):void 0):(r&&(r.get=o?"fetching":"hit"),this.#L(h),s&&this.#D(h),o?a.__staleWhileFetching:a)}#$(e,t){this.#u[t]=e,this.#l[e]=t}#L(e){e!==this.#h&&(e===this.#a?this.#a=this.#l[e]:this.#$(this.#u[e],this.#l[e]),this.#$(this.#h,e),this.#h=e)}delete(e){return this.#E(e,"delete")}#E(e,t){S.hasSubscribers&&S.publish({op:"delete",delete:t,key:e,cache:this});let i=!1;if(this.#n!==0){let s=this.#s.get(e);if(s!==void 0)if(this.#g?.[s]&&(clearTimeout(this.#g?.[s]),this.#g[s]=void 0),i=!0,this.#n===1)this.#q(t);else{this.#R(s);let n=this.#t[s];if(this.#e(n)?n.__abortController.abort(new Error("deleted")):(this.#T||this.#f)&&(this.#T&&this.#S?.(n,e,t),this.#f&&this.#r?.push([n,e,t])),this.#s.delete(e),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#h)this.#h=this.#u[s];else if(s===this.#a)this.#a=this.#l[s];else{let r=this.#u[s];this.#l[r]=this.#l[s];let h=this.#l[s];this.#u[h]=this.#u[s]}this.#n--,this.#y.push(s)}}if(this.#f&&this.#r?.length){let s=this.#r,n;for(;n=s?.shift();)this.#w?.(...n)}return i}clear(){return this.#q("delete")}#q(e){for(let t of this.#z({allowStale:!0})){let i=this.#t[t];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else{let s=this.#i[t];this.#T&&this.#S?.(i,s,e),this.#f&&this.#r?.push([i,s,e])}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#F){this.#d.fill(0),this.#F.fill(0);for(let t of this.#g??[])t!==void 0&&clearTimeout(t);this.#g?.fill(void 0)}if(this.#_&&this.#_.fill(0),this.#a=0,this.#h=0,this.#y.length=0,this.#b=0,this.#n=0,this.#f&&this.#r){let t=this.#r,i;for(;i=t?.shift();)this.#w?.(...i)}}};export{U as LRUCache};
|
|
2
2
|
//# sourceMappingURL=index.min.js.map
|
|
@@ -3,6 +3,5 @@ export const defaultPerf = (typeof performance === 'object' &&
|
|
|
3
3
|
typeof performance.now === 'function') ?
|
|
4
4
|
/* c8 ignore start - this gets covered, but c8 gets confused */
|
|
5
5
|
performance
|
|
6
|
-
: /* c8 ignore stop */
|
|
7
|
-
Date;
|
|
6
|
+
: /* c8 ignore stop */ Date;
|
|
8
7
|
//# sourceMappingURL=perf.js.map
|