@jjrawlins/cdk-ami-builder 0.0.48 → 0.0.50
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/.jsii +11 -11
- package/cdk-ami-builder/jsii/jsii.go +2 -2
- package/cdk-ami-builder/version +1 -1
- package/lib/ImagePipeline/ImagePipeline.js +1 -1
- package/lib/Lambdas/CheckStateMachineStatus/CheckStateMachineStatus-function.js +1 -1
- package/lib/Lambdas/StartStateMachine/StartStateMachine-function.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-cjs/index.js +88090 -87044
- package/node_modules/@aws-sdk/client-ec2/package.json +6 -6
- package/node_modules/@aws-sdk/client-ecs/dist-cjs/index.js +4836 -5148
- package/node_modules/@aws-sdk/client-ecs/package.json +6 -6
- package/node_modules/@aws-sdk/client-kms/dist-cjs/index.js +3963 -4397
- package/node_modules/@aws-sdk/client-kms/package.json +6 -6
- package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +11771 -11916
- package/node_modules/@aws-sdk/client-s3/package.json +10 -10
- package/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/index.js +1582 -1740
- package/node_modules/@aws-sdk/client-secrets-manager/package.json +6 -6
- package/node_modules/@aws-sdk/client-sfn/dist-cjs/index.js +3292 -3664
- package/node_modules/@aws-sdk/client-sfn/package.json +6 -6
- package/node_modules/@aws-sdk/client-sns/dist-cjs/index.js +4326 -4601
- package/node_modules/@aws-sdk/client-sns/package.json +6 -6
- package/node_modules/@aws-sdk/client-sqs/dist-cjs/index.js +2114 -2361
- package/node_modules/@aws-sdk/client-sqs/package.json +6 -6
- package/node_modules/@aws-sdk/client-ssm/dist-cjs/index.js +12508 -13696
- package/node_modules/@aws-sdk/client-ssm/package.json +6 -6
- package/node_modules/@aws-sdk/client-sso/dist-cjs/index.js +478 -596
- package/node_modules/@aws-sdk/client-sso/package.json +5 -5
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +1969 -6
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js +48 -88
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +35 -74
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +273 -365
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +1581 -1863
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +2 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +2 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +4 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +4 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +3 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js +4 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +2 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +4 -4
- package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/ConfigurableSerdeContext.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonCodec.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeDeserializer.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeSerializer.d.ts +2 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/QuerySerializerSettings.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/XmlCodec.d.ts +1 -1
- package/node_modules/@aws-sdk/core/package.json +1 -1
- package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +38 -73
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +194 -259
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +72 -132
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +71 -107
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +176 -249
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-CVy8iqsZ.js +14 -0
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +16 -25
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-flexible-checksums/dist-cjs/index.js +381 -478
- package/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js +511 -641
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +170 -203
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/index.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +583 -858
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +795 -928
- package/node_modules/@aws-sdk/nested-clients/package.json +5 -5
- package/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +108 -137
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +147 -222
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/util-user-agent-browser/README.md +22 -3
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/createUserAgentStringParsingProvider.js +57 -0
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/index.js +39 -8
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-es/createUserAgentStringParsingProvider.js +20 -0
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js +37 -6
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/createUserAgentStringParsingProvider.d.ts +14 -0
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/index.d.ts +14 -4
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/index.native.d.ts +4 -3
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/ts3.4/createUserAgentStringParsingProvider.d.ts +9 -0
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/ts3.4/index.d.ts +5 -0
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +1 -1
- package/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +50 -94
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/crt-availability.d.ts +1 -2
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/defaultUserAgent.d.ts +10 -5
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
- package/node_modules/@smithy/chunked-blob-reader-native/package.json +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +1 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +5 -3
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +32 -30
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +133 -202
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +126 -34
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +5 -3
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +4 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +3 -3
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +19 -17
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +4 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js +5 -6
- package/node_modules/@smithy/core/dist-es/submodules/schema/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +82 -176
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js +22 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js +110 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +4 -26
- package/node_modules/@smithy/core/dist-types/submodules/schema/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts +5 -24
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/sentinels.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/translateTraits.d.ts +7 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/schema-serde-lib/schema-date-utils.d.ts +47 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +5 -24
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/sentinels.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/translateTraits.d.ts +7 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/schema-serde-lib/schema-date-utils.d.ts +47 -0
- package/node_modules/@smithy/core/package.json +3 -3
- package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
- package/node_modules/@smithy/hash-blob-browser/package.json +2 -2
- package/node_modules/@smithy/middleware-endpoint/package.json +2 -2
- package/node_modules/@smithy/middleware-retry/package.json +2 -2
- package/node_modules/@smithy/smithy-client/package.json +4 -4
- package/node_modules/@smithy/util-base64/dist-cjs/constants.browser.js +9 -32
- package/node_modules/@smithy/util-base64/dist-es/constants.browser.js +9 -28
- package/node_modules/@smithy/util-base64/dist-types/constants.browser.d.ts +5 -6
- package/node_modules/@smithy/util-base64/dist-types/ts3.4/constants.browser.d.ts +5 -6
- package/node_modules/@smithy/util-base64/package.json +1 -1
- package/node_modules/@smithy/util-body-length-node/dist-cjs/index.js +8 -6
- package/node_modules/@smithy/util-body-length-node/dist-es/calculateBodyLength.js +8 -6
- package/node_modules/@smithy/util-body-length-node/package.json +1 -1
- package/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/resolveDefaultsModeConfig.js +11 -9
- package/node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js +11 -8
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -3
- package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
- package/node_modules/@smithy/util-stream/dist-cjs/index.js +3 -5
- package/node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js +3 -5
- package/node_modules/@smithy/util-stream/dist-types/blob/Uint8ArrayBlobAdapter.d.ts +1 -0
- package/node_modules/@smithy/util-stream/dist-types/ts3.4/blob/Uint8ArrayBlobAdapter.d.ts +1 -0
- package/node_modules/@smithy/util-stream/package.json +3 -3
- package/package.json +11 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/nested-clients",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.907.0",
|
|
4
4
|
"description": "Nested clients for AWS SDK packages.",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
31
31
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
32
|
-
"@aws-sdk/core": "3.
|
|
32
|
+
"@aws-sdk/core": "3.907.0",
|
|
33
33
|
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
34
34
|
"@aws-sdk/middleware-logger": "3.901.0",
|
|
35
35
|
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
36
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
36
|
+
"@aws-sdk/middleware-user-agent": "3.907.0",
|
|
37
37
|
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
38
38
|
"@aws-sdk/types": "3.901.0",
|
|
39
39
|
"@aws-sdk/util-endpoints": "3.901.0",
|
|
40
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
41
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
40
|
+
"@aws-sdk/util-user-agent-browser": "3.907.0",
|
|
41
|
+
"@aws-sdk/util-user-agent-node": "3.907.0",
|
|
42
42
|
"@smithy/config-resolver": "^4.3.0",
|
|
43
43
|
"@smithy/core": "^3.14.0",
|
|
44
44
|
"@smithy/fetch-http-handler": "^5.3.0",
|
|
@@ -1,150 +1,121 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/index.ts
|
|
22
|
-
var index_exports = {};
|
|
23
|
-
__export(index_exports, {
|
|
24
|
-
SignatureV4MultiRegion: () => SignatureV4MultiRegion,
|
|
25
|
-
signatureV4CrtContainer: () => signatureV4CrtContainer
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(index_exports);
|
|
1
|
+
'use strict';
|
|
28
2
|
|
|
29
|
-
|
|
30
|
-
var
|
|
31
|
-
var import_signature_v4 = require("@smithy/signature-v4");
|
|
3
|
+
var middlewareSdkS3 = require('@aws-sdk/middleware-sdk-s3');
|
|
4
|
+
var signatureV4 = require('@smithy/signature-v4');
|
|
32
5
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
CrtSignerV4: null
|
|
6
|
+
const signatureV4CrtContainer = {
|
|
7
|
+
CrtSignerV4: null,
|
|
36
8
|
};
|
|
37
9
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return "js";
|
|
51
|
-
}
|
|
52
|
-
return "none";
|
|
53
|
-
}
|
|
54
|
-
constructor(options) {
|
|
55
|
-
this.sigv4Signer = new import_middleware_sdk_s3.SignatureV4S3Express(options);
|
|
56
|
-
this.signerOptions = options;
|
|
57
|
-
}
|
|
58
|
-
async sign(requestToSign, options = {}) {
|
|
59
|
-
if (options.signingRegion === "*") {
|
|
60
|
-
return this.getSigv4aSigner().sign(requestToSign, options);
|
|
10
|
+
class SignatureV4MultiRegion {
|
|
11
|
+
sigv4aSigner;
|
|
12
|
+
sigv4Signer;
|
|
13
|
+
signerOptions;
|
|
14
|
+
static sigv4aDependency() {
|
|
15
|
+
if (typeof signatureV4CrtContainer.CrtSignerV4 === "function") {
|
|
16
|
+
return "crt";
|
|
17
|
+
}
|
|
18
|
+
else if (typeof signatureV4.signatureV4aContainer.SignatureV4a === "function") {
|
|
19
|
+
return "js";
|
|
20
|
+
}
|
|
21
|
+
return "none";
|
|
61
22
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
* Sign with alternate credentials to the ones provided in the constructor.
|
|
66
|
-
* Note: This is only supported for SigV4a when using the CRT implementation.
|
|
67
|
-
*/
|
|
68
|
-
async signWithCredentials(requestToSign, credentials, options = {}) {
|
|
69
|
-
if (options.signingRegion === "*") {
|
|
70
|
-
const signer = this.getSigv4aSigner();
|
|
71
|
-
const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
|
|
72
|
-
if (CrtSignerV4 && signer instanceof CrtSignerV4) {
|
|
73
|
-
return signer.signWithCredentials(requestToSign, credentials, options);
|
|
74
|
-
} else {
|
|
75
|
-
throw new Error(
|
|
76
|
-
`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`
|
|
77
|
-
);
|
|
78
|
-
}
|
|
23
|
+
constructor(options) {
|
|
24
|
+
this.sigv4Signer = new middlewareSdkS3.SignatureV4S3Express(options);
|
|
25
|
+
this.signerOptions = options;
|
|
79
26
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
*/
|
|
86
|
-
async presign(originalRequest, options = {}) {
|
|
87
|
-
if (options.signingRegion === "*") {
|
|
88
|
-
const signer = this.getSigv4aSigner();
|
|
89
|
-
const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
|
|
90
|
-
if (CrtSignerV4 && signer instanceof CrtSignerV4) {
|
|
91
|
-
return signer.presign(originalRequest, options);
|
|
92
|
-
} else {
|
|
93
|
-
throw new Error(
|
|
94
|
-
`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`
|
|
95
|
-
);
|
|
96
|
-
}
|
|
27
|
+
async sign(requestToSign, options = {}) {
|
|
28
|
+
if (options.signingRegion === "*") {
|
|
29
|
+
return this.getSigv4aSigner().sign(requestToSign, options);
|
|
30
|
+
}
|
|
31
|
+
return this.sigv4Signer.sign(requestToSign, options);
|
|
97
32
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
33
|
+
async signWithCredentials(requestToSign, credentials, options = {}) {
|
|
34
|
+
if (options.signingRegion === "*") {
|
|
35
|
+
const signer = this.getSigv4aSigner();
|
|
36
|
+
const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
|
|
37
|
+
if (CrtSignerV4 && signer instanceof CrtSignerV4) {
|
|
38
|
+
return signer.signWithCredentials(requestToSign, credentials, options);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. ` +
|
|
42
|
+
`Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. ` +
|
|
43
|
+
`You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] ` +
|
|
44
|
+
`or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. ` +
|
|
45
|
+
`For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options);
|
|
103
49
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
50
|
+
async presign(originalRequest, options = {}) {
|
|
51
|
+
if (options.signingRegion === "*") {
|
|
52
|
+
const signer = this.getSigv4aSigner();
|
|
53
|
+
const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
|
|
54
|
+
if (CrtSignerV4 && signer instanceof CrtSignerV4) {
|
|
55
|
+
return signer.presign(originalRequest, options);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. ` +
|
|
59
|
+
`Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. ` +
|
|
60
|
+
`You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] ` +
|
|
61
|
+
`or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. ` +
|
|
62
|
+
`For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);
|
|
63
|
+
}
|
|
115
64
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
} else if (JsSigV4aSigner && typeof JsSigV4aSigner === "function") {
|
|
122
|
-
this.sigv4aSigner = new JsSigV4aSigner({
|
|
123
|
-
...this.signerOptions
|
|
124
|
-
});
|
|
125
|
-
} else {
|
|
126
|
-
throw new Error(
|
|
127
|
-
"Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"
|
|
128
|
-
);
|
|
65
|
+
return this.sigv4Signer.presign(originalRequest, options);
|
|
66
|
+
}
|
|
67
|
+
async presignWithCredentials(originalRequest, credentials, options = {}) {
|
|
68
|
+
if (options.signingRegion === "*") {
|
|
69
|
+
throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");
|
|
129
70
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
71
|
+
return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options);
|
|
72
|
+
}
|
|
73
|
+
getSigv4aSigner() {
|
|
74
|
+
if (!this.sigv4aSigner) {
|
|
75
|
+
const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
|
|
76
|
+
const JsSigV4aSigner = signatureV4.signatureV4aContainer.SignatureV4a;
|
|
77
|
+
if (this.signerOptions.runtime === "node") {
|
|
78
|
+
if (!CrtSignerV4 && !JsSigV4aSigner) {
|
|
79
|
+
throw new Error("Neither CRT nor JS SigV4a implementation is available. " +
|
|
80
|
+
"Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. " +
|
|
81
|
+
"For more information please go to " +
|
|
82
|
+
"https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");
|
|
83
|
+
}
|
|
84
|
+
if (CrtSignerV4 && typeof CrtSignerV4 === "function") {
|
|
85
|
+
this.sigv4aSigner = new CrtSignerV4({
|
|
86
|
+
...this.signerOptions,
|
|
87
|
+
signingAlgorithm: 1,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
else if (JsSigV4aSigner && typeof JsSigV4aSigner === "function") {
|
|
91
|
+
this.sigv4aSigner = new JsSigV4aSigner({
|
|
92
|
+
...this.signerOptions,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
throw new Error("Available SigV4a implementation is not a valid constructor. " +
|
|
97
|
+
"Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a." +
|
|
98
|
+
"For more information please go to " +
|
|
99
|
+
"https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
if (!JsSigV4aSigner || typeof JsSigV4aSigner !== "function") {
|
|
104
|
+
throw new Error("JS SigV4a implementation is not available or not a valid constructor. " +
|
|
105
|
+
"Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. " +
|
|
106
|
+
"You must also register the package by calling [require('@aws-sdk/signature-v4a');] " +
|
|
107
|
+
"or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. " +
|
|
108
|
+
"For more information please go to " +
|
|
109
|
+
"https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");
|
|
110
|
+
}
|
|
111
|
+
this.sigv4aSigner = new JsSigV4aSigner({
|
|
112
|
+
...this.signerOptions,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
135
115
|
}
|
|
136
|
-
this.sigv4aSigner
|
|
137
|
-
...this.signerOptions
|
|
138
|
-
});
|
|
139
|
-
}
|
|
116
|
+
return this.sigv4aSigner;
|
|
140
117
|
}
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
145
|
-
|
|
146
|
-
0 && (module.exports = {
|
|
147
|
-
SignatureV4MultiRegion,
|
|
148
|
-
signatureV4CrtContainer
|
|
149
|
-
});
|
|
118
|
+
}
|
|
150
119
|
|
|
120
|
+
exports.SignatureV4MultiRegion = SignatureV4MultiRegion;
|
|
121
|
+
exports.signatureV4CrtContainer = signatureV4CrtContainer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/signature-v4-multi-region",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.907.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
6
6
|
"build:cjs": "node ../../scripts/compilation/inline signature-v4-multi-region",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aws-sdk/middleware-sdk-s3": "3.
|
|
28
|
+
"@aws-sdk/middleware-sdk-s3": "3.907.0",
|
|
29
29
|
"@aws-sdk/types": "3.901.0",
|
|
30
30
|
"@smithy/protocol-http": "^5.3.0",
|
|
31
31
|
"@smithy/signature-v4": "^5.3.0",
|