@aws-sdk/signature-v4-crt
Advanced tools
Comparing version 3.712.0 to 3.713.0
@@ -28,9 +28,8 @@ "use strict"; | ||
var import_signature_v4_multi_region = require("@aws-sdk/signature-v4-multi-region"); | ||
var import_util_user_agent_node = require("@aws-sdk/util-user-agent-node"); | ||
// src/CrtSignerV4.ts | ||
var import_crt_loader = require("@aws-sdk/crt-loader"); | ||
var import_querystring_parser = require("@smithy/querystring-parser"); | ||
var import_signature_v4 = require("@smithy/signature-v4"); | ||
var import_util_middleware = require("@smithy/util-middleware"); | ||
var import_aws_crt = require("aws-crt"); | ||
@@ -62,5 +61,5 @@ // src/constants.ts | ||
const headersArray = Object.entries(sdkRequest.headers); | ||
const crtHttpHeaders = new import_aws_crt.http.HttpHeaders(headersArray); | ||
const crtHttpHeaders = new import_crt_loader.http.HttpHeaders(headersArray); | ||
const queryString = (0, import_signature_v4.getCanonicalQuery)(sdkRequest); | ||
return new import_aws_crt.http.HttpRequest(sdkRequest.method, sdkRequest.path + "?" + queryString, crtHttpHeaders); | ||
return new import_crt_loader.http.HttpRequest(sdkRequest.method, sdkRequest.path + "?" + queryString, crtHttpHeaders); | ||
} | ||
@@ -76,3 +75,3 @@ __name(sdkHttpRequest2crtHttpRequest, "sdkHttpRequest2crtHttpRequest"); | ||
uriEscapePath = true, | ||
signingAlgorithm = import_aws_crt.auth.AwsSigningAlgorithm.SigV4 | ||
signingAlgorithm = import_crt_loader.auth.AwsSigningAlgorithm.SigV4 | ||
}) { | ||
@@ -86,3 +85,3 @@ this.service = service; | ||
this.credentialProvider = (0, import_util_middleware.normalizeProvider)(credentials); | ||
import_aws_crt.io.enable_logging(import_aws_crt.io.LogLevel.ERROR); | ||
import_crt_loader.io.enable_logging(import_crt_loader.io.LogLevel.ERROR); | ||
} | ||
@@ -105,3 +104,3 @@ async options2crtConfigure({ | ||
algorithm: this.signingAlgorithm, | ||
signature_type: viaHeader ? import_aws_crt.auth.AwsSignatureType.HttpRequestViaHeaders : import_aws_crt.auth.AwsSignatureType.HttpRequestViaQueryParams, | ||
signature_type: viaHeader ? import_crt_loader.auth.AwsSignatureType.HttpRequestViaHeaders : import_crt_loader.auth.AwsSignatureType.HttpRequestViaQueryParams, | ||
provider: sdk2crtCredentialsProvider(credentials), | ||
@@ -115,3 +114,3 @@ region, | ||
signed_body_value: payloadHash, | ||
signed_body_header: this.applyChecksum && viaHeader ? import_aws_crt.auth.AwsSignedBodyHeaderType.XAmzContentSha256 : import_aws_crt.auth.AwsSignedBodyHeaderType.None, | ||
signed_body_header: this.applyChecksum && viaHeader ? import_crt_loader.auth.AwsSignedBodyHeaderType.XAmzContentSha256 : import_crt_loader.auth.AwsSignedBodyHeaderType.None, | ||
expiration_in_seconds: expiresIn | ||
@@ -181,3 +180,3 @@ }; | ||
try { | ||
return await import_aws_crt.auth.aws_sign_request(request, crtConfig); | ||
return await import_crt_loader.auth.aws_sign_request(request, crtConfig); | ||
} catch (error) { | ||
@@ -209,3 +208,3 @@ throw new Error(error); | ||
const crtConfig = await this.options2crtConfigure(options, true, payloadHash); | ||
return import_aws_crt.auth.aws_verify_sigv4a_signing( | ||
return import_crt_loader.auth.aws_verify_sigv4a_signing( | ||
crtRequest, | ||
@@ -232,3 +231,3 @@ crtConfig, | ||
); | ||
return import_aws_crt.auth.aws_verify_sigv4a_signing( | ||
return import_crt_loader.auth.aws_verify_sigv4a_signing( | ||
crtRequest, | ||
@@ -246,3 +245,3 @@ crtConfig, | ||
function sdk2crtCredentialsProvider(credentials) { | ||
return import_aws_crt.auth.AwsCredentialsProvider.newStatic( | ||
return import_crt_loader.auth.AwsCredentialsProvider.newStatic( | ||
credentials.accessKeyId, | ||
@@ -273,3 +272,2 @@ credentials.secretAccessKey, | ||
import_signature_v4_multi_region.signatureV4CrtContainer.CrtSignerV4 = CrtSignerV4; | ||
import_util_user_agent_node.crtAvailability.isCrtAvailable = true; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
@@ -276,0 +274,0 @@ |
@@ -0,5 +1,5 @@ | ||
import { auth as crtAuth, http as crtHttp, io as crtIO } from "@aws-sdk/crt-loader"; | ||
import { parseQueryString } from "@smithy/querystring-parser"; | ||
import { getCanonicalQuery, getPayloadHash, moveHeadersToQuery, prepareRequest, } from "@smithy/signature-v4"; | ||
import { normalizeProvider } from "@smithy/util-middleware"; | ||
import { auth as crtAuth, http as crtHttp, io as crtIO } from "aws-crt"; | ||
import { MAX_PRESIGNED_TTL, SHA256_HEADER } from "./constants"; | ||
@@ -6,0 +6,0 @@ import { deleteHeader } from "./headerUtil"; |
import { signatureV4CrtContainer } from "@aws-sdk/signature-v4-multi-region"; | ||
import { crtAvailability } from "@aws-sdk/util-user-agent-node"; | ||
import { CrtSignerV4 } from "./CrtSignerV4"; | ||
signatureV4CrtContainer.CrtSignerV4 = CrtSignerV4; | ||
crtAvailability.isCrtAvailable = true; | ||
export * from "./CrtSignerV4"; |
@@ -0,5 +1,5 @@ | ||
import { auth as crtAuth } from "@aws-sdk/crt-loader"; | ||
import { AwsCredentialIdentity } from "@aws-sdk/types"; | ||
import { SignatureV4CryptoInit, SignatureV4Init } from "@smithy/signature-v4"; | ||
import { HttpRequest, RequestPresigner, RequestPresigningArguments, RequestSigner, RequestSigningArguments } from "@smithy/types"; | ||
import { auth as crtAuth } from "aws-crt"; | ||
export type AwsSigningAlgorithm = crtAuth.AwsSigningAlgorithm; | ||
@@ -6,0 +6,0 @@ export interface CrtSignerV4Init extends SignatureV4Init { |
@@ -0,1 +1,2 @@ | ||
import { auth as crtAuth } from "@aws-sdk/crt-loader"; | ||
import { AwsCredentialIdentity } from "@aws-sdk/types"; | ||
@@ -10,3 +11,2 @@ import { SignatureV4CryptoInit, SignatureV4Init } from "@smithy/signature-v4"; | ||
} from "@smithy/types"; | ||
import { auth as crtAuth } from "aws-crt"; | ||
export type AwsSigningAlgorithm = crtAuth.AwsSigningAlgorithm; | ||
@@ -13,0 +13,0 @@ export interface CrtSignerV4Init extends SignatureV4Init { |
{ | ||
"name": "@aws-sdk/signature-v4-crt", | ||
"version": "3.712.0", | ||
"version": "3.713.0", | ||
"description": "A revision of AWS Signature V4 request signer based on AWS Common Runtime https://github.com/awslabs/aws-crt-nodejs", | ||
@@ -25,5 +25,5 @@ "main": "./dist-cjs/index.js", | ||
"dependencies": { | ||
"@aws-sdk/signature-v4-multi-region": "3.709.0", | ||
"@aws-sdk/types": "3.709.0", | ||
"@aws-sdk/util-user-agent-node": "3.712.0", | ||
"@aws-sdk/crt-loader": "3.713.0", | ||
"@aws-sdk/signature-v4-multi-region": "3.713.0", | ||
"@aws-sdk/types": "3.713.0", | ||
"@smithy/querystring-parser": "^3.0.11", | ||
@@ -33,3 +33,2 @@ "@smithy/signature-v4": "^4.2.4", | ||
"@smithy/util-middleware": "^3.0.11", | ||
"aws-crt": "^1.18.3", | ||
"tslib": "^2.6.2" | ||
@@ -36,0 +35,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
8
60109
1098
+ Added@aws-sdk/crt-loader@3.713.0
+ Added@aws-sdk/core@3.713.0(transitive)
+ Added@aws-sdk/crt-loader@3.713.0(transitive)
+ Added@aws-sdk/middleware-sdk-s3@3.713.0(transitive)
+ Added@aws-sdk/middleware-user-agent@3.713.0(transitive)
+ Added@aws-sdk/signature-v4-multi-region@3.713.0(transitive)
+ Added@aws-sdk/types@3.713.0(transitive)
+ Added@aws-sdk/util-endpoints@3.713.0(transitive)
+ Added@aws-sdk/util-user-agent-node@3.713.0(transitive)
- Removedaws-crt@^1.18.3
- Removed@aws-sdk/core@3.709.0(transitive)
- Removed@aws-sdk/middleware-sdk-s3@3.709.0(transitive)
- Removed@aws-sdk/middleware-user-agent@3.709.0(transitive)
- Removed@aws-sdk/signature-v4-multi-region@3.709.0(transitive)
- Removed@aws-sdk/types@3.709.0(transitive)
- Removed@aws-sdk/util-endpoints@3.709.0(transitive)
- Removed@aws-sdk/util-user-agent-node@3.712.0(transitive)
Updated@aws-sdk/types@3.713.0