@aws-amplify/core 5.8.17 → 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 (196) hide show
  1. package/lib/Amplify.d.ts +10 -0
  2. package/lib/Amplify.js +10 -0
  3. package/lib/AwsClients/CognitoIdentity/base.js +2 -2
  4. package/lib/AwsClients/CognitoIdentity/getCredentialsForIdentity.js +2 -2
  5. package/lib/AwsClients/CognitoIdentity/getId.js +2 -2
  6. package/lib/AwsClients/Pinpoint/getInAppMessages.js +2 -2
  7. package/lib/AwsClients/Pinpoint/putEvents.js +2 -2
  8. package/lib/AwsClients/Pinpoint/updateEndpoint.js +2 -2
  9. package/lib/ClientDevice/browser.js +3 -4
  10. package/lib/ClientDevice/index.d.ts +5 -0
  11. package/lib/ClientDevice/index.js +5 -0
  12. package/lib/Credentials.d.ts +10 -0
  13. package/lib/Credentials.js +18 -8
  14. package/lib/Errors.d.ts +10 -0
  15. package/lib/Errors.js +12 -3
  16. package/lib/Hub.d.ts +20 -0
  17. package/lib/Hub.js +5 -0
  18. package/lib/I18n/index.d.ts +3 -0
  19. package/lib/I18n/index.js +3 -0
  20. package/lib/JS.d.ts +54 -0
  21. package/lib/JS.js +54 -0
  22. package/lib/Logger/ConsoleLogger.d.ts +3 -0
  23. package/lib/Logger/ConsoleLogger.js +6 -2
  24. package/lib/OAuthHelper/FacebookOAuth.js +2 -2
  25. package/lib/OAuthHelper/GoogleOAuth.js +2 -2
  26. package/lib/OAuthHelper/index.d.ts +10 -0
  27. package/lib/OAuthHelper/index.js +10 -0
  28. package/lib/Platform/detectFramework.js +2 -2
  29. package/lib/Platform/detection/Angular.js +2 -3
  30. package/lib/Platform/detection/Expo.js +1 -2
  31. package/lib/Platform/detection/Next.js +2 -3
  32. package/lib/Platform/detection/Nuxt.js +2 -3
  33. package/lib/Platform/detection/React.js +2 -3
  34. package/lib/Platform/detection/ReactNative.js +1 -2
  35. package/lib/Platform/detection/Svelte.js +2 -3
  36. package/lib/Platform/detection/Vue.js +2 -3
  37. package/lib/Platform/detection/Web.js +1 -2
  38. package/lib/Platform/detection/index.js +1 -2
  39. package/lib/Platform/index.d.ts +15 -0
  40. package/lib/Platform/index.js +15 -0
  41. package/lib/Platform/types.d.ts +70 -0
  42. package/lib/Platform/types.js +78 -13
  43. package/lib/Platform/version.d.ts +1 -1
  44. package/lib/Platform/version.js +1 -1
  45. package/lib/Providers/AWSCloudWatchProvider.d.ts +5 -0
  46. package/lib/Providers/AWSCloudWatchProvider.js +7 -2
  47. package/lib/RNComponents/index.d.ts +15 -0
  48. package/lib/RNComponents/index.js +15 -0
  49. package/lib/ServiceWorker/ServiceWorker.d.ts +3 -0
  50. package/lib/ServiceWorker/ServiceWorker.js +3 -0
  51. package/lib/Signer.d.ts +5 -0
  52. package/lib/Signer.js +5 -0
  53. package/lib/StorageHelper/index.d.ts +11 -1
  54. package/lib/StorageHelper/index.js +11 -1
  55. package/lib/UniversalStorage/index.d.ts +5 -0
  56. package/lib/UniversalStorage/index.js +5 -0
  57. package/lib/Util/BackgroundProcessManager.d.ts +9 -0
  58. package/lib/Util/BackgroundProcessManager.js +12 -3
  59. package/lib/Util/Constants.d.ts +35 -0
  60. package/lib/Util/Constants.js +35 -0
  61. package/lib/Util/DateUtils.d.ts +24 -1
  62. package/lib/Util/DateUtils.js +5 -0
  63. package/lib/Util/Mutex.d.ts +5 -0
  64. package/lib/Util/Mutex.js +5 -0
  65. package/lib/Util/Reachability.d.ts +5 -0
  66. package/lib/Util/Reachability.js +5 -0
  67. package/lib/Util/Retry.d.ts +19 -0
  68. package/lib/Util/Retry.js +24 -5
  69. package/lib/Util/StringUtils.d.ts +10 -0
  70. package/lib/Util/StringUtils.js +12 -3
  71. package/lib/clients/handlers/fetch.js +47 -49
  72. package/lib/clients/internal/composeServiceApi.js +2 -2
  73. package/lib/clients/internal/composeTransferHandler.d.ts +1 -1
  74. package/lib/clients/middleware/retry/defaultRetryDecider.js +2 -2
  75. package/lib/clients/middleware/retry/middleware.js +3 -3
  76. package/lib/clients/middleware/signing/middleware.js +2 -2
  77. package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalHeaders.d.ts +1 -1
  78. package/lib/clients/middleware/signing/signer/signatureV4/utils/getHashedPayload.d.ts +1 -1
  79. package/lib/clients/middleware/signing/signer/signatureV4/utils/getSignedHeaders.d.ts +1 -1
  80. package/lib/clients/middleware/userAgent/middleware.js +2 -2
  81. package/lib/clients/serde/json.js +2 -2
  82. package/lib/constants.d.ts +10 -0
  83. package/lib/constants.js +10 -0
  84. package/lib/index.d.ts +5 -0
  85. package/lib/index.js +5 -0
  86. package/lib/parseAWSExports.d.ts +5 -0
  87. package/lib/parseAWSExports.js +5 -0
  88. package/lib/tsconfig.tsbuildinfo +1 -1
  89. package/lib/types/types.d.ts +5 -0
  90. package/lib-esm/Amplify.d.ts +10 -0
  91. package/lib-esm/Amplify.js +10 -0
  92. package/lib-esm/AwsClients/CognitoIdentity/base.js +2 -2
  93. package/lib-esm/AwsClients/CognitoIdentity/getCredentialsForIdentity.js +2 -2
  94. package/lib-esm/AwsClients/CognitoIdentity/getId.js +2 -2
  95. package/lib-esm/AwsClients/Pinpoint/getInAppMessages.js +2 -2
  96. package/lib-esm/AwsClients/Pinpoint/putEvents.js +2 -2
  97. package/lib-esm/AwsClients/Pinpoint/updateEndpoint.js +2 -2
  98. package/lib-esm/ClientDevice/index.d.ts +5 -0
  99. package/lib-esm/ClientDevice/index.js +5 -0
  100. package/lib-esm/Credentials.d.ts +10 -0
  101. package/lib-esm/Credentials.js +18 -8
  102. package/lib-esm/Errors.d.ts +10 -0
  103. package/lib-esm/Errors.js +10 -0
  104. package/lib-esm/Hub.d.ts +20 -0
  105. package/lib-esm/Hub.js +5 -0
  106. package/lib-esm/I18n/index.d.ts +3 -0
  107. package/lib-esm/I18n/index.js +3 -0
  108. package/lib-esm/JS.d.ts +54 -0
  109. package/lib-esm/JS.js +54 -0
  110. package/lib-esm/Logger/ConsoleLogger.d.ts +3 -0
  111. package/lib-esm/Logger/ConsoleLogger.js +5 -1
  112. package/lib-esm/OAuthHelper/FacebookOAuth.js +2 -2
  113. package/lib-esm/OAuthHelper/GoogleOAuth.js +2 -2
  114. package/lib-esm/OAuthHelper/index.d.ts +10 -0
  115. package/lib-esm/OAuthHelper/index.js +10 -0
  116. package/lib-esm/Platform/index.d.ts +15 -0
  117. package/lib-esm/Platform/index.js +15 -0
  118. package/lib-esm/Platform/types.d.ts +70 -0
  119. package/lib-esm/Platform/types.js +65 -0
  120. package/lib-esm/Platform/version.d.ts +1 -1
  121. package/lib-esm/Platform/version.js +1 -1
  122. package/lib-esm/Providers/AWSCloudWatchProvider.d.ts +5 -0
  123. package/lib-esm/Providers/AWSCloudWatchProvider.js +7 -2
  124. package/lib-esm/RNComponents/index.d.ts +15 -0
  125. package/lib-esm/RNComponents/index.js +15 -0
  126. package/lib-esm/ServiceWorker/ServiceWorker.d.ts +3 -0
  127. package/lib-esm/ServiceWorker/ServiceWorker.js +3 -0
  128. package/lib-esm/Signer.d.ts +5 -0
  129. package/lib-esm/Signer.js +5 -0
  130. package/lib-esm/StorageHelper/index.d.ts +11 -1
  131. package/lib-esm/StorageHelper/index.js +11 -1
  132. package/lib-esm/UniversalStorage/index.d.ts +5 -0
  133. package/lib-esm/UniversalStorage/index.js +5 -0
  134. package/lib-esm/Util/BackgroundProcessManager.d.ts +9 -0
  135. package/lib-esm/Util/BackgroundProcessManager.js +11 -2
  136. package/lib-esm/Util/Constants.d.ts +35 -0
  137. package/lib-esm/Util/Constants.js +35 -0
  138. package/lib-esm/Util/DateUtils.d.ts +24 -1
  139. package/lib-esm/Util/DateUtils.js +5 -0
  140. package/lib-esm/Util/Mutex.d.ts +5 -0
  141. package/lib-esm/Util/Mutex.js +5 -0
  142. package/lib-esm/Util/Reachability.d.ts +5 -0
  143. package/lib-esm/Util/Reachability.js +5 -0
  144. package/lib-esm/Util/Retry.d.ts +19 -0
  145. package/lib-esm/Util/Retry.js +21 -2
  146. package/lib-esm/Util/StringUtils.d.ts +10 -0
  147. package/lib-esm/Util/StringUtils.js +10 -0
  148. package/lib-esm/clients/handlers/fetch.js +47 -49
  149. package/lib-esm/clients/internal/composeServiceApi.js +2 -2
  150. package/lib-esm/clients/internal/composeTransferHandler.d.ts +1 -1
  151. package/lib-esm/clients/middleware/retry/defaultRetryDecider.js +2 -2
  152. package/lib-esm/clients/middleware/retry/middleware.js +3 -3
  153. package/lib-esm/clients/middleware/signing/middleware.js +2 -2
  154. package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalHeaders.d.ts +1 -1
  155. package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getHashedPayload.d.ts +1 -1
  156. package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSignedHeaders.d.ts +1 -1
  157. package/lib-esm/clients/middleware/userAgent/middleware.js +2 -2
  158. package/lib-esm/clients/serde/json.js +2 -2
  159. package/lib-esm/constants.d.ts +10 -0
  160. package/lib-esm/constants.js +10 -0
  161. package/lib-esm/index.d.ts +5 -0
  162. package/lib-esm/index.js +5 -0
  163. package/lib-esm/parseAWSExports.d.ts +5 -0
  164. package/lib-esm/parseAWSExports.js +5 -0
  165. package/lib-esm/tsconfig.tsbuildinfo +1 -1
  166. package/lib-esm/types/types.d.ts +5 -0
  167. package/package.json +31 -14
  168. package/src/Amplify.ts +10 -0
  169. package/src/ClientDevice/index.ts +5 -0
  170. package/src/Credentials.ts +10 -0
  171. package/src/Errors.ts +10 -0
  172. package/src/Hub.ts +20 -0
  173. package/src/I18n/index.ts +3 -0
  174. package/src/JS.ts +54 -0
  175. package/src/Logger/ConsoleLogger.ts +3 -0
  176. package/src/OAuthHelper/index.ts +10 -0
  177. package/src/Platform/index.ts +15 -0
  178. package/src/Platform/types.ts +70 -0
  179. package/src/Platform/version.ts +1 -1
  180. package/src/Providers/AWSCloudWatchProvider.ts +5 -0
  181. package/src/RNComponents/index.ts +15 -0
  182. package/src/ServiceWorker/ServiceWorker.ts +3 -0
  183. package/src/Signer.ts +5 -0
  184. package/src/StorageHelper/index.ts +11 -1
  185. package/src/UniversalStorage/index.ts +5 -0
  186. package/src/Util/BackgroundProcessManager.ts +9 -0
  187. package/src/Util/Constants.ts +35 -0
  188. package/src/Util/DateUtils.ts +5 -0
  189. package/src/Util/Mutex.ts +5 -0
  190. package/src/Util/Reachability.ts +5 -0
  191. package/src/Util/Retry.ts +19 -0
  192. package/src/Util/StringUtils.ts +10 -0
  193. package/src/constants.ts +10 -0
  194. package/src/index.ts +5 -0
  195. package/src/parseAWSExports.ts +5 -0
  196. package/src/types/types.ts +5 -0
