Skip to content

Commit a908d87

Browse files
committed
chore(signature-v4-multi-region): cleanups and docstrings
1 parent c4f2e54 commit a908d87

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

packages/signature-v4-multi-region/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"@aws-sdk/types": "*",
2525
"@smithy/protocol-http": "^4.0.3",
2626
"@smithy/signature-v4": "^3.1.2",
27-
"@smithy/signature-v4a": "*",
2827
"@smithy/types": "^3.3.0",
2928
"tslib": "^2.6.2"
3029
},

packages/signature-v4-multi-region/src/SignatureV4MultiRegion.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export class SignatureV4MultiRegion implements RequestPresigner, RequestSigner {
119119
} else {
120120
throw new Error(
121121
"Neither CRT nor JS SigV4a implementation is available. " +
122-
"Please load either @aws-sdk/signature-v4-crt or @smithy/signature-v4a."
122+
"Please load either @aws-sdk/signature-v4-crt or @smithy/signature-v4a."
123123
);
124124
}
125125
}

packages/signature-v4-multi-region/src/signature-v4a-container.ts

+11
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ import type { HttpRequest, RequestPresigner, RequestSigner, RequestSigningArgume
55
* @public
66
*/
77
export type OptionalSigV4aSigner = {
8+
/**
9+
* This constructor is not typed so as not to require a type import
10+
* from the signature-v4a package.
11+
*
12+
* The true type is SignatureV4a from @smithy/signature-v4a.
13+
*/
814
new (options: any): RequestPresigner &
915
RequestSigner & {
1016
signWithCredentials(
@@ -17,6 +23,11 @@ export type OptionalSigV4aSigner = {
1723

1824
/**
1925
* @public
26+
*
27+
* \@smithy/signature-v4a will install the constructor in this
28+
* container if it is installed.
29+
*
30+
* This avoids a runtime-require being interpreted statically by bundlers.
2031
*/
2132
export const signatureV4aContainer: {
2233
SignatureV4a: null | OptionalSigV4aSigner;

0 commit comments

Comments
 (0)