@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.
- package/lib/Amplify.d.ts +10 -0
- package/lib/Amplify.js +10 -0
- package/lib/AwsClients/CognitoIdentity/base.js +2 -2
- package/lib/AwsClients/CognitoIdentity/getCredentialsForIdentity.js +2 -2
- package/lib/AwsClients/CognitoIdentity/getId.js +2 -2
- package/lib/AwsClients/Pinpoint/getInAppMessages.js +2 -2
- package/lib/AwsClients/Pinpoint/putEvents.js +2 -2
- package/lib/AwsClients/Pinpoint/updateEndpoint.js +2 -2
- package/lib/ClientDevice/browser.js +3 -4
- 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 +18 -8
- package/lib/Errors.d.ts +10 -0
- package/lib/Errors.js +12 -3
- 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 +6 -2
- package/lib/OAuthHelper/FacebookOAuth.js +2 -2
- package/lib/OAuthHelper/GoogleOAuth.js +2 -2
- package/lib/OAuthHelper/index.d.ts +10 -0
- package/lib/OAuthHelper/index.js +10 -0
- package/lib/Platform/detectFramework.js +2 -2
- package/lib/Platform/detection/Angular.js +2 -3
- package/lib/Platform/detection/Expo.js +1 -2
- package/lib/Platform/detection/Next.js +2 -3
- package/lib/Platform/detection/Nuxt.js +2 -3
- package/lib/Platform/detection/React.js +2 -3
- package/lib/Platform/detection/ReactNative.js +1 -2
- package/lib/Platform/detection/Svelte.js +2 -3
- package/lib/Platform/detection/Vue.js +2 -3
- package/lib/Platform/detection/Web.js +1 -2
- package/lib/Platform/detection/index.js +1 -2
- 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 +78 -13
- 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 +7 -2
- 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 +12 -3
- package/lib/Util/Constants.d.ts +35 -0
- package/lib/Util/Constants.js +35 -0
- package/lib/Util/DateUtils.d.ts +24 -1
- 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 +24 -5
- package/lib/Util/StringUtils.d.ts +10 -0
- package/lib/Util/StringUtils.js +12 -3
- package/lib/clients/handlers/fetch.js +47 -49
- package/lib/clients/internal/composeServiceApi.js +2 -2
- package/lib/clients/internal/composeTransferHandler.d.ts +1 -1
- package/lib/clients/middleware/retry/defaultRetryDecider.js +2 -2
- package/lib/clients/middleware/retry/middleware.js +3 -3
- package/lib/clients/middleware/signing/middleware.js +2 -2
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalHeaders.d.ts +1 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getHashedPayload.d.ts +1 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSignedHeaders.d.ts +1 -1
- package/lib/clients/middleware/userAgent/middleware.js +2 -2
- package/lib/clients/serde/json.js +2 -2
- 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/AwsClients/CognitoIdentity/base.js +2 -2
- package/lib-esm/AwsClients/CognitoIdentity/getCredentialsForIdentity.js +2 -2
- package/lib-esm/AwsClients/CognitoIdentity/getId.js +2 -2
- package/lib-esm/AwsClients/Pinpoint/getInAppMessages.js +2 -2
- package/lib-esm/AwsClients/Pinpoint/putEvents.js +2 -2
- package/lib-esm/AwsClients/Pinpoint/updateEndpoint.js +2 -2
- 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 +18 -8
- 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 +5 -1
- package/lib-esm/OAuthHelper/FacebookOAuth.js +2 -2
- package/lib-esm/OAuthHelper/GoogleOAuth.js +2 -2
- 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 +7 -2
- 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 +11 -2
- package/lib-esm/Util/Constants.d.ts +35 -0
- package/lib-esm/Util/Constants.js +35 -0
- package/lib-esm/Util/DateUtils.d.ts +24 -1
- 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 +21 -2
- package/lib-esm/Util/StringUtils.d.ts +10 -0
- package/lib-esm/Util/StringUtils.js +10 -0
- package/lib-esm/clients/handlers/fetch.js +47 -49
- package/lib-esm/clients/internal/composeServiceApi.js +2 -2
- package/lib-esm/clients/internal/composeTransferHandler.d.ts +1 -1
- package/lib-esm/clients/middleware/retry/defaultRetryDecider.js +2 -2
- package/lib-esm/clients/middleware/retry/middleware.js +3 -3
- package/lib-esm/clients/middleware/signing/middleware.js +2 -2
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalHeaders.d.ts +1 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getHashedPayload.d.ts +1 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSignedHeaders.d.ts +1 -1
- package/lib-esm/clients/middleware/userAgent/middleware.js +2 -2
- package/lib-esm/clients/serde/json.js +2 -2
- 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 +31 -14
- 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
|
@@ -5,11 +5,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.AsyncStorage = exports.AppState = exports.Linking = void 0;
|
|
6
6
|
var JS_1 = require("../JS");
|
|
7
7
|
var StorageHelper_1 = require("../StorageHelper");
|
|
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
|
exports.Linking = {};
|
|
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
|
+
*/
|
|
9
19
|
exports.AppState = {
|
|
10
20
|
addEventListener: function (action, handler) { return undefined; },
|
|
11
21
|
};
|
|
12
22
|
// if not in react native, just use local storage
|
|
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
|
+
*/
|
|
13
28
|
exports.AsyncStorage = (0, JS_1.browserOrNode)().isBrowser
|
|
14
29
|
? new StorageHelper_1.StorageHelper().getStorage()
|
|
15
30
|
: undefined;
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
* At the minmum this class will register the service worker and listen
|
|
10
10
|
* and attempt to dispatch messages on state change and record analytics
|
|
11
11
|
* events based on the service worker lifecycle.
|
|
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/
|
|
12
15
|
*/
|
|
13
16
|
export declare class ServiceWorkerClass {
|
|
14
17
|
private _serviceWorker;
|
|
@@ -29,6 +29,9 @@ var Amplify_1 = require("../Amplify");
|
|
|
29
29
|
* At the minmum this class will register the service worker and listen
|
|
30
30
|
* and attempt to dispatch messages on state change and record analytics
|
|
31
31
|
* events based on the service worker lifecycle.
|
|
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/
|
|
32
35
|
*/
|
|
33
36
|
var ServiceWorkerClass = /** @class */ (function () {
|
|
34
37
|
function ServiceWorkerClass() {
|
package/lib/Signer.d.ts
CHANGED
|
@@ -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 Signer {
|
|
2
7
|
/**
|
|
3
8
|
* Sign a HTTP request, add 'Authorization' header to request param
|
package/lib/Signer.js
CHANGED
|
@@ -19,6 +19,11 @@ var signatureV4_1 = require("./clients/middleware/signing/signer/signatureV4");
|
|
|
19
19
|
var IOT_SERVICE_NAME = 'iotdevicegateway';
|
|
20
20
|
// Best practice regex to parse the service and region from an AWS endpoint
|
|
21
21
|
var AWS_ENDPOINT_REGEX = /([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com(.cn)?$/;
|
|
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
|
+
*/
|
|
22
27
|
var Signer = /** @class */ (function () {
|
|
23
28
|
function Signer() {
|
|
24
29
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @class
|
|
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 MemoryStorage {
|
|
3
8
|
/**
|
|
4
9
|
* This is used to set a specific item in storage
|
|
@@ -26,6 +31,11 @@ export declare class MemoryStorage {
|
|
|
26
31
|
*/
|
|
27
32
|
static clear(): {};
|
|
28
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
36
|
+
* See the migration guide:
|
|
37
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
38
|
+
*/
|
|
29
39
|
export declare class StorageHelper {
|
|
30
40
|
private storageWindow;
|
|
31
41
|
/**
|
|
@@ -4,7 +4,12 @@
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.StorageHelper = exports.MemoryStorage = void 0;
|
|
6
6
|
var dataMemory = {};
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* @class
|
|
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
|
var MemoryStorage = /** @class */ (function () {
|
|
9
14
|
function MemoryStorage() {
|
|
10
15
|
}
|
|
@@ -48,6 +53,11 @@ var MemoryStorage = /** @class */ (function () {
|
|
|
48
53
|
return MemoryStorage;
|
|
49
54
|
}());
|
|
50
55
|
exports.MemoryStorage = MemoryStorage;
|
|
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 StorageHelper = /** @class */ (function () {
|
|
52
62
|
/**
|
|
53
63
|
* This is used to get a storage object
|
|
@@ -3,6 +3,11 @@ type Store = Record<string, string>;
|
|
|
3
3
|
type Context = {
|
|
4
4
|
req?: any;
|
|
5
5
|
};
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
8
|
+
* See the migration guide:
|
|
9
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
10
|
+
*/
|
|
6
11
|
export declare class UniversalStorage implements Storage {
|
|
7
12
|
cookies: Cookies;
|
|
8
13
|
store: Store;
|
|
@@ -21,6 +21,11 @@ var universal_cookie_1 = __importDefault(require("universal-cookie"));
|
|
|
21
21
|
var JS_1 = require("../JS");
|
|
22
22
|
var isBrowser = (0, JS_1.browserOrNode)().isBrowser;
|
|
23
23
|
var ONE_YEAR_IN_MS = 365 * 24 * 60 * 60 * 1000;
|
|
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 UniversalStorage = /** @class */ (function () {
|
|
25
30
|
function UniversalStorage(context) {
|
|
26
31
|
if (context === void 0) { context = {}; }
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
*
|
|
8
8
|
* As work completes on its own prior to close, the manager removes them
|
|
9
9
|
* from the registry to avoid holding references to completed jobs.
|
|
10
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
11
|
+
* See the migration guide:
|
|
12
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
10
13
|
*/
|
|
11
14
|
export declare class BackgroundProcessManager {
|
|
12
15
|
/**
|
|
@@ -181,12 +184,18 @@ export declare class BackgroundProcessManager {
|
|
|
181
184
|
}
|
|
182
185
|
/**
|
|
183
186
|
*
|
|
187
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
188
|
+
* See the migration guide:
|
|
189
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
184
190
|
*/
|
|
185
191
|
export declare class BackgroundManagerNotOpenError extends Error {
|
|
186
192
|
constructor(message: string);
|
|
187
193
|
}
|
|
188
194
|
/**
|
|
189
195
|
* All possible states a `BackgroundProcessManager` instance can be in.
|
|
196
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
197
|
+
* See the migration guide:
|
|
198
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
190
199
|
*/
|
|
191
200
|
export declare enum BackgroundProcessManagerState {
|
|
192
201
|
/**
|
|
@@ -24,8 +24,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g =
|
|
27
|
+
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);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -74,6 +74,9 @@ exports.BackgroundProcessManagerState = exports.BackgroundManagerNotOpenError =
|
|
|
74
74
|
*
|
|
75
75
|
* As work completes on its own prior to close, the manager removes them
|
|
76
76
|
* from the registry to avoid holding references to completed jobs.
|
|
77
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
78
|
+
* See the migration guide:
|
|
79
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
77
80
|
*/
|
|
78
81
|
var BackgroundProcessManager = /** @class */ (function () {
|
|
79
82
|
/**
|
|
@@ -419,6 +422,9 @@ var BackgroundProcessManager = /** @class */ (function () {
|
|
|
419
422
|
exports.BackgroundProcessManager = BackgroundProcessManager;
|
|
420
423
|
/**
|
|
421
424
|
*
|
|
425
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
426
|
+
* See the migration guide:
|
|
427
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
422
428
|
*/
|
|
423
429
|
var BackgroundManagerNotOpenError = /** @class */ (function (_super) {
|
|
424
430
|
__extends(BackgroundManagerNotOpenError, _super);
|
|
@@ -430,6 +436,9 @@ var BackgroundManagerNotOpenError = /** @class */ (function (_super) {
|
|
|
430
436
|
exports.BackgroundManagerNotOpenError = BackgroundManagerNotOpenError;
|
|
431
437
|
/**
|
|
432
438
|
* All possible states a `BackgroundProcessManager` instance can be in.
|
|
439
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
440
|
+
* See the migration guide:
|
|
441
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
433
442
|
*/
|
|
434
443
|
var BackgroundProcessManagerState;
|
|
435
444
|
(function (BackgroundProcessManagerState) {
|
|
@@ -445,4 +454,4 @@ var BackgroundProcessManagerState;
|
|
|
445
454
|
* Not accepting new jobs. All submitted jobs are complete.
|
|
446
455
|
*/
|
|
447
456
|
BackgroundProcessManagerState["Closed"] = "Closed";
|
|
448
|
-
})(BackgroundProcessManagerState
|
|
457
|
+
})(BackgroundProcessManagerState || (exports.BackgroundProcessManagerState = BackgroundProcessManagerState = {}));
|
package/lib/Util/Constants.d.ts
CHANGED
|
@@ -1,8 +1,43 @@
|
|
|
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
|
declare const AWS_CLOUDWATCH_BASE_BUFFER_SIZE = 26;
|
|
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
|
declare const AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE = 1048576;
|
|
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
|
declare const AWS_CLOUDWATCH_MAX_EVENT_SIZE = 256000;
|
|
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
|
declare const AWS_CLOUDWATCH_CATEGORY = "Logging";
|
|
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
|
declare const AWS_CLOUDWATCH_PROVIDER_NAME = "AWSCloudWatch";
|
|
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
|
declare const NO_CREDS_ERROR_STRING = "No credentials";
|
|
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
|
declare const RETRY_ERROR_CODES: string[];
|
|
8
43
|
export { AWS_CLOUDWATCH_BASE_BUFFER_SIZE, AWS_CLOUDWATCH_CATEGORY, AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE, AWS_CLOUDWATCH_MAX_EVENT_SIZE, AWS_CLOUDWATCH_PROVIDER_NAME, NO_CREDS_ERROR_STRING, RETRY_ERROR_CODES, };
|
package/lib/Util/Constants.js
CHANGED
|
@@ -4,18 +4,53 @@
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.RETRY_ERROR_CODES = exports.NO_CREDS_ERROR_STRING = exports.AWS_CLOUDWATCH_PROVIDER_NAME = exports.AWS_CLOUDWATCH_MAX_EVENT_SIZE = exports.AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE = exports.AWS_CLOUDWATCH_CATEGORY = exports.AWS_CLOUDWATCH_BASE_BUFFER_SIZE = void 0;
|
|
6
6
|
// Logging constants
|
|
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 AWS_CLOUDWATCH_BASE_BUFFER_SIZE = 26;
|
|
8
13
|
exports.AWS_CLOUDWATCH_BASE_BUFFER_SIZE = AWS_CLOUDWATCH_BASE_BUFFER_SIZE;
|
|
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
|
+
*/
|
|
9
19
|
var AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE = 1048576;
|
|
10
20
|
exports.AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE = AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
23
|
+
* See the migration guide:
|
|
24
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
25
|
+
*/
|
|
11
26
|
var AWS_CLOUDWATCH_MAX_EVENT_SIZE = 256000;
|
|
12
27
|
exports.AWS_CLOUDWATCH_MAX_EVENT_SIZE = AWS_CLOUDWATCH_MAX_EVENT_SIZE;
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
30
|
+
* See the migration guide:
|
|
31
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
32
|
+
*/
|
|
13
33
|
var AWS_CLOUDWATCH_CATEGORY = 'Logging';
|
|
14
34
|
exports.AWS_CLOUDWATCH_CATEGORY = AWS_CLOUDWATCH_CATEGORY;
|
|
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
|
+
*/
|
|
15
40
|
var AWS_CLOUDWATCH_PROVIDER_NAME = 'AWSCloudWatch';
|
|
16
41
|
exports.AWS_CLOUDWATCH_PROVIDER_NAME = AWS_CLOUDWATCH_PROVIDER_NAME;
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
44
|
+
* See the migration guide:
|
|
45
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
46
|
+
*/
|
|
17
47
|
var NO_CREDS_ERROR_STRING = 'No credentials';
|
|
18
48
|
exports.NO_CREDS_ERROR_STRING = NO_CREDS_ERROR_STRING;
|
|
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
|
+
*/
|
|
19
54
|
var RETRY_ERROR_CODES = [
|
|
20
55
|
'ResourceNotFoundException',
|
|
21
56
|
'InvalidSequenceTokenException',
|
package/lib/Util/DateUtils.d.ts
CHANGED
|
@@ -4,4 +4,27 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @see https://github.com/aws/aws-sdk-js/blob/6edf586dcc1de7fe8fbfbbd9a0d2b1847921e6e1/lib/util.js#L262
|
|
6
6
|
*/
|
|
7
|
-
|
|
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
|
+
*/
|
|
12
|
+
export declare const DateUtils: {
|
|
13
|
+
/**
|
|
14
|
+
* Milliseconds to offset the date to compensate for clock skew between device & services
|
|
15
|
+
*/
|
|
16
|
+
clockOffset: number;
|
|
17
|
+
getDateWithClockOffset(): Date;
|
|
18
|
+
/**
|
|
19
|
+
* @returns {number} Clock offset in milliseconds
|
|
20
|
+
*/
|
|
21
|
+
getClockOffset(): number;
|
|
22
|
+
getHeaderStringFromDate(date?: Date): string;
|
|
23
|
+
getDateFromHeaderString(header: string): Date;
|
|
24
|
+
isClockSkewed(serverDate: Date): boolean;
|
|
25
|
+
isClockSkewError(error: any): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* @param {number} offset Clock offset in milliseconds
|
|
28
|
+
*/
|
|
29
|
+
setClockOffset(offset: number): void;
|
|
30
|
+
};
|
package/lib/Util/DateUtils.js
CHANGED
|
@@ -27,6 +27,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
27
27
|
exports.DateUtils = void 0;
|
|
28
28
|
// Comment - TODO: remove
|
|
29
29
|
var FIVE_MINUTES_IN_MS = 1000 * 60 * 5;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
32
|
+
* See the migration guide:
|
|
33
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
34
|
+
*/
|
|
30
35
|
exports.DateUtils = {
|
|
31
36
|
/**
|
|
32
37
|
* Milliseconds to offset the date to compensate for clock skew between device & services
|
package/lib/Util/Mutex.d.ts
CHANGED
|
@@ -34,6 +34,11 @@ declare namespace MutexInterface {
|
|
|
34
34
|
(): Promise<T> | T;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
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
|
+
*/
|
|
37
42
|
declare class Mutex implements MutexInterface {
|
|
38
43
|
isLocked(): boolean;
|
|
39
44
|
acquire(): Promise<MutexInterface.Releaser>;
|
package/lib/Util/Mutex.js
CHANGED
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
* THE SOFTWARE.
|
|
26
26
|
*/
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
30
|
+
* See the migration guide:
|
|
31
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
32
|
+
*/
|
|
28
33
|
var Mutex = /** @class */ (function () {
|
|
29
34
|
function Mutex() {
|
|
30
35
|
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>;
|
package/lib/Util/Reachability.js
CHANGED
|
@@ -18,6 +18,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
// SPDX-License-Identifier: Apache-2.0
|
|
19
19
|
var core_1 = require("@aws-amplify/core");
|
|
20
20
|
var zen_observable_ts_1 = __importDefault(require("zen-observable-ts"));
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
23
|
+
* See the migration guide:
|
|
24
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
25
|
+
*/
|
|
21
26
|
var ReachabilityNavigator = /** @class */ (function () {
|
|
22
27
|
function ReachabilityNavigator() {
|
|
23
28
|
}
|
package/lib/Util/Retry.d.ts
CHANGED
|
@@ -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>;
|
package/lib/Util/Retry.js
CHANGED
|
@@ -24,8 +24,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g =
|
|
27
|
+
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);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -76,9 +76,16 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
76
76
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
77
77
|
};
|
|
78
78
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
79
|
-
exports.jitteredExponentialRetry = exports.
|
|
79
|
+
exports.jitteredExponentialRetry = exports.isNonRetryableError = exports.NonRetryableError = void 0;
|
|
80
|
+
exports.retry = retry;
|
|
81
|
+
exports.jitteredBackoff = jitteredBackoff;
|
|
80
82
|
var ConsoleLogger_1 = require("../Logger/ConsoleLogger");
|
|
81
83
|
var logger = new ConsoleLogger_1.ConsoleLogger('Util');
|
|
84
|
+
/**
|
|
85
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
86
|
+
* See the migration guide:
|
|
87
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
88
|
+
*/
|
|
82
89
|
var NonRetryableError = /** @class */ (function (_super) {
|
|
83
90
|
__extends(NonRetryableError, _super);
|
|
84
91
|
function NonRetryableError(message) {
|
|
@@ -89,6 +96,11 @@ var NonRetryableError = /** @class */ (function (_super) {
|
|
|
89
96
|
return NonRetryableError;
|
|
90
97
|
}(Error));
|
|
91
98
|
exports.NonRetryableError = NonRetryableError;
|
|
99
|
+
/**
|
|
100
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
101
|
+
* See the migration guide:
|
|
102
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
103
|
+
*/
|
|
92
104
|
var isNonRetryableError = function (obj) {
|
|
93
105
|
var key = 'nonRetryable';
|
|
94
106
|
return obj && obj[key];
|
|
@@ -97,6 +109,9 @@ exports.isNonRetryableError = isNonRetryableError;
|
|
|
97
109
|
/**
|
|
98
110
|
* @private
|
|
99
111
|
* Internal use of Amplify only
|
|
112
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
113
|
+
* See the migration guide:
|
|
114
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
100
115
|
*/
|
|
101
116
|
function retry(functionToRetry, args, delayFn, onTerminate) {
|
|
102
117
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -178,11 +193,13 @@ function retry(functionToRetry, args, delayFn, onTerminate) {
|
|
|
178
193
|
});
|
|
179
194
|
});
|
|
180
195
|
}
|
|
181
|
-
exports.retry = retry;
|
|
182
196
|
var MAX_DELAY_MS = 5 * 60 * 1000;
|
|
183
197
|
/**
|
|
184
198
|
* @private
|
|
185
199
|
* Internal use of Amplify only
|
|
200
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
201
|
+
* See the migration guide:
|
|
202
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
186
203
|
*/
|
|
187
204
|
function jitteredBackoff(maxDelayMs) {
|
|
188
205
|
if (maxDelayMs === void 0) { maxDelayMs = MAX_DELAY_MS; }
|
|
@@ -193,10 +210,12 @@ function jitteredBackoff(maxDelayMs) {
|
|
|
193
210
|
return delay > maxDelayMs ? false : delay;
|
|
194
211
|
};
|
|
195
212
|
}
|
|
196
|
-
exports.jitteredBackoff = jitteredBackoff;
|
|
197
213
|
/**
|
|
198
214
|
* @private
|
|
199
215
|
* Internal use of Amplify only
|
|
216
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
217
|
+
* See the migration guide:
|
|
218
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
200
219
|
*/
|
|
201
220
|
var jitteredExponentialRetry = function (functionToRetry, args, maxDelayMs, onTerminate) {
|
|
202
221
|
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;
|
package/lib/Util/StringUtils.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.urlSafeEncode = urlSafeEncode;
|
|
4
|
+
exports.urlSafeDecode = urlSafeDecode;
|
|
4
5
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
5
6
|
// SPDX-License-Identifier: Apache-2.0
|
|
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 urlSafeEncode(str) {
|
|
7
13
|
return str
|
|
8
14
|
.split('')
|
|
@@ -14,11 +20,14 @@ function urlSafeEncode(str) {
|
|
|
14
20
|
})
|
|
15
21
|
.join('');
|
|
16
22
|
}
|
|
17
|
-
|
|
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
|
+
*/
|
|
18
28
|
function urlSafeDecode(hex) {
|
|
19
29
|
return hex
|
|
20
30
|
.match(/.{2}/g)
|
|
21
31
|
.map(function (char) { return String.fromCharCode(parseInt(char, 16)); })
|
|
22
32
|
.join('');
|
|
23
33
|
}
|
|
24
|
-
exports.urlSafeDecode = urlSafeDecode;
|