@aws-amplify/core 6.0.1-console-preview.f63250a.0 → 6.0.1-console-preview.5dc0b68.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/adapter-core/package.json +8 -0
- package/internals/providers/pinpoint/package.json +8 -0
- package/internals/utils/package.json +7 -0
- package/lib/AwsClients/CognitoIdentity/getCredentialsForIdentity.d.ts +1 -1
- package/lib/AwsClients/CognitoIdentity/getId.d.ts +1 -1
- package/lib/AwsClients/Pinpoint/getInAppMessages.d.ts +1 -1
- package/lib/AwsClients/Pinpoint/index.d.ts +1 -1
- package/lib/AwsClients/Pinpoint/putEvents.d.ts +1 -1
- package/lib/AwsClients/Pinpoint/putEvents.js +2 -2
- package/lib/AwsClients/Pinpoint/updateEndpoint.d.ts +1 -1
- package/lib/Cache/AsyncStorageCache.js +3 -3
- package/lib/Cache/BrowserStorageCache.js +5 -5
- package/lib/Cache/InMemoryCache.js +3 -3
- package/lib/Cache/StorageCache.js +1 -1
- package/lib/Cache/Utils/CacheList.js +5 -5
- package/lib/Credentials.js +2 -5
- package/lib/{Hub.d.ts → Hub/index.d.ts} +5 -21
- package/lib/Hub/index.js +151 -0
- package/lib/Hub/types/AuthTypes.d.ts +11 -0
- package/lib/Hub/types/HubTypes.d.ts +28 -0
- package/lib/Hub/types/HubTypes.js +4 -0
- package/lib/Hub/types/index.d.ts +2 -0
- package/lib/Hub/types/index.js +20 -0
- package/lib/I18n/I18n.js +1 -1
- package/lib/I18n/index.js +5 -5
- package/lib/OAuthHelper/FacebookOAuth.js +1 -1
- package/lib/OAuthHelper/GoogleOAuth.js +1 -1
- package/lib/Platform/version.d.ts +1 -1
- package/lib/Platform/version.js +1 -1
- package/lib/RNComponents/index.d.ts +1 -0
- package/lib/RNComponents/index.js +2 -1
- package/lib/RNComponents/isAppInForeground.d.ts +1 -0
- package/lib/RNComponents/isAppInForeground.js +10 -0
- package/lib/ServiceWorker/ServiceWorker.js +9 -9
- package/lib/StorageHelper/localStorage.js +1 -1
- package/lib/StorageHelper/sessionStorage.js +1 -1
- package/lib/UniversalStorage/index.js +1 -1
- package/lib/Util/Constants.d.ts +12 -8
- package/lib/Util/Constants.js +21 -15
- package/lib/{Errors.d.ts → Util/Errors.d.ts} +1 -1
- package/lib/Util/Reachability.js +1 -1
- package/lib/Util/errors/AssertError.js +1 -1
- package/lib/Util/index.d.ts +1 -1
- package/lib/Util/index.js +1 -5
- package/lib/adapterCore/error/AmplifyServerContextError.d.ts +8 -0
- package/lib/adapterCore/error/AmplifyServerContextError.js +35 -0
- package/lib/adapterCore/error/index.d.ts +1 -0
- package/lib/adapterCore/error/index.js +7 -0
- package/lib/adapterCore/index.d.ts +2 -0
- package/lib/adapterCore/index.js +11 -0
- package/lib/adapterCore/serverContext/index.d.ts +2 -0
- package/lib/adapterCore/serverContext/index.js +9 -0
- package/lib/adapterCore/serverContext/serverContext.d.ts +20 -0
- package/lib/adapterCore/serverContext/serverContext.js +42 -0
- package/lib/adapterCore/serverContext/serverContextRegistry.d.ts +6 -0
- package/lib/adapterCore/serverContext/serverContextRegistry.js +24 -0
- package/lib/adapterCore/serverContext/types/amplifyServer.d.ts +16 -0
- package/lib/adapterCore/serverContext/types/amplifyServer.js +4 -0
- package/lib/adapterCore/serverContext/types/cookieStorage.d.ts +31 -0
- package/lib/adapterCore/serverContext/types/cookieStorage.js +4 -0
- package/lib/adapterCore/serverContext/types/index.d.ts +4 -0
- package/lib/adapterCore/serverContext/types/index.js +4 -0
- package/lib/clients/handlers/fetch.js +1 -0
- package/lib/clients/internal/composeServiceApi.d.ts +5 -2
- package/lib/index.d.ts +11 -32
- package/lib/index.js +19 -100
- package/lib/libraryUtils.d.ts +21 -0
- package/lib/libraryUtils.js +105 -0
- package/lib/providers/pinpoint/apis/index.d.ts +2 -0
- package/lib/providers/pinpoint/apis/index.js +9 -0
- package/lib/providers/pinpoint/apis/record.d.ts +5 -0
- package/lib/providers/pinpoint/apis/record.js +120 -0
- package/lib/providers/pinpoint/apis/updateEndpoint.d.ts +5 -0
- package/lib/providers/pinpoint/apis/updateEndpoint.js +120 -0
- package/lib/providers/pinpoint/index.d.ts +2 -0
- package/lib/providers/pinpoint/index.js +19 -0
- package/lib/providers/pinpoint/types/buffer.d.ts +25 -0
- package/lib/providers/pinpoint/types/buffer.js +4 -0
- package/lib/providers/pinpoint/types/index.d.ts +1 -0
- package/lib/providers/pinpoint/types/index.js +19 -0
- package/lib/providers/pinpoint/types/pinpoint.d.ts +40 -0
- package/lib/providers/pinpoint/types/pinpoint.js +4 -0
- package/lib/providers/pinpoint/utils/PinpointEventBuffer.d.ts +23 -0
- package/lib/providers/pinpoint/utils/PinpointEventBuffer.js +278 -0
- package/lib/providers/pinpoint/utils/cacheEndpointId.d.ts +7 -0
- package/lib/providers/pinpoint/utils/cacheEndpointId.js +61 -0
- package/lib/providers/pinpoint/utils/constants.d.ts +4 -0
- package/lib/providers/pinpoint/utils/constants.js +10 -0
- package/lib/providers/pinpoint/utils/getCacheKey.d.ts +7 -0
- package/lib/providers/pinpoint/utils/getCacheKey.js +13 -0
- package/lib/providers/pinpoint/utils/getEndpointId.d.ts +7 -0
- package/lib/providers/pinpoint/utils/getEndpointId.js +62 -0
- package/lib/providers/pinpoint/utils/getEventBuffer.d.ts +8 -0
- package/lib/providers/pinpoint/utils/getEventBuffer.js +48 -0
- package/lib/providers/pinpoint/utils/index.d.ts +3 -0
- package/lib/providers/pinpoint/utils/index.js +11 -0
- package/lib/server.d.ts +1 -0
- package/lib/server.js +7 -0
- package/lib/singleton/Amplify.d.ts +36 -0
- package/lib/singleton/Amplify.js +138 -0
- package/lib/singleton/Analytics/types.d.ts +2 -0
- package/lib/singleton/Analytics/types.js +4 -0
- package/lib/singleton/Auth/index.js +15 -12
- package/lib/singleton/Auth/types.d.ts +28 -3
- package/lib/singleton/Auth/utils/index.d.ts +3 -2
- package/lib/singleton/Auth/utils/index.js +15 -1
- package/lib/singleton/Storage/types.d.ts +6 -2
- package/lib/singleton/apis/fetchAuthSession.d.ts +2 -0
- package/lib/singleton/apis/fetchAuthSession.js +11 -0
- package/lib/singleton/apis/internal/fetchAuthSession.d.ts +3 -0
- package/lib/singleton/apis/internal/fetchAuthSession.js +9 -0
- package/lib/singleton/apis/server/fetchAuthSession.d.ts +3 -0
- package/lib/singleton/apis/server/fetchAuthSession.js +11 -0
- package/lib/singleton/index.d.ts +2 -46
- package/lib/singleton/index.js +7 -144
- package/lib/singleton/types.d.ts +3 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core.d.ts +47 -0
- package/lib/types/core.js +4 -0
- package/lib/types/errors.d.ts +16 -0
- package/lib/types/errors.js +4 -0
- package/lib/types/index.d.ts +4 -1
- package/lib/types/index.js +6 -3
- package/lib/types/logging.d.ts +13 -0
- package/lib/types/logging.js +4 -0
- package/lib/types/storage.d.ts +14 -0
- package/lib/types/storage.js +4 -0
- package/lib-esm/AwsClients/CognitoIdentity/getCredentialsForIdentity.d.ts +1 -1
- package/lib-esm/AwsClients/CognitoIdentity/getId.d.ts +1 -1
- package/lib-esm/AwsClients/Pinpoint/getInAppMessages.d.ts +1 -1
- package/lib-esm/AwsClients/Pinpoint/index.d.ts +1 -1
- package/lib-esm/AwsClients/Pinpoint/putEvents.d.ts +1 -1
- package/lib-esm/AwsClients/Pinpoint/putEvents.js +1 -1
- package/lib-esm/AwsClients/Pinpoint/updateEndpoint.d.ts +1 -1
- package/lib-esm/Cache/AsyncStorageCache.js +1 -1
- package/lib-esm/Cache/BrowserStorageCache.js +1 -1
- package/lib-esm/Cache/InMemoryCache.js +1 -1
- package/lib-esm/Cache/StorageCache.js +2 -2
- package/lib-esm/Cache/Utils/CacheList.js +1 -1
- package/lib-esm/Credentials.js +2 -5
- package/lib-esm/{Hub.d.ts → Hub/index.d.ts} +5 -21
- package/lib-esm/Hub/index.js +148 -0
- package/lib-esm/Hub/types/AuthTypes.d.ts +11 -0
- package/lib-esm/Hub/types/HubTypes.d.ts +28 -0
- package/lib-esm/Hub/types/HubTypes.js +3 -0
- package/lib-esm/Hub/types/index.d.ts +2 -0
- package/lib-esm/Hub/types/index.js +4 -0
- package/lib-esm/I18n/I18n.js +2 -2
- package/lib-esm/I18n/index.js +1 -1
- package/lib-esm/OAuthHelper/FacebookOAuth.js +1 -1
- package/lib-esm/OAuthHelper/GoogleOAuth.js +1 -1
- package/lib-esm/Platform/version.d.ts +1 -1
- package/lib-esm/Platform/version.js +1 -1
- package/lib-esm/RNComponents/index.d.ts +1 -0
- package/lib-esm/RNComponents/index.js +2 -1
- package/lib-esm/RNComponents/isAppInForeground.d.ts +1 -0
- package/lib-esm/RNComponents/isAppInForeground.js +6 -0
- package/lib-esm/ServiceWorker/ServiceWorker.js +3 -3
- package/lib-esm/StorageHelper/localStorage.js +1 -1
- package/lib-esm/StorageHelper/sessionStorage.js +1 -1
- package/lib-esm/UniversalStorage/index.js +1 -1
- package/lib-esm/Util/Constants.d.ts +12 -8
- package/lib-esm/Util/Constants.js +20 -8
- package/lib-esm/{Errors.d.ts → Util/Errors.d.ts} +1 -1
- package/lib-esm/Util/Reachability.js +1 -1
- package/lib-esm/Util/errors/AssertError.js +1 -1
- package/lib-esm/Util/index.d.ts +1 -1
- package/lib-esm/Util/index.js +1 -1
- package/lib-esm/adapterCore/error/AmplifyServerContextError.d.ts +8 -0
- package/lib-esm/adapterCore/error/AmplifyServerContextError.js +32 -0
- package/lib-esm/adapterCore/error/index.d.ts +1 -0
- package/lib-esm/adapterCore/error/index.js +3 -0
- package/lib-esm/adapterCore/index.d.ts +2 -0
- package/lib-esm/adapterCore/index.js +4 -0
- package/lib-esm/adapterCore/serverContext/index.d.ts +2 -0
- package/lib-esm/adapterCore/serverContext/index.js +3 -0
- package/lib-esm/adapterCore/serverContext/serverContext.d.ts +20 -0
- package/lib-esm/adapterCore/serverContext/serverContext.js +36 -0
- package/lib-esm/adapterCore/serverContext/serverContextRegistry.d.ts +6 -0
- package/lib-esm/adapterCore/serverContext/serverContextRegistry.js +21 -0
- package/lib-esm/adapterCore/serverContext/types/amplifyServer.d.ts +16 -0
- package/lib-esm/adapterCore/serverContext/types/amplifyServer.js +3 -0
- package/lib-esm/adapterCore/serverContext/types/cookieStorage.d.ts +31 -0
- package/lib-esm/adapterCore/serverContext/types/cookieStorage.js +3 -0
- package/lib-esm/adapterCore/serverContext/types/index.d.ts +4 -0
- package/lib-esm/adapterCore/serverContext/types/index.js +3 -0
- package/lib-esm/clients/handlers/fetch.js +1 -0
- package/lib-esm/clients/internal/composeServiceApi.d.ts +5 -2
- package/lib-esm/index.d.ts +11 -32
- package/lib-esm/index.js +11 -29
- package/lib-esm/libraryUtils.d.ts +21 -0
- package/lib-esm/libraryUtils.js +33 -0
- package/lib-esm/providers/pinpoint/apis/index.d.ts +2 -0
- package/lib-esm/providers/pinpoint/apis/index.js +4 -0
- package/lib-esm/providers/pinpoint/apis/record.d.ts +5 -0
- package/lib-esm/providers/pinpoint/apis/record.js +116 -0
- package/lib-esm/providers/pinpoint/apis/updateEndpoint.d.ts +5 -0
- package/lib-esm/providers/pinpoint/apis/updateEndpoint.js +116 -0
- package/lib-esm/providers/pinpoint/index.d.ts +2 -0
- package/lib-esm/providers/pinpoint/index.js +3 -0
- package/lib-esm/providers/pinpoint/types/buffer.d.ts +25 -0
- package/lib-esm/providers/pinpoint/types/buffer.js +3 -0
- package/lib-esm/providers/pinpoint/types/index.d.ts +1 -0
- package/lib-esm/providers/pinpoint/types/index.js +3 -0
- package/lib-esm/providers/pinpoint/types/pinpoint.d.ts +40 -0
- package/lib-esm/providers/pinpoint/types/pinpoint.js +3 -0
- package/lib-esm/providers/pinpoint/utils/PinpointEventBuffer.d.ts +23 -0
- package/lib-esm/providers/pinpoint/utils/PinpointEventBuffer.js +275 -0
- package/lib-esm/providers/pinpoint/utils/cacheEndpointId.d.ts +7 -0
- package/lib-esm/providers/pinpoint/utils/cacheEndpointId.js +57 -0
- package/lib-esm/providers/pinpoint/utils/constants.d.ts +4 -0
- package/lib-esm/providers/pinpoint/utils/constants.js +7 -0
- package/lib-esm/providers/pinpoint/utils/getCacheKey.d.ts +7 -0
- package/lib-esm/providers/pinpoint/utils/getCacheKey.js +9 -0
- package/lib-esm/providers/pinpoint/utils/getEndpointId.d.ts +7 -0
- package/lib-esm/providers/pinpoint/utils/getEndpointId.js +58 -0
- package/lib-esm/providers/pinpoint/utils/getEventBuffer.d.ts +8 -0
- package/lib-esm/providers/pinpoint/utils/getEventBuffer.js +44 -0
- package/lib-esm/providers/pinpoint/utils/index.d.ts +3 -0
- package/lib-esm/providers/pinpoint/utils/index.js +5 -0
- package/lib-esm/server.d.ts +1 -0
- package/lib-esm/server.js +3 -0
- package/lib-esm/singleton/Amplify.d.ts +36 -0
- package/lib-esm/singleton/Amplify.js +135 -0
- package/lib-esm/singleton/Analytics/types.d.ts +2 -0
- package/lib-esm/singleton/Analytics/types.js +3 -0
- package/lib-esm/singleton/Auth/index.js +14 -11
- package/lib-esm/singleton/Auth/types.d.ts +28 -3
- package/lib-esm/singleton/Auth/utils/index.d.ts +3 -2
- package/lib-esm/singleton/Auth/utils/index.js +13 -0
- package/lib-esm/singleton/Storage/types.d.ts +6 -2
- package/lib-esm/singleton/apis/fetchAuthSession.d.ts +2 -0
- package/lib-esm/singleton/apis/fetchAuthSession.js +7 -0
- package/lib-esm/singleton/apis/internal/fetchAuthSession.d.ts +3 -0
- package/lib-esm/singleton/apis/internal/fetchAuthSession.js +5 -0
- package/lib-esm/singleton/apis/server/fetchAuthSession.d.ts +3 -0
- package/lib-esm/singleton/apis/server/fetchAuthSession.js +7 -0
- package/lib-esm/singleton/index.d.ts +2 -46
- package/lib-esm/singleton/index.js +2 -141
- package/lib-esm/singleton/types.d.ts +3 -1
- package/lib-esm/tsconfig.tsbuildinfo +1 -1
- package/lib-esm/types/core.d.ts +47 -0
- package/lib-esm/types/core.js +3 -0
- package/lib-esm/types/errors.d.ts +16 -0
- package/lib-esm/types/errors.js +3 -0
- package/lib-esm/types/index.d.ts +4 -1
- package/lib-esm/types/index.js +4 -1
- package/lib-esm/types/logging.d.ts +13 -0
- package/lib-esm/types/logging.js +3 -0
- package/lib-esm/types/storage.d.ts +14 -0
- package/lib-esm/types/storage.js +3 -0
- package/package.json +15 -12
- package/server/package.json +8 -0
- package/src/AwsClients/Pinpoint/index.ts +1 -1
- package/src/AwsClients/Pinpoint/putEvents.ts +1 -1
- package/src/Cache/AsyncStorageCache.ts +1 -1
- package/src/Cache/BrowserStorageCache.ts +1 -1
- package/src/Cache/InMemoryCache.ts +1 -1
- package/src/Cache/StorageCache.ts +2 -2
- package/src/Cache/Utils/CacheList.ts +1 -1
- package/src/Credentials.ts +2 -8
- package/src/Hub/index.ts +204 -0
- package/src/Hub/types/AuthTypes.ts +10 -0
- package/src/Hub/types/HubTypes.ts +46 -0
- package/src/{Providers → Hub/types}/index.ts +3 -1
- package/src/I18n/I18n.ts +2 -2
- package/src/I18n/index.ts +1 -1
- package/src/Logger/ConsoleLogger.ts +1 -2
- package/src/OAuthHelper/FacebookOAuth.ts +1 -1
- package/src/OAuthHelper/GoogleOAuth.ts +1 -1
- package/src/Platform/version.ts +1 -1
- package/src/RNComponents/index.ts +2 -1
- package/src/RNComponents/isAppInForeground.ts +8 -0
- package/src/ServiceWorker/ServiceWorker.ts +3 -3
- package/src/StorageHelper/localStorage.ts +1 -1
- package/src/StorageHelper/sessionStorage.ts +1 -1
- package/src/UniversalStorage/index.ts +1 -1
- package/src/Util/Constants.ts +25 -16
- package/src/{Errors.ts → Util/Errors.ts} +1 -1
- package/src/Util/Reachability.ts +1 -1
- package/src/Util/errors/AssertError.ts +1 -1
- package/src/Util/index.ts +0 -4
- package/src/adapterCore/error/AmplifyServerContextError.ts +23 -0
- package/src/adapterCore/error/index.ts +4 -0
- package/src/adapterCore/index.ts +11 -0
- package/src/adapterCore/serverContext/index.ts +10 -0
- package/src/adapterCore/serverContext/serverContext.ts +54 -0
- package/src/adapterCore/serverContext/serverContextRegistry.ts +31 -0
- package/src/adapterCore/serverContext/types/amplifyServer.ts +29 -0
- package/src/adapterCore/serverContext/types/cookieStorage.ts +43 -0
- package/src/adapterCore/serverContext/types/index.ts +9 -0
- package/src/clients/handlers/fetch.ts +1 -0
- package/src/clients/internal/composeServiceApi.ts +13 -4
- package/src/index.ts +40 -120
- package/src/libraryUtils.ts +102 -0
- package/src/providers/pinpoint/apis/index.ts +5 -0
- package/src/providers/pinpoint/apis/record.ts +90 -0
- package/src/providers/pinpoint/apis/updateEndpoint.ts +82 -0
- package/src/providers/pinpoint/index.ts +5 -0
- package/src/providers/pinpoint/types/buffer.ts +32 -0
- package/{lib-esm/Providers/index.js → src/providers/pinpoint/types/index.ts} +2 -1
- package/src/providers/pinpoint/types/pinpoint.ts +55 -0
- package/src/providers/pinpoint/utils/PinpointEventBuffer.ts +248 -0
- package/src/providers/pinpoint/utils/cacheEndpointId.ts +27 -0
- package/src/providers/pinpoint/utils/constants.ts +8 -0
- package/src/providers/pinpoint/utils/getCacheKey.ts +16 -0
- package/src/providers/pinpoint/utils/getEndpointId.ts +20 -0
- package/src/providers/pinpoint/utils/getEventBuffer.ts +60 -0
- package/src/providers/pinpoint/utils/index.ts +6 -0
- package/src/server.ts +4 -0
- package/src/singleton/Amplify.ts +121 -0
- package/src/singleton/Analytics/types.ts +6 -0
- package/src/singleton/Auth/index.ts +7 -5
- package/src/singleton/Auth/types.ts +38 -6
- package/src/singleton/Auth/utils/index.ts +27 -1
- package/src/singleton/Storage/types.ts +6 -3
- package/src/singleton/apis/fetchAuthSession.ts +12 -0
- package/src/singleton/apis/internal/fetchAuthSession.ts +12 -0
- package/src/singleton/apis/server/fetchAuthSession.ts +16 -0
- package/src/singleton/index.ts +2 -128
- package/src/singleton/types.ts +4 -4
- package/src/types/core.ts +58 -0
- package/src/types/errors.ts +21 -0
- package/src/types/index.ts +5 -1
- package/src/types/logging.ts +24 -0
- package/src/types/storage.ts +19 -0
- package/lib/Hub.js +0 -220
- package/lib/Providers/AWSCloudWatchProvider.d.ts +0 -34
- package/lib/Providers/AWSCloudWatchProvider.js +0 -619
- package/lib/Providers/index.d.ts +0 -1
- package/lib/Providers/index.js +0 -7
- package/lib/constants.d.ts +0 -9
- package/lib/constants.js +0 -22
- package/lib/types/types.d.ts +0 -76
- package/lib-esm/Hub.js +0 -217
- package/lib-esm/Providers/AWSCloudWatchProvider.d.ts +0 -34
- package/lib-esm/Providers/AWSCloudWatchProvider.js +0 -616
- package/lib-esm/Providers/index.d.ts +0 -1
- package/lib-esm/constants.d.ts +0 -9
- package/lib-esm/constants.js +0 -19
- package/lib-esm/types/types.d.ts +0 -76
- package/src/Hub.ts +0 -236
- package/src/Providers/AWSCloudWatchProvider.ts +0 -540
- package/src/constants.ts +0 -31
- package/src/types/types.ts +0 -104
- /package/lib/{types/types.js → Hub/types/AuthTypes.js} +0 -0
- /package/lib/{Errors.js → Util/Errors.js} +0 -0
- /package/lib/{JS.d.ts → Util/JS.d.ts} +0 -0
- /package/lib/{JS.js → Util/JS.js} +0 -0
- /package/lib-esm/{types/types.js → Hub/types/AuthTypes.js} +0 -0
- /package/lib-esm/{Errors.js → Util/Errors.js} +0 -0
- /package/lib-esm/{JS.d.ts → Util/JS.d.ts} +0 -0
- /package/lib-esm/{JS.js → Util/JS.js} +0 -0
- /package/src/{JS.ts → Util/JS.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { ConsoleLogger as Logger } from '../Logger';
|
|
4
|
-
import { browserOrNode } from '../JS';
|
|
4
|
+
import { browserOrNode } from '../Util/JS';
|
|
5
5
|
import { NonRetryableError } from '../Util';
|
|
6
6
|
|
|
7
7
|
const logger = new Logger('CognitoCredentials');
|
package/src/Platform/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by genversion
|
|
2
|
-
export const version = '6.0.1-console-preview.
|
|
2
|
+
export const version = '6.0.1-console-preview.5dc0b68.0+5dc0b68';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { browserOrNode } from '../JS';
|
|
4
|
+
import { browserOrNode } from '../Util/JS';
|
|
5
5
|
import { StorageHelper } from '../StorageHelper';
|
|
6
6
|
|
|
7
7
|
export const Linking = {};
|
|
8
8
|
export const AppState = {
|
|
9
9
|
addEventListener: (action: any, handler: any) => undefined,
|
|
10
|
+
currentState: 'active'
|
|
10
11
|
};
|
|
11
12
|
|
|
12
13
|
// if not in react native, just use local storage
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
* and limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
import { ConsoleLogger as Logger } from '../Logger';
|
|
16
|
-
import { browserOrNode } from '../JS';
|
|
16
|
+
import { browserOrNode } from '../Util/JS';
|
|
17
17
|
import { Amplify } from '../Amplify';
|
|
18
18
|
import { asserts } from '../Util/errors/AssertError';
|
|
19
|
-
import { AmplifyError } from '../Errors';
|
|
20
|
-
import { SERVICE_WORKER_EXCEPTION } from '../
|
|
19
|
+
import { AmplifyError } from '../Util/Errors';
|
|
20
|
+
import { SERVICE_WORKER_EXCEPTION } from '../Util/Constants';
|
|
21
21
|
/**
|
|
22
22
|
* Provides a means to registering a service worker in the browser
|
|
23
23
|
* and communicating with it via postMessage events.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
import { KeyValueStorageInterface } from "../types";
|
|
5
|
-
import { PlatformNotSupportedError } from '../Errors';
|
|
5
|
+
import { PlatformNotSupportedError } from '../Util/Errors';
|
|
6
6
|
|
|
7
7
|
class LocalStorageClass implements KeyValueStorageInterface {
|
|
8
8
|
storage?: Storage;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { PlatformNotSupportedError } from '../Errors';
|
|
4
|
+
import { PlatformNotSupportedError } from '../Util/Errors';
|
|
5
5
|
import { KeyValueStorageInterface } from '../types';
|
|
6
6
|
|
|
7
7
|
class SessionStorageClass implements KeyValueStorageInterface {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import Cookies, { CookieSetOptions } from 'universal-cookie';
|
|
4
|
-
import { browserOrNode } from '../JS';
|
|
4
|
+
import { browserOrNode } from '../Util/JS';
|
|
5
5
|
|
|
6
6
|
type Store = Record<string, string>;
|
|
7
7
|
|
package/src/Util/Constants.ts
CHANGED
|
@@ -2,23 +2,32 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
// Logging constants
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const AWS_CLOUDWATCH_CATEGORY = 'Logging';
|
|
9
|
-
const AWS_CLOUDWATCH_PROVIDER_NAME = 'AWSCloudWatch';
|
|
10
|
-
const NO_CREDS_ERROR_STRING = 'No credentials';
|
|
11
|
-
const RETRY_ERROR_CODES = [
|
|
5
|
+
export const AWS_CLOUDWATCH_CATEGORY = 'Logging';
|
|
6
|
+
export const NO_CREDS_ERROR_STRING = 'No credentials';
|
|
7
|
+
export const RETRY_ERROR_CODES = [
|
|
12
8
|
'ResourceNotFoundException',
|
|
13
9
|
'InvalidSequenceTokenException',
|
|
14
10
|
];
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
/**
|
|
13
|
+
* This Symbol is used to reference an internal-only PubSub provider that
|
|
14
|
+
* is used for AppSync/GraphQL subscriptions in the API category.
|
|
15
|
+
*/
|
|
16
|
+
const hasSymbol =
|
|
17
|
+
typeof Symbol !== 'undefined' && typeof Symbol.for === 'function';
|
|
18
|
+
|
|
19
|
+
export const INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER = hasSymbol
|
|
20
|
+
? Symbol.for('INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER')
|
|
21
|
+
: '@@INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER';
|
|
22
|
+
|
|
23
|
+
export const USER_AGENT_HEADER = 'x-amz-user-agent';
|
|
24
|
+
|
|
25
|
+
// Error exception code constants
|
|
26
|
+
export const AUTH_CONFING_EXCEPTION = 'AuthConfigException';
|
|
27
|
+
export const CACHE_LIST_EXCEPTION = 'CacheListException';
|
|
28
|
+
export const I18N_EXCEPTION = 'I18NException';
|
|
29
|
+
export const SERVICE_WORKER_EXCEPTION = 'ServiceWorkerException';
|
|
30
|
+
export const STORAGE_CACHE_EXCEPTION = 'StorageCacheException';
|
|
31
|
+
export const APPLICATION_ID_EXCEPTION = 'ApplicationIdException';
|
|
32
|
+
export const NO_HUBCALLBACK_PROVIDED_EXCEPTION =
|
|
33
|
+
'NoHubcallbackProvidedException';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { ErrorParams } from '
|
|
4
|
+
import { ErrorParams } from '../types/errors';
|
|
5
5
|
|
|
6
6
|
export function missingConfig(name: string) {
|
|
7
7
|
return new Error('Missing config value of ' + name);
|
package/src/Util/Reachability.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import Observable, { ZenObservable } from 'zen-observable-ts';
|
|
4
|
-
import { browserOrNode, isWebWorker } from '
|
|
4
|
+
import { browserOrNode, isWebWorker } from './JS';
|
|
5
5
|
|
|
6
6
|
type NetworkStatus = {
|
|
7
7
|
online: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { AmplifyError } from '
|
|
3
|
+
import { AmplifyError } from '../Errors';
|
|
4
4
|
import { ErrorParams } from '../../types';
|
|
5
5
|
|
|
6
6
|
export function asserts(
|
package/src/Util/index.ts
CHANGED
|
@@ -12,11 +12,7 @@ export { default as Reachability } from './Reachability';
|
|
|
12
12
|
export { DateUtils } from './DateUtils';
|
|
13
13
|
export { urlSafeDecode, urlSafeEncode } from './StringUtils';
|
|
14
14
|
export {
|
|
15
|
-
AWS_CLOUDWATCH_BASE_BUFFER_SIZE,
|
|
16
15
|
AWS_CLOUDWATCH_CATEGORY,
|
|
17
|
-
AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE,
|
|
18
|
-
AWS_CLOUDWATCH_MAX_EVENT_SIZE,
|
|
19
|
-
AWS_CLOUDWATCH_PROVIDER_NAME,
|
|
20
16
|
NO_CREDS_ERROR_STRING,
|
|
21
17
|
RETRY_ERROR_CODES,
|
|
22
18
|
} from './Constants';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { AmplifyError } from '../../libraryUtils';
|
|
5
|
+
|
|
6
|
+
export class AmplifyServerContextError extends AmplifyError {
|
|
7
|
+
constructor({
|
|
8
|
+
message,
|
|
9
|
+
recoverySuggestion,
|
|
10
|
+
underlyingError,
|
|
11
|
+
}: {
|
|
12
|
+
message: string;
|
|
13
|
+
recoverySuggestion?: string;
|
|
14
|
+
underlyingError?: Error;
|
|
15
|
+
}) {
|
|
16
|
+
super({
|
|
17
|
+
name: 'AmplifyServerContextError',
|
|
18
|
+
message,
|
|
19
|
+
recoverySuggestion,
|
|
20
|
+
underlyingError,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
export {
|
|
5
|
+
createAmplifyServerContext,
|
|
6
|
+
getAmplifyServerContext,
|
|
7
|
+
destroyAmplifyServerContext,
|
|
8
|
+
AmplifyServer,
|
|
9
|
+
CookieStorage,
|
|
10
|
+
} from './serverContext';
|
|
11
|
+
export { AmplifyServerContextError } from './error';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
export {
|
|
5
|
+
createAmplifyServerContext,
|
|
6
|
+
destroyAmplifyServerContext,
|
|
7
|
+
getAmplifyServerContext,
|
|
8
|
+
} from './serverContext';
|
|
9
|
+
|
|
10
|
+
export { AmplifyServer, CookieStorage } from './types';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { AmplifyServer } from './types';
|
|
5
|
+
import { serverContextRegistry } from './serverContextRegistry';
|
|
6
|
+
import { AmplifyClass } from '../../singleton';
|
|
7
|
+
import { LibraryOptions, ResourcesConfig } from '../../singleton/types';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Creates an Amplify server context.
|
|
11
|
+
* @param amplifyConfig The Amplify resource config.
|
|
12
|
+
* @param libraryOptions The Amplify library options.
|
|
13
|
+
* @returns The Amplify server context spec.
|
|
14
|
+
*/
|
|
15
|
+
export const createAmplifyServerContext = (
|
|
16
|
+
amplifyConfig: ResourcesConfig,
|
|
17
|
+
libraryOptions: LibraryOptions
|
|
18
|
+
): AmplifyServer.ContextSpec => {
|
|
19
|
+
const amplify = new AmplifyClass();
|
|
20
|
+
amplify.configure(amplifyConfig, libraryOptions);
|
|
21
|
+
|
|
22
|
+
return serverContextRegistry.register({
|
|
23
|
+
amplify,
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Returns an Amplify server context.
|
|
29
|
+
* @param contextSpec The context spec used to get the Amplify server context.
|
|
30
|
+
* @returns The Amplify server context.
|
|
31
|
+
*/
|
|
32
|
+
export const getAmplifyServerContext = (
|
|
33
|
+
contextSpec: AmplifyServer.ContextSpec
|
|
34
|
+
): AmplifyServer.Context => {
|
|
35
|
+
const context = serverContextRegistry.get(contextSpec);
|
|
36
|
+
|
|
37
|
+
if (context) {
|
|
38
|
+
return context;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
throw new Error(
|
|
42
|
+
'Attempted to get the Amplify Server Context that may have been destroyed.'
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Destroys an Amplify server context.
|
|
48
|
+
* @param contextSpec The context spec used to destroy the Amplify server context.
|
|
49
|
+
*/
|
|
50
|
+
export const destroyAmplifyServerContext = (
|
|
51
|
+
contextSpec: AmplifyServer.ContextSpec
|
|
52
|
+
): void => {
|
|
53
|
+
serverContextRegistry.deregister(contextSpec);
|
|
54
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { AmplifyServer } from './types';
|
|
5
|
+
|
|
6
|
+
const storage = new WeakMap<
|
|
7
|
+
AmplifyServer.ContextToken,
|
|
8
|
+
AmplifyServer.Context
|
|
9
|
+
>();
|
|
10
|
+
|
|
11
|
+
function createToken(): AmplifyServer.ContextToken {
|
|
12
|
+
return {
|
|
13
|
+
value: Symbol('AmplifyServerContextToken'),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const serverContextRegistry = {
|
|
18
|
+
register(context: AmplifyServer.Context): AmplifyServer.ContextSpec {
|
|
19
|
+
const token = createToken();
|
|
20
|
+
storage.set(token, context);
|
|
21
|
+
return { token };
|
|
22
|
+
},
|
|
23
|
+
deregister(contextSpec: AmplifyServer.ContextSpec): boolean {
|
|
24
|
+
return storage.delete(contextSpec.token);
|
|
25
|
+
},
|
|
26
|
+
get(
|
|
27
|
+
contextSpec: AmplifyServer.ContextSpec
|
|
28
|
+
): AmplifyServer.Context | undefined {
|
|
29
|
+
return storage.get(contextSpec.token);
|
|
30
|
+
},
|
|
31
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { AmplifyClass } from '../../../singleton';
|
|
5
|
+
import { LibraryOptions, ResourcesConfig } from '../../../singleton/types';
|
|
6
|
+
|
|
7
|
+
export namespace AmplifyServer {
|
|
8
|
+
export type ContextToken = {
|
|
9
|
+
readonly value: Symbol;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type ContextSpec = {
|
|
13
|
+
readonly token: ContextToken;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type Context = {
|
|
17
|
+
amplify: AmplifyClass;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export interface RunOperationWithContext {
|
|
21
|
+
<Result>(
|
|
22
|
+
amplifyConfig: ResourcesConfig,
|
|
23
|
+
libraryOptions: LibraryOptions,
|
|
24
|
+
operation: (
|
|
25
|
+
contextSpec: AmplifyServer.ContextSpec
|
|
26
|
+
) => Result | Promise<Result>
|
|
27
|
+
): Promise<Result>;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { CookieSerializeOptions } from 'cookie';
|
|
5
|
+
|
|
6
|
+
export namespace CookieStorage {
|
|
7
|
+
export type SetCookieOptions = Pick<
|
|
8
|
+
CookieSerializeOptions,
|
|
9
|
+
'domain' | 'expires' | 'httpOnly' | 'maxAge' | 'sameSite' | 'secure'
|
|
10
|
+
>;
|
|
11
|
+
|
|
12
|
+
export type Cookie = {
|
|
13
|
+
name: string;
|
|
14
|
+
value?: string;
|
|
15
|
+
} & SetCookieOptions;
|
|
16
|
+
|
|
17
|
+
export interface Adapter {
|
|
18
|
+
/**
|
|
19
|
+
* Get all cookies from the storage.
|
|
20
|
+
*/
|
|
21
|
+
getAll(): Cookie[];
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Get a cookie from the storage.
|
|
25
|
+
* @param name The name of the cookie.
|
|
26
|
+
*/
|
|
27
|
+
get(name: string): Cookie | undefined;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Set a cookie in the storage.
|
|
31
|
+
* @param name The name of the cookie.
|
|
32
|
+
* @param value The value of the cookie.
|
|
33
|
+
* @param [options] The cookie's options.
|
|
34
|
+
*/
|
|
35
|
+
set(name: string, value: string, options?: SetCookieOptions): void;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Delete a cookie from the storage.
|
|
39
|
+
* @param name The name of the cookie.
|
|
40
|
+
*/
|
|
41
|
+
delete(name: string): void;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { AmplifyServer } from './amplifyServer';
|
|
5
|
+
|
|
6
|
+
type AmplifyServerContextSpec = AmplifyServer.ContextSpec;
|
|
7
|
+
|
|
8
|
+
export { AmplifyServerContextSpec, AmplifyServer };
|
|
9
|
+
export { CookieStorage } from './cookieStorage';
|
|
@@ -9,6 +9,7 @@ import { withMemoization } from '../utils/memoization';
|
|
|
9
9
|
const shouldSendBody = (method: string) =>
|
|
10
10
|
!['HEAD', 'GET', 'DELETE'].includes(method.toUpperCase());
|
|
11
11
|
|
|
12
|
+
// TODO[AllanZhengYP]: we need to provide isCanceledError utility
|
|
12
13
|
export const fetchTransferHandler: TransferHandler<
|
|
13
14
|
HttpRequest,
|
|
14
15
|
HttpResponse,
|
|
@@ -9,7 +9,7 @@ export const composeServiceApi = <
|
|
|
9
9
|
TransferHandlerOptions,
|
|
10
10
|
Input,
|
|
11
11
|
Output,
|
|
12
|
-
DefaultConfig
|
|
12
|
+
DefaultConfig
|
|
13
13
|
>(
|
|
14
14
|
transferHandler: TransferHandler<
|
|
15
15
|
HttpRequest,
|
|
@@ -21,11 +21,14 @@ export const composeServiceApi = <
|
|
|
21
21
|
endpoint: Endpoint
|
|
22
22
|
) => Promise<HttpRequest> | HttpRequest,
|
|
23
23
|
deserializer: (output: HttpResponse) => Promise<Output>,
|
|
24
|
-
defaultConfig: DefaultConfig
|
|
24
|
+
defaultConfig: Partial<DefaultConfig>
|
|
25
25
|
) => {
|
|
26
26
|
return async (
|
|
27
27
|
config: OptionalizeKey<
|
|
28
|
-
TransferHandlerOptions &
|
|
28
|
+
TransferHandlerOptions &
|
|
29
|
+
ServiceClientOptions &
|
|
30
|
+
Partial<DefaultConfig> &
|
|
31
|
+
InferEndpointResolverOptionType<DefaultConfig>,
|
|
29
32
|
keyof DefaultConfig
|
|
30
33
|
>,
|
|
31
34
|
input: Input
|
|
@@ -51,6 +54,12 @@ export const composeServiceApi = <
|
|
|
51
54
|
};
|
|
52
55
|
};
|
|
53
56
|
|
|
54
|
-
type OptionalizeKey<T, K> = Omit<T, K
|
|
57
|
+
type OptionalizeKey<T, K extends keyof T> = Omit<T, K> & {
|
|
55
58
|
[P in K & keyof T]?: T[P];
|
|
56
59
|
};
|
|
60
|
+
|
|
61
|
+
type InferEndpointResolverOptionType<T> = T extends {
|
|
62
|
+
endpointResolver: (options: infer EndpointOptions) => any;
|
|
63
|
+
}
|
|
64
|
+
? EndpointOptions
|
|
65
|
+
: never;
|
package/src/index.ts
CHANGED
|
@@ -1,127 +1,20 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export { AmplifyClass } from './Amplify';
|
|
4
|
+
/*
|
|
5
|
+
This file maps top-level exports from `@aws-amplify/core`. These are intended to be potentially customer-facing exports.
|
|
6
|
+
*/
|
|
7
|
+
// TODO Remove these
|
|
9
8
|
export { ClientDevice } from './ClientDevice';
|
|
10
9
|
export { ConsoleLogger, ConsoleLogger as Logger } from './Logger';
|
|
11
|
-
export {
|
|
12
|
-
|
|
13
|
-
missingConfig,
|
|
14
|
-
AmplifyError,
|
|
15
|
-
AmplifyErrorString,
|
|
16
|
-
} from './Errors';
|
|
17
|
-
export { Hub, HubCapsule, HubCallback, HubPayload } from './Hub';
|
|
18
|
-
export { I18n } from './I18n';
|
|
19
|
-
export {
|
|
20
|
-
browserOrNode,
|
|
21
|
-
filenameToContentType,
|
|
22
|
-
generateRandomString,
|
|
23
|
-
isEmpty,
|
|
24
|
-
isStrictObject,
|
|
25
|
-
isTextFile,
|
|
26
|
-
isWebWorker,
|
|
27
|
-
makeQuerablePromise,
|
|
28
|
-
objectLessAttributes,
|
|
29
|
-
sortByField,
|
|
30
|
-
transferKeyToLowerCase,
|
|
31
|
-
transferKeyToUpperCase,
|
|
32
|
-
} from './JS';
|
|
33
|
-
export { Signer } from './Signer';
|
|
34
|
-
export { parseAWSExports } from './parseAWSExports';
|
|
35
|
-
export { AWSCloudWatchProvider } from './Providers';
|
|
10
|
+
export { Hub } from './Hub';
|
|
11
|
+
export { HubCapsule, HubCallback, HubPayload } from './Hub/types';
|
|
36
12
|
export { FacebookOAuth, GoogleOAuth } from './OAuthHelper';
|
|
37
13
|
export { AppState, AsyncStorage, Linking } from './RNComponents';
|
|
38
14
|
export { Credentials, CredentialsClass } from './Credentials';
|
|
39
|
-
export {
|
|
40
|
-
export {
|
|
41
|
-
ICredentials,
|
|
42
|
-
ErrorParams,
|
|
43
|
-
AmplifyErrorMap,
|
|
44
|
-
ServiceError,
|
|
45
|
-
KeyValueStorageInterface,
|
|
46
|
-
} from './types';
|
|
47
|
-
export {
|
|
48
|
-
StorageHelper,
|
|
49
|
-
MemoryStorage,
|
|
50
|
-
LocalStorage,
|
|
51
|
-
CookieStorage,
|
|
52
|
-
SessionStorage,
|
|
53
|
-
MemoryKeyValueStorage,
|
|
54
|
-
} from './StorageHelper';
|
|
55
|
-
export { UniversalStorage } from './UniversalStorage';
|
|
56
|
-
export {
|
|
57
|
-
Platform,
|
|
58
|
-
getAmplifyUserAgentObject,
|
|
59
|
-
getAmplifyUserAgent,
|
|
60
|
-
} from './Platform';
|
|
61
|
-
export {
|
|
62
|
-
ApiAction,
|
|
63
|
-
AuthAction,
|
|
64
|
-
AnalyticsAction,
|
|
65
|
-
Category,
|
|
66
|
-
CustomUserAgentDetails,
|
|
67
|
-
DataStoreAction,
|
|
68
|
-
Framework,
|
|
69
|
-
GeoAction,
|
|
70
|
-
InteractionsAction,
|
|
71
|
-
InAppMessagingAction,
|
|
72
|
-
PredictionsAction,
|
|
73
|
-
PubSubAction,
|
|
74
|
-
PushNotificationAction,
|
|
75
|
-
StorageAction,
|
|
76
|
-
} from './Platform/types';
|
|
77
|
-
export {
|
|
78
|
-
INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER,
|
|
79
|
-
USER_AGENT_HEADER,
|
|
80
|
-
} from './constants';
|
|
81
|
-
|
|
82
|
-
export const Constants = {
|
|
83
|
-
userAgent: Platform.userAgent,
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export {
|
|
87
|
-
AWS_CLOUDWATCH_BASE_BUFFER_SIZE,
|
|
88
|
-
AWS_CLOUDWATCH_CATEGORY,
|
|
89
|
-
AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE,
|
|
90
|
-
AWS_CLOUDWATCH_MAX_EVENT_SIZE,
|
|
91
|
-
AWS_CLOUDWATCH_PROVIDER_NAME,
|
|
92
|
-
BackgroundManagerNotOpenError,
|
|
93
|
-
BackgroundProcessManager,
|
|
94
|
-
BackgroundProcessManagerState,
|
|
95
|
-
DateUtils,
|
|
96
|
-
Mutex,
|
|
97
|
-
NO_CREDS_ERROR_STRING,
|
|
98
|
-
NonRetryableError,
|
|
99
|
-
RETRY_ERROR_CODES,
|
|
100
|
-
Reachability,
|
|
101
|
-
isNonRetryableError,
|
|
102
|
-
jitteredBackoff,
|
|
103
|
-
jitteredExponentialRetry,
|
|
104
|
-
retry,
|
|
105
|
-
urlSafeDecode,
|
|
106
|
-
urlSafeEncode,
|
|
107
|
-
} from './Util';
|
|
108
|
-
|
|
109
|
-
// Cache exports
|
|
110
|
-
import { BrowserStorageCache } from './Cache/BrowserStorageCache';
|
|
111
|
-
export { asserts } from './Util/errors/AssertError';
|
|
112
|
-
export { isTokenExpired } from './singleton/Auth';
|
|
113
|
-
export { InMemoryCache } from './Cache/InMemoryCache';
|
|
114
|
-
export { CacheConfig } from './Cache/types';
|
|
115
|
-
export { ICache } from './Cache/types';
|
|
116
|
-
export { BrowserStorageCache };
|
|
117
|
-
export { BrowserStorageCache as Cache }; // Maintain interoperability with React Native
|
|
15
|
+
export { ICredentials } from './types';
|
|
118
16
|
|
|
119
17
|
// Singleton exports
|
|
120
|
-
export {
|
|
121
|
-
decodeJWT,
|
|
122
|
-
assertTokenProviderConfig,
|
|
123
|
-
assertIdentityPooIdConfig,
|
|
124
|
-
} from './singleton/Auth/utils';
|
|
125
18
|
export {
|
|
126
19
|
TokenProvider,
|
|
127
20
|
AuthTokens,
|
|
@@ -129,6 +22,7 @@ export {
|
|
|
129
22
|
AWSCredentialsAndIdentityIdProvider,
|
|
130
23
|
AWSCredentialsAndIdentityId,
|
|
131
24
|
Identity,
|
|
25
|
+
OAuthConfig,
|
|
132
26
|
} from './singleton/Auth/types';
|
|
133
27
|
export {
|
|
134
28
|
AuthConfig,
|
|
@@ -137,7 +31,14 @@ export {
|
|
|
137
31
|
StorageAccessLevel,
|
|
138
32
|
StorageConfig,
|
|
139
33
|
GetCredentialsOptions,
|
|
34
|
+
ResourcesConfig,
|
|
35
|
+
LibraryOptions,
|
|
140
36
|
} from './singleton/types';
|
|
37
|
+
export {
|
|
38
|
+
Amplify,
|
|
39
|
+
fetchAuthSession,
|
|
40
|
+
AmplifyClass as AmplifyClassV6,
|
|
41
|
+
} from './singleton';
|
|
141
42
|
|
|
142
43
|
// AWSClients exports
|
|
143
44
|
export {
|
|
@@ -147,10 +48,29 @@ export {
|
|
|
147
48
|
GetCredentialsForIdentityOutput,
|
|
148
49
|
} from './AwsClients/CognitoIdentity';
|
|
149
50
|
|
|
150
|
-
|
|
151
|
-
export {
|
|
51
|
+
// Amplify-wide constructs
|
|
52
|
+
export { UserProfile } from './types';
|
|
152
53
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
54
|
+
// Storage helpers
|
|
55
|
+
export {
|
|
56
|
+
StorageHelper,
|
|
57
|
+
MemoryStorage,
|
|
58
|
+
LocalStorage,
|
|
59
|
+
CookieStorage,
|
|
60
|
+
SessionStorage,
|
|
61
|
+
MemoryKeyValueStorage,
|
|
62
|
+
} from './StorageHelper';
|
|
63
|
+
export { KeyValueStorageInterface } from './types';
|
|
64
|
+
export { UniversalStorage } from './UniversalStorage';
|
|
65
|
+
|
|
66
|
+
// Cache exports
|
|
67
|
+
import { BrowserStorageCache } from './Cache/BrowserStorageCache';
|
|
68
|
+
export { InMemoryCache } from './Cache/InMemoryCache';
|
|
69
|
+
export { CacheConfig } from './Cache/types';
|
|
70
|
+
export { BrowserStorageCache };
|
|
71
|
+
export { BrowserStorageCache as Cache }; // Maintain interoperability with React Native
|
|
72
|
+
|
|
73
|
+
// Internationalization utilities
|
|
74
|
+
export { I18n } from './I18n';
|
|
75
|
+
|
|
76
|
+
export { parseAWSExports } from './parseAWSExports';
|