@trivikr-test/middleware-signing
Advanced tools
Comparing version 3.170.0-es2017 to 3.170.0-es2018
@@ -26,3 +26,10 @@ import { memoize } from "@trivikr-test/property-provider"; | ||
input.signingName = input.signingName || signingService || input.serviceId; | ||
const params = Object.assign(Object.assign({}, input), { credentials: normalizedCreds, region: input.signingRegion, service: input.signingName, sha256, uriEscapePath: signingEscapePath }); | ||
const params = { | ||
...input, | ||
credentials: normalizedCreds, | ||
region: input.signingRegion, | ||
service: input.signingName, | ||
sha256, | ||
uriEscapePath: signingEscapePath, | ||
}; | ||
const signerConstructor = input.signerConstructor || SignatureV4; | ||
@@ -32,4 +39,9 @@ return new signerConstructor(params); | ||
} | ||
return Object.assign(Object.assign({}, input), { systemClockOffset, | ||
signingEscapePath, credentials: normalizedCreds, signer }); | ||
return { | ||
...input, | ||
systemClockOffset, | ||
signingEscapePath, | ||
credentials: normalizedCreds, | ||
signer, | ||
}; | ||
}; | ||
@@ -54,4 +66,9 @@ export const resolveSigV4AuthConfig = (input) => { | ||
} | ||
return Object.assign(Object.assign({}, input), { systemClockOffset, | ||
signingEscapePath, credentials: normalizedCreds, signer }); | ||
return { | ||
...input, | ||
systemClockOffset, | ||
signingEscapePath, | ||
credentials: normalizedCreds, | ||
signer, | ||
}; | ||
}; | ||
@@ -58,0 +75,0 @@ const normalizeProvider = (input) => { |
@@ -8,7 +8,10 @@ import { HttpRequest, HttpResponse } from "@trivikr-test/protocol-http"; | ||
const signer = await options.signer(); | ||
const output = await next(Object.assign(Object.assign({}, args), { request: await signer.sign(args.request, { | ||
const output = await next({ | ||
...args, | ||
request: await signer.sign(args.request, { | ||
signingDate: getSkewCorrectedDate(options.systemClockOffset), | ||
signingRegion: context["signing_region"], | ||
signingService: context["signing_service"], | ||
}) })).catch((error) => { | ||
}), | ||
}).catch((error) => { | ||
var _a; | ||
@@ -15,0 +18,0 @@ const serverTime = (_a = error.ServerTime) !== null && _a !== void 0 ? _a : getDateHeader(error.$response); |
{ | ||
"name": "@trivikr-test/middleware-signing", | ||
"version": "3.170.0-es2017", | ||
"version": "3.170.0-es2018", | ||
"scripts": { | ||
@@ -23,6 +23,6 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", | ||
"dependencies": { | ||
"@trivikr-test/property-provider": "3.170.0-es2017", | ||
"@trivikr-test/protocol-http": "3.170.0-es2017", | ||
"@trivikr-test/signature-v4": "3.170.0-es2017", | ||
"@trivikr-test/types": "3.170.0-es2017", | ||
"@trivikr-test/property-provider": "3.170.0-es2018", | ||
"@trivikr-test/protocol-http": "3.170.0-es2018", | ||
"@trivikr-test/signature-v4": "3.170.0-es2018", | ||
"@trivikr-test/types": "3.170.0-es2018", | ||
"tslib": "^2.3.1" | ||
@@ -29,0 +29,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34145
515
+ Added@trivikr-test/is-array-buffer@3.170.0-es2018(transitive)
+ Added@trivikr-test/property-provider@3.170.0-es2018(transitive)
+ Added@trivikr-test/protocol-http@3.170.0-es2018(transitive)
+ Added@trivikr-test/signature-v4@3.170.0-es2018(transitive)
+ Added@trivikr-test/types@3.170.0-es2018(transitive)
+ Added@trivikr-test/util-hex-encoding@3.170.0-es2018(transitive)
+ Added@trivikr-test/util-middleware@3.170.0-es2018(transitive)
+ Added@trivikr-test/util-uri-escape@3.170.0-es2018(transitive)
- Removed@trivikr-test/is-array-buffer@3.170.0-es2017(transitive)
- Removed@trivikr-test/property-provider@3.170.0-es2017(transitive)
- Removed@trivikr-test/protocol-http@3.170.0-es2017(transitive)
- Removed@trivikr-test/signature-v4@3.170.0-es2017(transitive)
- Removed@trivikr-test/types@3.170.0-es2017(transitive)
- Removed@trivikr-test/util-hex-encoding@3.170.0-es2017(transitive)
- Removed@trivikr-test/util-middleware@3.170.0-es2017(transitive)
- Removed@trivikr-test/util-uri-escape@3.170.0-es2017(transitive)