@aws-amplify/core 6.0.1-console-preview.67f944e.0 → 6.0.1-console-preview.0bbe168.0
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/AwsClients/Pinpoint/getInAppMessages.d.ts +1 -1
- package/lib/AwsClients/Pinpoint/putEvents.d.ts +1 -1
- package/lib/AwsClients/Pinpoint/updateEndpoint.d.ts +1 -1
- package/lib/BackgroundProcessManager/BackgroundManagerNotOpenError.d.ts +3 -0
- package/lib/BackgroundProcessManager/BackgroundManagerNotOpenError.js +28 -0
- package/{lib-esm/Util → lib/BackgroundProcessManager}/BackgroundProcessManager.d.ts +1 -23
- package/lib/{Util → BackgroundProcessManager}/BackgroundProcessManager.js +13 -56
- package/lib/BackgroundProcessManager/index.d.ts +1 -0
- package/lib/BackgroundProcessManager/index.js +7 -0
- package/lib/BackgroundProcessManager/types.d.ts +41 -0
- package/lib/BackgroundProcessManager/types.js +23 -0
- package/lib/Hub/index.js +2 -2
- package/lib/Logger/ConsoleLogger.js +2 -2
- package/lib/{Util → Mutex}/Mutex.d.ts +2 -15
- package/lib/{Util → Mutex}/Mutex.js +2 -1
- package/lib/Mutex/index.d.ts +1 -0
- package/lib/Mutex/index.js +7 -0
- package/lib/Mutex/types.d.ts +13 -0
- package/lib/Mutex/types.js +4 -0
- package/lib/Platform/version.d.ts +1 -1
- package/lib/Platform/version.js +1 -1
- package/lib/Reachability/Reachability.d.ts +6 -0
- package/lib/Reachability/Reachability.js +29 -0
- package/lib/Reachability/Reachability.native.d.ts +6 -0
- package/lib/{Util → Reachability}/Reachability.native.js +8 -10
- package/lib/Reachability/index.d.ts +1 -0
- package/lib/Reachability/index.js +7 -0
- package/lib/Reachability/types.d.ts +3 -0
- package/lib/Reachability/types.js +4 -0
- package/lib/ServiceWorker/ServiceWorker.js +2 -2
- package/lib/{Signer.js → Signer/Signer.js} +3 -3
- package/lib/Signer/index.d.ts +1 -0
- package/lib/Signer/index.js +7 -0
- package/lib/clients/middleware/retry/jitteredBackoff.js +2 -2
- package/lib/{Util/Constants.d.ts → constants.d.ts} +0 -2
- package/lib/{Util/Constants.js → constants.js} +1 -6
- package/lib/libraryUtils.d.ts +7 -6
- package/lib/libraryUtils.js +37 -49
- package/lib/providers/pinpoint/apis/updateEndpoint.d.ts +1 -1
- package/lib/providers/pinpoint/apis/updateEndpoint.js +7 -5
- package/lib/providers/pinpoint/types/pinpoint.d.ts +1 -0
- package/lib/singleton/Auth/utils/index.js +2 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core.d.ts +4 -1
- package/lib/utils/convert/base64/base64Decoder.d.ts +2 -0
- package/lib/utils/convert/base64/base64Decoder.js +11 -0
- package/lib/utils/convert/base64/base64Encoder.d.ts +2 -0
- package/lib/utils/convert/base64/base64Encoder.js +18 -0
- package/lib/utils/convert/base64/bytesToString.d.ts +1 -0
- package/lib/utils/convert/base64/bytesToString.js +9 -0
- package/lib/utils/convert/index.d.ts +2 -0
- package/lib/utils/convert/index.js +9 -0
- package/lib/utils/convert/types.d.ts +9 -0
- package/lib/utils/convert/types.js +4 -0
- package/lib/utils/generateRandomString.d.ts +1 -0
- package/lib/utils/generateRandomString.js +14 -0
- package/lib/utils/globalHelpers/index.d.ts +3 -0
- package/lib/utils/globalHelpers/index.js +50 -0
- package/lib/utils/globalHelpers/index.native.d.ts +5 -0
- package/lib/utils/globalHelpers/index.native.js +27 -0
- package/lib/utils/index.d.ts +6 -0
- package/lib/utils/index.js +21 -0
- package/lib/utils/isBrowser.d.ts +1 -0
- package/lib/utils/isBrowser.js +9 -0
- package/lib/utils/isWebWorker.d.ts +1 -0
- package/lib/utils/isWebWorker.js +14 -0
- package/lib/utils/retry/NonRetryableError.d.ts +4 -0
- package/lib/utils/retry/NonRetryableError.js +30 -0
- package/lib/utils/retry/constants.d.ts +1 -0
- package/lib/utils/retry/constants.js +6 -0
- package/lib/utils/retry/index.d.ts +5 -0
- package/lib/utils/retry/index.js +15 -0
- package/lib/utils/retry/isNonRetryableError.d.ts +2 -0
- package/lib/utils/retry/isNonRetryableError.js +10 -0
- package/lib/utils/retry/jitteredBackoff.d.ts +6 -0
- package/lib/utils/retry/jitteredBackoff.js +20 -0
- package/lib/utils/retry/jitteredExponentialRetry.d.ts +5 -0
- package/lib/utils/retry/jitteredExponentialRetry.js +17 -0
- package/lib/utils/retry/retry.d.ts +6 -0
- package/lib/{Util/Retry.js → utils/retry/retry.js} +6 -57
- package/lib/utils/urlSafeDecode.d.ts +1 -0
- package/lib/{Util/StringUtils.js → utils/urlSafeDecode.js} +2 -9
- package/lib/utils/urlSafeEncode.d.ts +1 -0
- package/lib/utils/urlSafeEncode.js +12 -0
- package/lib-esm/AwsClients/Pinpoint/getInAppMessages.d.ts +1 -1
- package/lib-esm/AwsClients/Pinpoint/putEvents.d.ts +1 -1
- package/lib-esm/AwsClients/Pinpoint/updateEndpoint.d.ts +1 -1
- package/lib-esm/BackgroundProcessManager/BackgroundManagerNotOpenError.d.ts +3 -0
- package/lib-esm/BackgroundProcessManager/BackgroundManagerNotOpenError.js +25 -0
- package/{lib/Util → lib-esm/BackgroundProcessManager}/BackgroundProcessManager.d.ts +1 -23
- package/lib-esm/{Util → BackgroundProcessManager}/BackgroundProcessManager.js +4 -47
- package/lib-esm/BackgroundProcessManager/index.d.ts +1 -0
- package/lib-esm/BackgroundProcessManager/index.js +3 -0
- package/lib-esm/BackgroundProcessManager/types.d.ts +41 -0
- package/lib-esm/BackgroundProcessManager/types.js +20 -0
- package/lib-esm/Hub/index.js +1 -1
- package/lib-esm/Logger/ConsoleLogger.js +1 -1
- package/lib-esm/{Util → Mutex}/Mutex.d.ts +2 -15
- package/lib-esm/{Util → Mutex}/Mutex.js +1 -1
- package/lib-esm/Mutex/index.d.ts +1 -0
- package/lib-esm/Mutex/index.js +3 -0
- package/lib-esm/Mutex/types.d.ts +13 -0
- package/lib-esm/Mutex/types.js +3 -0
- package/lib-esm/Platform/version.d.ts +1 -1
- package/lib-esm/Platform/version.js +1 -1
- package/lib-esm/Reachability/Reachability.d.ts +6 -0
- package/lib-esm/Reachability/Reachability.js +26 -0
- package/lib-esm/Reachability/Reachability.native.d.ts +6 -0
- package/lib-esm/{Util → Reachability}/Reachability.native.js +6 -6
- package/lib-esm/Reachability/index.d.ts +1 -0
- package/lib-esm/Reachability/index.js +3 -0
- package/lib-esm/Reachability/types.d.ts +3 -0
- package/lib-esm/Reachability/types.js +3 -0
- package/lib-esm/ServiceWorker/ServiceWorker.js +1 -1
- package/lib-esm/{Signer.js → Signer/Signer.js} +2 -2
- package/lib-esm/Signer/index.d.ts +1 -0
- package/lib-esm/Signer/index.js +3 -0
- package/lib-esm/clients/middleware/retry/jitteredBackoff.js +1 -1
- package/lib-esm/{Util/Constants.d.ts → constants.d.ts} +0 -2
- package/lib-esm/{Util/Constants.js → constants.js} +0 -5
- package/lib-esm/libraryUtils.d.ts +7 -6
- package/lib-esm/libraryUtils.js +8 -8
- package/lib-esm/providers/pinpoint/apis/updateEndpoint.d.ts +1 -1
- package/lib-esm/providers/pinpoint/apis/updateEndpoint.js +7 -5
- package/lib-esm/providers/pinpoint/types/pinpoint.d.ts +1 -0
- package/lib-esm/singleton/Auth/utils/index.js +2 -1
- package/lib-esm/tsconfig.tsbuildinfo +1 -1
- package/lib-esm/types/core.d.ts +4 -1
- package/lib-esm/utils/convert/base64/base64Decoder.d.ts +2 -0
- package/lib-esm/utils/convert/base64/base64Decoder.js +8 -0
- package/lib-esm/utils/convert/base64/base64Encoder.d.ts +2 -0
- package/lib-esm/utils/convert/base64/base64Encoder.js +15 -0
- package/lib-esm/utils/convert/base64/bytesToString.d.ts +1 -0
- package/lib-esm/utils/convert/base64/bytesToString.js +5 -0
- package/lib-esm/utils/convert/index.d.ts +2 -0
- package/lib-esm/utils/convert/index.js +4 -0
- package/lib-esm/utils/convert/types.d.ts +9 -0
- package/lib-esm/utils/convert/types.js +3 -0
- package/lib-esm/utils/generateRandomString.d.ts +1 -0
- package/lib-esm/utils/generateRandomString.js +10 -0
- package/lib-esm/utils/globalHelpers/index.d.ts +3 -0
- package/lib-esm/utils/globalHelpers/index.js +44 -0
- package/lib-esm/utils/globalHelpers/index.native.d.ts +5 -0
- package/lib-esm/utils/globalHelpers/index.native.js +21 -0
- package/lib-esm/utils/index.d.ts +6 -0
- package/lib-esm/utils/index.js +8 -0
- package/lib-esm/utils/isBrowser.d.ts +1 -0
- package/lib-esm/utils/isBrowser.js +5 -0
- package/lib-esm/utils/isWebWorker.d.ts +1 -0
- package/lib-esm/utils/isWebWorker.js +10 -0
- package/lib-esm/utils/retry/NonRetryableError.d.ts +4 -0
- package/lib-esm/utils/retry/NonRetryableError.js +27 -0
- package/lib-esm/utils/retry/constants.d.ts +1 -0
- package/lib-esm/utils/retry/constants.js +3 -0
- package/lib-esm/utils/retry/index.d.ts +5 -0
- package/lib-esm/utils/retry/index.js +7 -0
- package/lib-esm/utils/retry/isNonRetryableError.d.ts +2 -0
- package/lib-esm/utils/retry/isNonRetryableError.js +6 -0
- package/lib-esm/utils/retry/jitteredBackoff.d.ts +6 -0
- package/lib-esm/utils/retry/jitteredBackoff.js +16 -0
- package/lib-esm/utils/retry/jitteredExponentialRetry.d.ts +5 -0
- package/lib-esm/utils/retry/jitteredExponentialRetry.js +13 -0
- package/lib-esm/utils/retry/retry.d.ts +6 -0
- package/lib-esm/{Util/Retry.js → utils/retry/retry.js} +4 -52
- package/lib-esm/{Util/StringUtils.d.ts → utils/urlSafeDecode.d.ts} +0 -1
- package/lib-esm/{Util/StringUtils.js → utils/urlSafeDecode.js} +0 -6
- package/{lib/Util/StringUtils.d.ts → lib-esm/utils/urlSafeEncode.d.ts} +0 -1
- package/lib-esm/utils/urlSafeEncode.js +8 -0
- package/package.json +7 -4
- package/src/BackgroundProcessManager/BackgroundManagerNotOpenError.ts +8 -0
- package/src/{Util → BackgroundProcessManager}/BackgroundProcessManager.ts +4 -58
- package/src/BackgroundProcessManager/index.ts +4 -0
- package/src/BackgroundProcessManager/types.ts +49 -0
- package/src/Hub/index.ts +1 -1
- package/src/Logger/ConsoleLogger.ts +1 -1
- package/src/{Util → Mutex}/Mutex.ts +2 -20
- package/src/Mutex/index.ts +4 -0
- package/src/Mutex/types.ts +20 -0
- package/src/Platform/version.ts +1 -1
- package/src/{Util → Reachability}/Reachability.native.ts +4 -11
- package/src/Reachability/Reachability.ts +35 -0
- package/src/Reachability/index.ts +4 -0
- package/src/Reachability/types.ts +6 -0
- package/src/ServiceWorker/ServiceWorker.ts +1 -1
- package/src/{Signer.ts → Signer/Signer.ts} +2 -2
- package/src/Signer/index.ts +4 -0
- package/src/clients/middleware/retry/jitteredBackoff.ts +1 -1
- package/src/{Util/Constants.ts → constants.ts} +0 -5
- package/src/libraryUtils.ts +16 -35
- package/src/providers/pinpoint/apis/updateEndpoint.ts +19 -3
- package/src/providers/pinpoint/types/pinpoint.ts +1 -0
- package/src/singleton/Auth/utils/index.ts +2 -1
- package/src/types/core.ts +4 -1
- package/src/utils/convert/base64/base64Decoder.ts +11 -0
- package/src/utils/convert/base64/base64Encoder.ts +18 -0
- package/src/utils/convert/base64/bytesToString.ts +6 -0
- package/src/utils/convert/index.ts +5 -0
- package/src/utils/convert/types.ts +17 -0
- package/src/utils/generateRandomString.ts +16 -0
- package/src/utils/globalHelpers/index.native.ts +28 -0
- package/src/utils/globalHelpers/index.ts +54 -0
- package/src/utils/index.ts +15 -0
- package/src/utils/isBrowser.ts +5 -0
- package/src/utils/isWebWorker.ts +13 -0
- package/src/utils/retry/NonRetryableError.ts +9 -0
- package/src/utils/retry/constants.ts +4 -0
- package/src/utils/retry/index.ts +8 -0
- package/src/utils/retry/isNonRetryableError.ts +9 -0
- package/src/utils/retry/jitteredBackoff.ts +21 -0
- package/src/utils/retry/jitteredExponentialRetry.ts +18 -0
- package/src/{Util/Retry.ts → utils/retry/retry.ts} +4 -44
- package/src/{Util/StringUtils.ts → utils/urlSafeDecode.ts} +0 -6
- package/src/utils/urlSafeEncode.ts +9 -0
- package/lib/Util/JS.d.ts +0 -29
- package/lib/Util/JS.js +0 -214
- package/lib/Util/Reachability.d.ts +0 -13
- package/lib/Util/Reachability.js +0 -69
- package/lib/Util/Reachability.native.d.ts +0 -12
- package/lib/Util/Retry.d.ts +0 -21
- package/lib/Util/index.d.ts +0 -7
- package/lib/Util/index.js +0 -31
- package/lib-esm/Util/JS.d.ts +0 -29
- package/lib-esm/Util/JS.js +0 -199
- package/lib-esm/Util/Reachability.d.ts +0 -13
- package/lib-esm/Util/Reachability.js +0 -64
- package/lib-esm/Util/Reachability.native.d.ts +0 -12
- package/lib-esm/Util/Retry.d.ts +0 -21
- package/lib-esm/Util/index.d.ts +0 -7
- package/lib-esm/Util/index.js +0 -9
- package/src/Util/JS.ts +0 -255
- package/src/Util/Reachability.ts +0 -58
- package/src/Util/index.ts +0 -23
- /package/lib/{Util → Signer}/DateUtils.d.ts +0 -0
- /package/lib/{Util → Signer}/DateUtils.js +0 -0
- /package/lib/{Signer.d.ts → Signer/Signer.d.ts} +0 -0
- /package/lib-esm/{Util → Signer}/DateUtils.d.ts +0 -0
- /package/lib-esm/{Util → Signer}/DateUtils.js +0 -0
- /package/lib-esm/{Signer.d.ts → Signer/Signer.d.ts} +0 -0
- /package/src/{Util → Signer}/DateUtils.ts +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.base64Decoder = void 0;
|
|
6
|
+
var globalHelpers_1 = require("../../globalHelpers");
|
|
7
|
+
exports.base64Decoder = {
|
|
8
|
+
convert: function (input) {
|
|
9
|
+
return (0, globalHelpers_1.getAtob)()(input);
|
|
10
|
+
},
|
|
11
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.base64Encoder = void 0;
|
|
6
|
+
var globalHelpers_1 = require("../../globalHelpers");
|
|
7
|
+
var bytesToString_1 = require("./bytesToString");
|
|
8
|
+
exports.base64Encoder = {
|
|
9
|
+
convert: function (input, _a) {
|
|
10
|
+
var _b = _a === void 0 ? { urlSafe: false } : _a, urlSafe = _b.urlSafe;
|
|
11
|
+
var inputStr = typeof input === 'string' ? input : (0, bytesToString_1.bytesToString)(input);
|
|
12
|
+
var encodedStr = (0, globalHelpers_1.getBtoa)()(inputStr);
|
|
13
|
+
// see details about the char replacing at https://datatracker.ietf.org/doc/html/rfc4648#section-5
|
|
14
|
+
return urlSafe
|
|
15
|
+
? encodedStr.replace(/\+/g, '-').replace(/\//g, '_')
|
|
16
|
+
: encodedStr;
|
|
17
|
+
},
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function bytesToString(input: Uint8Array): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.bytesToString = void 0;
|
|
6
|
+
function bytesToString(input) {
|
|
7
|
+
return Array.from(input, function (byte) { return String.fromCodePoint(byte); }).join('');
|
|
8
|
+
}
|
|
9
|
+
exports.bytesToString = bytesToString;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.base64Encoder = exports.base64Decoder = void 0;
|
|
6
|
+
var base64Decoder_1 = require("./base64/base64Decoder");
|
|
7
|
+
Object.defineProperty(exports, "base64Decoder", { enumerable: true, get: function () { return base64Decoder_1.base64Decoder; } });
|
|
8
|
+
var base64Encoder_1 = require("./base64/base64Encoder");
|
|
9
|
+
Object.defineProperty(exports, "base64Encoder", { enumerable: true, get: function () { return base64Encoder_1.base64Encoder; } });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface Base64EncoderConvertOptions {
|
|
2
|
+
urlSafe: boolean;
|
|
3
|
+
}
|
|
4
|
+
export interface Base64Encoder {
|
|
5
|
+
convert(input: Uint8Array | string, options?: Base64EncoderConvertOptions): string;
|
|
6
|
+
}
|
|
7
|
+
export interface Base64Decoder {
|
|
8
|
+
convert(input: string): string;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const generateRandomString: (length: number) => string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.generateRandomString = void 0;
|
|
6
|
+
var generateRandomString = function (length) {
|
|
7
|
+
var STATE_CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
8
|
+
var result = '';
|
|
9
|
+
for (var i = 0; i < length; i++) {
|
|
10
|
+
result += STATE_CHARSET.charAt(Math.floor(Math.random() * STATE_CHARSET.length));
|
|
11
|
+
}
|
|
12
|
+
return result;
|
|
13
|
+
};
|
|
14
|
+
exports.generateRandomString = generateRandomString;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.getAtob = exports.getBtoa = exports.getCrypto = void 0;
|
|
6
|
+
var errors_1 = require("../../errors");
|
|
7
|
+
var getCrypto = function () {
|
|
8
|
+
if (typeof window === 'object' && typeof window.crypto === 'object') {
|
|
9
|
+
return window.crypto;
|
|
10
|
+
}
|
|
11
|
+
// Next.js global polyfill
|
|
12
|
+
if (typeof crypto === 'object') {
|
|
13
|
+
return crypto;
|
|
14
|
+
}
|
|
15
|
+
throw new errors_1.AmplifyError({
|
|
16
|
+
name: 'MissingPolyfill',
|
|
17
|
+
message: 'Cannot resolve the `crypto` function from the environment.',
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
exports.getCrypto = getCrypto;
|
|
21
|
+
var getBtoa = function () {
|
|
22
|
+
// browser
|
|
23
|
+
if (typeof window !== 'undefined' && typeof window.btoa === 'function') {
|
|
24
|
+
return window.btoa;
|
|
25
|
+
}
|
|
26
|
+
// Next.js global polyfill
|
|
27
|
+
if (typeof btoa === 'function') {
|
|
28
|
+
return btoa;
|
|
29
|
+
}
|
|
30
|
+
throw new errors_1.AmplifyError({
|
|
31
|
+
name: 'Base64EncoderError',
|
|
32
|
+
message: 'Cannot resolve the `btoa` function from the environment.',
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
exports.getBtoa = getBtoa;
|
|
36
|
+
var getAtob = function () {
|
|
37
|
+
// browser
|
|
38
|
+
if (typeof window !== 'undefined' && typeof window.atob === 'function') {
|
|
39
|
+
return window.atob;
|
|
40
|
+
}
|
|
41
|
+
// Next.js global polyfill
|
|
42
|
+
if (typeof atob === 'function') {
|
|
43
|
+
return atob;
|
|
44
|
+
}
|
|
45
|
+
throw new errors_1.AmplifyError({
|
|
46
|
+
name: 'Base64EncoderError',
|
|
47
|
+
message: 'Cannot resolve the `atob` function from the environment.',
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
exports.getAtob = getAtob;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.getAtob = exports.getBtoa = exports.getCrypto = void 0;
|
|
6
|
+
require("react-native-get-random-values");
|
|
7
|
+
var base_64_1 = require("base-64");
|
|
8
|
+
var errors_1 = require("../../errors");
|
|
9
|
+
var getCrypto = function () {
|
|
10
|
+
if (typeof crypto !== 'undefined' &&
|
|
11
|
+
typeof crypto.getRandomValues === 'function') {
|
|
12
|
+
return crypto;
|
|
13
|
+
}
|
|
14
|
+
throw new errors_1.AmplifyError({
|
|
15
|
+
name: 'MissingPolyfill',
|
|
16
|
+
message: 'Cannot resolve the `crypto` function from the environment.',
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
exports.getCrypto = getCrypto;
|
|
20
|
+
var getBtoa = function () {
|
|
21
|
+
return base_64_1.encode;
|
|
22
|
+
};
|
|
23
|
+
exports.getBtoa = getBtoa;
|
|
24
|
+
var getAtob = function () {
|
|
25
|
+
return base_64_1.decode;
|
|
26
|
+
};
|
|
27
|
+
exports.getAtob = getAtob;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { generateRandomString } from './generateRandomString';
|
|
2
|
+
export { isBrowser } from './isBrowser';
|
|
3
|
+
export { isWebWorker } from './isWebWorker';
|
|
4
|
+
export { NonRetryableError, isNonRetryableError, jitteredBackoff, jitteredExponentialRetry, retry, } from './retry';
|
|
5
|
+
export { urlSafeDecode } from './urlSafeDecode';
|
|
6
|
+
export { urlSafeEncode } from './urlSafeEncode';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.urlSafeEncode = exports.urlSafeDecode = exports.retry = exports.jitteredExponentialRetry = exports.jitteredBackoff = exports.isNonRetryableError = exports.NonRetryableError = exports.isWebWorker = exports.isBrowser = exports.generateRandomString = void 0;
|
|
6
|
+
var generateRandomString_1 = require("./generateRandomString");
|
|
7
|
+
Object.defineProperty(exports, "generateRandomString", { enumerable: true, get: function () { return generateRandomString_1.generateRandomString; } });
|
|
8
|
+
var isBrowser_1 = require("./isBrowser");
|
|
9
|
+
Object.defineProperty(exports, "isBrowser", { enumerable: true, get: function () { return isBrowser_1.isBrowser; } });
|
|
10
|
+
var isWebWorker_1 = require("./isWebWorker");
|
|
11
|
+
Object.defineProperty(exports, "isWebWorker", { enumerable: true, get: function () { return isWebWorker_1.isWebWorker; } });
|
|
12
|
+
var retry_1 = require("./retry");
|
|
13
|
+
Object.defineProperty(exports, "NonRetryableError", { enumerable: true, get: function () { return retry_1.NonRetryableError; } });
|
|
14
|
+
Object.defineProperty(exports, "isNonRetryableError", { enumerable: true, get: function () { return retry_1.isNonRetryableError; } });
|
|
15
|
+
Object.defineProperty(exports, "jitteredBackoff", { enumerable: true, get: function () { return retry_1.jitteredBackoff; } });
|
|
16
|
+
Object.defineProperty(exports, "jitteredExponentialRetry", { enumerable: true, get: function () { return retry_1.jitteredExponentialRetry; } });
|
|
17
|
+
Object.defineProperty(exports, "retry", { enumerable: true, get: function () { return retry_1.retry; } });
|
|
18
|
+
var urlSafeDecode_1 = require("./urlSafeDecode");
|
|
19
|
+
Object.defineProperty(exports, "urlSafeDecode", { enumerable: true, get: function () { return urlSafeDecode_1.urlSafeDecode; } });
|
|
20
|
+
var urlSafeEncode_1 = require("./urlSafeEncode");
|
|
21
|
+
Object.defineProperty(exports, "urlSafeEncode", { enumerable: true, get: function () { return urlSafeEncode_1.urlSafeEncode; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isBrowser: () => boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.isBrowser = void 0;
|
|
6
|
+
var isBrowser = function () {
|
|
7
|
+
return typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
8
|
+
};
|
|
9
|
+
exports.isBrowser = isBrowser;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isWebWorker: () => boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.isWebWorker = void 0;
|
|
6
|
+
var isWebWorker = function () {
|
|
7
|
+
if (typeof self === 'undefined') {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
var selfContext = self;
|
|
11
|
+
return (typeof selfContext.WorkerGlobalScope !== 'undefined' &&
|
|
12
|
+
self instanceof selfContext.WorkerGlobalScope);
|
|
13
|
+
};
|
|
14
|
+
exports.isWebWorker = isWebWorker;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
var __extends = (this && this.__extends) || (function () {
|
|
5
|
+
var extendStatics = function (d, b) {
|
|
6
|
+
extendStatics = Object.setPrototypeOf ||
|
|
7
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
8
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
9
|
+
return extendStatics(d, b);
|
|
10
|
+
};
|
|
11
|
+
return function (d, b) {
|
|
12
|
+
if (typeof b !== "function" && b !== null)
|
|
13
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
14
|
+
extendStatics(d, b);
|
|
15
|
+
function __() { this.constructor = d; }
|
|
16
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
17
|
+
};
|
|
18
|
+
})();
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.NonRetryableError = void 0;
|
|
21
|
+
var NonRetryableError = /** @class */ (function (_super) {
|
|
22
|
+
__extends(NonRetryableError, _super);
|
|
23
|
+
function NonRetryableError(message) {
|
|
24
|
+
var _this = _super.call(this, message) || this;
|
|
25
|
+
_this.nonRetryable = true;
|
|
26
|
+
return _this;
|
|
27
|
+
}
|
|
28
|
+
return NonRetryableError;
|
|
29
|
+
}(Error));
|
|
30
|
+
exports.NonRetryableError = NonRetryableError;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MAX_DELAY_MS: number;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { NonRetryableError } from './NonRetryableError';
|
|
2
|
+
export { isNonRetryableError } from './isNonRetryableError';
|
|
3
|
+
export { jitteredBackoff } from './jitteredBackoff';
|
|
4
|
+
export { jitteredExponentialRetry } from './jitteredExponentialRetry';
|
|
5
|
+
export { retry } from './retry';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.retry = exports.jitteredExponentialRetry = exports.jitteredBackoff = exports.isNonRetryableError = exports.NonRetryableError = void 0;
|
|
6
|
+
var NonRetryableError_1 = require("./NonRetryableError");
|
|
7
|
+
Object.defineProperty(exports, "NonRetryableError", { enumerable: true, get: function () { return NonRetryableError_1.NonRetryableError; } });
|
|
8
|
+
var isNonRetryableError_1 = require("./isNonRetryableError");
|
|
9
|
+
Object.defineProperty(exports, "isNonRetryableError", { enumerable: true, get: function () { return isNonRetryableError_1.isNonRetryableError; } });
|
|
10
|
+
var jitteredBackoff_1 = require("./jitteredBackoff");
|
|
11
|
+
Object.defineProperty(exports, "jitteredBackoff", { enumerable: true, get: function () { return jitteredBackoff_1.jitteredBackoff; } });
|
|
12
|
+
var jitteredExponentialRetry_1 = require("./jitteredExponentialRetry");
|
|
13
|
+
Object.defineProperty(exports, "jitteredExponentialRetry", { enumerable: true, get: function () { return jitteredExponentialRetry_1.jitteredExponentialRetry; } });
|
|
14
|
+
var retry_1 = require("./retry");
|
|
15
|
+
Object.defineProperty(exports, "retry", { enumerable: true, get: function () { return retry_1.retry; } });
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.isNonRetryableError = void 0;
|
|
6
|
+
var isNonRetryableError = function (obj) {
|
|
7
|
+
var key = 'nonRetryable';
|
|
8
|
+
return obj && obj[key];
|
|
9
|
+
};
|
|
10
|
+
exports.isNonRetryableError = isNonRetryableError;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.jitteredBackoff = void 0;
|
|
6
|
+
var constants_1 = require("./constants");
|
|
7
|
+
/**
|
|
8
|
+
* @private
|
|
9
|
+
* Internal use of Amplify only
|
|
10
|
+
*/
|
|
11
|
+
function jitteredBackoff(maxDelayMs) {
|
|
12
|
+
if (maxDelayMs === void 0) { maxDelayMs = constants_1.MAX_DELAY_MS; }
|
|
13
|
+
var BASE_TIME_MS = 100;
|
|
14
|
+
var JITTER_FACTOR = 100;
|
|
15
|
+
return function (attempt) {
|
|
16
|
+
var delay = Math.pow(2, attempt) * BASE_TIME_MS + JITTER_FACTOR * Math.random();
|
|
17
|
+
return delay > maxDelayMs ? false : delay;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
exports.jitteredBackoff = jitteredBackoff;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.jitteredExponentialRetry = void 0;
|
|
6
|
+
var constants_1 = require("./constants");
|
|
7
|
+
var jitteredBackoff_1 = require("./jitteredBackoff");
|
|
8
|
+
var retry_1 = require("./retry");
|
|
9
|
+
/**
|
|
10
|
+
* @private
|
|
11
|
+
* Internal use of Amplify only
|
|
12
|
+
*/
|
|
13
|
+
var jitteredExponentialRetry = function (functionToRetry, args, maxDelayMs, onTerminate) {
|
|
14
|
+
if (maxDelayMs === void 0) { maxDelayMs = constants_1.MAX_DELAY_MS; }
|
|
15
|
+
return (0, retry_1.retry)(functionToRetry, args, (0, jitteredBackoff_1.jitteredBackoff)(maxDelayMs), onTerminate);
|
|
16
|
+
};
|
|
17
|
+
exports.jitteredExponentialRetry = jitteredExponentialRetry;
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
17
4
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
5
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
6
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -76,24 +63,10 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
76
63
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
77
64
|
};
|
|
78
65
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
79
|
-
exports.
|
|
80
|
-
var ConsoleLogger_1 = require("
|
|
66
|
+
exports.retry = void 0;
|
|
67
|
+
var ConsoleLogger_1 = require("../../Logger/ConsoleLogger");
|
|
68
|
+
var isNonRetryableError_1 = require("./isNonRetryableError");
|
|
81
69
|
var logger = new ConsoleLogger_1.ConsoleLogger('Util');
|
|
82
|
-
var NonRetryableError = /** @class */ (function (_super) {
|
|
83
|
-
__extends(NonRetryableError, _super);
|
|
84
|
-
function NonRetryableError(message) {
|
|
85
|
-
var _this = _super.call(this, message) || this;
|
|
86
|
-
_this.nonRetryable = true;
|
|
87
|
-
return _this;
|
|
88
|
-
}
|
|
89
|
-
return NonRetryableError;
|
|
90
|
-
}(Error));
|
|
91
|
-
exports.NonRetryableError = NonRetryableError;
|
|
92
|
-
var isNonRetryableError = function (obj) {
|
|
93
|
-
var key = 'nonRetryable';
|
|
94
|
-
return obj && obj[key];
|
|
95
|
-
};
|
|
96
|
-
exports.isNonRetryableError = isNonRetryableError;
|
|
97
70
|
/**
|
|
98
71
|
* @private
|
|
99
72
|
* Internal use of Amplify only
|
|
@@ -139,7 +112,7 @@ function retry(functionToRetry, args, delayFn, onTerminate) {
|
|
|
139
112
|
err_1 = _d.sent();
|
|
140
113
|
lastError = err_1;
|
|
141
114
|
logger.debug("error on ".concat(functionToRetry.name), err_1);
|
|
142
|
-
if ((0,
|
|
115
|
+
if ((0, isNonRetryableError_1.isNonRetryableError)(err_1)) {
|
|
143
116
|
logger.debug("".concat(functionToRetry.name, " non retryable error"), err_1);
|
|
144
117
|
return [2 /*return*/, { value: reject(err_1) }];
|
|
145
118
|
}
|
|
@@ -179,27 +152,3 @@ function retry(functionToRetry, args, delayFn, onTerminate) {
|
|
|
179
152
|
});
|
|
180
153
|
}
|
|
181
154
|
exports.retry = retry;
|
|
182
|
-
var MAX_DELAY_MS = 5 * 60 * 1000;
|
|
183
|
-
/**
|
|
184
|
-
* @private
|
|
185
|
-
* Internal use of Amplify only
|
|
186
|
-
*/
|
|
187
|
-
function jitteredBackoff(maxDelayMs) {
|
|
188
|
-
if (maxDelayMs === void 0) { maxDelayMs = MAX_DELAY_MS; }
|
|
189
|
-
var BASE_TIME_MS = 100;
|
|
190
|
-
var JITTER_FACTOR = 100;
|
|
191
|
-
return function (attempt) {
|
|
192
|
-
var delay = Math.pow(2, attempt) * BASE_TIME_MS + JITTER_FACTOR * Math.random();
|
|
193
|
-
return delay > maxDelayMs ? false : delay;
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
exports.jitteredBackoff = jitteredBackoff;
|
|
197
|
-
/**
|
|
198
|
-
* @private
|
|
199
|
-
* Internal use of Amplify only
|
|
200
|
-
*/
|
|
201
|
-
var jitteredExponentialRetry = function (functionToRetry, args, maxDelayMs, onTerminate) {
|
|
202
|
-
if (maxDelayMs === void 0) { maxDelayMs = MAX_DELAY_MS; }
|
|
203
|
-
return retry(functionToRetry, args, jitteredBackoff(maxDelayMs), onTerminate);
|
|
204
|
-
};
|
|
205
|
-
exports.jitteredExponentialRetry = jitteredExponentialRetry;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function urlSafeDecode(hex: string): string;
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.urlSafeDecode = exports.urlSafeEncode = void 0;
|
|
4
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
5
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
.split('')
|
|
9
|
-
.map(function (char) { return char.charCodeAt(0).toString(16).padStart(2, '0'); })
|
|
10
|
-
.join('');
|
|
11
|
-
}
|
|
12
|
-
exports.urlSafeEncode = urlSafeEncode;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.urlSafeDecode = void 0;
|
|
13
6
|
function urlSafeDecode(hex) {
|
|
14
7
|
var matchArr = hex.match(/.{2}/g) || [];
|
|
15
8
|
return matchArr.map(function (char) { return String.fromCharCode(parseInt(char, 16)); }).join('');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function urlSafeEncode(str: string): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.urlSafeEncode = void 0;
|
|
6
|
+
function urlSafeEncode(str) {
|
|
7
|
+
return str
|
|
8
|
+
.split('')
|
|
9
|
+
.map(function (char) { return char.charCodeAt(0).toString(16).padStart(2, '0'); })
|
|
10
|
+
.join('');
|
|
11
|
+
}
|
|
12
|
+
exports.urlSafeEncode = urlSafeEncode;
|
|
@@ -13,11 +13,11 @@ export declare const getInAppMessages: (config: {
|
|
|
13
13
|
computeDelay?: ((attempt: number) => number) | undefined;
|
|
14
14
|
userAgentValue?: string | undefined;
|
|
15
15
|
} & {
|
|
16
|
-
uriEscapePath?: boolean | undefined;
|
|
17
16
|
credentials: import("@smithy/types/dist-types/identity/awsCredentialIdentity").AwsCredentialIdentity | (() => Promise<import("@smithy/types/dist-types/identity/awsCredentialIdentity").AwsCredentialIdentity>);
|
|
18
17
|
region: string;
|
|
19
18
|
abortSignal?: AbortSignal | undefined;
|
|
20
19
|
cache?: RequestCache | undefined;
|
|
21
20
|
maxAttempts?: number | undefined;
|
|
22
21
|
userAgentHeader?: string | undefined;
|
|
22
|
+
uriEscapePath?: boolean | undefined;
|
|
23
23
|
}, input: GetInAppMessagesInput) => Promise<GetInAppMessagesOutput>;
|
|
@@ -13,11 +13,11 @@ export declare const putEvents: (config: {
|
|
|
13
13
|
computeDelay?: ((attempt: number) => number) | undefined;
|
|
14
14
|
userAgentValue?: string | undefined;
|
|
15
15
|
} & {
|
|
16
|
-
uriEscapePath?: boolean | undefined;
|
|
17
16
|
credentials: import("@smithy/types/dist-types/identity/awsCredentialIdentity").AwsCredentialIdentity | (() => Promise<import("@smithy/types/dist-types/identity/awsCredentialIdentity").AwsCredentialIdentity>);
|
|
18
17
|
region: string;
|
|
19
18
|
abortSignal?: AbortSignal | undefined;
|
|
20
19
|
cache?: RequestCache | undefined;
|
|
21
20
|
maxAttempts?: number | undefined;
|
|
22
21
|
userAgentHeader?: string | undefined;
|
|
22
|
+
uriEscapePath?: boolean | undefined;
|
|
23
23
|
}, input: PutEventsInput) => Promise<PutEventsOutput>;
|
|
@@ -13,11 +13,11 @@ export declare const updateEndpoint: (config: {
|
|
|
13
13
|
computeDelay?: ((attempt: number) => number) | undefined;
|
|
14
14
|
userAgentValue?: string | undefined;
|
|
15
15
|
} & {
|
|
16
|
-
uriEscapePath?: boolean | undefined;
|
|
17
16
|
credentials: import("@smithy/types/dist-types/identity/awsCredentialIdentity").AwsCredentialIdentity | (() => Promise<import("@smithy/types/dist-types/identity/awsCredentialIdentity").AwsCredentialIdentity>);
|
|
18
17
|
region: string;
|
|
19
18
|
abortSignal?: AbortSignal | undefined;
|
|
20
19
|
cache?: RequestCache | undefined;
|
|
21
20
|
maxAttempts?: number | undefined;
|
|
22
21
|
userAgentHeader?: string | undefined;
|
|
22
|
+
uriEscapePath?: boolean | undefined;
|
|
23
23
|
}, input: UpdateEndpointInput) => Promise<UpdateEndpointOutput>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
var __extends = (this && this.__extends) || (function () {
|
|
4
|
+
var extendStatics = function (d, b) {
|
|
5
|
+
extendStatics = Object.setPrototypeOf ||
|
|
6
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
7
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
8
|
+
return extendStatics(d, b);
|
|
9
|
+
};
|
|
10
|
+
return function (d, b) {
|
|
11
|
+
if (typeof b !== "function" && b !== null)
|
|
12
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
13
|
+
extendStatics(d, b);
|
|
14
|
+
function __() { this.constructor = d; }
|
|
15
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16
|
+
};
|
|
17
|
+
})();
|
|
18
|
+
var BackgroundManagerNotOpenError = /** @class */ (function (_super) {
|
|
19
|
+
__extends(BackgroundManagerNotOpenError, _super);
|
|
20
|
+
function BackgroundManagerNotOpenError(message) {
|
|
21
|
+
return _super.call(this, "BackgroundManagerNotOpenError: ".concat(message)) || this;
|
|
22
|
+
}
|
|
23
|
+
return BackgroundManagerNotOpenError;
|
|
24
|
+
}(Error));
|
|
25
|
+
export { BackgroundManagerNotOpenError };
|