package/lib/Amplify.d.ts CHANGED
@@ -1,4 +1,9 @@
1
1
  import { ConsoleLogger as LoggerClass } from './Logger';
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 AmplifyClass {
3
8
  private _components;
4
9
  private _config;
@@ -25,4 +30,9 @@ export declare class AmplifyClass {
25
30
  configure(config?: any): {};
26
31
  addPluggable(pluggable: any): void;
27
32
  }
33
+ /**
34
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
35
+ * See the migration guide:
36
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
37
+ */
28
38
  export declare const Amplify: AmplifyClass;
package/lib/Amplify.js CHANGED
@@ -21,6 +21,11 @@ exports.Amplify = exports.AmplifyClass = void 0;
21
21
  // SPDX-License-Identifier: Apache-2.0
22
22
  var Logger_1 = require("./Logger");
23
23
  var logger = new Logger_1.ConsoleLogger('Amplify');
24
+ /**
25
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
26
+ * See the migration guide:
27
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
28
+ */
24
29
  var AmplifyClass = /** @class */ (function () {
25
30
  function AmplifyClass() {
26
31
  // Everything that is `register`ed is tracked here
@@ -117,4 +122,9 @@ var AmplifyClass = /** @class */ (function () {
117
122
  return AmplifyClass;
118
123
  }());
119
124
  exports.AmplifyClass = AmplifyClass;
125
+ /**
126
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
127
+ * See the migration guide:
128
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
129
+ */
120
130
  exports.Amplify = new AmplifyClass();
@@ -11,8 +11,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  });
12
12
  };
13
13
  var __generator = (this && this.__generator) || function (thisArg, body) {
14
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
15
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
15
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
16
16
  function verb(n) { return function (v) { return step([n, v]); }; }
17
17
  function step(op) {
18
18
  if (f) throw new TypeError("Generator is already executing.");
@@ -11,8 +11,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  });
12
12
  };
