@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/Hub.ts
CHANGED
|
@@ -1,24 +1,15 @@
|
|
|
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 { ConsoleLogger as Logger } from './Logger';
|
|
15
5
|
|
|
16
6
|
const logger = new Logger('Hub');
|
|
17
7
|
|
|
18
|
-
const AMPLIFY_SYMBOL = (
|
|
19
|
-
typeof Symbol.for === 'function'
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
const AMPLIFY_SYMBOL = (
|
|
9
|
+
typeof Symbol !== 'undefined' && typeof Symbol.for === 'function'
|
|
10
|
+
? Symbol.for('amplify_default')
|
|
11
|
+
: '@@amplify_default'
|
|
12
|
+
) as Symbol;
|
|
22
13
|
interface IPattern {
|
|
23
14
|
pattern: RegExp;
|
|
24
15
|
callback: HubCallback;
|
|
@@ -71,8 +62,13 @@ export class HubClass {
|
|
|
71
62
|
this.name = name;
|
|
72
63
|
}
|
|
73
64
|
|
|
74
|
-
|
|
75
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Used internally to remove a Hub listener.
|
|
67
|
+
*
|
|
68
|
+
* @remarks
|
|
69
|
+
* This private method is for internal use only. Instead of calling Hub.remove, call the result of Hub.listen.
|
|
70
|
+
*/
|
|
71
|
+
private _remove(channel: string | RegExp, listener: HubCallback) {
|
|
76
72
|
if (channel instanceof RegExp) {
|
|
77
73
|
const pattern = this.patterns.find(
|
|
78
74
|
({ pattern }) => pattern.source === channel.source
|
|
@@ -94,6 +90,22 @@ export class HubClass {
|
|
|
94
90
|
}
|
|
95
91
|
}
|
|
96
92
|
|
|
93
|
+
/**
|
|
94
|
+
* @deprecated Instead of calling Hub.remove, call the result of Hub.listen.
|
|
95
|
+
*/
|
|
96
|
+
remove(channel: string | RegExp, listener: HubCallback) {
|
|
97
|
+
this._remove(channel, listener);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Used to send a Hub event.
|
|
102
|
+
*
|
|
103
|
+
* @param channel - The channel on which the event will be broadcast
|
|
104
|
+
* @param payload - The HubPayload
|
|
105
|
+
* @param source - The source of the event; defaults to ''
|
|
106
|
+
* @param ampSymbol - Symbol used to determine if the event is dispatched internally on a protected channel
|
|
107
|
+
*
|
|
108
|
+
*/
|
|
97
109
|
dispatch(
|
|
98
110
|
channel: string,
|
|
99
111
|
payload: HubPayload,
|
|
@@ -124,6 +136,15 @@ export class HubClass {
|
|
|
124
136
|
}
|
|
125
137
|
}
|
|
126
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Used to listen for Hub events.
|
|
141
|
+
*
|
|
142
|
+
* @param channel - The channel on which to listen
|
|
143
|
+
* @param callback - The callback to execute when an event is received on the specified channel
|
|
144
|
+
* @param listenerName - The name of the listener; defaults to 'noname'
|
|
145
|
+
* @returns A function which can be called to cancel the listener.
|
|
146
|
+
*
|
|
147
|
+
*/
|
|
127
148
|
listen(
|
|
128
149
|
channel: string | RegExp,
|
|
129
150
|
callback?: HubCallback | LegacyCallback,
|
|
@@ -162,7 +183,7 @@ export class HubClass {
|
|
|
162
183
|
}
|
|
163
184
|
|
|
164
185
|
return () => {
|
|
165
|
-
this.
|
|
186
|
+
this._remove(channel, cb);
|
|
166
187
|
};
|
|
167
188
|
}
|
|
168
189
|
|
|
@@ -212,7 +233,3 @@ export class HubClass {
|
|
|
212
233
|
pseudo Singleton for the main messaging bus, however you can still create
|
|
213
234
|
your own instance of HubClass() for a separate "private bus" of events.*/
|
|
214
235
|
export const Hub = new HubClass('__default__');
|
|
215
|
-
/**
|
|
216
|
-
* @deprecated use named import
|
|
217
|
-
*/
|
|
218
|
-
export default Hub;
|
package/src/I18n/I18n.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
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 { I18nOptions } from './types';
|
|
15
5
|
import { ConsoleLogger as Logger } from '../Logger';
|
package/src/I18n/index.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
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 { I18n as I18nClass } from './I18n';
|
|
15
5
|
|
|
@@ -122,8 +112,3 @@ export class I18n {
|
|
|
122
112
|
}
|
|
123
113
|
|
|
124
114
|
Amplify.register(I18n);
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* @deprecated use named import
|
|
128
|
-
*/
|
|
129
|
-
export default I18n;
|
package/src/I18n/types.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
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
|
export class I18nOptions {
|
|
15
5
|
language = null;
|
package/src/JS.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
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
|
const MIME_MAP = [
|
|
15
5
|
{ type: 'text/plain', ext: 'txt' },
|
|
@@ -167,8 +157,10 @@ export const isWebWorker = () => {
|
|
|
167
157
|
return false;
|
|
168
158
|
}
|
|
169
159
|
const selfContext = self as { WorkerGlobalScope? };
|
|
170
|
-
return
|
|
171
|
-
|
|
160
|
+
return (
|
|
161
|
+
typeof selfContext.WorkerGlobalScope !== 'undefined' &&
|
|
162
|
+
self instanceof selfContext.WorkerGlobalScope
|
|
163
|
+
);
|
|
172
164
|
};
|
|
173
165
|
|
|
174
166
|
export const browserOrNode = () => {
|
|
@@ -265,26 +257,3 @@ export const isStrictObject = obj => {
|
|
|
265
257
|
!(obj instanceof Boolean)
|
|
266
258
|
);
|
|
267
259
|
};
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* @deprecated use per-function imports
|
|
271
|
-
*/
|
|
272
|
-
export class JS {
|
|
273
|
-
static isEmpty = isEmpty;
|
|
274
|
-
static sortByField = sortByField;
|
|
275
|
-
static objectLessAttributes = objectLessAttributes;
|
|
276
|
-
static filenameToContentType = filenameToContentType;
|
|
277
|
-
static isTextFile = isTextFile;
|
|
278
|
-
static generateRandomString = generateRandomString;
|
|
279
|
-
static makeQuerablePromise = makeQuerablePromise;
|
|
280
|
-
static isWebWorker = isWebWorker;
|
|
281
|
-
static browserOrNode = browserOrNode;
|
|
282
|
-
static transferKeyToLowerCase = transferKeyToLowerCase;
|
|
283
|
-
static transferKeyToUpperCase = transferKeyToUpperCase;
|
|
284
|
-
static isStrictObject = isStrictObject;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* @deprecated use per-function imports
|
|
289
|
-
*/
|
|
290
|
-
export default JS;
|
|
@@ -1,15 +1,5 @@
|
|
|
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 { InputLogEvent } from '@aws-sdk/client-cloudwatch-logs';
|
|
15
5
|
import { LoggingProvider } from '../types';
|
package/src/Logger/index.ts
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
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
|
-
export
|
|
4
|
+
export { ConsoleLogger, LOG_TYPE } from './ConsoleLogger';
|
|
@@ -1,15 +1,5 @@
|
|
|
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 { LoggingProvider } from '../types';
|
|
15
5
|
|
|
@@ -20,8 +10,3 @@ export interface Logger {
|
|
|
20
10
|
error(msg: string): void;
|
|
21
11
|
addPluggable(pluggable: LoggingProvider): void;
|
|
22
12
|
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated use named import
|
|
26
|
-
*/
|
|
27
|
-
export default Logger;
|
|
@@ -1,15 +1,5 @@
|
|
|
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
|
import { ConsoleLogger as Logger } from '../Logger';
|
|
14
4
|
import { browserOrNode } from '../JS';
|
|
15
5
|
import { NonRetryableError } from '../Util';
|
|
@@ -91,8 +81,3 @@ export class FacebookOAuth {
|
|
|
91
81
|
});
|
|
92
82
|
}
|
|
93
83
|
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* @deprecated use named import
|
|
97
|
-
*/
|
|
98
|
-
export default FacebookOAuth;
|
|
@@ -1,15 +1,5 @@
|
|
|
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
|
import { ConsoleLogger as Logger } from '../Logger';
|
|
14
4
|
import { browserOrNode } from '../JS';
|
|
15
5
|
import { NonRetryableError } from '../Util';
|
|
@@ -102,8 +92,3 @@ export class GoogleOAuth {
|
|
|
102
92
|
});
|
|
103
93
|
}
|
|
104
94
|
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* @deprecated use named import
|
|
108
|
-
*/
|
|
109
|
-
export default GoogleOAuth;
|
package/src/OAuthHelper/index.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
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
|
import { GoogleOAuth as GoogleOAuthClass } from './GoogleOAuth';
|
|
14
4
|
import { FacebookOAuth as FacebookOAuthClass } from './FacebookOAuth';
|
|
15
5
|
|
package/src/Platform/index.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
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
|
import { version } from './version';
|
|
14
4
|
|
|
15
5
|
const BASE_USER_AGENT = `aws-amplify/${version}`;
|
|
@@ -38,8 +28,3 @@ if (typeof navigator !== 'undefined' && navigator.product) {
|
|
|
38
28
|
export const getAmplifyUserAgent = (content?: string) => {
|
|
39
29
|
return `${Platform.userAgent}${content ? content : ''}`;
|
|
40
30
|
};
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* @deprecated use named import
|
|
44
|
-
*/
|
|
45
|
-
export default Platform;
|
package/src/Platform/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by genversion
|
|
2
|
-
export const version = '
|
|
2
|
+
export const version = '5.0.0';
|
|
@@ -1,15 +1,5 @@
|
|
|
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 {
|
|
15
5
|
CloudWatchLogsClient,
|
|
@@ -43,7 +33,7 @@ import {
|
|
|
43
33
|
import { Credentials } from '../..';
|
|
44
34
|
import { ConsoleLogger as Logger } from '../Logger';
|
|
45
35
|
import { getAmplifyUserAgent } from '../Platform';
|
|
46
|
-
import {
|
|
36
|
+
import { parseAWSExports } from '../parseAWSExports';
|
|
47
37
|
import {
|
|
48
38
|
AWS_CLOUDWATCH_BASE_BUFFER_SIZE,
|
|
49
39
|
AWS_CLOUDWATCH_CATEGORY,
|
|
@@ -96,7 +86,7 @@ class AWSCloudWatchProvider implements LoggingProvider {
|
|
|
96
86
|
const conf = Object.assign(
|
|
97
87
|
{},
|
|
98
88
|
this._config,
|
|
99
|
-
|
|
89
|
+
parseAWSExports(config).Logging,
|
|
100
90
|
config
|
|
101
91
|
);
|
|
102
92
|
this._config = conf;
|
package/src/Providers/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { AWSCloudWatchProvider } from './AWSCloudWatchProvider';
|
|
@@ -1,15 +1,5 @@
|
|
|
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 { browserOrNode } from '../JS';
|
|
15
5
|
import { StorageHelper } from '../StorageHelper';
|
|
@@ -1,15 +1,5 @@
|
|
|
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 { Linking, AppState } from 'react-native';
|
|
15
5
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
@@ -42,7 +42,7 @@ export class ServiceWorkerClass {
|
|
|
42
42
|
// The AWS Amplify logger
|
|
43
43
|
private _logger: Logger = new Logger('ServiceWorker');
|
|
44
44
|
|
|
45
|
-
constructor() {
|
|
45
|
+
constructor() {}
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* Get the currently active service worker
|
|
@@ -202,8 +202,3 @@ export class ServiceWorkerClass {
|
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* @deprecated use named import
|
|
208
|
-
*/
|
|
209
|
-
export default ServiceWorkerClass;
|
package/src/Signer.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
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 { ConsoleLogger as Logger } from './Logger';
|
|
15
5
|
import { Sha256 as jsSha256 } from '@aws-crypto/sha256-js';
|
|
@@ -439,8 +429,3 @@ export class Signer {
|
|
|
439
429
|
return result;
|
|
440
430
|
}
|
|
441
431
|
}
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* @deprecated use per-function import
|
|
445
|
-
*/
|
|
446
|
-
export default Signer;
|
|
@@ -1,15 +1,5 @@
|
|
|
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
|
let dataMemory = {};
|
|
15
5
|
|
|
@@ -81,8 +71,3 @@ export class StorageHelper {
|
|
|
81
71
|
return this.storageWindow;
|
|
82
72
|
}
|
|
83
73
|
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* @deprecated use named import
|
|
87
|
-
*/
|
|
88
|
-
export default StorageHelper;
|
|
@@ -1,15 +1,5 @@
|
|
|
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
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
14
4
|
|
|
15
5
|
const MEMORY_KEY_PREFIX = '@MemoryStorage:';
|
|
@@ -110,8 +100,3 @@ export class StorageHelper {
|
|
|
110
100
|
return this.storageWindow;
|
|
111
101
|
}
|
|
112
102
|
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* @deprecated use named import
|
|
116
|
-
*/
|
|
117
|
-
export default StorageHelper;
|
package/src/Util/Constants.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
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
|
// Logging constants
|
|
15
5
|
const AWS_CLOUDWATCH_BASE_BUFFER_SIZE = 26;
|
package/src/Util/Retry.ts
CHANGED
|
@@ -9,7 +9,7 @@ export class NonRetryableError extends Error {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
const isNonRetryableError = (obj: any): obj is NonRetryableError => {
|
|
12
|
+
export const isNonRetryableError = (obj: any): obj is NonRetryableError => {
|
|
13
13
|
const key: keyof NonRetryableError = 'nonRetryable';
|
|
14
14
|
return obj && obj[key];
|
|
15
15
|
};
|
package/src/Util/index.ts
CHANGED
|
@@ -1,7 +1,25 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {
|
|
2
|
+
NonRetryableError,
|
|
3
|
+
isNonRetryableError,
|
|
4
|
+
jitteredBackoff,
|
|
5
|
+
jitteredExponentialRetry,
|
|
6
|
+
retry,
|
|
7
|
+
} from './Retry';
|
|
2
8
|
export { default as Mutex } from './Mutex';
|
|
3
9
|
export { default as Reachability } from './Reachability';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
|
|
10
|
+
export { DateUtils } from './DateUtils';
|
|
11
|
+
export { urlSafeDecode, urlSafeEncode } from './StringUtils';
|
|
12
|
+
export {
|
|
13
|
+
AWS_CLOUDWATCH_BASE_BUFFER_SIZE,
|
|
14
|
+
AWS_CLOUDWATCH_CATEGORY,
|
|
15
|
+
AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE,
|
|
16
|
+
AWS_CLOUDWATCH_MAX_EVENT_SIZE,
|
|
17
|
+
AWS_CLOUDWATCH_PROVIDER_NAME,
|
|
18
|
+
NO_CREDS_ERROR_STRING,
|
|
19
|
+
RETRY_ERROR_CODES,
|
|
20
|
+
} from './Constants';
|
|
21
|
+
export {
|
|
22
|
+
BackgroundProcessManager,
|
|
23
|
+
BackgroundManagerNotOpenError,
|
|
24
|
+
BackgroundProcessManagerState,
|
|
25
|
+
} from './BackgroundProcessManager';
|
package/src/constants.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
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
|
/**
|
|
15
5
|
* This Symbol is used to reference an internal-only PubSub provider that
|