@smithy/signature-v4 5.1.2 → 5.2.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/dist-cjs/index.js +6 -9
- package/dist-types/SignatureV4.d.ts +3 -2
- package/dist-types/SignatureV4Base.d.ts +1 -1
- package/dist-types/credentialDerivation.d.ts +1 -1
- package/dist-types/getCanonicalHeaders.d.ts +1 -1
- package/dist-types/getCanonicalQuery.d.ts +1 -1
- package/dist-types/getPayloadHash.d.ts +1 -1
- package/dist-types/headerUtil.d.ts +1 -1
- package/dist-types/suite.fixture.d.ts +1 -1
- package/dist-types/ts3.4/SignatureV4.d.ts +2 -1
- package/package.json +9 -8
package/dist-cjs/index.js
CHANGED
|
@@ -18,8 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
23
|
ALGORITHM_IDENTIFIER: () => ALGORITHM_IDENTIFIER,
|
|
24
24
|
ALGORITHM_IDENTIFIER_V4A: () => ALGORITHM_IDENTIFIER_V4A,
|
|
25
25
|
ALGORITHM_QUERY_PARAM: () => ALGORITHM_QUERY_PARAM,
|
|
@@ -60,7 +60,7 @@ __export(src_exports, {
|
|
|
60
60
|
prepareRequest: () => prepareRequest,
|
|
61
61
|
signatureV4aContainer: () => signatureV4aContainer
|
|
62
62
|
});
|
|
63
|
-
module.exports = __toCommonJS(
|
|
63
|
+
module.exports = __toCommonJS(index_exports);
|
|
64
64
|
|
|
65
65
|
// src/SignatureV4.ts
|
|
66
66
|
|
|
@@ -301,8 +301,7 @@ function negate(bytes) {
|
|
|
301
301
|
}
|
|
302
302
|
for (let i = 7; i > -1; i--) {
|
|
303
303
|
bytes[i]++;
|
|
304
|
-
if (bytes[i] !== 0)
|
|
305
|
-
break;
|
|
304
|
+
if (bytes[i] !== 0) break;
|
|
306
305
|
}
|
|
307
306
|
}
|
|
308
307
|
__name(negate, "negate");
|
|
@@ -433,10 +432,8 @@ ${(0, import_util_hex_encoding.toHex)(hashedRequest)}`;
|
|
|
433
432
|
if (this.uriEscapePath) {
|
|
434
433
|
const normalizedPathSegments = [];
|
|
435
434
|
for (const pathSegment of path.split("/")) {
|
|
436
|
-
if (pathSegment?.length === 0)
|
|
437
|
-
|
|
438
|
-
if (pathSegment === ".")
|
|
439
|
-
continue;
|
|
435
|
+
if (pathSegment?.length === 0) continue;
|
|
436
|
+
if (pathSegment === ".") continue;
|
|
440
437
|
if (pathSegment === "..") {
|
|
441
438
|
normalizedPathSegments.pop();
|
|
442
439
|
} else {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { EventSigner, EventSigningArguments, FormattedEvent, HttpRequest, MessageSigner, RequestPresigner, RequestPresigningArguments, RequestSigner, RequestSigningArguments, SignableMessage, SignedMessage, SigningArguments, StringSigner } from "@smithy/types";
|
|
2
|
-
import {
|
|
1
|
+
import type { EventSigner, EventSigningArguments, FormattedEvent, HttpRequest, MessageSigner, RequestPresigner, RequestPresigningArguments, RequestSigner, RequestSigningArguments, SignableMessage, SignedMessage, SigningArguments, StringSigner } from "@smithy/types";
|
|
2
|
+
import type { SignatureV4CryptoInit, SignatureV4Init } from "./SignatureV4Base";
|
|
3
|
+
import { SignatureV4Base } from "./SignatureV4Base";
|
|
3
4
|
/**
|
|
4
5
|
* @public
|
|
5
6
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AwsCredentialIdentity, ChecksumConstructor, DateInput, HashConstructor, HeaderBag, HttpRequest, Provider } from "@smithy/types";
|
|
1
|
+
import type { AwsCredentialIdentity, ChecksumConstructor, DateInput, HashConstructor, HeaderBag, HttpRequest, Provider } from "@smithy/types";
|
|
2
2
|
/**
|
|
3
3
|
* @public
|
|
4
4
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AwsCredentialIdentity, ChecksumConstructor, HashConstructor } from "@smithy/types";
|
|
1
|
+
import type { AwsCredentialIdentity, ChecksumConstructor, HashConstructor } from "@smithy/types";
|
|
2
2
|
/**
|
|
3
3
|
* Create a string describing the scope of credentials used to sign a request.
|
|
4
4
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HeaderBag } from "@smithy/types";
|
|
1
|
+
import type { HeaderBag } from "@smithy/types";
|
|
2
2
|
export declare const hasHeader: (soughtHeader: string, headers: HeaderBag) => boolean;
|
|
3
3
|
export declare const getHeaderValue: (soughtHeader: string, headers: HeaderBag) => string | undefined;
|
|
4
4
|
export declare const deleteHeader: (soughtHeader: string, headers: HeaderBag) => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventSigner, EventSigningArguments, FormattedEvent, HttpRequest, MessageSigner, RequestPresigner, RequestPresigningArguments, RequestSigner, RequestSigningArguments, SignableMessage, SignedMessage, SigningArguments, StringSigner } from "@smithy/types";
|
|
2
|
-
import {
|
|
2
|
+
import { SignatureV4CryptoInit, SignatureV4Init } from "./SignatureV4Base";
|
|
3
|
+
import { SignatureV4Base } from "./SignatureV4Base";
|
|
3
4
|
/**
|
|
4
5
|
* @public
|
|
5
6
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/signature-v4",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -24,14 +24,15 @@
|
|
|
24
24
|
"url": "https://aws.amazon.com/javascript/"
|
|
25
25
|
},
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
|
+
"sideEffects": false,
|
|
27
28
|
"dependencies": {
|
|
28
|
-
"@smithy/is-array-buffer": "^4.
|
|
29
|
-
"@smithy/protocol-http": "^5.
|
|
30
|
-
"@smithy/types": "^4.
|
|
31
|
-
"@smithy/util-hex-encoding": "^4.
|
|
32
|
-
"@smithy/util-middleware": "^4.0
|
|
33
|
-
"@smithy/util-uri-escape": "^4.
|
|
34
|
-
"@smithy/util-utf8": "^4.
|
|
29
|
+
"@smithy/is-array-buffer": "^4.1.0",
|
|
30
|
+
"@smithy/protocol-http": "^5.2.0",
|
|
31
|
+
"@smithy/types": "^4.4.0",
|
|
32
|
+
"@smithy/util-hex-encoding": "^4.1.0",
|
|
33
|
+
"@smithy/util-middleware": "^4.1.0",
|
|
34
|
+
"@smithy/util-uri-escape": "^4.1.0",
|
|
35
|
+
"@smithy/util-utf8": "^4.1.0",
|
|
35
36
|
"tslib": "^2.6.2"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|