13
13
  var __generator = (this && this.__generator) || function (thisArg, body) {
14
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
15
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
15
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
16
16
  function verb(n) { return function (v) { return step([n, v]); }; }
17
17
  function step(op) {
18
18
  if (f) throw new TypeError("Generator is already executing.");
@@ -11,8 +11,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  });
12
12
  };
13
13
  var __generator = (this && this.__generator) || function (thisArg, body) {
14
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
15
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
15
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
16
16
  function verb(n) { return function (v) { return step([n, v]); }; }
17
17
  function step(op) {
18
18
  if (f) throw new TypeError("Generator is already executing.");
@@ -11,8 +11,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  });
12
12
  };
13
13
  var __generator = (this && this.__generator) || function (thisArg, body) {
14
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
15
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
15
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
16
16
  function verb(n) { return function (v) { return step([n, v]); }; }
17
17
  function step(op) {
18
18
  if (f) throw new TypeError("Generator is already executing.");
@@ -11,8 +11,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  });
12
12
  };
13
13
  var __generator = (this && this.__generator) || function (thisArg, body) {
14
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
15
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
15
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
16
16
  function verb(n) { return function (v) { return step([n, v]); }; }
17
17
  function step(op) {
18
18
  if (f) throw new TypeError("Generator is already executing.");
@@ -11,8 +11,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  });
12
12
  };
