@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.
Files changed (146) hide show
  1. package/lib/Amplify.d.ts +10 -0
  2. package/lib/Amplify.js +10 -0
  3. package/lib/ClientDevice/index.d.ts +5 -0
  4. package/lib/ClientDevice/index.js +5 -0
  5. package/lib/Credentials.d.ts +10 -0
  6. package/lib/Credentials.js +10 -0
  7. package/lib/Errors.d.ts +10 -0
  8. package/lib/Errors.js +10 -0
  9. package/lib/Hub.d.ts +20 -0
  10. package/lib/Hub.js +5 -0
  11. package/lib/I18n/index.d.ts +3 -0
  12. package/lib/I18n/index.js +3 -0
  13. package/lib/JS.d.ts +54 -0
  14. package/lib/JS.js +54 -0
  15. package/lib/Logger/ConsoleLogger.d.ts +3 -0
  16. package/lib/Logger/ConsoleLogger.js +3 -0
  17. package/lib/OAuthHelper/index.d.ts +10 -0
  18. package/lib/OAuthHelper/index.js +10 -0
  19. package/lib/Platform/index.d.ts +15 -0
  20. package/lib/Platform/index.js +15 -0
  21. package/lib/Platform/types.d.ts +70 -0
  22. package/lib/Platform/types.js +65 -0
  23. package/lib/Platform/version.d.ts +1 -1
  24. package/lib/Platform/version.js +1 -1
  25. package/lib/Providers/AWSCloudWatchProvider.d.ts +5 -0
  26. package/lib/Providers/AWSCloudWatchProvider.js +5 -0
  27. package/lib/RNComponents/index.d.ts +15 -0
  28. package/lib/RNComponents/index.js +15 -0
  29. package/lib/ServiceWorker/ServiceWorker.d.ts +3 -0
  30. package/lib/ServiceWorker/ServiceWorker.js +3 -0
  31. package/lib/Signer.d.ts +5 -0
  32. package/lib/Signer.js +5 -0
  33. package/lib/StorageHelper/index.d.ts +11 -1
  34. package/lib/StorageHelper/index.js +11 -1
  35. package/lib/UniversalStorage/index.d.ts +5 -0
  36. package/lib/UniversalStorage/index.js +5 -0
  37. package/lib/Util/BackgroundProcessManager.d.ts +9 -0
  38. package/lib/Util/BackgroundProcessManager.js +9 -0
  39. package/lib/Util/Constants.d.ts +35 -0
  40. package/lib/Util/Constants.js +35 -0
  41. package/lib/Util/DateUtils.d.ts +5 -0
  42. package/lib/Util/DateUtils.js +5 -0
  43. package/lib/Util/Mutex.d.ts +5 -0
  44. package/lib/Util/Mutex.js +5 -0
  45. package/lib/Util/Reachability.d.ts +5 -0
  46. package/lib/Util/Reachability.js +5 -0
  47. package/lib/Util/Retry.d.ts +19 -0
  48. package/lib/Util/Retry.js +19 -0
  49. package/lib/Util/StringUtils.d.ts +10 -0
  50. package/lib/Util/StringUtils.js +10 -0
  51. package/lib/constants.d.ts +10 -0
  52. package/lib/constants.js +10 -0
  53. package/lib/index.d.ts +5 -0
  54. package/lib/index.js +5 -0
  55. package/lib/parseAWSExports.d.ts +5 -0
  56. package/lib/parseAWSExports.js +5 -0
  57. package/lib/tsconfig.tsbuildinfo +1 -1
  58. package/lib/types/types.d.ts +5 -0
  59. package/lib-esm/Amplify.d.ts +10 -0
  60. package/lib-esm/Amplify.js +10 -0
  61. package/lib-esm/ClientDevice/index.d.ts +5 -0
  62. package/lib-esm/ClientDevice/index.js +5 -0
  63. package/lib-esm/Credentials.d.ts +10 -0
  64. package/lib-esm/Credentials.js +10 -0
  65. package/lib-esm/Errors.d.ts +10 -0
  66. package/lib-esm/Errors.js +10 -0
  67. package/lib-esm/Hub.d.ts +20 -0
  68. package/lib-esm/Hub.js +5 -0
  69. package/lib-esm/I18n/index.d.ts +3 -0
  70. package/lib-esm/I18n/index.js +3 -0
  71. package/lib-esm/JS.d.ts +54 -0
  72. package/lib-esm/JS.js +54 -0
  73. package/lib-esm/Logger/ConsoleLogger.d.ts +3 -0
  74. package/lib-esm/Logger/ConsoleLogger.js +3 -0
  75. package/lib-esm/OAuthHelper/index.d.ts +10 -0
  76. package/lib-esm/OAuthHelper/index.js +10 -0
  77. package/lib-esm/Platform/index.d.ts +15 -0
  78. package/lib-esm/Platform/index.js +15 -0
  79. package/lib-esm/Platform/types.d.ts +70 -0
  80. package/lib-esm/Platform/types.js +65 -0
  81. package/lib-esm/Platform/version.d.ts +1 -1
  82. package/lib-esm/Platform/version.js +1 -1
  83. package/lib-esm/Providers/AWSCloudWatchProvider.d.ts +5 -0
  84. package/lib-esm/Providers/AWSCloudWatchProvider.js +5 -0
  85. package/lib-esm/RNComponents/index.d.ts +15 -0
  86. package/lib-esm/RNComponents/index.js +15 -0
  87. package/lib-esm/ServiceWorker/ServiceWorker.d.ts +3 -0
  88. package/lib-esm/ServiceWorker/ServiceWorker.js +3 -0
  89. package/lib-esm/Signer.d.ts +5 -0
  90. package/lib-esm/Signer.js +5 -0
  91. package/lib-esm/StorageHelper/index.d.ts +11 -1
  92. package/lib-esm/StorageHelper/index.js +11 -1
  93. package/lib-esm/UniversalStorage/index.d.ts +5 -0
  94. package/lib-esm/UniversalStorage/index.js +5 -0
  95. package/lib-esm/Util/BackgroundProcessManager.d.ts +9 -0
  96. package/lib-esm/Util/BackgroundProcessManager.js +9 -0
  97. package/lib-esm/Util/Constants.d.ts +35 -0
  98. package/lib-esm/Util/Constants.js +35 -0
  99. package/lib-esm/Util/DateUtils.d.ts +5 -0
  100. package/lib-esm/Util/DateUtils.js +5 -0
  101. package/lib-esm/Util/Mutex.d.ts +5 -0
  102. package/lib-esm/Util/Mutex.js +5 -0
  103. package/lib-esm/Util/Reachability.d.ts +5 -0
  104. package/lib-esm/Util/Reachability.js +5 -0
  105. package/lib-esm/Util/Retry.d.ts +19 -0
  106. package/lib-esm/Util/Retry.js +19 -0
  107. package/lib-esm/Util/StringUtils.d.ts +10 -0
  108. package/lib-esm/Util/StringUtils.js +10 -0
  109. package/lib-esm/constants.d.ts +10 -0
  110. package/lib-esm/constants.js +10 -0
  111. package/lib-esm/index.d.ts +5 -0
  112. package/lib-esm/index.js +5 -0
  113. package/lib-esm/parseAWSExports.d.ts +5 -0
  114. package/lib-esm/parseAWSExports.js +5 -0
  115. package/lib-esm/tsconfig.tsbuildinfo +1 -1
  116. package/lib-esm/types/types.d.ts +5 -0
  117. package/package.json +2 -2
  118. package/src/Amplify.ts +10 -0
  119. package/src/ClientDevice/index.ts +5 -0
  120. package/src/Credentials.ts +10 -0
  121. package/src/Errors.ts +10 -0
  122. package/src/Hub.ts +20 -0
  123. package/src/I18n/index.ts +3 -0
  124. package/src/JS.ts +54 -0
  125. package/src/Logger/ConsoleLogger.ts +3 -0
  126. package/src/OAuthHelper/index.ts +10 -0
  127. package/src/Platform/index.ts +15 -0
  128. package/src/Platform/types.ts +70 -0
  129. package/src/Platform/version.ts +1 -1
  130. package/src/Providers/AWSCloudWatchProvider.ts +5 -0
  131. package/src/RNComponents/index.ts +15 -0
  132. package/src/ServiceWorker/ServiceWorker.ts +3 -0
  133. package/src/Signer.ts +5 -0
  134. package/src/StorageHelper/index.ts +11 -1
  135. package/src/UniversalStorage/index.ts +5 -0
  136. package/src/Util/BackgroundProcessManager.ts +9 -0
  137. package/src/Util/Constants.ts +35 -0
  138. package/src/Util/DateUtils.ts +5 -0
  139. package/src/Util/Mutex.ts +5 -0
  140. package/src/Util/Reachability.ts +5 -0
  141. package/src/Util/Retry.ts +19 -0
  142. package/src/Util/StringUtils.ts +10 -0
  143. package/src/constants.ts +10 -0
  144. package/src/index.ts +5 -0
  145. package/src/parseAWSExports.ts +5 -0
  146. package/src/types/types.ts +5 -0
@@ -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',
@@ -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;
@@ -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,
@@ -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
  };
@@ -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
@@ -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;