@jjrawlins/cdk-ami-builder 0.0.47 → 0.0.49

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.
Files changed (138) hide show
  1. package/.jsii +11 -11
  2. package/cdk-ami-builder/go.mod +1 -1
  3. package/cdk-ami-builder/jsii/jsii.go +2 -2
  4. package/cdk-ami-builder/version +1 -1
  5. package/lib/ImagePipeline/ImagePipeline.js +1 -1
  6. package/lib/Lambdas/CheckStateMachineStatus/CheckStateMachineStatus-function.js +1 -1
  7. package/lib/Lambdas/StartStateMachine/StartStateMachine-function.js +1 -1
  8. package/node_modules/@aws-sdk/client-ec2/dist-cjs/index.js +88090 -87044
  9. package/node_modules/@aws-sdk/client-ec2/package.json +5 -5
  10. package/node_modules/@aws-sdk/client-ecs/dist-cjs/index.js +4836 -5148
  11. package/node_modules/@aws-sdk/client-ecs/package.json +5 -5
  12. package/node_modules/@aws-sdk/client-kms/dist-cjs/index.js +3963 -4397
  13. package/node_modules/@aws-sdk/client-kms/package.json +5 -5
  14. package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +11771 -11916
  15. package/node_modules/@aws-sdk/client-s3/package.json +9 -9
  16. package/node_modules/@aws-sdk/client-secrets-manager/dist-cjs/index.js +1582 -1740
  17. package/node_modules/@aws-sdk/client-secrets-manager/package.json +5 -5
  18. package/node_modules/@aws-sdk/client-sfn/dist-cjs/index.js +3292 -3664
  19. package/node_modules/@aws-sdk/client-sfn/package.json +5 -5
  20. package/node_modules/@aws-sdk/client-sns/dist-cjs/index.js +4326 -4601
  21. package/node_modules/@aws-sdk/client-sns/package.json +5 -5
  22. package/node_modules/@aws-sdk/client-sqs/dist-cjs/index.js +2114 -2361
  23. package/node_modules/@aws-sdk/client-sqs/package.json +5 -5
  24. package/node_modules/@aws-sdk/client-ssm/dist-cjs/index.js +12508 -13696
  25. package/node_modules/@aws-sdk/client-ssm/package.json +5 -5
  26. package/node_modules/@aws-sdk/client-sso/dist-cjs/index.js +478 -596
  27. package/node_modules/@aws-sdk/client-sso/package.json +4 -4
  28. package/node_modules/@aws-sdk/core/dist-cjs/index.js +1969 -6
  29. package/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js +48 -88
  30. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +35 -74
  31. package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +273 -365
  32. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +1581 -1863
  33. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +2 -2
  34. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +2 -2
  35. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +4 -4
  36. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +4 -4
  37. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +3 -3
  38. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js +4 -4
  39. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +2 -2
  40. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +4 -4
  41. package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +1 -1
  42. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.d.ts +1 -1
  43. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +1 -1
  44. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.d.ts +1 -1
  45. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts +1 -1
  46. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/ConfigurableSerdeContext.d.ts +1 -1
  47. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonCodec.d.ts +1 -1
  48. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeDeserializer.d.ts +1 -1
  49. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeSerializer.d.ts +2 -2
  50. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/QuerySerializerSettings.d.ts +1 -1
  51. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/XmlCodec.d.ts +1 -1
  52. package/node_modules/@aws-sdk/core/package.json +1 -1
  53. package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +38 -73
  54. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  55. package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  56. package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +194 -259
  57. package/node_modules/@aws-sdk/credential-provider-ini/package.json +8 -8
  58. package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +72 -132
  59. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  60. package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +71 -107
  61. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  62. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +176 -249
  63. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-CVy8iqsZ.js +14 -0
  64. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  65. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +16 -25
  66. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  67. package/node_modules/@aws-sdk/middleware-flexible-checksums/dist-cjs/index.js +381 -478
  68. package/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +2 -2
  69. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js +511 -641
  70. package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +2 -2
  71. package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +170 -203
  72. package/node_modules/@aws-sdk/middleware-user-agent/package.json +2 -2
  73. package/node_modules/@aws-sdk/nested-clients/dist-cjs/index.js +2 -2
  74. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +583 -858
  75. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +795 -928
  76. package/node_modules/@aws-sdk/nested-clients/package.json +4 -4
  77. package/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +108 -137
  78. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
  79. package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +147 -222
  80. package/node_modules/@aws-sdk/token-providers/package.json +3 -3
  81. package/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +50 -94
  82. package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
  83. package/node_modules/@smithy/chunked-blob-reader-native/package.json +2 -2
  84. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +1 -1
  85. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +5 -3
  86. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +32 -30
  87. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +133 -202
  88. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +126 -34
  89. package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +2 -2
  90. package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +5 -3
  91. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +4 -4
  92. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +3 -3
  93. package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +2 -2
  94. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +19 -17
  95. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +4 -4
  96. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js +5 -6
  97. package/node_modules/@smithy/core/dist-es/submodules/schema/index.js +1 -0
  98. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +82 -176
  99. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js +22 -0
  100. package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
  101. package/node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js +110 -0
  102. package/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +4 -26
  103. package/node_modules/@smithy/core/dist-types/submodules/schema/index.d.ts +1 -0
  104. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts +5 -24
  105. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/sentinels.d.ts +2 -0
  106. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/translateTraits.d.ts +7 -0
  107. package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +1 -0
  108. package/node_modules/@smithy/core/dist-types/submodules/serde/schema-serde-lib/schema-date-utils.d.ts +47 -0
  109. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/index.d.ts +1 -0
  110. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +5 -24
  111. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/sentinels.d.ts +2 -0
  112. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/translateTraits.d.ts +7 -0
  113. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +1 -0
  114. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/schema-serde-lib/schema-date-utils.d.ts +47 -0
  115. package/node_modules/@smithy/core/package.json +3 -3
  116. package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
  117. package/node_modules/@smithy/hash-blob-browser/package.json +2 -2
  118. package/node_modules/@smithy/middleware-endpoint/package.json +2 -2
  119. package/node_modules/@smithy/middleware-retry/package.json +2 -2
  120. package/node_modules/@smithy/smithy-client/package.json +4 -4
  121. package/node_modules/@smithy/util-base64/dist-cjs/constants.browser.js +9 -32
  122. package/node_modules/@smithy/util-base64/dist-es/constants.browser.js +9 -28
  123. package/node_modules/@smithy/util-base64/dist-types/constants.browser.d.ts +5 -6
  124. package/node_modules/@smithy/util-base64/dist-types/ts3.4/constants.browser.d.ts +5 -6
  125. package/node_modules/@smithy/util-base64/package.json +1 -1
  126. package/node_modules/@smithy/util-body-length-node/dist-cjs/index.js +8 -6
  127. package/node_modules/@smithy/util-body-length-node/dist-es/calculateBodyLength.js +8 -6
  128. package/node_modules/@smithy/util-body-length-node/package.json +1 -1
  129. package/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/resolveDefaultsModeConfig.js +11 -9
  130. package/node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js +11 -8
  131. package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -3
  132. package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
  133. package/node_modules/@smithy/util-stream/dist-cjs/index.js +3 -5
  134. package/node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js +3 -5
  135. package/node_modules/@smithy/util-stream/dist-types/blob/Uint8ArrayBlobAdapter.d.ts +1 -0
  136. package/node_modules/@smithy/util-stream/dist-types/ts3.4/blob/Uint8ArrayBlobAdapter.d.ts +1 -0
  137. package/node_modules/@smithy/util-stream/package.json +3 -3
  138. package/package.json +10 -10
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/nested-clients",
3
- "version": "3.901.0",
3
+ "version": "3.906.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.901.0",
32
+ "@aws-sdk/core": "3.906.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.901.0",
36
+ "@aws-sdk/middleware-user-agent": "3.906.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
40
  "@aws-sdk/util-user-agent-browser": "3.901.0",
