@aws-amplify/core 4.7.12 → 4.7.13-unstable.2
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/CHANGELOG.md +0 -8
- package/lib/.tsbuildinfo +3 -0
- package/lib/Amplify.d.ts +28 -0
- package/lib/Amplify.js +3 -21
- package/lib/Amplify.js.map +1 -1
- package/lib/ClientDevice/android.d.ts +5 -0
- package/lib/ClientDevice/android.js +2 -12
- package/lib/ClientDevice/android.js.map +1 -1
- package/lib/ClientDevice/browser.d.ts +25 -0
- package/lib/ClientDevice/browser.js +2 -12
- package/lib/ClientDevice/browser.js.map +1 -1
- package/lib/ClientDevice/index.d.ts +23 -0
- package/lib/ClientDevice/index.js +2 -16
- package/lib/ClientDevice/index.js.map +1 -1
- package/lib/ClientDevice/ios.d.ts +7 -0
- package/lib/ClientDevice/ios.js +2 -12
- package/lib/ClientDevice/ios.js.map +1 -1
- package/lib/ClientDevice/reactnative.d.ts +7 -0
- package/lib/ClientDevice/reactnative.js +2 -16
- package/lib/ClientDevice/reactnative.js.map +1 -1
- package/lib/Credentials.d.ts +47 -0
- package/lib/Credentials.js +52 -86
- package/lib/Credentials.js.map +1 -1
- package/lib/Errors.d.ts +2 -0
- package/lib/Errors.js +2 -12
- package/lib/Errors.js.map +1 -1
- package/lib/Hub.d.ts +55 -0
- package/lib/Hub.js +41 -57
- package/lib/Hub.js.map +1 -1
- package/lib/I18n/I18n.d.ts +59 -0
- package/lib/I18n/I18n.js +2 -12
- package/lib/I18n/I18n.js.map +1 -1
- package/lib/I18n/index.d.ts +49 -0
- package/lib/I18n/index.js +2 -16
- package/lib/I18n/index.js.map +1 -1
- package/lib/I18n/types.d.ts +3 -0
- package/lib/I18n/types.js +2 -12
- package/lib/I18n/types.js.map +1 -1
- package/lib/JS.d.ts +32 -0
- package/lib/JS.js +4 -39
- package/lib/JS.js.map +1 -1
- package/lib/Logger/ConsoleLogger.d.ts +80 -0
- package/lib/Logger/ConsoleLogger.js +10 -50
- package/lib/Logger/ConsoleLogger.js.map +1 -1
- package/lib/Logger/index.d.ts +1 -0
- package/lib/Logger/index.js +5 -16
- package/lib/Logger/index.js.map +1 -1
- package/lib/Logger/logger-interface.d.ts +8 -0
- package/lib/Logger/logger-interface.js +2 -12
- package/lib/Logger/logger-interface.js.map +1 -1
- package/lib/OAuthHelper/FacebookOAuth.d.ts +6 -0
- package/lib/OAuthHelper/FacebookOAuth.js +5 -54
- package/lib/OAuthHelper/FacebookOAuth.js.map +1 -1
- package/lib/OAuthHelper/GoogleOAuth.d.ts +6 -0
- package/lib/OAuthHelper/GoogleOAuth.js +5 -54
- package/lib/OAuthHelper/GoogleOAuth.js.map +1 -1
- package/lib/OAuthHelper/index.d.ts +4 -0
- package/lib/OAuthHelper/index.js +2 -12
- package/lib/OAuthHelper/index.js.map +1 -1
- package/lib/Platform/index.d.ts +7 -0
- package/lib/Platform/index.js +2 -16
- package/lib/Platform/index.js.map +1 -1
- package/lib/Platform/version.d.ts +1 -0
- package/lib/Platform/version.js +1 -1
- package/lib/Platform/version.js.map +1 -1
- package/lib/Providers/AWSCloudWatchProvider.d.ts +34 -0
- package/lib/Providers/AWSCloudWatchProvider.js +32 -97
- package/lib/Providers/AWSCloudWatchProvider.js.map +1 -1
- package/lib/Providers/index.d.ts +1 -0
- package/lib/Providers/index.js +2 -4
- package/lib/Providers/index.js.map +1 -1
- package/lib/RNComponents/index.d.ts +5 -0
- package/lib/RNComponents/index.js +2 -12
- package/lib/RNComponents/index.js.map +1 -1
- package/lib/RNComponents/reactnative.d.ts +3 -0
- package/lib/RNComponents/reactnative.js +4 -16
- package/lib/RNComponents/reactnative.js.map +1 -1
- package/lib/ServiceWorker/ServiceWorker.d.ts +68 -0
- package/lib/ServiceWorker/ServiceWorker.js +0 -4
- package/lib/ServiceWorker/ServiceWorker.js.map +1 -1
- package/lib/ServiceWorker/index.d.ts +13 -0
- package/lib/Signer.d.ts +41 -0
- package/lib/Signer.js +8 -43
- package/lib/Signer.js.map +1 -1
- package/lib/StorageHelper/index.d.ts +41 -0
- package/lib/StorageHelper/index.js +2 -16
- package/lib/StorageHelper/index.js.map +1 -1
- package/lib/StorageHelper/reactnative.d.ts +13 -0
- package/lib/StorageHelper/reactnative.js +4 -20
- package/lib/StorageHelper/reactnative.js.map +1 -1
- package/lib/UniversalStorage/index.d.ts +23 -0
- package/lib/UniversalStorage/index.js +2 -4
- package/lib/UniversalStorage/index.js.map +1 -1
- package/lib/Util/BackgroundProcessManager.d.ts +204 -0
- package/lib/Util/BackgroundProcessManager.js +10 -69
- package/lib/Util/BackgroundProcessManager.js.map +1 -1
- package/lib/Util/Constants.d.ts +8 -0
- package/lib/Util/Constants.js +2 -12
- package/lib/Util/Constants.js.map +1 -1
- package/lib/Util/DateUtils.d.ts +7 -0
- package/lib/Util/DateUtils.js +2 -17
- package/lib/Util/DateUtils.js.map +1 -1
- package/lib/Util/Mutex.d.ts +45 -0
- package/lib/Util/Reachability.d.ts +13 -0
- package/lib/Util/Reachability.js +3 -16
- package/lib/Util/Reachability.js.map +1 -1
- package/lib/Util/Reachability.native.d.ts +11 -0
- package/lib/Util/Reachability.native.js +2 -4
- package/lib/Util/Reachability.native.js.map +1 -1
- package/lib/Util/Retry.d.ts +21 -0
- package/lib/Util/Retry.js +10 -78
- package/lib/Util/Retry.js.map +1 -1
- package/lib/Util/StringUtils.d.ts +2 -0
- package/lib/Util/index.d.ts +7 -0
- package/lib/Util/index.js +23 -8
- package/lib/Util/index.js.map +1 -1
- package/lib/constants.d.ts +6 -0
- package/lib/constants.js +2 -12
- package/lib/constants.js.map +1 -1
- package/lib/index.d.ts +29 -0
- package/lib/index.js +54 -25
- package/lib/index.js.map +1 -1
- package/lib/parseAWSExports.d.ts +2 -0
- package/lib/{Parser.js → parseAWSExports.js} +4 -28
- package/lib/parseAWSExports.js.map +1 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/types.d.ts +46 -0
- package/lib-esm/.tsbuildinfo +3 -0
- package/lib-esm/Amplify.d.ts +1 -4
- package/lib-esm/Amplify.js +2 -20
- package/lib-esm/Amplify.js.map +1 -1
- package/lib-esm/ClientDevice/android.js +2 -12
- package/lib-esm/ClientDevice/android.js.map +1 -1
- package/lib-esm/ClientDevice/browser.js +2 -12
- package/lib-esm/ClientDevice/browser.js.map +1 -1
- package/lib-esm/ClientDevice/index.d.ts +0 -4
- package/lib-esm/ClientDevice/index.js +2 -16
- package/lib-esm/ClientDevice/index.js.map +1 -1
- package/lib-esm/ClientDevice/ios.js +2 -12
- package/lib-esm/ClientDevice/ios.js.map +1 -1
- package/lib-esm/ClientDevice/reactnative.d.ts +0 -7
- package/lib-esm/ClientDevice/reactnative.js +2 -16
- package/lib-esm/ClientDevice/reactnative.js.map +1 -1
- package/lib-esm/Credentials.d.ts +0 -4
- package/lib-esm/Credentials.js +24 -58
- package/lib-esm/Credentials.js.map +1 -1
- package/lib-esm/Errors.js +2 -12
- package/lib-esm/Errors.js.map +1 -1
- package/lib-esm/Hub.d.ts +28 -4
- package/lib-esm/Hub.js +36 -52
- package/lib-esm/Hub.js.map +1 -1
- package/lib-esm/I18n/I18n.js +2 -12
- package/lib-esm/I18n/I18n.js.map +1 -1
- package/lib-esm/I18n/index.d.ts +0 -4
- package/lib-esm/I18n/index.js +2 -16
- package/lib-esm/I18n/index.js.map +1 -1
- package/lib-esm/I18n/types.js +2 -12
- package/lib-esm/I18n/types.js.map +1 -1
- package/lib-esm/JS.d.ts +0 -24
- package/lib-esm/JS.js +4 -39
- package/lib-esm/JS.js.map +1 -1
- package/lib-esm/Logger/ConsoleLogger.js +3 -43
- package/lib-esm/Logger/ConsoleLogger.js.map +1 -1
- package/lib-esm/Logger/index.d.ts +1 -1
- package/lib-esm/Logger/index.js +3 -13
- package/lib-esm/Logger/index.js.map +1 -1
- package/lib-esm/Logger/logger-interface.d.ts +0 -4
- package/lib-esm/Logger/logger-interface.js +2 -12
- package/lib-esm/Logger/logger-interface.js.map +1 -1
- package/lib-esm/OAuthHelper/FacebookOAuth.d.ts +0 -4
- package/lib-esm/OAuthHelper/FacebookOAuth.js +3 -52
- package/lib-esm/OAuthHelper/FacebookOAuth.js.map +1 -1
- package/lib-esm/OAuthHelper/GoogleOAuth.d.ts +0 -4
- package/lib-esm/OAuthHelper/GoogleOAuth.js +3 -52
- package/lib-esm/OAuthHelper/GoogleOAuth.js.map +1 -1
- package/lib-esm/OAuthHelper/index.js +2 -12
- package/lib-esm/OAuthHelper/index.js.map +1 -1
- package/lib-esm/Platform/index.d.ts +0 -4
- package/lib-esm/Platform/index.js +2 -16
- package/lib-esm/Platform/index.js.map +1 -1
- package/lib-esm/Platform/version.d.ts +1 -1
- package/lib-esm/Platform/version.js +1 -1
- package/lib-esm/Platform/version.js.map +1 -1
- package/lib-esm/Providers/AWSCloudWatchProvider.js +5 -70
- package/lib-esm/Providers/AWSCloudWatchProvider.js.map +1 -1
- package/lib-esm/Providers/index.d.ts +1 -1
- package/lib-esm/Providers/index.js +1 -1
- package/lib-esm/Providers/index.js.map +1 -1
- package/lib-esm/RNComponents/index.js +2 -12
- package/lib-esm/RNComponents/index.js.map +1 -1
- package/lib-esm/RNComponents/reactnative.js +2 -12
- package/lib-esm/RNComponents/reactnative.js.map +1 -1
- package/lib-esm/ServiceWorker/ServiceWorker.d.ts +0 -4
- package/lib-esm/ServiceWorker/ServiceWorker.js +0 -4
- package/lib-esm/ServiceWorker/ServiceWorker.js.map +1 -1
- package/lib-esm/Signer.d.ts +0 -4
- package/lib-esm/Signer.js +3 -38
- package/lib-esm/Signer.js.map +1 -1
- package/lib-esm/StorageHelper/index.d.ts +0 -4
- package/lib-esm/StorageHelper/index.js +2 -16
- package/lib-esm/StorageHelper/index.js.map +1 -1
- package/lib-esm/StorageHelper/reactnative.d.ts +0 -4
- package/lib-esm/StorageHelper/reactnative.js +2 -16
- package/lib-esm/StorageHelper/reactnative.js.map +1 -1
- package/lib-esm/Util/BackgroundProcessManager.js +1 -60
- package/lib-esm/Util/BackgroundProcessManager.js.map +1 -1
- package/lib-esm/Util/Constants.js +2 -12
- package/lib-esm/Util/Constants.js.map +1 -1
- package/lib-esm/Util/DateUtils.js +1 -16
- package/lib-esm/Util/DateUtils.js.map +1 -1
- package/lib-esm/Util/Reachability.js +1 -11
- package/lib-esm/Util/Reachability.js.map +1 -1
- package/lib-esm/Util/Retry.d.ts +1 -0
- package/lib-esm/Util/Retry.js +2 -70
- package/lib-esm/Util/Retry.js.map +1 -1
- package/lib-esm/Util/index.d.ts +5 -5
- package/lib-esm/Util/index.js +5 -5
- package/lib-esm/Util/index.js.map +1 -1
- package/lib-esm/constants.js +2 -12
- package/lib-esm/constants.js.map +1 -1
- package/lib-esm/index.d.ts +8 -9
- package/lib-esm/index.js +10 -21
- package/lib-esm/index.js.map +1 -1
- package/lib-esm/parseAWSExports.d.ts +2 -0
- package/lib-esm/{Parser.js → parseAWSExports.js} +3 -27
- package/lib-esm/parseAWSExports.js.map +1 -0
- package/lib-esm/types/types.d.ts +3 -0
- package/package.json +13 -9
- package/src/Amplify.ts +1 -5
- package/src/ClientDevice/android.ts +2 -12
- package/src/ClientDevice/browser.ts +2 -12
- package/src/ClientDevice/index.ts +2 -17
- package/src/ClientDevice/ios.ts +2 -12
- package/src/ClientDevice/reactnative.ts +2 -17
- package/src/Credentials.ts +34 -6
- package/src/Errors.ts +2 -12
- package/src/Hub.ts +40 -23
- package/src/I18n/I18n.ts +2 -12
- package/src/I18n/index.ts +2 -17
- package/src/I18n/types.ts +2 -12
- package/src/JS.ts +6 -37
- package/src/Logger/ConsoleLogger.ts +2 -12
- package/src/Logger/index.ts +3 -13
- package/src/Logger/logger-interface.ts +2 -17
- package/src/OAuthHelper/FacebookOAuth.ts +2 -17
- package/src/OAuthHelper/GoogleOAuth.ts +2 -17
- package/src/OAuthHelper/index.ts +2 -12
- package/src/Platform/index.ts +2 -17
- package/src/Platform/version.ts +1 -1
- package/src/Providers/AWSCloudWatchProvider.ts +4 -14
- package/src/Providers/index.ts +1 -1
- package/src/RNComponents/index.ts +2 -12
- package/src/RNComponents/reactnative.ts +2 -12
- package/src/ServiceWorker/ServiceWorker.ts +1 -6
- package/src/Signer.ts +2 -17
- package/src/StorageHelper/index.ts +2 -17
- package/src/StorageHelper/reactnative.ts +2 -17
- package/src/Util/Constants.ts +2 -12
- package/src/Util/Retry.ts +1 -1
- package/src/Util/index.ts +23 -5
- package/src/constants.ts +2 -12
- package/src/index.ts +48 -21
- package/src/{Parser.ts → parseAWSExports.ts} +1 -13
- package/src/types/types.ts +3 -0
- package/build.js +0 -5
- package/dist/aws-amplify-core.js +0 -42644
- package/dist/aws-amplify-core.js.map +0 -1
- package/dist/aws-amplify-core.min.js +0 -32
- package/dist/aws-amplify-core.min.js.map +0 -1
- package/index.js +0 -7
- package/lib/Parser.js.map +0 -1
- package/lib-esm/Parser.d.ts +0 -12
- package/lib-esm/Parser.js.map +0 -1
- package/webpack.config.dev.js +0 -6
package/src/index.ts
CHANGED
|
@@ -1,47 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
5
|
-
* the License. A copy of the License is located at
|
|
6
|
-
*
|
|
7
|
-
* http://aws.amazon.com/apache2.0/
|
|
8
|
-
*
|
|
9
|
-
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
10
|
-
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
11
|
-
* and limitations under the License.
|
|
12
|
-
*/
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
13
3
|
|
|
14
4
|
import { Amplify } from './Amplify';
|
|
15
5
|
import { Platform } from './Platform';
|
|
16
6
|
|
|
7
|
+
export { Amplify } from './Amplify';
|
|
17
8
|
export { AmplifyClass } from './Amplify';
|
|
18
9
|
export { ClientDevice } from './ClientDevice';
|
|
19
10
|
export { ConsoleLogger, ConsoleLogger as Logger } from './Logger';
|
|
20
|
-
export
|
|
11
|
+
export { invalidParameter, missingConfig } from './Errors';
|
|
21
12
|
export { Hub, HubCapsule, HubCallback, HubPayload } from './Hub';
|
|
22
13
|
export { I18n } from './I18n';
|
|
23
|
-
export
|
|
14
|
+
export {
|
|
15
|
+
browserOrNode,
|
|
16
|
+
filenameToContentType,
|
|
17
|
+
generateRandomString,
|
|
18
|
+
isEmpty,
|
|
19
|
+
isStrictObject,
|
|
20
|
+
isTextFile,
|
|
21
|
+
isWebWorker,
|
|
22
|
+
makeQuerablePromise,
|
|
23
|
+
objectLessAttributes,
|
|
24
|
+
sortByField,
|
|
25
|
+
transferKeyToLowerCase,
|
|
26
|
+
transferKeyToUpperCase,
|
|
27
|
+
} from './JS';
|
|
24
28
|
export { Signer } from './Signer';
|
|
25
|
-
export
|
|
26
|
-
export
|
|
29
|
+
export { parseAWSExports } from './parseAWSExports';
|
|
30
|
+
export { AWSCloudWatchProvider } from './Providers';
|
|
27
31
|
export { FacebookOAuth, GoogleOAuth } from './OAuthHelper';
|
|
28
|
-
export
|
|
32
|
+
export { AppState, AsyncStorage, Linking } from './RNComponents';
|
|
29
33
|
export { Credentials, CredentialsClass } from './Credentials';
|
|
30
34
|
export { ServiceWorker } from './ServiceWorker';
|
|
31
35
|
export { ICredentials } from './types';
|
|
32
36
|
export { StorageHelper, MemoryStorage } from './StorageHelper';
|
|
33
37
|
export { UniversalStorage } from './UniversalStorage';
|
|
34
38
|
export { Platform, getAmplifyUserAgent } from './Platform';
|
|
35
|
-
export
|
|
39
|
+
export {
|
|
40
|
+
INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER,
|
|
41
|
+
INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER,
|
|
42
|
+
USER_AGENT_HEADER,
|
|
43
|
+
} from './constants';
|
|
36
44
|
|
|
37
45
|
export const Constants = {
|
|
38
46
|
userAgent: Platform.userAgent,
|
|
39
47
|
};
|
|
40
48
|
|
|
41
|
-
export
|
|
42
|
-
|
|
49
|
+
export {
|
|
50
|
+
AWS_CLOUDWATCH_BASE_BUFFER_SIZE,
|
|
51
|
+
AWS_CLOUDWATCH_CATEGORY,
|
|
52
|
+
AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE,
|
|
53
|
+
AWS_CLOUDWATCH_MAX_EVENT_SIZE,
|
|
54
|
+
AWS_CLOUDWATCH_PROVIDER_NAME,
|
|
55
|
+
BackgroundManagerNotOpenError,
|
|
56
|
+
BackgroundProcessManager,
|
|
57
|
+
BackgroundProcessManagerState,
|
|
58
|
+
DateUtils,
|
|
59
|
+
Mutex,
|
|
60
|
+
NO_CREDS_ERROR_STRING,
|
|
61
|
+
NonRetryableError,
|
|
62
|
+
RETRY_ERROR_CODES,
|
|
63
|
+
Reachability,
|
|
64
|
+
isNonRetryableError,
|
|
65
|
+
jitteredBackoff,
|
|
66
|
+
jitteredExponentialRetry,
|
|
67
|
+
retry,
|
|
68
|
+
urlSafeDecode,
|
|
69
|
+
urlSafeEncode,
|
|
70
|
+
} from './Util';
|
|
43
71
|
|
|
44
|
-
export { Amplify };
|
|
45
72
|
/**
|
|
46
73
|
* @deprecated use named import
|
|
47
74
|
*/
|
|
@@ -3,7 +3,7 @@ import { ConsoleLogger as Logger } from './Logger';
|
|
|
3
3
|
|
|
4
4
|
const logger = new Logger('Parser');
|
|
5
5
|
|
|
6
|
-
export const
|
|
6
|
+
export const parseAWSExports = (config): AmplifyConfig => {
|
|
7
7
|
const amplifyConfig: AmplifyConfig = {};
|
|
8
8
|
// Analytics
|
|
9
9
|
if (config['aws_mobile_analytics_app_id']) {
|
|
@@ -80,15 +80,3 @@ export const parseMobileHubConfig = (config): AmplifyConfig => {
|
|
|
80
80
|
logger.debug('parse config', config, 'to amplifyconfig', amplifyConfig);
|
|
81
81
|
return amplifyConfig;
|
|
82
82
|
};
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* @deprecated use per-function export
|
|
86
|
-
*/
|
|
87
|
-
export class Parser {
|
|
88
|
-
static parseMobilehubConfig = parseMobileHubConfig;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* @deprecated use per-function export
|
|
93
|
-
*/
|
|
94
|
-
export default Parser;
|
package/src/types/types.ts
CHANGED