13
13
  var __generator = (this && this.__generator) || function (thisArg, body) {
14
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
15
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
15
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
16
16
  function verb(n) { return function (v) { return step([n, v]); }; }
17
17
  function step(op) {
18
18
  if (f) throw new TypeError("Generator is already executing.");
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.browserType = exports.dimension = exports.clientInfo = void 0;
3
+ exports.clientInfo = clientInfo;
4
+ exports.dimension = dimension;
5
+ exports.browserType = browserType;
4
6
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
7
  // SPDX-License-Identifier: Apache-2.0
6
8
  var Logger_1 = require("../Logger");
@@ -11,7 +13,6 @@ function clientInfo() {
11
13
  }
12
14
  return browserClientInfo();
13
15
  }
14
- exports.clientInfo = clientInfo;
15
16
  function browserClientInfo() {
16
17
  if (typeof window === 'undefined') {
17
18
  logger.warn('No window object available to get browser client info');
@@ -45,7 +46,6 @@ function dimension() {
45
46
  height: window.innerHeight,
46
47
  };
47
48
  }
48
- exports.dimension = dimension;
49
49
  function browserTimezone() {
50
50
  var tzMatch = /\(([A-Za-z\s].*)\)/.exec(new Date().toString());
51
51
  return tzMatch ? tzMatch[1] || '' : '';
@@ -77,4 +77,3 @@ function browserType(userAgent) {
77
77
  }
78
78
  return { type: '', version: '' };
79
79
  }
80
- exports.browserType = browserType;
@@ -1,3 +1,8 @@
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 class ClientDevice {
2
7
  static clientInfo(): {
3
8
  platform?: undefined;
@@ -4,6 +4,11 @@
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.ClientDevice = void 0;
6
6
  var browser_1 = require("./browser");
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
  var ClientDevice = /** @class */ (function () {
8
13
  function ClientDevice() {
9
14
  }
@@ -1,4 +1,9 @@
1
1
  import { ICredentials } 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 CredentialsClass {
3
8
  private _config;
4
9
  private _credentials;
@@ -44,4 +49,9 @@ export declare class CredentialsClass {
44
49
  authenticated: any;
45
50
  };
46
51
  }
52
+ /**
53
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
54
+ * See the migration guide:
55
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
56
+ */
47
57
  export declare const Credentials: CredentialsClass;
@@ -20,8 +20,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
20
20
  });
21
21
  };
22
22
  var __generator = (this && this.__generator) || function (thisArg, body) {
23
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
23
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
24
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
25
  function verb(n) { return function (v) { return step([n, v]); }; }
26
26
  function step(op) {
27
27
  if (f) throw new TypeError("Generator is already executing.");
@@ -68,6 +68,11 @@ var AMPLIFY_SYMBOL = (typeof Symbol !== 'undefined' && typeof Symbol.for === 'fu
68
68
  var dispatchCredentialsEvent = function (event, data, message) {
69
69
  Hub_1.Hub.dispatch('core', { event: event, data: data, message: message }, 'Credentials', AMPLIFY_SYMBOL);
70
70
  };
71
+ /**
72
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
73
+ * See the migration guide:
74
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
75
+ */
71
76
  var CredentialsClass = /** @class */ (function () {
72
77
  function CredentialsClass(config) {
73
78
  this._gettingCredPromise = null;
@@ -257,20 +262,20 @@ var CredentialsClass = /** @class */ (function () {
257
262
  return this._nextCredentialsRefresh <= Date.now();
258
263
  };
259
264
  CredentialsClass.prototype._setCredentialsForGuest = function () {
260
- var _a;
261
265
  return __awaiter(this, void 0, void 0, function () {
262
- var _b, identityPoolId, region, mandatorySignIn, identityPoolRegion, identityId, _c, cognitoConfig, guestCredentialsProvider, credentials;
266
+ var _a, identityPoolId, region, mandatorySignIn, identityPoolRegion, identityId, _b, cognitoConfig, guestCredentialsProvider, credentials;
263
267
  var _this = this;
268
+ var _c;
264
269
  return __generator(this, function (_d) {
265
270
  switch (_d.label) {
266
271
  case 0:
267
272
  logger.debug('setting credentials for guest');
268
- if (!((_a = this._config) === null || _a === void 0 ? void 0 : _a.identityPoolId)) {
273
+ if (!((_c = this._config) === null || _c === void 0 ? void 0 : _c.identityPoolId)) {
269
274
  // If Credentials are not configured thru Auth module,
270
275
  // doing best effort to check if the library was configured
271
276
  this._config = Object.assign({}, this._config, (0, parseAWSExports_1.parseAWSExports)(this._config || {}).Auth);
272
277
  }
273
- _b = this._config, identityPoolId = _b.identityPoolId, region = _b.region, mandatorySignIn = _b.mandatorySignIn, identityPoolRegion = _b.identityPoolRegion;
278
+ _a = this._config, identityPoolId = _a.identityPoolId, region = _a.region, mandatorySignIn = _a.mandatorySignIn, identityPoolRegion = _a.identityPoolRegion;
274
279
  if (mandatorySignIn) {
275
280
  return [2 /*return*/, Promise.reject('cannot get guest credentials when mandatory signin enabled')];
276
281
  }
@@ -282,10 +287,10 @@ var CredentialsClass = /** @class */ (function () {
282
287
  logger.debug('region is not configured for getting the credentials');
283
288
  return [2 /*return*/, Promise.reject('region is not configured for getting the credentials')];
284
289
  }
285
- _c = this;
290
+ _b = this;
286
291
  return [4 /*yield*/, this._getGuestIdentityId()];
287
292
  case 1:
288
- identityId = (_c._identityId = _d.sent());
293
+ identityId = (_b._identityId = _d.sent());
289
294
  cognitoConfig = { region: identityPoolRegion !== null && identityPoolRegion !== void 0 ? identityPoolRegion : region };
290
295
  guestCredentialsProvider = function () { return __awaiter(_this, void 0, void 0, function () {
291
296
  var IdentityId, Credentials;
@@ -674,5 +679,10 @@ var CredentialsClass = /** @class */ (function () {
674
679
  return CredentialsClass;
675
680
  }());
676
681
  exports.CredentialsClass = CredentialsClass;
682
+ /**
683
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
684
+ * See the migration guide:
685
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
686
+ */
677
687
  exports.Credentials = new CredentialsClass(null);
678
688
  Amplify_1.Amplify.register(exports.Credentials);
package/lib/Errors.d.ts CHANGED
@@ -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 missingConfig(name: string): Error;
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 invalidParameter(name: string): Error;
package/lib/Errors.js CHANGED
@@ -2,12 +2,21 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.invalidParameter = exports.missingConfig = void 0;
5
+ exports.missingConfig = missingConfig;
6
+ exports.invalidParameter = invalidParameter;
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
+ */
6
12
  function missingConfig(name) {
7
13
  return new Error('Missing config value of ' + name);
8
14
  }
9
- exports.missingConfig = missingConfig;
15
+ /**
16
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
17
+ * See the migration guide:
18
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
19
+ */
10
20
  function invalidParameter(name) {
11
21
  return new Error('Invalid parameter value of ' + name);
12
22
  }
13
- exports.invalidParameter = invalidParameter;
package/lib/Hub.d.ts CHANGED
@@ -1,14 +1,29 @@
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 type HubCapsule = {
2
7
  channel: string;
3
8
  payload: HubPayload;
4
9
  source: string;
5
10
  patternInfo?: string[];
6
11
  };
12
+ /**
13
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
14
+ * See the migration guide:
15
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
16
+ */
7
17
  export type HubPayload = {
8
18
  event: string;
9
19
  data?: any;
10
20
  message?: string;
11
21
  };
22
+ /**
23
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
24
+ * See the migration guide:
25
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
26
+ */
12
27
  export type HubCallback = (capsule: HubCapsule) => void;
13
28
  export type LegacyCallback = {
14
29
  onHubCapsule: HubCallback;
@@ -52,4 +67,9 @@ export declare class HubClass {
52
67
  listen(channel: string | RegExp, callback?: HubCallback | LegacyCallback, listenerName?: string): () => void;
53
68
  private _toListeners;
54
69
  }
70
+ /**
71
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
72
+ * See the migration guide:
73
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
74
+ */
55
75
  export declare const Hub: HubClass;
package/lib/Hub.js CHANGED
@@ -216,4 +216,9 @@ exports.HubClass = HubClass;
216
216
  /*We export a __default__ instance of HubClass to use it as a
217
217
  pseudo Singleton for the main messaging bus, however you can still create
218
218
  your own instance of HubClass() for a separate "private bus" of events.*/
219
+ /**
220
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
221
+ * See the migration guide:
222
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
223
+ */
219
224
  exports.Hub = new HubClass('__default__');
@@ -1,5 +1,8 @@
1
1
  /**
2
2
  * Export I18n APIs
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/
3
6
  */
4
7
  export declare class I18n {
5
8
  /**
package/lib/I18n/index.js CHANGED
@@ -11,6 +11,9 @@ var _config = null;
11
11
  var _i18n = null;
12
12
  /**
13
13
  * Export I18n APIs
14
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
15
+ * See the migration guide:
16
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
14
17
  */
15
18
  var I18n = /** @class */ (function () {
16
19
  function I18n() {
package/lib/JS.d.ts CHANGED
@@ -1,11 +1,56 @@
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 isEmpty: (obj?: {}) => boolean;
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 sortByField: (list: any, field: any, dir: any) => boolean;
13
+ /**
14
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
15
+ * See the migration guide:
16
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
17
+ */
3
18
  export declare const objectLessAttributes: (obj: any, less: any) => any;
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
+ */
4
24
  export declare const filenameToContentType: (filename: any, defVal?: string) => string;
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
+ */
5
30
  export declare const isTextFile: (contentType: any) => boolean;
31
+ /**
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/
35
+ */
6
36
  export declare const generateRandomString: () => string;
37
+ /**
38
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
39
+ * See the migration guide:
40
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
41
+ */
7
42
  export declare const makeQuerablePromise: (promise: any) => any;
43
+ /**
44
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
45
+ * See the migration guide:
46
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
47
+ */
8
48
  export declare const isWebWorker: () => boolean;
49
+ /**
50
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
51
+ * See the migration guide:
52
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
53
+ */
9
54
  export declare const browserOrNode: () => {
10
55
  isBrowser: boolean;
11
56
  isNode: boolean;
@@ -15,6 +60,9 @@ export declare const browserOrNode: () => {
15
60
  * @param {Object} obj - the object need to be transferred
16
61
  * @param {Array} whiteListForItself - whitelist itself from being transferred
17
62
  * @param {Array} whiteListForChildren - whitelist its children keys from being transferred
63
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
64
+ * See the migration guide:
65
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
18
66
  */
19
67
  export declare const transferKeyToLowerCase: (obj: any, whiteListForItself?: any[], whiteListForChildren?: any[]) => any;
20
68
  /**
@@ -22,11 +70,17 @@ export declare const transferKeyToLowerCase: (obj: any, whiteListForItself?: any
22
70
  * @param {Object} obj - the object need to be transferred
23
71
  * @param {Array} whiteListForItself - whitelist itself from being transferred
24
72
  * @param {Array} whiteListForChildren - whitelist its children keys from being transferred
73
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
74
+ * See the migration guide:
75
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
25
76
  */
26
77
  export declare const transferKeyToUpperCase: (obj: any, whiteListForItself?: any[], whiteListForChildren?: any[]) => any;
27
78
  /**
28
79
  * Return true if the object is a strict object
29
80
  * which means it's not Array, Function, Number, String, Boolean or Null
30
81
  * @param obj the Object
82
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
83
+ * See the migration guide:
84
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
31
85
  */
32
86
  export declare const isStrictObject: (obj: any) => boolean;
package/lib/JS.js CHANGED
@@ -43,11 +43,21 @@ var MIME_MAP = [
43
43
  { type: 'application/vnd.ms-excel', ext: 'xlsx' },
44
44
  { type: 'message/rfc822', ext: 'eml' },
45
45
  ];
46
+ /**
47
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
48
+ * See the migration guide:
49
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
50
+ */
46
51
  var isEmpty = function (obj) {
47
52
  if (obj === void 0) { obj = {}; }
48
53
  return Object.keys(obj).length === 0;
49
54
  };
50
55
  exports.isEmpty = isEmpty;
56
+ /**
57
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
58
+ * See the migration guide:
59
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
60
+ */
51
61
  var sortByField = function (list, field, dir) {
52
62
  if (!list || !list.sort) {
53
63
  return false;
@@ -73,6 +83,11 @@ var sortByField = function (list, field, dir) {
73
83
  return true;
74
84
  };
75
85
  exports.sortByField = sortByField;
86
+ /**
87
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
88
+ * See the migration guide:
89
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
90
+ */
76
91
  var objectLessAttributes = function (obj, less) {
77
92
  var ret = Object.assign({}, obj);
78
93
  if (less) {
@@ -88,6 +103,11 @@ var objectLessAttributes = function (obj, less) {
88
103
  return ret;
89
104
  };
90
105
  exports.objectLessAttributes = objectLessAttributes;
106
+ /**
107
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
108
+ * See the migration guide:
109
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
110
+ */
91
111
  var filenameToContentType = function (filename, defVal) {
92
112
  if (defVal === void 0) { defVal = 'application/octet-stream'; }
93
113
  var name = filename.toLowerCase();
@@ -95,6 +115,11 @@ var filenameToContentType = function (filename, defVal) {
95
115
  return filtered.length > 0 ? filtered[0].type : defVal;
96
116
  };
97
117
  exports.filenameToContentType = filenameToContentType;
118
+ /**
119
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
120
+ * See the migration guide:
121
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
122
+ */
98
123
  var isTextFile = function (contentType) {
99
124
  var type = contentType.toLowerCase();
100
125
  if (type.startsWith('text/')) {
@@ -105,6 +130,11 @@ var isTextFile = function (contentType) {
105
130
  'application/sh' === type);
106
131
  };
107
132
  exports.isTextFile = isTextFile;
133
+ /**
134
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
135
+ * See the migration guide:
136
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
137
+ */
108
138
  var generateRandomString = function () {
109
139
  var result = '';
110
140
  var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
@@ -114,6 +144,11 @@ var generateRandomString = function () {
114
144
  return result;
115
145
  };
116
146
  exports.generateRandomString = generateRandomString;
147
+ /**
148
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
149
+ * See the migration guide:
150
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
151
+ */
117
152
  var makeQuerablePromise = function (promise) {
118
153
  if (promise.isResolved)
119
154
  return promise;
@@ -135,6 +170,11 @@ var makeQuerablePromise = function (promise) {
135
170
  return result;
136
171
  };
137
172
  exports.makeQuerablePromise = makeQuerablePromise;
173
+ /**
174
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
175
+ * See the migration guide:
176
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
177
+ */
138
178
  var isWebWorker = function () {
139
179
  if (typeof self === 'undefined') {
140
180
  return false;
@@ -144,6 +184,11 @@ var isWebWorker = function () {
144
184
  self instanceof selfContext.WorkerGlobalScope);
145
185
  };
146
186
  exports.isWebWorker = isWebWorker;
187
+ /**
188
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
189
+ * See the migration guide:
190
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
191
+ */
147
192
  var browserOrNode = function () {
148
193
  var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
149
194
  var isNode = typeof process !== 'undefined' &&
@@ -160,6 +205,9 @@ exports.browserOrNode = browserOrNode;
160
205
  * @param {Object} obj - the object need to be transferred
161
206
  * @param {Array} whiteListForItself - whitelist itself from being transferred
162
207
  * @param {Array} whiteListForChildren - whitelist its children keys from being transferred
208
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
209
+ * See the migration guide:
210
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
163
211
  */
164
212
  var transferKeyToLowerCase = function (obj, whiteListForItself, whiteListForChildren) {
165
213
  if (whiteListForItself === void 0) { whiteListForItself = []; }
@@ -185,6 +233,9 @@ exports.transferKeyToLowerCase = transferKeyToLowerCase;
185
233
  * @param {Object} obj - the object need to be transferred
186
234
  * @param {Array} whiteListForItself - whitelist itself from being transferred
187
235
  * @param {Array} whiteListForChildren - whitelist its children keys from being transferred
236
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
237
+ * See the migration guide:
238
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
188
239
  */
189
240
  var transferKeyToUpperCase = function (obj, whiteListForItself, whiteListForChildren) {
190
241
  if (whiteListForItself === void 0) { whiteListForItself = []; }
@@ -209,6 +260,9 @@ exports.transferKeyToUpperCase = transferKeyToUpperCase;
209
260
  * Return true if the object is a strict object
210
261
  * which means it's not Array, Function, Number, String, Boolean or Null
211
262
  * @param obj the Object
263
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
264
+ * See the migration guide:
265
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
212
266
  */
213
267
  var isStrictObject = function (obj) {
214
268
  return (obj instanceof Object &&
@@ -10,6 +10,9 @@ export declare enum LOG_TYPE {
10
10
  /**
11
11
  * Write logs
12
12
  * @class Logger
13
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
14
+ * See the migration guide:
15
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
13
16
  */
14
17
  export declare class ConsoleLogger implements Logger {
15
18
  name: string;
@@ -54,12 +54,15 @@ var LOG_TYPE;
54
54
  LOG_TYPE["INFO"] = "INFO";
55
55
  LOG_TYPE["WARN"] = "WARN";
56
56
  LOG_TYPE["VERBOSE"] = "VERBOSE";
57
- })(LOG_TYPE = exports.LOG_TYPE || (exports.LOG_TYPE = {}));
57
+ })(LOG_TYPE || (exports.LOG_TYPE = LOG_TYPE = {}));
58
58
  /**
59
59
  * Write logs
60
60
  * @class Logger
61
+ * @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
62
+ * See the migration guide:
63
+ * https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
61
64
  */
62
- var ConsoleLogger = exports.ConsoleLogger = /** @class */ (function () {
65
+ var ConsoleLogger = /** @class */ (function () {
63
66
  /**
64
67
  * @constructor
65
68
  * @param {string} name - Name of the logger
@@ -245,3 +248,4 @@ var ConsoleLogger = exports.ConsoleLogger = /** @class */ (function () {
245
248
  ConsoleLogger.LOG_LEVEL = null;
246
249
  return ConsoleLogger;
247
250
  }());
251
+ exports.ConsoleLogger = ConsoleLogger;
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");