@aws-amplify/core 5.8.18 → 5.8.19
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/lib/Amplify.d.ts +10 -0
- package/lib/Amplify.js +10 -0
- package/lib/ClientDevice/index.d.ts +5 -0
- package/lib/ClientDevice/index.js +5 -0
- package/lib/Credentials.d.ts +10 -0
- package/lib/Credentials.js +10 -0
- package/lib/Errors.d.ts +10 -0
- package/lib/Errors.js +10 -0
- package/lib/Hub.d.ts +20 -0
- package/lib/Hub.js +5 -0
- package/lib/I18n/index.d.ts +3 -0
- package/lib/I18n/index.js +3 -0
- package/lib/JS.d.ts +54 -0
- package/lib/JS.js +54 -0
- package/lib/Logger/ConsoleLogger.d.ts +3 -0
- package/lib/Logger/ConsoleLogger.js +3 -0
- package/lib/OAuthHelper/index.d.ts +10 -0
- package/lib/OAuthHelper/index.js +10 -0
- package/lib/Platform/index.d.ts +15 -0
- package/lib/Platform/index.js +15 -0
- package/lib/Platform/types.d.ts +70 -0
- package/lib/Platform/types.js +65 -0
- package/lib/Platform/version.d.ts +1 -1
- package/lib/Platform/version.js +1 -1
- package/lib/Providers/AWSCloudWatchProvider.d.ts +5 -0
- package/lib/Providers/AWSCloudWatchProvider.js +5 -0
- package/lib/RNComponents/index.d.ts +15 -0
- package/lib/RNComponents/index.js +15 -0
- package/lib/ServiceWorker/ServiceWorker.d.ts +3 -0
- package/lib/ServiceWorker/ServiceWorker.js +3 -0
- package/lib/Signer.d.ts +5 -0
- package/lib/Signer.js +5 -0
- package/lib/StorageHelper/index.d.ts +11 -1
- package/lib/StorageHelper/index.js +11 -1
- package/lib/UniversalStorage/index.d.ts +5 -0
- package/lib/UniversalStorage/index.js +5 -0
- package/lib/Util/BackgroundProcessManager.d.ts +9 -0
- package/lib/Util/BackgroundProcessManager.js +9 -0
- package/lib/Util/Constants.d.ts +35 -0
- package/lib/Util/Constants.js +35 -0
- package/lib/Util/DateUtils.d.ts +5 -0
- package/lib/Util/DateUtils.js +5 -0
- package/lib/Util/Mutex.d.ts +5 -0
- package/lib/Util/Mutex.js +5 -0
- package/lib/Util/Reachability.d.ts +5 -0
- package/lib/Util/Reachability.js +5 -0
- package/lib/Util/Retry.d.ts +19 -0
- package/lib/Util/Retry.js +19 -0
- package/lib/Util/StringUtils.d.ts +10 -0
- package/lib/Util/StringUtils.js +10 -0
- package/lib/constants.d.ts +10 -0
- package/lib/constants.js +10 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +5 -0
- package/lib/parseAWSExports.d.ts +5 -0
- package/lib/parseAWSExports.js +5 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/types.d.ts +5 -0
- package/lib-esm/Amplify.d.ts +10 -0
- package/lib-esm/Amplify.js +10 -0
- package/lib-esm/ClientDevice/index.d.ts +5 -0
- package/lib-esm/ClientDevice/index.js +5 -0
- package/lib-esm/Credentials.d.ts +10 -0
- package/lib-esm/Credentials.js +10 -0
- package/lib-esm/Errors.d.ts +10 -0
- package/lib-esm/Errors.js +10 -0
- package/lib-esm/Hub.d.ts +20 -0
- package/lib-esm/Hub.js +5 -0
- package/lib-esm/I18n/index.d.ts +3 -0
- package/lib-esm/I18n/index.js +3 -0
- package/lib-esm/JS.d.ts +54 -0
- package/lib-esm/JS.js +54 -0
- package/lib-esm/Logger/ConsoleLogger.d.ts +3 -0
- package/lib-esm/Logger/ConsoleLogger.js +3 -0
- package/lib-esm/OAuthHelper/index.d.ts +10 -0
- package/lib-esm/OAuthHelper/index.js +10 -0
- package/lib-esm/Platform/index.d.ts +15 -0
- package/lib-esm/Platform/index.js +15 -0
- package/lib-esm/Platform/types.d.ts +70 -0
- package/lib-esm/Platform/types.js +65 -0
- package/lib-esm/Platform/version.d.ts +1 -1
- package/lib-esm/Platform/version.js +1 -1
- package/lib-esm/Providers/AWSCloudWatchProvider.d.ts +5 -0
- package/lib-esm/Providers/AWSCloudWatchProvider.js +5 -0
- package/lib-esm/RNComponents/index.d.ts +15 -0
- package/lib-esm/RNComponents/index.js +15 -0
- package/lib-esm/ServiceWorker/ServiceWorker.d.ts +3 -0
- package/lib-esm/ServiceWorker/ServiceWorker.js +3 -0
- package/lib-esm/Signer.d.ts +5 -0
- package/lib-esm/Signer.js +5 -0
- package/lib-esm/StorageHelper/index.d.ts +11 -1
- package/lib-esm/StorageHelper/index.js +11 -1
- package/lib-esm/UniversalStorage/index.d.ts +5 -0
- package/lib-esm/UniversalStorage/index.js +5 -0
- package/lib-esm/Util/BackgroundProcessManager.d.ts +9 -0
- package/lib-esm/Util/BackgroundProcessManager.js +9 -0
- package/lib-esm/Util/Constants.d.ts +35 -0
- package/lib-esm/Util/Constants.js +35 -0
- package/lib-esm/Util/DateUtils.d.ts +5 -0
- package/lib-esm/Util/DateUtils.js +5 -0
- package/lib-esm/Util/Mutex.d.ts +5 -0
- package/lib-esm/Util/Mutex.js +5 -0
- package/lib-esm/Util/Reachability.d.ts +5 -0
- package/lib-esm/Util/Reachability.js +5 -0
- package/lib-esm/Util/Retry.d.ts +19 -0
- package/lib-esm/Util/Retry.js +19 -0
- package/lib-esm/Util/StringUtils.d.ts +10 -0
- package/lib-esm/Util/StringUtils.js +10 -0
- package/lib-esm/constants.d.ts +10 -0
- package/lib-esm/constants.js +10 -0
- package/lib-esm/index.d.ts +5 -0
- package/lib-esm/index.js +5 -0
- package/lib-esm/parseAWSExports.d.ts +5 -0
- package/lib-esm/parseAWSExports.js +5 -0
- package/lib-esm/tsconfig.tsbuildinfo +1 -1
- package/lib-esm/types/types.d.ts +5 -0
- package/package.json +2 -2
- package/src/Amplify.ts +10 -0
- package/src/ClientDevice/index.ts +5 -0
- package/src/Credentials.ts +10 -0
- package/src/Errors.ts +10 -0
- package/src/Hub.ts +20 -0
- package/src/I18n/index.ts +3 -0
- package/src/JS.ts +54 -0
- package/src/Logger/ConsoleLogger.ts +3 -0
- package/src/OAuthHelper/index.ts +10 -0
- package/src/Platform/index.ts +15 -0
- package/src/Platform/types.ts +70 -0
- package/src/Platform/version.ts +1 -1
- package/src/Providers/AWSCloudWatchProvider.ts +5 -0
- package/src/RNComponents/index.ts +15 -0
- package/src/ServiceWorker/ServiceWorker.ts +3 -0
- package/src/Signer.ts +5 -0
- package/src/StorageHelper/index.ts +11 -1
- package/src/UniversalStorage/index.ts +5 -0
- package/src/Util/BackgroundProcessManager.ts +9 -0
- package/src/Util/Constants.ts +35 -0
- package/src/Util/DateUtils.ts +5 -0
- package/src/Util/Mutex.ts +5 -0
- package/src/Util/Reachability.ts +5 -0
- package/src/Util/Retry.ts +19 -0
- package/src/Util/StringUtils.ts +10 -0
- package/src/constants.ts +10 -0
- package/src/index.ts +5 -0
- package/src/parseAWSExports.ts +5 -0
- package/src/types/types.ts +5 -0
package/src/Util/Constants.ts
CHANGED
|
@@ -2,12 +2,47 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
// Logging constants
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
7
|
+
* See the migration guide:
|
|
8
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
9
|
+
*/
|
|
5
10
|
const AWS_CLOUDWATCH_BASE_BUFFER_SIZE = 26;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
13
|
+
* See the migration guide:
|
|
14
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
15
|
+
*/
|
|
6
16
|
const AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE = 1048576;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
19
|
+
* See the migration guide:
|
|
20
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
21
|
+
*/
|
|
7
22
|
const AWS_CLOUDWATCH_MAX_EVENT_SIZE = 256000;
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
25
|
+
* See the migration guide:
|
|
26
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
27
|
+
*/
|
|
8
28
|
const AWS_CLOUDWATCH_CATEGORY = 'Logging';
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
31
|
+
* See the migration guide:
|
|
32
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
33
|
+
*/
|
|
9
34
|
const AWS_CLOUDWATCH_PROVIDER_NAME = 'AWSCloudWatch';
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
37
|
+
* See the migration guide:
|
|
38
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
39
|
+
*/
|
|
10
40
|
const NO_CREDS_ERROR_STRING = 'No credentials';
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
43
|
+
* See the migration guide:
|
|
44
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
45
|
+
*/
|
|
11
46
|
const RETRY_ERROR_CODES = [
|
|
12
47
|
'ResourceNotFoundException',
|
|
13
48
|
'InvalidSequenceTokenException',
|
package/src/Util/DateUtils.ts
CHANGED
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
|
|
12
12
|
const FIVE_MINUTES_IN_MS = 1000 * 60 * 5;
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
16
|
+
* See the migration guide:
|
|
17
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
18
|
+
*/
|
|
14
19
|
export const DateUtils = {
|
|
15
20
|
/**
|
|
16
21
|
* Milliseconds to offset the date to compensate for clock skew between device & services
|
package/src/Util/Mutex.ts
CHANGED
|
@@ -42,6 +42,11 @@ namespace MutexInterface {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
47
|
+
* See the migration guide:
|
|
48
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
49
|
+
*/
|
|
45
50
|
class Mutex implements MutexInterface {
|
|
46
51
|
isLocked(): boolean {
|
|
47
52
|
return this._pending;
|
package/src/Util/Reachability.ts
CHANGED
|
@@ -7,6 +7,11 @@ type NetworkStatus = {
|
|
|
7
7
|
online: boolean;
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
12
|
+
* See the migration guide:
|
|
13
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
14
|
+
*/
|
|
10
15
|
export default class ReachabilityNavigator implements Reachability {
|
|
11
16
|
private static _observers: Array<
|
|
12
17
|
ZenObservable.SubscriptionObserver<NetworkStatus>
|
package/src/Util/Retry.ts
CHANGED
|
@@ -4,6 +4,11 @@ import { DelayFunction } from '../types';
|
|
|
4
4
|
import { ConsoleLogger as Logger } from '../Logger/ConsoleLogger';
|
|
5
5
|
const logger = new Logger('Util');
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
9
|
+
* See the migration guide:
|
|
10
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
11
|
+
*/
|
|
7
12
|
export class NonRetryableError extends Error {
|
|
8
13
|
public readonly nonRetryable = true;
|
|
9
14
|
constructor(message: string) {
|
|
@@ -11,6 +16,11 @@ export class NonRetryableError extends Error {
|
|
|
11
16
|
}
|
|
12
17
|
}
|
|
13
18
|
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
21
|
+
* See the migration guide:
|
|
22
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
23
|
+
*/
|
|
14
24
|
export const isNonRetryableError = (obj: any): obj is NonRetryableError => {
|
|
15
25
|
const key: keyof NonRetryableError = 'nonRetryable';
|
|
16
26
|
return obj && obj[key];
|
|
@@ -19,6 +29,9 @@ export const isNonRetryableError = (obj: any): obj is NonRetryableError => {
|
|
|
19
29
|
/**
|
|
20
30
|
* @private
|
|
21
31
|
* Internal use of Amplify only
|
|
32
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
33
|
+
* See the migration guide:
|
|
34
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
22
35
|
*/
|
|
23
36
|
export async function retry<T>(
|
|
24
37
|
functionToRetry: (...args: any[]) => T,
|
|
@@ -95,6 +108,9 @@ const MAX_DELAY_MS = 5 * 60 * 1000;
|
|
|
95
108
|
/**
|
|
96
109
|
* @private
|
|
97
110
|
* Internal use of Amplify only
|
|
111
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
112
|
+
* See the migration guide:
|
|
113
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
98
114
|
*/
|
|
99
115
|
export function jitteredBackoff(
|
|
100
116
|
maxDelayMs: number = MAX_DELAY_MS
|
|
@@ -111,6 +127,9 @@ export function jitteredBackoff(
|
|
|
111
127
|
/**
|
|
112
128
|
* @private
|
|
113
129
|
* Internal use of Amplify only
|
|
130
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
131
|
+
* See the migration guide:
|
|
132
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
114
133
|
*/
|
|
115
134
|
export const jitteredExponentialRetry = <T>(
|
|
116
135
|
functionToRetry: (...args: any[]) => T,
|
package/src/Util/StringUtils.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
5
|
+
* See the migration guide:
|
|
6
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
7
|
+
*/
|
|
3
8
|
export function urlSafeEncode(str: string) {
|
|
4
9
|
return str
|
|
5
10
|
.split('')
|
|
@@ -12,6 +17,11 @@ export function urlSafeEncode(str: string) {
|
|
|
12
17
|
.join('');
|
|
13
18
|
}
|
|
14
19
|
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
22
|
+
* See the migration guide:
|
|
23
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
24
|
+
*/
|
|
15
25
|
export function urlSafeDecode(hex: string) {
|
|
16
26
|
return hex
|
|
17
27
|
.match(/.{2}/g)
|
package/src/constants.ts
CHANGED
|
@@ -8,8 +8,18 @@
|
|
|
8
8
|
const hasSymbol =
|
|
9
9
|
typeof Symbol !== 'undefined' && typeof Symbol.for === 'function';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
13
|
+
* See the migration guide:
|
|
14
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
15
|
+
*/
|
|
11
16
|
export const INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER = hasSymbol
|
|
12
17
|
? Symbol.for('INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER')
|
|
13
18
|
: '@@INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER';
|
|
14
19
|
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
22
|
+
* See the migration guide:
|
|
23
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
24
|
+
*/
|
|
15
25
|
export const USER_AGENT_HEADER = 'x-amz-user-agent';
|
package/src/index.ts
CHANGED
|
@@ -61,6 +61,11 @@ export {
|
|
|
61
61
|
USER_AGENT_HEADER,
|
|
62
62
|
} from './constants';
|
|
63
63
|
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
66
|
+
* See the migration guide:
|
|
67
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
68
|
+
*/
|
|
64
69
|
export const Constants = {
|
|
65
70
|
userAgent: Platform.userAgent,
|
|
66
71
|
};
|
package/src/parseAWSExports.ts
CHANGED
|
@@ -5,6 +5,11 @@ import { ConsoleLogger as Logger } from './Logger';
|
|
|
5
5
|
|
|
6
6
|
const logger = new Logger('Parser');
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
10
|
+
* See the migration guide:
|
|
11
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
12
|
+
*/
|
|
8
13
|
export const parseAWSExports = (config): AmplifyConfig => {
|
|
9
14
|
const amplifyConfig: AmplifyConfig = {};
|
|
10
15
|
// Analytics
|
package/src/types/types.ts
CHANGED
|
@@ -17,6 +17,11 @@ export interface AmplifyConfig {
|
|
|
17
17
|
ssr?: boolean;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
22
|
+
* See the migration guide:
|
|
23
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
24
|
+
*/
|
|
20
25
|
export interface ICredentials {
|
|
21
26
|
accessKeyId: string;
|
|
22
27
|
sessionToken: string;
|