@aws-sdk/signature-v4-multi-region 3.996.34 → 3.996.35
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 +4 -6
- package/package.json +5 -5
package/dist-cjs/index.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var signatureV4 = require('@smithy/signature-v4');
|
|
1
|
+
const { SignatureV4, signatureV4aContainer } = require("@smithy/signature-v4");
|
|
4
2
|
|
|
5
3
|
const signatureV4CrtContainer = {
|
|
6
4
|
CrtSignerV4: null,
|
|
@@ -8,7 +6,7 @@ const signatureV4CrtContainer = {
|
|
|
8
6
|
|
|
9
7
|
const SESSION_TOKEN_QUERY_PARAM = "X-Amz-S3session-Token";
|
|
10
8
|
const SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase();
|
|
11
|
-
class SignatureV4SignWithCredentials extends
|
|
9
|
+
class SignatureV4SignWithCredentials extends SignatureV4 {
|
|
12
10
|
async signWithCredentials(requestToSign, credentials, options) {
|
|
13
11
|
const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);
|
|
14
12
|
requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken;
|
|
@@ -50,7 +48,7 @@ class SignatureV4MultiRegion {
|
|
|
50
48
|
if (typeof signatureV4CrtContainer.CrtSignerV4 === "function") {
|
|
51
49
|
return "crt";
|
|
52
50
|
}
|
|
53
|
-
else if (typeof
|
|
51
|
+
else if (typeof signatureV4aContainer.SignatureV4a === "function") {
|
|
54
52
|
return "js";
|
|
55
53
|
}
|
|
56
54
|
return "none";
|
|
@@ -108,7 +106,7 @@ class SignatureV4MultiRegion {
|
|
|
108
106
|
getSigv4aSigner() {
|
|
109
107
|
if (!this.sigv4aSigner) {
|
|
110
108
|
const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
|
|
111
|
-
const JsSigV4aSigner =
|
|
109
|
+
const JsSigV4aSigner = signatureV4aContainer.SignatureV4a;
|
|
112
110
|
if (this.signerOptions.runtime === "node") {
|
|
113
111
|
if (!CrtSignerV4 && !JsSigV4aSigner) {
|
|
114
112
|
throw new Error("Neither CRT nor JS SigV4a implementation is available. " +
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/signature-v4-multi-region",
|
|
3
|
-
"version": "3.996.
|
|
3
|
+
"version": "3.996.35",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
6
6
|
"build:browser": "node ./test-browser/browser-build/esbuild",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline",
|
|
8
|
-
"build:es": "tsc -p tsconfig.es.json",
|
|
8
|
+
"build:es": "premove dist-es && tsc -p tsconfig.es.json",
|
|
9
9
|
"build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
|
|
10
|
-
"build:types": "tsc -p tsconfig.types.json",
|
|
10
|
+
"build:types": "premove dist-types && tsc -p tsconfig.types.json",
|
|
11
11
|
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
12
|
-
"clean": "premove dist-cjs dist-es dist-types
|
|
12
|
+
"clean": "premove dist-cjs dist-es dist-types",
|
|
13
13
|
"test": "yarn g:vitest run",
|
|
14
14
|
"test:watch": "yarn g:vitest watch",
|
|
15
15
|
"test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@aws-sdk/types": "^3.973.
|
|
29
|
+
"@aws-sdk/types": "^3.973.13",
|
|
30
30
|
"@smithy/signature-v4": "^5.4.6",
|
|
31
31
|
"@smithy/types": "^4.14.3",
|
|
32
32
|
"tslib": "^2.6.2"
|