41
- "@aws-sdk/util-user-agent-node": "3.901.0",
41
+ "@aws-sdk/util-user-agent-node": "3.906.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
- "use strict";
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
- // src/SignatureV4MultiRegion.ts
30
- var import_middleware_sdk_s3 = require("@aws-sdk/middleware-sdk-s3");
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
- // src/signature-v4-crt-container.ts
34
- var signatureV4CrtContainer = {
35
- CrtSignerV4: null
6
+ const signatureV4CrtContainer = {
7
+ CrtSignerV4: null,
36
8
  };
37
9
 
38
- // src/SignatureV4MultiRegion.ts
39
- var SignatureV4MultiRegion = class {
40
- static {
41
- __name(this, "SignatureV4MultiRegion");
42
- }
43
- sigv4aSigner;
44
- sigv4Signer;
45
- signerOptions;
46
- static sigv4aDependency() {
47
- if (typeof signatureV4CrtContainer.CrtSignerV4 === "function") {
48
- return "crt";
49
- } else if (typeof import_signature_v4.signatureV4aContainer.SignatureV4a === "function") {
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
- return this.sigv4Signer.sign(requestToSign, options);
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
- return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options);
81
- }
82
- /**
83
- * Presign a request.
84
- * Note: This is only supported for SigV4a when using the CRT implementation.
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
- return this.sigv4Signer.presign(originalRequest, options);
99
- }
100
- async presignWithCredentials(originalRequest, credentials, options = {}) {
101
- if (options.signingRegion === "*") {
102
- throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");
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
- return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options);
105
- }
106
- getSigv4aSigner() {
107
- if (!this.sigv4aSigner) {
108
- const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
109
- const JsSigV4aSigner = import_signature_v4.signatureV4aContainer.SignatureV4a;
110
- if (this.signerOptions.runtime === "node") {
111
- if (!CrtSignerV4 && !JsSigV4aSigner) {
112
- throw new Error(
113
- "Neither CRT nor JS SigV4a implementation is available. Please load either @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"
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
- if (CrtSignerV4 && typeof CrtSignerV4 === "function") {
117
- this.sigv4aSigner = new CrtSignerV4({
118
- ...this.signerOptions,
119
- signingAlgorithm: 1
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
- } else {
131
- if (!JsSigV4aSigner || typeof JsSigV4aSigner !== "function") {
132
- throw new Error(
133
- "JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a"
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 = new JsSigV4aSigner({
137
- ...this.signerOptions
138
- });
139
- }
116
+ return this.sigv4aSigner;
140
117
  }
141
- return this.sigv4aSigner;
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.901.0",
3
+ "version": "3.906.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.901.0",
28
+ "@aws-sdk/middleware-sdk-s3": "3.906.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",