@aws-amplify/core 5.3.2-unstable.ffe65ea.1 → 5.4.0
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/internals/aws-client-utils/package.json +8 -0
- package/internals/aws-clients/pinpoint/package.json +8 -0
- package/lib/Amplify.js +18 -3
- package/lib/AwsClients/CognitoIdentity/base.d.ts +28 -0
- package/lib/AwsClients/CognitoIdentity/base.js +109 -0
- package/lib/AwsClients/CognitoIdentity/getCredentialsForIdentity.d.ts +12 -0
- package/lib/AwsClients/CognitoIdentity/getCredentialsForIdentity.js +82 -0
- package/lib/AwsClients/CognitoIdentity/getId.d.ts +12 -0
- package/lib/AwsClients/CognitoIdentity/getId.js +72 -0
- package/lib/AwsClients/CognitoIdentity/index.d.ts +2 -0
- package/lib/AwsClients/CognitoIdentity/index.js +9 -0
- package/lib/AwsClients/CognitoIdentity/types.d.ts +153 -0
- package/lib/AwsClients/CognitoIdentity/types.js +4 -0
- package/lib/AwsClients/Pinpoint/base.d.ts +17 -0
- package/lib/AwsClients/Pinpoint/base.js +39 -0
- package/lib/AwsClients/Pinpoint/getInAppMessages.d.ts +13 -0
- package/lib/AwsClients/Pinpoint/getInAppMessages.js +77 -0
- package/lib/AwsClients/Pinpoint/index.d.ts +4 -0
- package/lib/AwsClients/Pinpoint/index.js +11 -0
- package/lib/AwsClients/Pinpoint/putEvents.d.ts +13 -0
- package/lib/AwsClients/Pinpoint/putEvents.js +78 -0
- package/lib/AwsClients/Pinpoint/types.d.ts +836 -0
- package/lib/AwsClients/Pinpoint/types.js +5 -0
- package/lib/AwsClients/Pinpoint/updateEndpoint.d.ts +13 -0
- package/lib/AwsClients/Pinpoint/updateEndpoint.js +81 -0
- package/lib/ClientDevice/android.js +3 -2
- package/lib/ClientDevice/browser.js +1 -1
- package/lib/ClientDevice/index.js +3 -3
- package/lib/ClientDevice/ios.js +3 -2
- package/lib/ClientDevice/reactnative.js +3 -3
- package/lib/Credentials.js +176 -113
- package/lib/Errors.js +1 -1
- package/lib/Hub.d.ts +4 -4
- package/lib/Hub.js +47 -12
- package/lib/I18n/I18n.js +13 -3
- package/lib/I18n/index.js +1 -1
- package/lib/I18n/types.js +1 -1
- package/lib/JS.js +29 -17
- package/lib/Logger/ConsoleLogger.js +51 -17
- package/lib/Logger/index.js +3 -3
- package/lib/Logger/logger-interface.js +0 -1
- package/lib/OAuthHelper/FacebookOAuth.js +41 -6
- package/lib/OAuthHelper/GoogleOAuth.js +41 -6
- package/lib/OAuthHelper/index.js +1 -1
- package/lib/Platform/index.js +8 -7
- package/lib/Platform/version.d.ts +1 -1
- package/lib/Platform/version.js +2 -2
- package/lib/Providers/AWSCloudWatchProvider.js +104 -44
- package/lib/Providers/index.js +2 -2
- package/lib/RNComponents/index.js +2 -2
- package/lib/RNComponents/reactnative.js +7 -5
- package/lib/ServiceWorker/ServiceWorker.js +11 -11
- package/lib/ServiceWorker/index.js +2 -2
- package/lib/Signer.js +17 -7
- package/lib/StorageHelper/index.js +1 -1
- package/lib/StorageHelper/reactnative.js +5 -3
- package/lib/UniversalStorage/index.d.ts +2 -2
- package/lib/UniversalStorage/index.js +24 -6
- package/lib/Util/BackgroundProcessManager.js +84 -23
- package/lib/Util/Constants.js +1 -1
- package/lib/Util/DateUtils.js +18 -3
- package/lib/Util/Mutex.js +0 -1
- package/lib/Util/Reachability.d.ts +1 -1
- package/lib/Util/Reachability.js +18 -6
- package/lib/Util/Reachability.native.d.ts +1 -1
- package/lib/Util/Reachability.native.js +4 -3
- package/lib/Util/Retry.js +103 -26
- package/lib/Util/StringUtils.js +1 -1
- package/lib/Util/index.js +24 -21
- package/lib/clients/endpoints/getDnsSuffix.d.ts +11 -0
- package/lib/clients/endpoints/getDnsSuffix.js +49 -0
- package/lib/clients/endpoints/index.d.ts +1 -0
- package/lib/clients/endpoints/index.js +7 -0
- package/lib/clients/endpoints/partitions.d.ts +33 -0
- package/lib/clients/endpoints/partitions.js +41 -0
- package/lib/clients/handlers/authenticated.d.ts +5 -0
- package/lib/clients/handlers/authenticated.js +15 -0
- package/lib/clients/handlers/fetch.d.ts +4 -0
- package/lib/clients/handlers/fetch.js +123 -0
- package/lib/clients/handlers/unauthenticated.d.ts +4 -0
- package/lib/clients/handlers/unauthenticated.js +10 -0
- package/lib/clients/index.d.ts +8 -0
- package/lib/clients/index.js +37 -0
- package/lib/clients/internal/composeServiceApi.d.ts +8 -0
- package/lib/clients/internal/composeServiceApi.js +75 -0
- package/lib/clients/internal/composeTransferHandler.d.ts +29 -0
- package/lib/clients/internal/composeTransferHandler.js +26 -0
- package/lib/clients/middleware/retry/defaultRetryDecider.d.ts +6 -0
- package/lib/clients/middleware/retry/defaultRetryDecider.js +101 -0
- package/lib/clients/middleware/retry/index.d.ts +3 -0
- package/lib/clients/middleware/retry/index.js +11 -0
- package/lib/clients/middleware/retry/jitteredBackoff.d.ts +2 -0
- package/lib/clients/middleware/retry/jitteredBackoff.js +16 -0
- package/lib/clients/middleware/retry/middleware.d.ts +40 -0
- package/lib/clients/middleware/retry/middleware.js +143 -0
- package/lib/clients/middleware/signing/index.d.ts +1 -0
- package/lib/clients/middleware/signing/index.js +7 -0
- package/lib/clients/middleware/signing/middleware.d.ts +13 -0
- package/lib/clients/middleware/signing/middleware.js +101 -0
- package/lib/clients/middleware/signing/signer/signatureV4/constants.js +1 -1
- package/lib/clients/middleware/signing/signer/signatureV4/index.js +4 -4
- package/lib/clients/middleware/signing/signer/signatureV4/index.native.js +4 -4
- package/lib/clients/middleware/signing/signer/signatureV4/presignUrl.js +46 -8
- package/lib/clients/middleware/signing/signer/signatureV4/signRequest.js +22 -11
- package/lib/clients/middleware/signing/signer/signatureV4/types/index.js +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/types/signer.js +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/dataHashHelpers.d.ts +3 -2
- package/lib/clients/middleware/signing/signer/signatureV4/utils/dataHashHelpers.js +7 -5
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalHeaders.d.ts +2 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalHeaders.js +23 -7
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalQueryString.js +24 -8
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalRequest.js +8 -7
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalUri.js +3 -2
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCredentialScope.js +3 -2
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getFormattedDates.js +3 -2
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getHashedPayload.d.ts +2 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getHashedPayload.js +4 -3
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSignature.js +7 -6
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSignedHeaders.d.ts +2 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSignedHeaders.js +3 -2
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSigningKey.js +8 -7
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSigningValues.js +5 -4
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getStringToSign.js +3 -2
- package/lib/clients/middleware/signing/utils/extendedEncodeURIComponent.d.ts +10 -0
- package/lib/clients/middleware/signing/utils/extendedEncodeURIComponent.js +23 -0
- package/lib/clients/middleware/signing/utils/getSkewCorrectedDate.d.ts +10 -0
- package/lib/clients/middleware/signing/utils/getSkewCorrectedDate.js +18 -0
- package/lib/clients/middleware/signing/utils/getUpdatedSystemClockOffset.d.ts +9 -0
- package/lib/clients/middleware/signing/utils/getUpdatedSystemClockOffset.js +21 -0
- package/lib/clients/middleware/signing/utils/isClockSkewed.d.ts +11 -0
- package/lib/clients/middleware/signing/utils/isClockSkewed.js +23 -0
- package/lib/clients/middleware/userAgent/index.d.ts +1 -0
- package/lib/clients/middleware/userAgent/index.js +7 -0
- package/lib/clients/middleware/userAgent/middleware.d.ts +13 -0
- package/lib/clients/middleware/userAgent/middleware.js +77 -0
- package/lib/clients/serde/index.d.ts +2 -0
- package/lib/clients/serde/index.js +10 -0
- package/lib/clients/serde/json.d.ts +12 -0
- package/lib/clients/serde/json.js +115 -0
- package/lib/clients/serde/responseInfo.d.ts +3 -0
- package/lib/clients/serde/responseInfo.js +23 -0
- package/lib/clients/types/aws.d.ts +18 -1
- package/lib/clients/types/aws.js +0 -1
- package/lib/clients/types/core.d.ts +22 -0
- package/lib/clients/types/core.js +0 -1
- package/lib/clients/types/http.d.ts +8 -4
- package/lib/clients/types/http.js +0 -1
- package/lib/clients/types/index.d.ts +3 -2
- package/lib/clients/types/index.js +0 -1
- package/lib/clients/utils/isClockSkewError.d.ts +9 -0
- package/lib/clients/utils/isClockSkewError.js +27 -0
- package/lib/constants.js +1 -1
- package/lib/index.js +61 -60
- package/lib/parseAWSExports.js +15 -4
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/types/index.js +15 -1
- package/lib/types/types.d.ts +1 -1
- package/lib/types/types.js +0 -1
- package/lib-esm/Amplify.js +16 -2
- package/lib-esm/AwsClients/CognitoIdentity/base.d.ts +28 -0
- package/lib-esm/AwsClients/CognitoIdentity/base.js +104 -0
- package/lib-esm/AwsClients/CognitoIdentity/getCredentialsForIdentity.d.ts +12 -0
- package/lib-esm/AwsClients/CognitoIdentity/getCredentialsForIdentity.js +79 -0
- package/lib-esm/AwsClients/CognitoIdentity/getId.d.ts +12 -0
- package/lib-esm/AwsClients/CognitoIdentity/getId.js +69 -0
- package/lib-esm/AwsClients/CognitoIdentity/index.d.ts +2 -0
- package/lib-esm/AwsClients/CognitoIdentity/index.js +4 -0
- package/lib-esm/AwsClients/CognitoIdentity/types.d.ts +153 -0
- package/lib-esm/AwsClients/CognitoIdentity/types.js +3 -0
- package/lib-esm/AwsClients/Pinpoint/base.d.ts +17 -0
- package/lib-esm/AwsClients/Pinpoint/base.js +35 -0
- package/lib-esm/AwsClients/Pinpoint/getInAppMessages.d.ts +13 -0
- package/lib-esm/AwsClients/Pinpoint/getInAppMessages.js +74 -0
- package/lib-esm/AwsClients/Pinpoint/index.d.ts +4 -0
- package/lib-esm/AwsClients/Pinpoint/index.js +5 -0
- package/lib-esm/AwsClients/Pinpoint/putEvents.d.ts +13 -0
- package/lib-esm/AwsClients/Pinpoint/putEvents.js +75 -0
- package/lib-esm/AwsClients/Pinpoint/types.d.ts +836 -0
- package/lib-esm/AwsClients/Pinpoint/types.js +4 -0
- package/lib-esm/AwsClients/Pinpoint/updateEndpoint.d.ts +13 -0
- package/lib-esm/AwsClients/Pinpoint/updateEndpoint.js +78 -0
- package/lib-esm/ClientDevice/android.js +0 -1
- package/lib-esm/ClientDevice/browser.js +0 -1
- package/lib-esm/ClientDevice/index.js +0 -1
- package/lib-esm/ClientDevice/ios.js +0 -1
- package/lib-esm/ClientDevice/reactnative.js +0 -1
- package/lib-esm/Credentials.js +149 -87
- package/lib-esm/Errors.js +0 -1
- package/lib-esm/Hub.d.ts +4 -4
- package/lib-esm/Hub.js +43 -9
- package/lib-esm/I18n/I18n.js +11 -2
- package/lib-esm/I18n/index.js +0 -1
- package/lib-esm/I18n/types.js +0 -1
- package/lib-esm/JS.js +0 -1
- package/lib-esm/Logger/ConsoleLogger.js +49 -16
- package/lib-esm/Logger/index.js +0 -1
- package/lib-esm/Logger/logger-interface.js +1 -1
- package/lib-esm/OAuthHelper/FacebookOAuth.js +36 -2
- package/lib-esm/OAuthHelper/GoogleOAuth.js +36 -2
- package/lib-esm/OAuthHelper/index.js +0 -1
- package/lib-esm/Platform/index.js +5 -6
- package/lib-esm/Platform/version.d.ts +1 -1
- package/lib-esm/Platform/version.js +1 -2
- package/lib-esm/Providers/AWSCloudWatchProvider.js +75 -16
- package/lib-esm/Providers/index.js +0 -1
- package/lib-esm/RNComponents/index.js +0 -1
- package/lib-esm/RNComponents/reactnative.js +0 -1
- package/lib-esm/ServiceWorker/ServiceWorker.js +9 -10
- package/lib-esm/ServiceWorker/index.js +0 -1
- package/lib-esm/Signer.js +11 -2
- package/lib-esm/StorageHelper/index.js +0 -1
- package/lib-esm/StorageHelper/reactnative.js +0 -1
- package/lib-esm/UniversalStorage/index.d.ts +2 -2
- package/lib-esm/UniversalStorage/index.js +17 -3
- package/lib-esm/Util/BackgroundProcessManager.js +74 -14
- package/lib-esm/Util/Constants.js +0 -1
- package/lib-esm/Util/DateUtils.js +16 -2
- package/lib-esm/Util/Mutex.js +0 -1
- package/lib-esm/Util/Reachability.d.ts +1 -1
- package/lib-esm/Util/Reachability.js +11 -2
- package/lib-esm/Util/Reachability.native.d.ts +1 -1
- package/lib-esm/Util/Reachability.native.js +0 -1
- package/lib-esm/Util/Retry.js +92 -18
- package/lib-esm/Util/StringUtils.js +0 -1
- package/lib-esm/Util/index.js +0 -1
- package/lib-esm/clients/endpoints/getDnsSuffix.d.ts +11 -0
- package/lib-esm/clients/endpoints/getDnsSuffix.js +45 -0
- package/lib-esm/clients/endpoints/index.d.ts +1 -0
- package/lib-esm/clients/endpoints/index.js +3 -0
- package/lib-esm/clients/endpoints/partitions.d.ts +33 -0
- package/lib-esm/clients/endpoints/partitions.js +38 -0
- package/lib-esm/clients/handlers/authenticated.d.ts +5 -0
- package/lib-esm/clients/handlers/authenticated.js +12 -0
- package/lib-esm/clients/handlers/fetch.d.ts +4 -0
- package/lib-esm/clients/handlers/fetch.js +119 -0
- package/lib-esm/clients/handlers/unauthenticated.d.ts +4 -0
- package/lib-esm/clients/handlers/unauthenticated.js +7 -0
- package/lib-esm/clients/index.d.ts +8 -0
- package/lib-esm/clients/index.js +10 -0
- package/lib-esm/clients/internal/composeServiceApi.d.ts +8 -0
- package/lib-esm/clients/internal/composeServiceApi.js +71 -0
- package/lib-esm/clients/internal/composeTransferHandler.d.ts +29 -0
- package/lib-esm/clients/internal/composeTransferHandler.js +22 -0
- package/lib-esm/clients/middleware/retry/defaultRetryDecider.d.ts +6 -0
- package/lib-esm/clients/middleware/retry/defaultRetryDecider.js +97 -0
- package/lib-esm/clients/middleware/retry/index.d.ts +3 -0
- package/lib-esm/clients/middleware/retry/index.js +5 -0
- package/lib-esm/clients/middleware/retry/jitteredBackoff.d.ts +2 -0
- package/lib-esm/clients/middleware/retry/jitteredBackoff.js +12 -0
- package/lib-esm/clients/middleware/retry/middleware.d.ts +40 -0
- package/lib-esm/clients/middleware/retry/middleware.js +138 -0
- package/lib-esm/clients/middleware/signing/index.d.ts +1 -0
- package/lib-esm/clients/middleware/signing/index.js +3 -0
- package/lib-esm/clients/middleware/signing/middleware.d.ts +13 -0
- package/lib-esm/clients/middleware/signing/middleware.js +97 -0
- package/lib-esm/clients/middleware/signing/signer/signatureV4/constants.js +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/index.js +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/index.native.js +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/presignUrl.js +39 -3
- package/lib-esm/clients/middleware/signing/signer/signatureV4/signRequest.js +15 -6
- package/lib-esm/clients/middleware/signing/signer/signatureV4/types/index.js +1 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/types/signer.js +1 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/dataHashHelpers.d.ts +3 -2
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/dataHashHelpers.js +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalHeaders.d.ts +2 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalHeaders.js +20 -6
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalQueryString.js +18 -4
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalRequest.js +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalUri.js +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCredentialScope.js +1 -2
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getFormattedDates.js +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getHashedPayload.d.ts +2 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getHashedPayload.js +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSignature.js +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSignedHeaders.d.ts +2 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSignedHeaders.js +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSigningKey.js +1 -2
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSigningValues.js +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getStringToSign.js +0 -1
- package/lib-esm/clients/middleware/signing/utils/extendedEncodeURIComponent.d.ts +10 -0
- package/lib-esm/clients/middleware/signing/utils/extendedEncodeURIComponent.js +19 -0
- package/lib-esm/clients/middleware/signing/utils/getSkewCorrectedDate.d.ts +10 -0
- package/lib-esm/clients/middleware/signing/utils/getSkewCorrectedDate.js +14 -0
- package/lib-esm/clients/middleware/signing/utils/getUpdatedSystemClockOffset.d.ts +9 -0
- package/lib-esm/clients/middleware/signing/utils/getUpdatedSystemClockOffset.js +17 -0
- package/lib-esm/clients/middleware/signing/utils/isClockSkewed.d.ts +11 -0
- package/lib-esm/clients/middleware/signing/utils/isClockSkewed.js +19 -0
- package/lib-esm/clients/middleware/userAgent/index.d.ts +1 -0
- package/lib-esm/clients/middleware/userAgent/index.js +3 -0
- package/lib-esm/clients/middleware/userAgent/middleware.d.ts +13 -0
- package/lib-esm/clients/middleware/userAgent/middleware.js +73 -0
- package/lib-esm/clients/serde/index.d.ts +2 -0
- package/lib-esm/clients/serde/index.js +4 -0
- package/lib-esm/clients/serde/json.d.ts +12 -0
- package/lib-esm/clients/serde/json.js +110 -0
- package/lib-esm/clients/serde/responseInfo.d.ts +3 -0
- package/lib-esm/clients/serde/responseInfo.js +19 -0
- package/lib-esm/clients/types/aws.d.ts +18 -1
- package/lib-esm/clients/types/aws.js +1 -1
- package/lib-esm/clients/types/core.d.ts +22 -0
- package/lib-esm/clients/types/core.js +1 -1
- package/lib-esm/clients/types/http.d.ts +8 -4
- package/lib-esm/clients/types/http.js +1 -1
- package/lib-esm/clients/types/index.d.ts +3 -2
- package/lib-esm/clients/types/index.js +1 -1
- package/lib-esm/clients/utils/isClockSkewError.d.ts +9 -0
- package/lib-esm/clients/utils/isClockSkewError.js +23 -0
- package/lib-esm/constants.js +0 -1
- package/lib-esm/index.js +0 -1
- package/lib-esm/parseAWSExports.js +11 -2
- package/lib-esm/tsconfig.tsbuildinfo +1 -0
- package/lib-esm/types/index.js +1 -1
- package/lib-esm/types/types.d.ts +1 -1
- package/lib-esm/types/types.js +1 -1
- package/package.json +56 -22
- package/src/AwsClients/CognitoIdentity/base.ts +88 -0
- package/src/AwsClients/CognitoIdentity/getCredentialsForIdentity.ts +67 -0
- package/src/AwsClients/CognitoIdentity/getId.ts +58 -0
- package/src/AwsClients/CognitoIdentity/index.ts +9 -0
- package/src/AwsClients/CognitoIdentity/types.ts +159 -0
- package/src/AwsClients/Pinpoint/base.ts +41 -0
- package/src/AwsClients/Pinpoint/getInAppMessages.ts +56 -0
- package/src/AwsClients/Pinpoint/index.ts +15 -0
- package/src/AwsClients/Pinpoint/putEvents.ts +55 -0
- package/src/AwsClients/Pinpoint/types.ts +844 -0
- package/src/AwsClients/Pinpoint/updateEndpoint.ts +60 -0
- package/src/Credentials.ts +75 -100
- package/src/OAuthHelper/FacebookOAuth.ts +1 -1
- package/src/OAuthHelper/GoogleOAuth.ts +1 -1
- package/src/Platform/version.ts +1 -1
- package/src/StorageHelper/reactnative.ts +1 -1
- package/src/clients/endpoints/getDnsSuffix.ts +25 -0
- package/src/clients/endpoints/index.ts +4 -0
- package/src/clients/endpoints/partitions.ts +40 -0
- package/src/clients/handlers/authenticated.ts +19 -0
- package/src/clients/handlers/fetch.ts +75 -0
- package/src/clients/handlers/unauthenticated.ts +14 -0
- package/src/clients/index.ts +15 -0
- package/src/clients/internal/composeServiceApi.ts +50 -0
- package/src/clients/internal/composeTransferHandler.ts +89 -0
- package/src/clients/middleware/retry/defaultRetryDecider.ts +54 -0
- package/src/clients/middleware/retry/index.ts +6 -0
- package/src/clients/middleware/retry/jitteredBackoff.ts +16 -0
- package/src/clients/middleware/retry/middleware.ts +133 -0
- package/src/clients/middleware/signing/index.ts +4 -0
- package/src/clients/middleware/signing/middleware.ts +65 -0
- package/src/clients/middleware/signing/utils/extendedEncodeURIComponent.ts +21 -0
- package/src/clients/middleware/signing/utils/getSkewCorrectedDate.ts +14 -0
- package/src/clients/middleware/signing/utils/getUpdatedSystemClockOffset.ts +22 -0
- package/src/clients/middleware/signing/utils/isClockSkewed.ts +26 -0
- package/src/clients/middleware/userAgent/index.ts +4 -0
- package/src/clients/middleware/userAgent/middleware.ts +41 -0
- package/src/clients/serde/index.ts +5 -0
- package/src/clients/serde/json.ts +51 -0
- package/src/clients/serde/responseInfo.ts +20 -0
- package/src/clients/types/aws.ts +21 -0
- package/src/clients/types/core.ts +40 -0
- package/src/clients/types/http.ts +12 -2
- package/src/clients/types/index.ts +22 -2
- package/src/clients/utils/isClockSkewError.ts +24 -0
- package/lib/.tsbuildinfo +0 -3
- package/lib/Amplify.js.map +0 -1
- package/lib/ClientDevice/android.js.map +0 -1
- package/lib/ClientDevice/browser.js.map +0 -1
- package/lib/ClientDevice/index.js.map +0 -1
- package/lib/ClientDevice/ios.js.map +0 -1
- package/lib/ClientDevice/reactnative.js.map +0 -1
- package/lib/Credentials.js.map +0 -1
- package/lib/Errors.js.map +0 -1
- package/lib/Hub.js.map +0 -1
- package/lib/I18n/I18n.js.map +0 -1
- package/lib/I18n/index.js.map +0 -1
- package/lib/I18n/types.js.map +0 -1
- package/lib/JS.js.map +0 -1
- package/lib/Logger/ConsoleLogger.js.map +0 -1
- package/lib/Logger/index.js.map +0 -1
- package/lib/Logger/logger-interface.js.map +0 -1
- package/lib/OAuthHelper/FacebookOAuth.js.map +0 -1
- package/lib/OAuthHelper/GoogleOAuth.js.map +0 -1
- package/lib/OAuthHelper/index.js.map +0 -1
- package/lib/Platform/index.js.map +0 -1
- package/lib/Platform/version.js.map +0 -1
- package/lib/Providers/AWSCloudWatchProvider.js.map +0 -1
- package/lib/Providers/index.js.map +0 -1
- package/lib/RNComponents/index.js.map +0 -1
- package/lib/RNComponents/reactnative.js.map +0 -1
- package/lib/ServiceWorker/ServiceWorker.js.map +0 -1
- package/lib/ServiceWorker/index.js.map +0 -1
- package/lib/Signer.js.map +0 -1
- package/lib/StorageHelper/index.js.map +0 -1
- package/lib/StorageHelper/reactnative.js.map +0 -1
- package/lib/UniversalStorage/index.js.map +0 -1
- package/lib/Util/BackgroundProcessManager.js.map +0 -1
- package/lib/Util/CognitoIdentityClient.d.ts +0 -14
- package/lib/Util/CognitoIdentityClient.js +0 -31
- package/lib/Util/CognitoIdentityClient.js.map +0 -1
- package/lib/Util/Constants.js.map +0 -1
- package/lib/Util/DateUtils.js.map +0 -1
- package/lib/Util/Mutex.js.map +0 -1
- package/lib/Util/Reachability.js.map +0 -1
- package/lib/Util/Reachability.native.js.map +0 -1
- package/lib/Util/Retry.js.map +0 -1
- package/lib/Util/StringUtils.js.map +0 -1
- package/lib/Util/index.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/constants.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/index.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/index.native.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/presignUrl.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/signRequest.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/types/index.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/types/signer.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/dataHashHelpers.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalHeaders.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalQueryString.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalRequest.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalUri.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCredentialScope.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getFormattedDates.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getHashedPayload.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSignature.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSignedHeaders.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSigningKey.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSigningValues.js.map +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getStringToSign.js.map +0 -1
- package/lib/clients/types/aws.js.map +0 -1
- package/lib/clients/types/core.js.map +0 -1
- package/lib/clients/types/http.js.map +0 -1
- package/lib/clients/types/index.js.map +0 -1
- package/lib/constants.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/parseAWSExports.js.map +0 -1
- package/lib/types/index.js.map +0 -1
- package/lib/types/types.js.map +0 -1
- package/lib-esm/.tsbuildinfo +0 -3
- package/lib-esm/Amplify.js.map +0 -1
- package/lib-esm/ClientDevice/android.js.map +0 -1
- package/lib-esm/ClientDevice/browser.js.map +0 -1
- package/lib-esm/ClientDevice/index.js.map +0 -1
- package/lib-esm/ClientDevice/ios.js.map +0 -1
- package/lib-esm/ClientDevice/reactnative.js.map +0 -1
- package/lib-esm/Credentials.js.map +0 -1
- package/lib-esm/Errors.js.map +0 -1
- package/lib-esm/Hub.js.map +0 -1
- package/lib-esm/I18n/I18n.js.map +0 -1
- package/lib-esm/I18n/index.js.map +0 -1
- package/lib-esm/I18n/types.js.map +0 -1
- package/lib-esm/JS.js.map +0 -1
- package/lib-esm/Logger/ConsoleLogger.js.map +0 -1
- package/lib-esm/Logger/index.js.map +0 -1
- package/lib-esm/Logger/logger-interface.js.map +0 -1
- package/lib-esm/OAuthHelper/FacebookOAuth.js.map +0 -1
- package/lib-esm/OAuthHelper/GoogleOAuth.js.map +0 -1
- package/lib-esm/OAuthHelper/index.js.map +0 -1
- package/lib-esm/Platform/index.js.map +0 -1
- package/lib-esm/Platform/version.js.map +0 -1
- package/lib-esm/Providers/AWSCloudWatchProvider.js.map +0 -1
- package/lib-esm/Providers/index.js.map +0 -1
- package/lib-esm/RNComponents/index.js.map +0 -1
- package/lib-esm/RNComponents/reactnative.js.map +0 -1
- package/lib-esm/ServiceWorker/ServiceWorker.js.map +0 -1
- package/lib-esm/ServiceWorker/index.js.map +0 -1
- package/lib-esm/Signer.js.map +0 -1
- package/lib-esm/StorageHelper/index.js.map +0 -1
- package/lib-esm/StorageHelper/reactnative.js.map +0 -1
- package/lib-esm/UniversalStorage/index.js.map +0 -1
- package/lib-esm/Util/BackgroundProcessManager.js.map +0 -1
- package/lib-esm/Util/CognitoIdentityClient.d.ts +0 -14
- package/lib-esm/Util/CognitoIdentityClient.js +0 -27
- package/lib-esm/Util/CognitoIdentityClient.js.map +0 -1
- package/lib-esm/Util/Constants.js.map +0 -1
- package/lib-esm/Util/DateUtils.js.map +0 -1
- package/lib-esm/Util/Mutex.js.map +0 -1
- package/lib-esm/Util/Reachability.js.map +0 -1
- package/lib-esm/Util/Reachability.native.js.map +0 -1
- package/lib-esm/Util/Retry.js.map +0 -1
- package/lib-esm/Util/StringUtils.js.map +0 -1
- package/lib-esm/Util/index.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/constants.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/index.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/index.native.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/presignUrl.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/signRequest.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/types/index.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/types/signer.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/dataHashHelpers.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalHeaders.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalQueryString.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalRequest.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalUri.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCredentialScope.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getFormattedDates.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getHashedPayload.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSignature.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSignedHeaders.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSigningKey.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSigningValues.js.map +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getStringToSign.js.map +0 -1
- package/lib-esm/clients/types/aws.js.map +0 -1
- package/lib-esm/clients/types/core.js.map +0 -1
- package/lib-esm/clients/types/http.js.map +0 -1
- package/lib-esm/clients/types/index.js.map +0 -1
- package/lib-esm/constants.js.map +0 -1
- package/lib-esm/index.js.map +0 -1
- package/lib-esm/parseAWSExports.js.map +0 -1
- package/lib-esm/types/index.js.map +0 -1
- package/lib-esm/types/types.js.map +0 -1
- package/src/Util/CognitoIdentityClient.ts +0 -48
|
@@ -1,8 +1,69 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
14
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
15
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
16
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
17
|
+
function step(op) {
|
|
18
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
19
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
20
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
21
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
22
|
+
switch (op[0]) {
|
|
23
|
+
case 0: case 1: t = op; break;
|
|
24
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
25
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
26
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
27
|
+
default:
|
|
28
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
29
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
30
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
31
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
32
|
+
if (t[2]) _.ops.pop();
|
|
33
|
+
_.trys.pop(); continue;
|
|
34
|
+
}
|
|
35
|
+
op = body.call(thisArg, _);
|
|
36
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
37
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
41
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
42
|
+
if (!m) return o;
|
|
43
|
+
var i = m.call(o), r, ar = [], e;
|
|
44
|
+
try {
|
|
45
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
46
|
+
}
|
|
47
|
+
catch (error) { e = { error: error }; }
|
|
48
|
+
finally {
|
|
49
|
+
try {
|
|
50
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
51
|
+
}
|
|
52
|
+
finally { if (e) throw e.error; }
|
|
53
|
+
}
|
|
54
|
+
return ar;
|
|
55
|
+
};
|
|
56
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
57
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
58
|
+
if (ar || !(i in from)) {
|
|
59
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
60
|
+
ar[i] = from[i];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
64
|
+
};
|
|
4
65
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
|
|
66
|
+
exports.AWSCloudWatchProvider = void 0;
|
|
6
67
|
var client_cloudwatch_logs_1 = require("@aws-sdk/client-cloudwatch-logs");
|
|
7
68
|
var __1 = require("../..");
|
|
8
69
|
var Logger_1 = require("../Logger");
|
|
@@ -32,14 +93,14 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
32
93
|
AWSCloudWatchProvider.prototype.configure = function (config) {
|
|
33
94
|
if (!config)
|
|
34
95
|
return this._config || {};
|
|
35
|
-
var conf = Object.assign({}, this._config, parseAWSExports_1.parseAWSExports(config).Logging, config);
|
|
96
|
+
var conf = Object.assign({}, this._config, (0, parseAWSExports_1.parseAWSExports)(config).Logging, config);
|
|
36
97
|
this._config = conf;
|
|
37
98
|
return this._config;
|
|
38
99
|
};
|
|
39
100
|
AWSCloudWatchProvider.prototype.createLogGroup = function (params) {
|
|
40
|
-
return
|
|
101
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
41
102
|
var cmd, credentialsOK, client, output, error_1;
|
|
42
|
-
return
|
|
103
|
+
return __generator(this, function (_a) {
|
|
43
104
|
switch (_a.label) {
|
|
44
105
|
case 0:
|
|
45
106
|
logger.debug('creating new log group in CloudWatch - ', params.logGroupName);
|
|
@@ -60,7 +121,7 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
60
121
|
return [2 /*return*/, output];
|
|
61
122
|
case 4:
|
|
62
123
|
error_1 = _a.sent();
|
|
63
|
-
logger.error("error creating log group - "
|
|
124
|
+
logger.error("error creating log group - ".concat(error_1));
|
|
64
125
|
throw error_1;
|
|
65
126
|
case 5: return [2 /*return*/];
|
|
66
127
|
}
|
|
@@ -68,9 +129,9 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
68
129
|
});
|
|
69
130
|
};
|
|
70
131
|
AWSCloudWatchProvider.prototype.getLogGroups = function (params) {
|
|
71
|
-
return
|
|
132
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
72
133
|
var cmd, credentialsOK, client, output, error_2;
|
|
73
|
-
return
|
|
134
|
+
return __generator(this, function (_a) {
|
|
74
135
|
switch (_a.label) {
|
|
75
136
|
case 0:
|
|
76
137
|
logger.debug('getting list of log groups');
|
|
@@ -91,7 +152,7 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
91
152
|
return [2 /*return*/, output];
|
|
92
153
|
case 4:
|
|
93
154
|
error_2 = _a.sent();
|
|
94
|
-
logger.error("error getting log group - "
|
|
155
|
+
logger.error("error getting log group - ".concat(error_2));
|
|
95
156
|
throw error_2;
|
|
96
157
|
case 5: return [2 /*return*/];
|
|
97
158
|
}
|
|
@@ -99,9 +160,9 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
99
160
|
});
|
|
100
161
|
};
|
|
101
162
|
AWSCloudWatchProvider.prototype.createLogStream = function (params) {
|
|
102
|
-
return
|
|
163
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
103
164
|
var cmd, credentialsOK, client, output, error_3;
|
|
104
|
-
return
|
|
165
|
+
return __generator(this, function (_a) {
|
|
105
166
|
switch (_a.label) {
|
|
106
167
|
case 0:
|
|
107
168
|
logger.debug('creating new log stream in CloudWatch - ', params.logStreamName);
|
|
@@ -122,7 +183,7 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
122
183
|
return [2 /*return*/, output];
|
|
123
184
|
case 4:
|
|
124
185
|
error_3 = _a.sent();
|
|
125
|
-
logger.error("error creating log stream - "
|
|
186
|
+
logger.error("error creating log stream - ".concat(error_3));
|
|
126
187
|
throw error_3;
|
|
127
188
|
case 5: return [2 /*return*/];
|
|
128
189
|
}
|
|
@@ -130,9 +191,9 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
130
191
|
});
|
|
131
192
|
};
|
|
132
193
|
AWSCloudWatchProvider.prototype.getLogStreams = function (params) {
|
|
133
|
-
return
|
|
194
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
134
195
|
var cmd, credentialsOK, client, output, error_4;
|
|
135
|
-
return
|
|
196
|
+
return __generator(this, function (_a) {
|
|
136
197
|
switch (_a.label) {
|
|
137
198
|
case 0:
|
|
138
199
|
logger.debug('getting list of log streams');
|
|
@@ -153,7 +214,7 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
153
214
|
return [2 /*return*/, output];
|
|
154
215
|
case 4:
|
|
155
216
|
error_4 = _a.sent();
|
|
156
|
-
logger.error("error getting log stream - "
|
|
217
|
+
logger.error("error getting log stream - ".concat(error_4));
|
|
157
218
|
throw error_4;
|
|
158
219
|
case 5: return [2 /*return*/];
|
|
159
220
|
}
|
|
@@ -161,9 +222,9 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
161
222
|
});
|
|
162
223
|
};
|
|
163
224
|
AWSCloudWatchProvider.prototype.getLogEvents = function (params) {
|
|
164
|
-
return
|
|
225
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
165
226
|
var cmd, credentialsOK, client, output, error_5;
|
|
166
|
-
return
|
|
227
|
+
return __generator(this, function (_a) {
|
|
167
228
|
switch (_a.label) {
|
|
168
229
|
case 0:
|
|
169
230
|
logger.debug('getting log events from stream - ', params.logStreamName);
|
|
@@ -184,7 +245,7 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
184
245
|
return [2 /*return*/, output];
|
|
185
246
|
case 4:
|
|
186
247
|
error_5 = _a.sent();
|
|
187
|
-
logger.error("error getting log events - "
|
|
248
|
+
logger.error("error getting log events - ".concat(error_5));
|
|
188
249
|
throw error_5;
|
|
189
250
|
case 5: return [2 /*return*/];
|
|
190
251
|
}
|
|
@@ -193,12 +254,12 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
193
254
|
};
|
|
194
255
|
AWSCloudWatchProvider.prototype.pushLogs = function (logs) {
|
|
195
256
|
logger.debug('pushing log events to Cloudwatch...');
|
|
196
|
-
this._dataTracker.logEvents =
|
|
257
|
+
this._dataTracker.logEvents = __spreadArray(__spreadArray([], __read(this._dataTracker.logEvents), false), __read(logs), false);
|
|
197
258
|
};
|
|
198
259
|
AWSCloudWatchProvider.prototype._validateLogGroupExistsAndCreate = function (logGroupName) {
|
|
199
|
-
return
|
|
260
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
200
261
|
var credentialsOK, currGroups, foundGroups, err_1, errString;
|
|
201
|
-
return
|
|
262
|
+
return __generator(this, function (_a) {
|
|
202
263
|
switch (_a.label) {
|
|
203
264
|
case 0:
|
|
204
265
|
if (this._dataTracker.verifiedLogGroup) {
|
|
@@ -239,7 +300,7 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
239
300
|
return [2 /*return*/, null];
|
|
240
301
|
case 5:
|
|
241
302
|
err_1 = _a.sent();
|
|
242
|
-
errString = "failure during log group search: "
|
|
303
|
+
errString = "failure during log group search: ".concat(err_1);
|
|
243
304
|
logger.error(errString);
|
|
244
305
|
throw err_1;
|
|
245
306
|
case 6: return [2 /*return*/];
|
|
@@ -248,9 +309,9 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
248
309
|
});
|
|
249
310
|
};
|
|
250
311
|
AWSCloudWatchProvider.prototype._validateLogStreamExists = function (logGroupName, logStreamName) {
|
|
251
|
-
return
|
|
312
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
252
313
|
var credentialsOK, currStreams, foundStreams, err_2, errString;
|
|
253
|
-
return
|
|
314
|
+
return __generator(this, function (_a) {
|
|
254
315
|
switch (_a.label) {
|
|
255
316
|
case 0:
|
|
256
317
|
_a.trys.push([0, 4, , 5]);
|
|
@@ -290,7 +351,7 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
290
351
|
return [2 /*return*/, null];
|
|
291
352
|
case 4:
|
|
292
353
|
err_2 = _a.sent();
|
|
293
|
-
errString = "failure during log stream search: "
|
|
354
|
+
errString = "failure during log stream search: ".concat(err_2);
|
|
294
355
|
logger.error(errString);
|
|
295
356
|
throw err_2;
|
|
296
357
|
case 5: return [2 /*return*/];
|
|
@@ -299,9 +360,9 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
299
360
|
});
|
|
300
361
|
};
|
|
301
362
|
AWSCloudWatchProvider.prototype._sendLogEvents = function (params) {
|
|
302
|
-
return
|
|
363
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
303
364
|
var credentialsOK, cmd, client, output, err_3, errString;
|
|
304
|
-
return
|
|
365
|
+
return __generator(this, function (_a) {
|
|
305
366
|
switch (_a.label) {
|
|
306
367
|
case 0:
|
|
307
368
|
_a.trys.push([0, 3, , 4]);
|
|
@@ -320,7 +381,7 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
320
381
|
return [2 /*return*/, output];
|
|
321
382
|
case 3:
|
|
322
383
|
err_3 = _a.sent();
|
|
323
|
-
errString = "failure during log push: "
|
|
384
|
+
errString = "failure during log push: ".concat(err_3);
|
|
324
385
|
logger.error(errString);
|
|
325
386
|
return [3 /*break*/, 4];
|
|
326
387
|
case 4: return [2 /*return*/];
|
|
@@ -332,14 +393,14 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
332
393
|
return new client_cloudwatch_logs_1.CloudWatchLogsClient({
|
|
333
394
|
region: this._config.region,
|
|
334
395
|
credentials: this._config.credentials,
|
|
335
|
-
customUserAgent: Platform_1.getAmplifyUserAgent(),
|
|
396
|
+
customUserAgent: (0, Platform_1.getAmplifyUserAgent)(),
|
|
336
397
|
endpoint: this._config.endpoint,
|
|
337
398
|
});
|
|
338
399
|
};
|
|
339
400
|
AWSCloudWatchProvider.prototype._ensureCredentials = function () {
|
|
340
|
-
return
|
|
401
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
341
402
|
var _this = this;
|
|
342
|
-
return
|
|
403
|
+
return __generator(this, function (_a) {
|
|
343
404
|
switch (_a.label) {
|
|
344
405
|
case 0: return [4 /*yield*/, __1.Credentials.get()
|
|
345
406
|
.then(function (credentials) {
|
|
@@ -360,9 +421,9 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
360
421
|
});
|
|
361
422
|
};
|
|
362
423
|
AWSCloudWatchProvider.prototype._getNextSequenceToken = function () {
|
|
363
|
-
return
|
|
424
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
364
425
|
var logStream, err_4;
|
|
365
|
-
return
|
|
426
|
+
return __generator(this, function (_a) {
|
|
366
427
|
switch (_a.label) {
|
|
367
428
|
case 0:
|
|
368
429
|
if (this._nextSequenceToken && this._nextSequenceToken.length > 0) {
|
|
@@ -384,7 +445,7 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
384
445
|
return [2 /*return*/, this._nextSequenceToken];
|
|
385
446
|
case 4:
|
|
386
447
|
err_4 = _a.sent();
|
|
387
|
-
logger.error("failure while getting next sequence token: "
|
|
448
|
+
logger.error("failure while getting next sequence token: ".concat(err_4));
|
|
388
449
|
throw err_4;
|
|
389
450
|
case 5: return [2 /*return*/];
|
|
390
451
|
}
|
|
@@ -392,9 +453,9 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
392
453
|
});
|
|
393
454
|
};
|
|
394
455
|
AWSCloudWatchProvider.prototype._safeUploadLogEvents = function () {
|
|
395
|
-
return
|
|
456
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
396
457
|
var seqToken, logBatch, putLogsPayload, sendLogEventsResponse, err_5;
|
|
397
|
-
return
|
|
458
|
+
return __generator(this, function (_a) {
|
|
398
459
|
switch (_a.label) {
|
|
399
460
|
case 0:
|
|
400
461
|
_a.trys.push([0, 3, , 4]);
|
|
@@ -420,7 +481,7 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
420
481
|
return [2 /*return*/, sendLogEventsResponse];
|
|
421
482
|
case 3:
|
|
422
483
|
err_5 = _a.sent();
|
|
423
|
-
logger.error("error during _safeUploadLogEvents: "
|
|
484
|
+
logger.error("error during _safeUploadLogEvents: ".concat(err_5));
|
|
424
485
|
if (Constants_1.RETRY_ERROR_CODES.includes(err_5.name)) {
|
|
425
486
|
this._getNewSequenceTokenAndSubmit({
|
|
426
487
|
logEvents: this._currentLogBatch,
|
|
@@ -456,7 +517,7 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
456
517
|
Constants_1.AWS_CLOUDWATCH_BASE_BUFFER_SIZE
|
|
457
518
|
: 0;
|
|
458
519
|
if (eventSize > Constants_1.AWS_CLOUDWATCH_MAX_EVENT_SIZE) {
|
|
459
|
-
var errString = "Log entry exceeds maximum size for CloudWatch logs. Log size: "
|
|
520
|
+
var errString = "Log entry exceeds maximum size for CloudWatch logs. Log size: ".concat(eventSize, ". Truncating log message.");
|
|
460
521
|
logger.warn(errString);
|
|
461
522
|
currentEvent.message = currentEvent.message.substring(0, eventSize);
|
|
462
523
|
}
|
|
@@ -469,9 +530,9 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
469
530
|
return this._currentLogBatch;
|
|
470
531
|
};
|
|
471
532
|
AWSCloudWatchProvider.prototype._getNewSequenceTokenAndSubmit = function (payload) {
|
|
472
|
-
return
|
|
533
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
473
534
|
var seqToken, sendLogEventsRepsonse, err_6;
|
|
474
|
-
return
|
|
535
|
+
return __generator(this, function (_a) {
|
|
475
536
|
switch (_a.label) {
|
|
476
537
|
case 0:
|
|
477
538
|
_a.trys.push([0, 3, , 4]);
|
|
@@ -489,7 +550,7 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
489
550
|
return [2 /*return*/, sendLogEventsRepsonse];
|
|
490
551
|
case 3:
|
|
491
552
|
err_6 = _a.sent();
|
|
492
|
-
logger.error("error when retrying log submission with new sequence token: "
|
|
553
|
+
logger.error("error when retrying log submission with new sequence token: ".concat(err_6));
|
|
493
554
|
this._dataTracker.eventUploadInProgress = false;
|
|
494
555
|
throw err_6;
|
|
495
556
|
case 4: return [2 /*return*/];
|
|
@@ -502,9 +563,9 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
502
563
|
if (this._timer) {
|
|
503
564
|
clearInterval(this._timer);
|
|
504
565
|
}
|
|
505
|
-
this._timer = setInterval(function () { return
|
|
566
|
+
this._timer = setInterval(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
506
567
|
var err_7;
|
|
507
|
-
return
|
|
568
|
+
return __generator(this, function (_a) {
|
|
508
569
|
switch (_a.label) {
|
|
509
570
|
case 0:
|
|
510
571
|
_a.trys.push([0, 3, , 4]);
|
|
@@ -516,7 +577,7 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
516
577
|
case 2: return [3 /*break*/, 4];
|
|
517
578
|
case 3:
|
|
518
579
|
err_7 = _a.sent();
|
|
519
|
-
logger.error("error when calling _safeUploadLogEvents in the timer interval - "
|
|
580
|
+
logger.error("error when calling _safeUploadLogEvents in the timer interval - ".concat(err_7));
|
|
520
581
|
return [3 /*break*/, 4];
|
|
521
582
|
case 4: return [2 /*return*/];
|
|
522
583
|
}
|
|
@@ -533,4 +594,3 @@ var AWSCloudWatchProvider = /** @class */ (function () {
|
|
|
533
594
|
return AWSCloudWatchProvider;
|
|
534
595
|
}());
|
|
535
596
|
exports.AWSCloudWatchProvider = AWSCloudWatchProvider;
|
|
536
|
-
//# sourceMappingURL=AWSCloudWatchProvider.js.map
|
package/lib/Providers/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AWSCloudWatchProvider = void 0;
|
|
3
4
|
var AWSCloudWatchProvider_1 = require("./AWSCloudWatchProvider");
|
|
4
|
-
exports
|
|
5
|
-
//# sourceMappingURL=index.js.map
|
|
5
|
+
Object.defineProperty(exports, "AWSCloudWatchProvider", { enumerable: true, get: function () { return AWSCloudWatchProvider_1.AWSCloudWatchProvider; } });
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.AsyncStorage = exports.AppState = exports.Linking = void 0;
|
|
5
6
|
var JS_1 = require("../JS");
|
|
6
7
|
var StorageHelper_1 = require("../StorageHelper");
|
|
7
8
|
exports.Linking = {};
|
|
@@ -9,7 +10,6 @@ exports.AppState = {
|
|
|
9
10
|
addEventListener: function (action, handler) { return undefined; },
|
|
10
11
|
};
|
|
11
12
|
// if not in react native, just use local storage
|
|
12
|
-
exports.AsyncStorage = JS_1.browserOrNode().isBrowser
|
|
13
|
+
exports.AsyncStorage = (0, JS_1.browserOrNode)().isBrowser
|
|
13
14
|
? new StorageHelper_1.StorageHelper().getStorage()
|
|
14
15
|
: undefined;
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
6
|
+
};
|
|
4
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
|
|
8
|
+
exports.AsyncStorage = exports.AppState = exports.Linking = void 0;
|
|
6
9
|
var react_native_1 = require("react-native");
|
|
7
|
-
exports
|
|
8
|
-
exports
|
|
9
|
-
var async_storage_1 =
|
|
10
|
+
Object.defineProperty(exports, "Linking", { enumerable: true, get: function () { return react_native_1.Linking; } });
|
|
11
|
+
Object.defineProperty(exports, "AppState", { enumerable: true, get: function () { return react_native_1.AppState; } });
|
|
12
|
+
var async_storage_1 = __importDefault(require("@react-native-async-storage/async-storage"));
|
|
10
13
|
exports.AsyncStorage = async_storage_1.default;
|
|
11
|
-
//# sourceMappingURL=reactnative.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ServiceWorkerClass = void 0;
|
|
3
4
|
/**
|
|
4
5
|
* Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
5
6
|
*
|
|
@@ -39,7 +40,7 @@ var ServiceWorkerClass = /** @class */ (function () {
|
|
|
39
40
|
get: function () {
|
|
40
41
|
return this._serviceWorker;
|
|
41
42
|
},
|
|
42
|
-
enumerable:
|
|
43
|
+
enumerable: false,
|
|
43
44
|
configurable: true
|
|
44
45
|
});
|
|
45
46
|
/**
|
|
@@ -58,8 +59,8 @@ var ServiceWorkerClass = /** @class */ (function () {
|
|
|
58
59
|
var _this = this;
|
|
59
60
|
if (filePath === void 0) { filePath = '/service-worker.js'; }
|
|
60
61
|
if (scope === void 0) { scope = '/'; }
|
|
61
|
-
this._logger.debug("registering "
|
|
62
|
-
this._logger.debug("registering service worker with scope "
|
|
62
|
+
this._logger.debug("registering ".concat(filePath));
|
|
63
|
+
this._logger.debug("registering service worker with scope ".concat(scope));
|
|
63
64
|
return new Promise(function (resolve, reject) {
|
|
64
65
|
if (navigator && 'serviceWorker' in navigator) {
|
|
65
66
|
navigator.serviceWorker
|
|
@@ -78,11 +79,11 @@ var ServiceWorkerClass = /** @class */ (function () {
|
|
|
78
79
|
}
|
|
79
80
|
_this._registration = registration;
|
|
80
81
|
_this._setupListeners();
|
|
81
|
-
_this._logger.debug("Service Worker Registration Success: "
|
|
82
|
+
_this._logger.debug("Service Worker Registration Success: ".concat(registration));
|
|
82
83
|
return resolve(registration);
|
|
83
84
|
})
|
|
84
85
|
.catch(function (error) {
|
|
85
|
-
_this._logger.debug("Service Worker Registration Failed "
|
|
86
|
+
_this._logger.debug("Service Worker Registration Failed ".concat(error));
|
|
86
87
|
return reject(error);
|
|
87
88
|
});
|
|
88
89
|
}
|
|
@@ -108,11 +109,11 @@ var ServiceWorkerClass = /** @class */ (function () {
|
|
|
108
109
|
throw new Error('Service Worker not registered');
|
|
109
110
|
this._publicKey = publicKey;
|
|
110
111
|
return new Promise(function (resolve, reject) {
|
|
111
|
-
if (JS_1.browserOrNode().isBrowser) {
|
|
112
|
+
if ((0, JS_1.browserOrNode)().isBrowser) {
|
|
112
113
|
_this._registration.pushManager.getSubscription().then(function (subscription) {
|
|
113
114
|
if (subscription) {
|
|
114
115
|
_this._subscription = subscription;
|
|
115
|
-
_this._logger.debug("User is subscribed to push: "
|
|
116
|
+
_this._logger.debug("User is subscribed to push: ".concat(JSON.stringify(subscription)));
|
|
116
117
|
resolve(subscription);
|
|
117
118
|
}
|
|
118
119
|
else {
|
|
@@ -124,7 +125,7 @@ var ServiceWorkerClass = /** @class */ (function () {
|
|
|
124
125
|
})
|
|
125
126
|
.then(function (subscription) {
|
|
126
127
|
_this._subscription = subscription;
|
|
127
|
-
_this._logger.debug("User subscribed: "
|
|
128
|
+
_this._logger.debug("User subscribed: ".concat(JSON.stringify(subscription)));
|
|
128
129
|
resolve(subscription);
|
|
129
130
|
})
|
|
130
131
|
.catch(function (error) {
|
|
@@ -175,7 +176,7 @@ var ServiceWorkerClass = /** @class */ (function () {
|
|
|
175
176
|
var _this = this;
|
|
176
177
|
this._serviceWorker.addEventListener('statechange', function (event) {
|
|
177
178
|
var currentState = _this._serviceWorker.state;
|
|
178
|
-
_this._logger.debug("ServiceWorker statechange: "
|
|
179
|
+
_this._logger.debug("ServiceWorker statechange: ".concat(currentState));
|
|
179
180
|
if (Amplify_1.Amplify.Analytics && typeof Amplify_1.Amplify.Analytics.record === 'function') {
|
|
180
181
|
Amplify_1.Amplify.Analytics.record({
|
|
181
182
|
name: 'ServiceWorker',
|
|
@@ -186,10 +187,9 @@ var ServiceWorkerClass = /** @class */ (function () {
|
|
|
186
187
|
}
|
|
187
188
|
});
|
|
188
189
|
this._serviceWorker.addEventListener('message', function (event) {
|
|
189
|
-
_this._logger.debug("ServiceWorker message event: "
|
|
190
|
+
_this._logger.debug("ServiceWorker message event: ".concat(event));
|
|
190
191
|
});
|
|
191
192
|
};
|
|
192
193
|
return ServiceWorkerClass;
|
|
193
194
|
}());
|
|
194
195
|
exports.ServiceWorkerClass = ServiceWorkerClass;
|
|
195
|
-
//# sourceMappingURL=ServiceWorker.js.map
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
* and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ServiceWorker = void 0;
|
|
15
16
|
var ServiceWorker_1 = require("./ServiceWorker");
|
|
16
|
-
exports
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
|
17
|
+
Object.defineProperty(exports, "ServiceWorker", { enumerable: true, get: function () { return ServiceWorker_1.ServiceWorkerClass; } });
|
package/lib/Signer.js
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
var __assign = (this && this.__assign) || function () {
|
|
5
|
+
__assign = Object.assign || function(t) {
|
|
6
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7
|
+
s = arguments[i];
|
|
8
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
9
|
+
t[p] = s[p];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
return __assign.apply(this, arguments);
|
|
14
|
+
};
|
|
4
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
|
|
16
|
+
exports.Signer = void 0;
|
|
6
17
|
var Util_1 = require("./Util");
|
|
7
18
|
var signatureV4_1 = require("./clients/middleware/signing/signer/signatureV4");
|
|
8
19
|
var IOT_SERVICE_NAME = 'iotdevicegateway';
|
|
@@ -52,9 +63,9 @@ var Signer = /** @class */ (function () {
|
|
|
52
63
|
if (request.body && !request.data) {
|
|
53
64
|
throw new Error('The attribute "body" was found on the request object. Please use the attribute "data" instead.');
|
|
54
65
|
}
|
|
55
|
-
var requestToSign =
|
|
66
|
+
var requestToSign = __assign(__assign({}, request), { body: request.data, url: new URL(request.url) });
|
|
56
67
|
var options = getOptions(requestToSign, accessInfo, serviceInfo);
|
|
57
|
-
var signedRequest = signatureV4_1.signRequest(requestToSign, options);
|
|
68
|
+
var signedRequest = (0, signatureV4_1.signRequest)(requestToSign, options);
|
|
58
69
|
// Prior to using `signRequest`, Signer accepted urls as strings and outputted urls as string. Coerce the property
|
|
59
70
|
// back to a string so as not to disrupt consumers of Signer.
|
|
60
71
|
signedRequest.url = signedRequest.url.toString();
|
|
@@ -77,7 +88,7 @@ var Signer = /** @class */ (function () {
|
|
|
77
88
|
url: new URL(urlToSign),
|
|
78
89
|
};
|
|
79
90
|
var options = getOptions(presignable, accessInfo, serviceInfo, expiration);
|
|
80
|
-
var signedUrl = signatureV4_1.presignUrl(presignable, options);
|
|
91
|
+
var signedUrl = (0, signatureV4_1.presignUrl)(presignable, options);
|
|
81
92
|
if (accessInfo.session_token &&
|
|
82
93
|
!sessionTokenRequiredInSigning(options.signingService)) {
|
|
83
94
|
signedUrl.searchParams.append(signatureV4_1.TOKEN_QUERY_PARAM, accessInfo.session_token);
|
|
@@ -91,10 +102,10 @@ var getOptions = function (request, accessInfo, serviceInfo, expiration) {
|
|
|
91
102
|
var _a = accessInfo !== null && accessInfo !== void 0 ? accessInfo : {}, access_key = _a.access_key, secret_key = _a.secret_key, session_token = _a.session_token;
|
|
92
103
|
var _b = parseServiceInfo(request.url), urlRegion = _b.region, urlService = _b.service;
|
|
93
104
|
var _c = serviceInfo !== null && serviceInfo !== void 0 ? serviceInfo : {}, _d = _c.region, region = _d === void 0 ? urlRegion : _d, _e = _c.service, service = _e === void 0 ? urlService : _e;
|
|
94
|
-
var credentials =
|
|
105
|
+
var credentials = __assign({ accessKeyId: access_key, secretAccessKey: secret_key }, (sessionTokenRequiredInSigning(service)
|
|
95
106
|
? { sessionToken: session_token }
|
|
96
107
|
: {}));
|
|
97
|
-
return
|
|
108
|
+
return __assign({ credentials: credentials, signingDate: Util_1.DateUtils.getDateWithClockOffset(), signingRegion: region, signingService: service }, (expiration && { expiration: expiration }));
|
|
98
109
|
};
|
|
99
110
|
// TODO: V6 investigate whether add to custom clients' general signer implementation.
|
|
100
111
|
var parseServiceInfo = function (url) {
|
|
@@ -117,4 +128,3 @@ var parseServiceInfo = function (url) {
|
|
|
117
128
|
var sessionTokenRequiredInSigning = function (service) {
|
|
118
129
|
return service !== IOT_SERVICE_NAME;
|
|
119
130
|
};
|
|
120
|
-
//# sourceMappingURL=Signer.js.map
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.StorageHelper = exports.MemoryStorage = void 0;
|
|
5
6
|
var dataMemory = {};
|
|
6
7
|
/** @class */
|
|
7
8
|
var MemoryStorage = /** @class */ (function () {
|
|
@@ -72,4 +73,3 @@ var StorageHelper = /** @class */ (function () {
|
|
|
72
73
|
return StorageHelper;
|
|
73
74
|
}());
|
|
74
75
|
exports.StorageHelper = StorageHelper;
|
|
75
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
6
|
+
exports.StorageHelper = void 0;
|
|
4
7
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
5
8
|
// SPDX-License-Identifier: Apache-2.0
|
|
6
|
-
var async_storage_1 =
|
|
9
|
+
var async_storage_1 = __importDefault(require("@react-native-async-storage/async-storage"));
|
|
7
10
|
var MEMORY_KEY_PREFIX = '@MemoryStorage:';
|
|
8
11
|
var dataMemory = {};
|
|
9
12
|
/** @class */
|
|
@@ -101,4 +104,3 @@ var StorageHelper = /** @class */ (function () {
|
|
|
101
104
|
return StorageHelper;
|
|
102
105
|
}());
|
|
103
106
|
exports.StorageHelper = StorageHelper;
|
|
104
|
-
//# sourceMappingURL=reactnative.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Cookies, { CookieSetOptions } from 'universal-cookie';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type Store = Record<string, string>;
|
|
3
|
+
type Context = {
|
|
4
4
|
req?: any;
|
|
5
5
|
};
|
|
6
6
|
export declare class UniversalStorage implements Storage {
|