@aws-amplify/core 5.5.2 → 5.5.3-api-v6.13
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/internals/aws-client-utils/composers/package.json +8 -0
- package/internals/aws-client-utils/package.json +4 -4
- package/lib/Amplify.js +2 -0
- package/lib/AwsClients/CognitoIdentity/base.d.ts +1 -1
- package/lib/AwsClients/CognitoIdentity/getCredentialsForIdentity.d.ts +14 -3
- package/lib/AwsClients/CognitoIdentity/getCredentialsForIdentity.js +2 -1
- package/lib/AwsClients/CognitoIdentity/getId.d.ts +14 -3
- package/lib/AwsClients/CognitoIdentity/getId.js +2 -1
- package/lib/AwsClients/Pinpoint/getInAppMessages.d.ts +13 -3
- package/lib/AwsClients/Pinpoint/putEvents.d.ts +13 -3
- package/lib/AwsClients/Pinpoint/updateEndpoint.d.ts +13 -3
- package/lib/Credentials.js +2 -0
- package/lib/Platform/version.d.ts +1 -1
- package/lib/Platform/version.js +1 -1
- package/lib/Providers/index.js +2 -0
- package/lib/ServiceWorker/ServiceWorker.js +2 -0
- package/lib/ServiceWorker/index.js +2 -0
- package/lib/UniversalStorage/index.js +2 -0
- package/lib/Util/BackgroundProcessManager.js +2 -0
- package/lib/Util/DateUtils.js +2 -0
- package/lib/Util/Mutex.js +2 -0
- package/lib/Util/Reachability.js +2 -0
- package/lib/Util/Reachability.native.js +2 -0
- package/lib/Util/StringUtils.js +2 -0
- package/lib/Util/index.js +2 -0
- package/lib/clients/handlers/fetch.js +4 -21
- package/lib/clients/index.d.ts +7 -2
- package/lib/clients/index.js +17 -4
- package/lib/clients/internal/composeServiceApi.d.ts +1 -1
- package/lib/clients/internal/composeServiceApi.js +6 -6
- package/lib/clients/internal/index.d.ts +7 -0
- package/lib/clients/internal/index.js +14 -0
- package/lib/clients/middleware/retry/middleware.d.ts +0 -7
- package/lib/clients/middleware/retry/middleware.js +37 -26
- package/lib/clients/middleware/signing/middleware.d.ts +9 -2
- package/lib/clients/middleware/signing/middleware.js +25 -14
- package/lib/clients/middleware/signing/signer/signatureV4/index.d.ts +2 -0
- package/lib/clients/middleware/signing/signer/signatureV4/index.js +3 -1
- package/lib/clients/middleware/signing/signer/signatureV4/index.native.d.ts +1 -0
- package/lib/clients/middleware/signing/signer/signatureV4/index.native.js +3 -1
- package/lib/clients/middleware/signing/signer/signatureV4/types/signer.d.ts +10 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalRequest.d.ts +3 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalRequest.js +5 -2
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalUri.d.ts +3 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalUri.js +9 -2
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSignature.d.ts +1 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSignature.js +2 -2
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSigningValues.d.ts +1 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSigningValues.js +3 -2
- package/lib/clients/serde/responseInfo.js +4 -2
- package/lib/clients/types/aws.d.ts +4 -3
- package/lib/clients/utils/memoization.d.ts +9 -0
- package/lib/clients/utils/memoization.js +26 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/index.js +2 -0
- package/lib-esm/Amplify.js +2 -0
- package/lib-esm/AwsClients/CognitoIdentity/base.d.ts +1 -1
- package/lib-esm/AwsClients/CognitoIdentity/getCredentialsForIdentity.d.ts +14 -3
- package/lib-esm/AwsClients/CognitoIdentity/getCredentialsForIdentity.js +2 -1
- package/lib-esm/AwsClients/CognitoIdentity/getId.d.ts +14 -3
- package/lib-esm/AwsClients/CognitoIdentity/getId.js +2 -1
- package/lib-esm/AwsClients/Pinpoint/getInAppMessages.d.ts +13 -3
- package/lib-esm/AwsClients/Pinpoint/putEvents.d.ts +13 -3
- package/lib-esm/AwsClients/Pinpoint/updateEndpoint.d.ts +13 -3
- package/lib-esm/Credentials.js +2 -0
- package/lib-esm/Platform/version.d.ts +1 -1
- package/lib-esm/Platform/version.js +1 -1
- package/lib-esm/Providers/index.js +2 -0
- package/lib-esm/ServiceWorker/ServiceWorker.js +2 -0
- package/lib-esm/ServiceWorker/index.js +2 -0
- package/lib-esm/UniversalStorage/index.js +2 -0
- package/lib-esm/Util/BackgroundProcessManager.js +2 -0
- package/lib-esm/Util/DateUtils.js +2 -0
- package/lib-esm/Util/Mutex.js +2 -0
- package/lib-esm/Util/Reachability.js +2 -0
- package/lib-esm/Util/Reachability.native.js +2 -0
- package/lib-esm/Util/StringUtils.js +2 -0
- package/lib-esm/Util/index.js +2 -0
- package/lib-esm/clients/handlers/fetch.js +1 -18
- package/lib-esm/clients/index.d.ts +7 -2
- package/lib-esm/clients/index.js +7 -2
- package/lib-esm/clients/internal/composeServiceApi.d.ts +1 -1
- package/lib-esm/clients/internal/composeServiceApi.js +6 -6
- package/lib-esm/clients/internal/index.d.ts +7 -0
- package/lib-esm/clients/internal/index.js +9 -0
- package/lib-esm/clients/middleware/retry/middleware.d.ts +0 -7
- package/lib-esm/clients/middleware/retry/middleware.js +36 -24
- package/lib-esm/clients/middleware/signing/middleware.d.ts +9 -2
- package/lib-esm/clients/middleware/signing/middleware.js +25 -14
- package/lib-esm/clients/middleware/signing/signer/signatureV4/index.d.ts +2 -0
- package/lib-esm/clients/middleware/signing/signer/signatureV4/index.js +1 -0
- package/lib-esm/clients/middleware/signing/signer/signatureV4/index.native.d.ts +1 -0
- package/lib-esm/clients/middleware/signing/signer/signatureV4/index.native.js +1 -0
- package/lib-esm/clients/middleware/signing/signer/signatureV4/types/signer.d.ts +10 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalRequest.d.ts +3 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalRequest.js +5 -2
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalUri.d.ts +3 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalUri.js +9 -2
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSignature.d.ts +1 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSignature.js +2 -2
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSigningValues.d.ts +1 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSigningValues.js +3 -2
- package/lib-esm/clients/serde/responseInfo.js +3 -1
- package/lib-esm/clients/types/aws.d.ts +4 -3
- package/lib-esm/clients/utils/memoization.d.ts +9 -0
- package/lib-esm/clients/utils/memoization.js +22 -0
- package/lib-esm/tsconfig.tsbuildinfo +1 -1
- package/lib-esm/types/index.js +2 -0
- package/package.json +8 -8
- package/polyfills/URL/index.ts +2 -0
- package/src/Amplify.ts +2 -0
- package/src/AwsClients/CognitoIdentity/getCredentialsForIdentity.ts +1 -1
- package/src/AwsClients/CognitoIdentity/getId.ts +1 -1
- package/src/Credentials.ts +2 -0
- package/src/Platform/version.ts +1 -1
- package/src/Providers/index.ts +2 -0
- package/src/ServiceWorker/ServiceWorker.ts +2 -0
- package/src/ServiceWorker/index.ts +2 -0
- package/src/UniversalStorage/index.ts +2 -0
- package/src/Util/BackgroundProcessManager.ts +2 -0
- package/src/Util/DateUtils.ts +2 -0
- package/src/Util/Mutex.ts +2 -0
- package/src/Util/Reachability.native.ts +2 -0
- package/src/Util/Reachability.ts +2 -0
- package/src/Util/Retry.ts +2 -0
- package/src/Util/StringUtils.ts +2 -0
- package/src/Util/index.ts +2 -0
- package/src/clients/handlers/fetch.ts +1 -19
- package/src/clients/index.ts +15 -2
- package/src/clients/internal/composeServiceApi.ts +12 -6
- package/src/clients/internal/index.ts +10 -0
- package/src/clients/middleware/retry/middleware.ts +28 -24
- package/src/clients/middleware/signing/middleware.ts +13 -2
- package/src/clients/middleware/signing/signer/signatureV4/index.native.ts +1 -0
- package/src/clients/middleware/signing/signer/signatureV4/index.ts +2 -0
- package/src/clients/middleware/signing/signer/signatureV4/types/signer.ts +14 -1
- package/src/clients/middleware/signing/signer/signatureV4/utils/getCanonicalRequest.ts +7 -7
- package/src/clients/middleware/signing/signer/signatureV4/utils/getCanonicalUri.ts +11 -2
- package/src/clients/middleware/signing/signer/signatureV4/utils/getSignature.ts +2 -1
- package/src/clients/middleware/signing/signer/signatureV4/utils/getSigningValues.ts +2 -0
- package/src/clients/serde/responseInfo.ts +4 -2
- package/src/clients/types/aws.ts +4 -3
- package/src/clients/utils/memoization.ts +23 -0
- package/src/parseAWSExports.ts +2 -0
- package/src/types/index.ts +2 -0
- package/src/types/types.ts +2 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aws-amplify/core/internals/aws-client-utils/composers",
|
|
3
|
+
"types": "../../../lib-esm/clients/internal/index.d.ts",
|
|
4
|
+
"main": "../../../lib/clients/internal/index.js",
|
|
5
|
+
"module": "../../../lib-esm/clients/internal/index.js",
|
|
6
|
+
"react-native": "../../../lib-esm/clients/internal/index.js",
|
|
7
|
+
"sideEffects": false
|
|
8
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/core/internals/aws-client-utils",
|
|
3
|
-
"types": "
|
|
4
|
-
"main": "
|
|
5
|
-
"module": "
|
|
6
|
-
"react-native": "
|
|
3
|
+
"types": "../../lib-esm/clients/index.d.ts",
|
|
4
|
+
"main": "../../lib/clients/index.js",
|
|
5
|
+
"module": "../../lib-esm/clients/index.js",
|
|
6
|
+
"react-native": "../../lib-esm/clients/index.js",
|
|
7
7
|
"sideEffects": false
|
|
8
8
|
}
|
package/lib/Amplify.js
CHANGED
|
@@ -17,6 +17,8 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.Amplify = exports.AmplifyClass = void 0;
|
|
20
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
21
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
20
22
|
var Logger_1 = require("./Logger");
|
|
21
23
|
var logger = new Logger_1.ConsoleLogger('Amplify');
|
|
22
24
|
var AmplifyClass = /** @class */ (function () {
|
|
@@ -5,7 +5,7 @@ import { Endpoint, EndpointResolverOptions, Headers, HttpRequest, HttpResponse }
|
|
|
5
5
|
*
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
|
-
export declare const cognitoIdentityTransferHandler: (request: HttpRequest, options: import("../../clients
|
|
8
|
+
export declare const cognitoIdentityTransferHandler: (request: HttpRequest, options: import("../../clients").UserAgentOptions & import("../../clients").RetryOptions<HttpResponse>) => Promise<HttpResponse>;
|
|
9
9
|
/**
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
@@ -4,9 +4,20 @@ export type { GetCredentialsForIdentityInput, GetCredentialsForIdentityOutput };
|
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export declare const getCredentialsForIdentity: (config: Omit<import("../../clients
|
|
8
|
-
|
|
7
|
+
export declare const getCredentialsForIdentity: (config: Omit<import("../../clients").UserAgentOptions & import("../../clients").RetryOptions<HttpResponse> & import("../../clients").ServiceClientOptions & {
|
|
8
|
+
service: string;
|
|
9
|
+
endpointResolver: ({ region }: import("../../clients").EndpointResolverOptions) => {
|
|
10
|
+
url: URL;
|
|
11
|
+
};
|
|
12
|
+
retryDecider: (response?: HttpResponse, error?: Error) => Promise<boolean>;
|
|
13
|
+
computeDelay: (attempt: number) => number;
|
|
14
|
+
userAgentValue: string;
|
|
15
|
+
}, "retryDecider" | "computeDelay" | "userAgentValue" | "service" | "endpointResolver"> & {
|
|
16
|
+
retryDecider?: ((response?: HttpResponse, error?: unknown) => Promise<boolean>) & ((response?: HttpResponse, error?: Error) => Promise<boolean>);
|
|
9
17
|
computeDelay?: (attempt: number) => number;
|
|
10
18
|
userAgentValue?: string;
|
|
11
|
-
|
|
19
|
+
service?: string;
|
|
20
|
+
endpointResolver?: ((options: import("../../clients").EndpointResolverOptions, input?: any) => Endpoint) & (({ region }: import("../../clients").EndpointResolverOptions) => {
|
|
21
|
+
url: URL;
|
|
22
|
+
});
|
|
12
23
|
}, input: GetCredentialsForIdentityInput) => Promise<GetCredentialsForIdentityOutput>;
|
|
@@ -41,6 +41,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
41
41
|
exports.getCredentialsForIdentity = void 0;
|
|
42
42
|
var base_1 = require("./base");
|
|
43
43
|
var clients_1 = require("../../clients");
|
|
44
|
+
var internal_1 = require("../../clients/internal");
|
|
44
45
|
var getCredentialsForIdentitySerializer = function (input, endpoint) {
|
|
45
46
|
var headers = (0, base_1.getSharedHeaders)('GetCredentialsForIdentity');
|
|
46
47
|
var body = JSON.stringify(input);
|
|
@@ -79,4 +80,4 @@ var deserializeCredentials = function (output) {
|
|
|
79
80
|
/**
|
|
80
81
|
* @internal
|
|
81
82
|
*/
|
|
82
|
-
exports.getCredentialsForIdentity = (0,
|
|
83
|
+
exports.getCredentialsForIdentity = (0, internal_1.composeServiceApi)(base_1.cognitoIdentityTransferHandler, getCredentialsForIdentitySerializer, getCredentialsForIdentityDeserializer, base_1.defaultConfig);
|
|
@@ -4,9 +4,20 @@ export type { GetIdInput, GetIdOutput };
|
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export declare const getId: (config: Omit<import("../../clients
|
|
8
|
-
|
|
7
|
+
export declare const getId: (config: Omit<import("../../clients").UserAgentOptions & import("../../clients").RetryOptions<HttpResponse> & import("../../clients").ServiceClientOptions & {
|
|
8
|
+
service: string;
|
|
9
|
+
endpointResolver: ({ region }: import("../../clients").EndpointResolverOptions) => {
|
|
10
|
+
url: URL;
|
|
11
|
+
};
|
|
12
|
+
retryDecider: (response?: HttpResponse, error?: Error) => Promise<boolean>;
|
|
13
|
+
computeDelay: (attempt: number) => number;
|
|
14
|
+
userAgentValue: string;
|
|
15
|
+
}, "retryDecider" | "computeDelay" | "userAgentValue" | "service" | "endpointResolver"> & {
|
|
16
|
+
retryDecider?: ((response?: HttpResponse, error?: unknown) => Promise<boolean>) & ((response?: HttpResponse, error?: Error) => Promise<boolean>);
|
|
9
17
|
computeDelay?: (attempt: number) => number;
|
|
10
18
|
userAgentValue?: string;
|
|
11
|
-
|
|
19
|
+
service?: string;
|
|
20
|
+
endpointResolver?: ((options: import("../../clients").EndpointResolverOptions, input?: any) => Endpoint) & (({ region }: import("../../clients").EndpointResolverOptions) => {
|
|
21
|
+
url: URL;
|
|
22
|
+
});
|
|
12
23
|
}, input: GetIdInput) => Promise<GetIdOutput>;
|
|
@@ -41,6 +41,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
41
41
|
exports.getId = void 0;
|
|
42
42
|
var base_1 = require("./base");
|
|
43
43
|
var clients_1 = require("../../clients");
|
|
44
|
+
var internal_1 = require("../../clients/internal");
|
|
44
45
|
var getIdSerializer = function (input, endpoint) {
|
|
45
46
|
var headers = (0, base_1.getSharedHeaders)('GetId');
|
|
46
47
|
var body = JSON.stringify(input);
|
|
@@ -69,4 +70,4 @@ var getIdDeserializer = function (response) { return __awaiter(void 0, void 0, v
|
|
|
69
70
|
/**
|
|
70
71
|
* @internal
|
|
71
72
|
*/
|
|
72
|
-
exports.getId = (0,
|
|
73
|
+
exports.getId = (0, internal_1.composeServiceApi)(base_1.cognitoIdentityTransferHandler, getIdSerializer, getIdDeserializer, base_1.defaultConfig);
|
|
@@ -4,10 +4,20 @@ export type { GetInAppMessagesInput, GetInAppMessagesOutput };
|
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export declare const getInAppMessages: (config: Omit<import("../../clients
|
|
8
|
-
|
|
7
|
+
export declare const getInAppMessages: (config: Omit<import("../../clients").UserAgentOptions & import("../../clients").RetryOptions<HttpResponse> & import("../../clients").SigningOptions & import("../../clients/types").ServiceClientOptions & {
|
|
8
|
+
service: string;
|
|
9
|
+
endpointResolver: ({ region }: import("../../clients/types").EndpointResolverOptions) => {
|
|
10
|
+
url: URL;
|
|
11
|
+
};
|
|
12
|
+
retryDecider: (response?: HttpResponse, error?: Error) => Promise<boolean>;
|
|
13
|
+
computeDelay: (attempt: number) => number;
|
|
14
|
+
userAgentValue: string;
|
|
15
|
+
}, "retryDecider" | "computeDelay" | "userAgentValue" | "service" | "endpointResolver"> & {
|
|
16
|
+
retryDecider?: ((response?: HttpResponse, error?: unknown) => Promise<boolean>) & ((response?: HttpResponse, error?: Error) => Promise<boolean>);
|
|
9
17
|
computeDelay?: (attempt: number) => number;
|
|
10
18
|
userAgentValue?: string;
|
|
11
19
|
service?: string;
|
|
12
|
-
endpointResolver?: (options: import("../../clients/types").EndpointResolverOptions) => Endpoint
|
|
20
|
+
endpointResolver?: ((options: import("../../clients/types").EndpointResolverOptions, input?: any) => Endpoint) & (({ region }: import("../../clients/types").EndpointResolverOptions) => {
|
|
21
|
+
url: URL;
|
|
22
|
+
});
|
|
13
23
|
}, input: GetInAppMessagesInput) => Promise<GetInAppMessagesOutput>;
|
|
@@ -4,10 +4,20 @@ export type { PutEventsInput, PutEventsOutput };
|
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export declare const putEvents: (config: Omit<import("../../clients
|
|
8
|
-
|
|
7
|
+
export declare const putEvents: (config: Omit<import("../../clients").UserAgentOptions & import("../../clients").RetryOptions<HttpResponse> & import("../../clients").SigningOptions & import("../../clients/types").ServiceClientOptions & {
|
|
8
|
+
service: string;
|
|
9
|
+
endpointResolver: ({ region }: import("../../clients/types").EndpointResolverOptions) => {
|
|
10
|
+
url: URL;
|
|
11
|
+
};
|
|
12
|
+
retryDecider: (response?: HttpResponse, error?: Error) => Promise<boolean>;
|
|
13
|
+
computeDelay: (attempt: number) => number;
|
|
14
|
+
userAgentValue: string;
|
|
15
|
+
}, "retryDecider" | "computeDelay" | "userAgentValue" | "service" | "endpointResolver"> & {
|
|
16
|
+
retryDecider?: ((response?: HttpResponse, error?: unknown) => Promise<boolean>) & ((response?: HttpResponse, error?: Error) => Promise<boolean>);
|
|
9
17
|
computeDelay?: (attempt: number) => number;
|
|
10
18
|
userAgentValue?: string;
|
|
11
19
|
service?: string;
|
|
12
|
-
endpointResolver?: (options: import("../../clients/types").EndpointResolverOptions) => Endpoint
|
|
20
|
+
endpointResolver?: ((options: import("../../clients/types").EndpointResolverOptions, input?: any) => Endpoint) & (({ region }: import("../../clients/types").EndpointResolverOptions) => {
|
|
21
|
+
url: URL;
|
|
22
|
+
});
|
|
13
23
|
}, input: PutEventsInput) => Promise<PutEventsOutput>;
|
|
@@ -4,10 +4,20 @@ export type { UpdateEndpointInput, UpdateEndpointOutput };
|
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export declare const updateEndpoint: (config: Omit<import("../../clients
|
|
8
|
-
|
|
7
|
+
export declare const updateEndpoint: (config: Omit<import("../../clients").UserAgentOptions & import("../../clients").RetryOptions<HttpResponse> & import("../../clients").SigningOptions & import("../../clients/types").ServiceClientOptions & {
|
|
8
|
+
service: string;
|
|
9
|
+
endpointResolver: ({ region }: import("../../clients/types").EndpointResolverOptions) => {
|
|
10
|
+
url: URL;
|
|
11
|
+
};
|
|
12
|
+
retryDecider: (response?: HttpResponse, error?: Error) => Promise<boolean>;
|
|
13
|
+
computeDelay: (attempt: number) => number;
|
|
14
|
+
userAgentValue: string;
|
|
15
|
+
}, "retryDecider" | "computeDelay" | "userAgentValue" | "service" | "endpointResolver"> & {
|
|
16
|
+
retryDecider?: ((response?: HttpResponse, error?: unknown) => Promise<boolean>) & ((response?: HttpResponse, error?: Error) => Promise<boolean>);
|
|
9
17
|
computeDelay?: (attempt: number) => number;
|
|
10
18
|
userAgentValue?: string;
|
|
11
19
|
service?: string;
|
|
12
|
-
endpointResolver?: (options: import("../../clients/types").EndpointResolverOptions) => Endpoint
|
|
20
|
+
endpointResolver?: ((options: import("../../clients/types").EndpointResolverOptions, input?: any) => Endpoint) & (({ region }: import("../../clients/types").EndpointResolverOptions) => {
|
|
21
|
+
url: URL;
|
|
22
|
+
});
|
|
13
23
|
}, input: UpdateEndpointInput) => Promise<UpdateEndpointOutput>;
|
package/lib/Credentials.js
CHANGED
|
@@ -48,6 +48,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
};
|
|
49
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
50
|
exports.Credentials = exports.CredentialsClass = void 0;
|
|
51
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
52
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
51
53
|
var Logger_1 = require("./Logger");
|
|
52
54
|
var StorageHelper_1 = require("./StorageHelper");
|
|
53
55
|
var JS_1 = require("./JS");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "5.3.
|
|
1
|
+
export declare const version = "5.3.4-api-v6.13+5927d05d2";
|
package/lib/Platform/version.js
CHANGED
package/lib/Providers/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AWSCloudWatchProvider = void 0;
|
|
4
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
5
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
6
|
var AWSCloudWatchProvider_1 = require("./AWSCloudWatchProvider");
|
|
5
7
|
Object.defineProperty(exports, "AWSCloudWatchProvider", { enumerable: true, get: function () { return AWSCloudWatchProvider_1.AWSCloudWatchProvider; } });
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ServiceWorkerClass = void 0;
|
|
4
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
5
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
6
|
/**
|
|
5
7
|
* Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
8
|
*
|
|
@@ -15,6 +15,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.UniversalStorage = void 0;
|
|
18
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
19
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
18
20
|
var universal_cookie_1 = __importDefault(require("universal-cookie"));
|
|
19
21
|
var JS_1 = require("../JS");
|
|
20
22
|
var isBrowser = (0, JS_1.browserOrNode)().isBrowser;
|
|
@@ -63,6 +63,8 @@ var __values = (this && this.__values) || function(o) {
|
|
|
63
63
|
};
|
|
64
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
65
|
exports.BackgroundProcessManagerState = exports.BackgroundManagerNotOpenError = exports.BackgroundProcessManager = void 0;
|
|
66
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
67
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
66
68
|
/**
|
|
67
69
|
* @private For internal Amplify use.
|
|
68
70
|
*
|
package/lib/Util/DateUtils.js
CHANGED
package/lib/Util/Mutex.js
CHANGED
package/lib/Util/Reachability.js
CHANGED
|
@@ -14,6 +14,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
18
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
17
19
|
var core_1 = require("@aws-amplify/core");
|
|
18
20
|
var zen_observable_ts_1 = __importDefault(require("zen-observable-ts"));
|
|
19
21
|
var ReachabilityNavigator = /** @class */ (function () {
|
|
@@ -3,6 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
6
8
|
var zen_observable_ts_1 = __importDefault(require("zen-observable-ts"));
|
|
7
9
|
var Logger_1 = require("../Logger");
|
|
8
10
|
var logger = new Logger_1.ConsoleLogger('Reachability', 'DEBUG');
|
package/lib/Util/StringUtils.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.urlSafeDecode = exports.urlSafeEncode = void 0;
|
|
4
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
5
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
6
|
function urlSafeEncode(str) {
|
|
5
7
|
return str
|
|
6
8
|
.split('')
|
package/lib/Util/index.js
CHANGED
|
@@ -4,6 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.BackgroundProcessManagerState = exports.BackgroundManagerNotOpenError = exports.BackgroundProcessManager = 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 = exports.urlSafeEncode = exports.urlSafeDecode = exports.DateUtils = exports.Reachability = exports.Mutex = exports.retry = exports.jitteredExponentialRetry = exports.jitteredBackoff = exports.isNonRetryableError = exports.NonRetryableError = void 0;
|
|
7
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
8
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
7
9
|
var Retry_1 = require("./Retry");
|
|
8
10
|
Object.defineProperty(exports, "NonRetryableError", { enumerable: true, get: function () { return Retry_1.NonRetryableError; } });
|
|
9
11
|
Object.defineProperty(exports, "isNonRetryableError", { enumerable: true, get: function () { return Retry_1.isNonRetryableError; } });
|
|
@@ -51,6 +51,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51
51
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
52
|
exports.fetchTransferHandler = void 0;
|
|
53
53
|
require("isomorphic-unfetch"); // TODO: remove this dependency in v6
|
|
54
|
+
var memoization_1 = require("../utils/memoization");
|
|
54
55
|
var shouldSendBody = function (method) {
|
|
55
56
|
return !['HEAD', 'GET', 'DELETE'].includes(method.toUpperCase());
|
|
56
57
|
};
|
|
@@ -93,9 +94,9 @@ var fetchTransferHandler = function (_a, _b) {
|
|
|
93
94
|
body: null,
|
|
94
95
|
};
|
|
95
96
|
bodyWithMixin = Object.assign((_d = resp.body) !== null && _d !== void 0 ? _d : {}, {
|
|
96
|
-
text: withMemoization(function () { return resp.text(); }),
|
|
97
|
-
blob: withMemoization(function () { return resp.blob(); }),
|
|
98
|
-
json: withMemoization(function () { return resp.json(); }),
|
|
97
|
+
text: (0, memoization_1.withMemoization)(function () { return resp.text(); }),
|
|
98
|
+
blob: (0, memoization_1.withMemoization)(function () { return resp.blob(); }),
|
|
99
|
+
json: (0, memoization_1.withMemoization)(function () { return resp.json(); }),
|
|
99
100
|
});
|
|
100
101
|
return [2 /*return*/, __assign(__assign({}, httpResponse), { body: bodyWithMixin })];
|
|
101
102
|
}
|
|
@@ -103,21 +104,3 @@ var fetchTransferHandler = function (_a, _b) {
|
|
|
103
104
|
});
|
|
104
105
|
};
|
|
105
106
|
exports.fetchTransferHandler = fetchTransferHandler;
|
|
106
|
-
/**
|
|
107
|
-
* Cache the payload of a response body. It allows multiple calls to the body,
|
|
108
|
-
* for example, when reading the body in both retry decider and error deserializer.
|
|
109
|
-
* Caching body is allowed here because we call the body accessor(blob(), json(),
|
|
110
|
-
* etc.) when body is small or streaming implementation is not available(RN).
|
|
111
|
-
*/
|
|
112
|
-
var withMemoization = function (payloadAccessor) {
|
|
113
|
-
var cached;
|
|
114
|
-
return function () {
|
|
115
|
-
if (!cached) {
|
|
116
|
-
// Explicitly not awaiting. Intermediate await would add overhead and
|
|
117
|
-
// introduce a possible race in the event that this wrapper is called
|
|
118
|
-
// again before the first `payloadAccessor` call resolves.
|
|
119
|
-
cached = payloadAccessor();
|
|
120
|
-
}
|
|
121
|
-
return cached;
|
|
122
|
-
};
|
|
123
|
-
};
|
package/lib/clients/index.d.ts
CHANGED
|
@@ -2,7 +2,12 @@ export { getDnsSuffix } from './endpoints';
|
|
|
2
2
|
export { fetchTransferHandler } from './handlers/fetch';
|
|
3
3
|
export { unauthenticatedHandler } from './handlers/unauthenticated';
|
|
4
4
|
export { authenticatedHandler } from './handlers/authenticated';
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
5
|
+
export { getHashedPayload, presignUrl, PresignUrlOptions, signRequest, SignRequestOptions, } from './middleware/signing/signer/signatureV4';
|
|
6
|
+
export { EMPTY_HASH as EMPTY_SHA256_HASH } from './middleware/signing/signer/signatureV4/constants';
|
|
7
|
+
export { extendedEncodeURIComponent } from './middleware/signing/utils/extendedEncodeURIComponent';
|
|
8
|
+
export { signingMiddleware, SigningOptions } from './middleware/signing';
|
|
9
|
+
export { getRetryDecider, jitteredBackoff, retryMiddleware, RetryOptions, } from './middleware/retry';
|
|
10
|
+
export { userAgentMiddleware, UserAgentOptions } from './middleware/userAgent';
|
|
7
11
|
export { parseJsonBody, parseJsonError, parseMetadata } from './serde';
|
|
12
|
+
export { withMemoization } from './utils/memoization';
|
|
8
13
|
export * from './types';
|
package/lib/clients/index.js
CHANGED
|
@@ -16,7 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.parseMetadata = exports.parseJsonError = exports.parseJsonBody = exports.
|
|
19
|
+
exports.withMemoization = exports.parseMetadata = exports.parseJsonError = exports.parseJsonBody = exports.userAgentMiddleware = exports.retryMiddleware = exports.jitteredBackoff = exports.getRetryDecider = exports.signingMiddleware = exports.extendedEncodeURIComponent = exports.EMPTY_SHA256_HASH = exports.signRequest = exports.presignUrl = exports.getHashedPayload = exports.authenticatedHandler = exports.unauthenticatedHandler = exports.fetchTransferHandler = exports.getDnsSuffix = void 0;
|
|
20
20
|
var endpoints_1 = require("./endpoints");
|
|
21
21
|
Object.defineProperty(exports, "getDnsSuffix", { enumerable: true, get: function () { return endpoints_1.getDnsSuffix; } });
|
|
22
22
|
var fetch_1 = require("./handlers/fetch");
|
|
@@ -25,13 +25,26 @@ var unauthenticated_1 = require("./handlers/unauthenticated");
|
|
|
25
25
|
Object.defineProperty(exports, "unauthenticatedHandler", { enumerable: true, get: function () { return unauthenticated_1.unauthenticatedHandler; } });
|
|
26
26
|
var authenticated_1 = require("./handlers/authenticated");
|
|
27
27
|
Object.defineProperty(exports, "authenticatedHandler", { enumerable: true, get: function () { return authenticated_1.authenticatedHandler; } });
|
|
28
|
-
var composeServiceApi_1 = require("./internal/composeServiceApi");
|
|
29
|
-
Object.defineProperty(exports, "composeServiceApi", { enumerable: true, get: function () { return composeServiceApi_1.composeServiceApi; } });
|
|
30
28
|
var signatureV4_1 = require("./middleware/signing/signer/signatureV4");
|
|
31
|
-
Object.defineProperty(exports, "
|
|
29
|
+
Object.defineProperty(exports, "getHashedPayload", { enumerable: true, get: function () { return signatureV4_1.getHashedPayload; } });
|
|
32
30
|
Object.defineProperty(exports, "presignUrl", { enumerable: true, get: function () { return signatureV4_1.presignUrl; } });
|
|
31
|
+
Object.defineProperty(exports, "signRequest", { enumerable: true, get: function () { return signatureV4_1.signRequest; } });
|
|
32
|
+
var constants_1 = require("./middleware/signing/signer/signatureV4/constants");
|
|
33
|
+
Object.defineProperty(exports, "EMPTY_SHA256_HASH", { enumerable: true, get: function () { return constants_1.EMPTY_HASH; } });
|
|
34
|
+
var extendedEncodeURIComponent_1 = require("./middleware/signing/utils/extendedEncodeURIComponent");
|
|
35
|
+
Object.defineProperty(exports, "extendedEncodeURIComponent", { enumerable: true, get: function () { return extendedEncodeURIComponent_1.extendedEncodeURIComponent; } });
|
|
36
|
+
var signing_1 = require("./middleware/signing");
|
|
37
|
+
Object.defineProperty(exports, "signingMiddleware", { enumerable: true, get: function () { return signing_1.signingMiddleware; } });
|
|
38
|
+
var retry_1 = require("./middleware/retry");
|
|
39
|
+
Object.defineProperty(exports, "getRetryDecider", { enumerable: true, get: function () { return retry_1.getRetryDecider; } });
|
|
40
|
+
Object.defineProperty(exports, "jitteredBackoff", { enumerable: true, get: function () { return retry_1.jitteredBackoff; } });
|
|
41
|
+
Object.defineProperty(exports, "retryMiddleware", { enumerable: true, get: function () { return retry_1.retryMiddleware; } });
|
|
42
|
+
var userAgent_1 = require("./middleware/userAgent");
|
|
43
|
+
Object.defineProperty(exports, "userAgentMiddleware", { enumerable: true, get: function () { return userAgent_1.userAgentMiddleware; } });
|
|
33
44
|
var serde_1 = require("./serde");
|
|
34
45
|
Object.defineProperty(exports, "parseJsonBody", { enumerable: true, get: function () { return serde_1.parseJsonBody; } });
|
|
35
46
|
Object.defineProperty(exports, "parseJsonError", { enumerable: true, get: function () { return serde_1.parseJsonError; } });
|
|
36
47
|
Object.defineProperty(exports, "parseMetadata", { enumerable: true, get: function () { return serde_1.parseMetadata; } });
|
|
48
|
+
var memoization_1 = require("./utils/memoization");
|
|
49
|
+
Object.defineProperty(exports, "withMemoization", { enumerable: true, get: function () { return memoization_1.withMemoization; } });
|
|
37
50
|
__exportStar(require("./types"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ServiceClientOptions } from '../types/aws';
|
|
2
2
|
import { TransferHandler, Endpoint } from '../types/core';
|
|
3
3
|
import { HttpRequest, HttpResponse } from '../types/http';
|
|
4
|
-
export declare const composeServiceApi: <TransferHandlerOptions, Input, Output, DefaultConfig extends Partial<TransferHandlerOptions & ServiceClientOptions>>(transferHandler: TransferHandler<HttpRequest, HttpResponse, TransferHandlerOptions>, serializer: (input: Input, endpoint: Endpoint) => HttpRequest, deserializer: (output: HttpResponse) => Promise<Output>, defaultConfig: DefaultConfig) => (config: OptionalizeKey<TransferHandlerOptions & ServiceClientOptions, keyof DefaultConfig>, input: Input) => Promise<Output>;
|
|
4
|
+
export declare const composeServiceApi: <TransferHandlerOptions, Input, Output, DefaultConfig extends Partial<TransferHandlerOptions & ServiceClientOptions>>(transferHandler: TransferHandler<HttpRequest, HttpResponse, TransferHandlerOptions>, serializer: (input: Input, endpoint: Endpoint) => Promise<HttpRequest> | HttpRequest, deserializer: (output: HttpResponse) => Promise<Output>, defaultConfig: DefaultConfig) => (config: OptionalizeKey<TransferHandlerOptions & ServiceClientOptions & DefaultConfig, keyof DefaultConfig>, input: Input) => Promise<Output>;
|
|
5
5
|
type OptionalizeKey<T, K> = Omit<T, K & keyof T> & {
|
|
6
6
|
[P in K & keyof T]?: T[P];
|
|
7
7
|
};
|
|
@@ -57,17 +57,17 @@ var composeServiceApi = function (transferHandler, serializer, deserializer, def
|
|
|
57
57
|
switch (_a.label) {
|
|
58
58
|
case 0:
|
|
59
59
|
resolvedConfig = __assign(__assign({}, defaultConfig), config);
|
|
60
|
-
return [4 /*yield*/, resolvedConfig.endpointResolver(
|
|
61
|
-
region: resolvedConfig.region,
|
|
62
|
-
})];
|
|
60
|
+
return [4 /*yield*/, resolvedConfig.endpointResolver(resolvedConfig, input)];
|
|
63
61
|
case 1:
|
|
64
62
|
endpoint = _a.sent();
|
|
65
|
-
|
|
66
|
-
return [4 /*yield*/, transferHandler(request, __assign({}, resolvedConfig))];
|
|
63
|
+
return [4 /*yield*/, serializer(input, endpoint)];
|
|
67
64
|
case 2:
|
|
65
|
+
request = _a.sent();
|
|
66
|
+
return [4 /*yield*/, transferHandler(request, __assign({}, resolvedConfig))];
|
|
67
|
+
case 3:
|
|
68
68
|
response = _a.sent();
|
|
69
69
|
return [4 /*yield*/, deserializer(response)];
|
|
70
|
-
case
|
|
70
|
+
case 4: return [2 /*return*/, _a.sent()];
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
73
|
}); };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This index should NOT be included in the ../index.ts because the composer functions
|
|
3
|
+
* here requires TypeScript >= 4. Given other scoped packages may use TypeScript < 4,
|
|
4
|
+
* they should not be exposed to upper level index.
|
|
5
|
+
*/
|
|
6
|
+
export { composeServiceApi } from './composeServiceApi';
|
|
7
|
+
export { composeTransferHandler } from './composeTransferHandler';
|
|
@@ -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.composeTransferHandler = exports.composeServiceApi = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* This index should NOT be included in the ../index.ts because the composer functions
|
|
8
|
+
* here requires TypeScript >= 4. Given other scoped packages may use TypeScript < 4,
|
|
9
|
+
* they should not be exposed to upper level index.
|
|
10
|
+
*/
|
|
11
|
+
var composeServiceApi_1 = require("./composeServiceApi");
|
|
12
|
+
Object.defineProperty(exports, "composeServiceApi", { enumerable: true, get: function () { return composeServiceApi_1.composeServiceApi; } });
|
|
13
|
+
var composeTransferHandler_1 = require("./composeTransferHandler");
|
|
14
|
+
Object.defineProperty(exports, "composeTransferHandler", { enumerable: true, get: function () { return composeTransferHandler_1.composeTransferHandler; } });
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { MetadataBearer } from '@aws-sdk/types';
|
|
2
1
|
import { MiddlewareContext, MiddlewareHandler, Request, Response } from '../../types/core';
|
|
3
2
|
/**
|
|
4
3
|
* Configuration of the retry middleware
|
|
@@ -32,9 +31,3 @@ export interface RetryOptions<TResponse = Response> {
|
|
|
32
31
|
* Retry middleware
|
|
33
32
|
*/
|
|
34
33
|
export declare const retryMiddleware: <TInput = Request, TOutput = Response>({ maxAttempts, retryDecider, computeDelay, abortSignal, }: RetryOptions<TOutput>) => (next: MiddlewareHandler<TInput, TOutput>, context: MiddlewareContext) => (request: TInput) => Promise<TOutput>;
|
|
35
|
-
/**
|
|
36
|
-
* Check if the response is a contains `$metadata` property.
|
|
37
|
-
*
|
|
38
|
-
* @internal Amplify internal use only
|
|
39
|
-
*/
|
|
40
|
-
export declare const isMetadataBearer: (response: unknown) => response is MetadataBearer;
|