@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
@@ -23,6 +23,11 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
24
  * THE SOFTWARE.
25
25
  */
26
+ /**
27
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
28
+ * See the migration guide:
29
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
30
+ */
26
31
  var Mutex = /** @class */ (function () {
27
32
  function Mutex() {
28
33
  this._queue = [];
@@ -2,6 +2,11 @@ import Observable from 'zen-observable-ts';
2
2
  type NetworkStatus = {
3
3
  online: boolean;
4
4
  };
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
  export default class ReachabilityNavigator implements Reachability {
6
11
  private static _observers;
7
12
  networkMonitor(netInfo?: any): Observable<NetworkStatus>;
@@ -13,6 +13,11 @@ var __values = (this && this.__values) || function(o) {
13
13
  // SPDX-License-Identifier: Apache-2.0
14
14
  import { browserOrNode, isWebWorker } from '@aws-amplify/core';
15
15
  import Observable from 'zen-observable-ts';
16
+ /**
17
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
18
+ * See the migration guide:
19
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
20
+ */
16
21
  var ReachabilityNavigator = /** @class */ (function () {
17
22
  function ReachabilityNavigator() {
18
23
  }
@@ -1,21 +1,40 @@
1
1
  import { DelayFunction } from '../types';
2
+ /**
3
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
4
+ * See the migration guide:
5
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
6
+ */
2
7
  export declare class NonRetryableError extends Error {
3
8
  readonly nonRetryable = true;
4
9
  constructor(message: string);
5
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
+ */
6
16
  export declare const isNonRetryableError: (obj: any) => obj is NonRetryableError;
7
17
  /**
8
18
  * @private
9
19
  * Internal use of Amplify only
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/
10
23
  */
11
24
  export declare function retry<T>(functionToRetry: (...args: any[]) => T, args: any[], delayFn: DelayFunction, onTerminate?: Promise<void>): Promise<T>;
12
25
  /**
13
26
  * @private
14
27
  * Internal use of Amplify only
28
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
29
+ * See the migration guide:
30
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
15
31
  */
16
32
  export declare function jitteredBackoff(maxDelayMs?: number): DelayFunction;
17
33
  /**
18
34
  * @private
19
35
  * Internal use of Amplify only
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/
20
39
  */
21
40
  export declare const jitteredExponentialRetry: <T>(functionToRetry: (...args: any[]) => T, args: any[], maxDelayMs?: number, onTerminate?: Promise<void>) => Promise<T>;
@@ -76,6 +76,11 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
76
76
  };
77
77
  import { ConsoleLogger as Logger } from '../Logger/ConsoleLogger';
78
78
  var logger = new Logger('Util');
79
+ /**
80
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
81
+ * See the migration guide:
82
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
83
+ */
79
84
  var NonRetryableError = /** @class */ (function (_super) {
80
85
  __extends(NonRetryableError, _super);
81
86
  function NonRetryableError(message) {
@@ -86,6 +91,11 @@ var NonRetryableError = /** @class */ (function (_super) {
86
91
  return NonRetryableError;
87
92
  }(Error));
88
93
  export { NonRetryableError };
94
+ /**
95
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
96
+ * See the migration guide:
97
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
98
+ */
89
99
  export var isNonRetryableError = function (obj) {
90
100
  var key = 'nonRetryable';
91
101
  return obj && obj[key];
@@ -93,6 +103,9 @@ export var isNonRetryableError = function (obj) {
93
103
  /**
94
104
  * @private
95
105
  * Internal use of Amplify only
106
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
107
+ * See the migration guide:
108
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
96
109
  */
97
110
  export function retry(functionToRetry, args, delayFn, onTerminate) {
98
111
  return __awaiter(this, void 0, void 0, function () {
@@ -178,6 +191,9 @@ var MAX_DELAY_MS = 5 * 60 * 1000;
178
191
  /**
179
192
  * @private
180
193
  * Internal use of Amplify only
194
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
195
+ * See the migration guide:
196
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
181
197
  */
182
198
  export function jitteredBackoff(maxDelayMs) {
183
199
  if (maxDelayMs === void 0) { maxDelayMs = MAX_DELAY_MS; }
@@ -191,6 +207,9 @@ export function jitteredBackoff(maxDelayMs) {
191
207
  /**
192
208
  * @private
193
209
  * Internal use of Amplify only
210
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
211
+ * See the migration guide:
212
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
194
213
  */
195
214
  export var jitteredExponentialRetry = function (functionToRetry, args, maxDelayMs, onTerminate) {
196
215
  if (maxDelayMs === void 0) { maxDelayMs = MAX_DELAY_MS; }
@@ -1,2 +1,12 @@
1
+ /**
2
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
3
+ * See the migration guide:
4
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
5
+ */
1
6
  export declare function urlSafeEncode(str: string): string;
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
+ */
2
12
  export declare function urlSafeDecode(hex: string): string;
@@ -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) {
4
9
  return str
5
10
  .split('')
@@ -11,6 +16,11 @@ export function urlSafeEncode(str) {
11
16
  })
12
17
  .join('');
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 function urlSafeDecode(hex) {
15
25
  return hex
16
26
  .match(/.{2}/g)
@@ -1,2 +1,12 @@
1
+ /**
2
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
3
+ * See the migration guide:
4
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
5
+ */
1
6
  export declare const INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER: string | symbol;
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
+ */
2
12
  export declare const USER_AGENT_HEADER = "x-amz-user-agent";
@@ -5,7 +5,17 @@
5
5
  * is used for AppSync/GraphQL subscriptions in the API category.
6
6
  */
7
7
  var hasSymbol = typeof Symbol !== 'undefined' && typeof Symbol.for === 'function';
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 var INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER = hasSymbol
9
14
  ? Symbol.for('INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER')
10
15
  : '@@INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER';
16
+ /**
17
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
18
+ * See the migration guide:
19
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
20
+ */
11
21
  export var USER_AGENT_HEADER = 'x-amz-user-agent';
@@ -20,6 +20,11 @@ export { UniversalStorage } from './UniversalStorage';
20
20
  export { Platform, getAmplifyUserAgentObject, getAmplifyUserAgent, } from './Platform';
21
21
  export { ApiAction, AuthAction, AnalyticsAction, Category, CustomUserAgentDetails, DataStoreAction, Framework, GeoAction, InteractionsAction, InAppMessagingAction, PredictionsAction, PubSubAction, PushNotificationAction, StorageAction, } from './Platform/types';
22
22
  export { INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER, USER_AGENT_HEADER, } from './constants';
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
+ */
23
28
  export declare const Constants: {
24
29
  userAgent: string;
25
30
  };
package/lib-esm/index.js CHANGED
@@ -22,6 +22,11 @@ export { UniversalStorage } from './UniversalStorage';
22
22
  export { Platform, getAmplifyUserAgentObject, getAmplifyUserAgent, } from './Platform';
23
23
  export { ApiAction, AuthAction, AnalyticsAction, Category, DataStoreAction, Framework, GeoAction, InteractionsAction, InAppMessagingAction, PredictionsAction, PubSubAction, PushNotificationAction, StorageAction, } from './Platform/types';
24
24
  export { INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER, USER_AGENT_HEADER, } from './constants';
25
+ /**
26
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
27
+ * See the migration guide:
28
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
29
+ */
25
30
  export var Constants = {
26
31
  userAgent: Platform.userAgent,
27
32
  };
@@ -1,2 +1,7 @@
1
1
  import { AmplifyConfig } from './types';
2
+ /**
3
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
4
+ * See the migration guide:
5
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
6
+ */
2
7
  export declare const parseAWSExports: (config: any) => AmplifyConfig;
@@ -11,6 +11,11 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { ConsoleLogger as Logger } from './Logger';
13
13
  var logger = new Logger('Parser');
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 var parseAWSExports = function (config) {
15
20
  var amplifyConfig = {};
16
21
  // Analytics