@mavogel/awscdk-rootmail 0.0.96 → 0.0.97
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 +7 -7
- package/lib/rootmail.js +1 -1
- package/lib/ses-receive.js +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-cjs/index.js +5 -5
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-es/CloudWatchLogsClient.js +5 -5
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/CloudWatchLogsClient.d.ts +2 -2
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/CloudWatchLogsClient.d.ts +2 -2
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/package.json +17 -17
- package/node_modules/@aws-sdk/client-route-53/dist-cjs/index.js +5 -5
- package/node_modules/@aws-sdk/client-route-53/dist-es/Route53Client.js +5 -5
- package/node_modules/@aws-sdk/client-route-53/dist-types/Route53Client.d.ts +2 -2
- package/node_modules/@aws-sdk/client-route-53/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-route-53/dist-types/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-route-53/dist-types/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-route-53/dist-types/ts3.4/Route53Client.d.ts +2 -2
- package/node_modules/@aws-sdk/client-route-53/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-route-53/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-route-53/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-route-53/package.json +17 -17
- package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +174 -64
- package/node_modules/@aws-sdk/client-s3/dist-es/S3Client.js +7 -7
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/AbortMultipartUploadCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/CreateMultipartUploadCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/CreateSessionCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectTaggingCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectsCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAccelerateConfigurationCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAclCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAnalyticsConfigurationCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketCorsCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketEncryptionCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketIntelligentTieringConfigurationCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketInventoryConfigurationCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLifecycleConfigurationCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLocationCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLoggingCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetricsConfigurationCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketNotificationConfigurationCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketOwnershipControlsCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyStatusCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketReplicationCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketRequestPaymentCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketTaggingCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketVersioningCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketWebsiteCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAclCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAttributesCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLegalHoldCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLockConfigurationCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectRetentionCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTaggingCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/GetPublicAccessBlockCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/HeadBucketCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/HeadObjectCommand.js +2 -1
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketAnalyticsConfigurationsCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketIntelligentTieringConfigurationsCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketInventoryConfigurationsCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketMetricsConfigurationsCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketsCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/ListDirectoryBucketsCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/ListMultipartUploadsCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectVersionsCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsV2Command.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/ListPartsCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectAclCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectCommand.js +2 -1
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLegalHoldCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLockConfigurationCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectRetentionCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectTaggingCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/RestoreObjectCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/SelectObjectContentCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCommand.js +2 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/S3Client.d.ts +2 -2
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteObjectTaggingCommand.d.ts +11 -11
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteObjectsCommand.d.ts +22 -22
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectCommand.d.ts +19 -19
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectCommand.d.ts +50 -50
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/UploadPartCopyCommand.d.ts +13 -13
- package/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/S3Client.d.ts +2 -2
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -4
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.d.ts +4 -4
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -4
- package/node_modules/@aws-sdk/client-s3/package.json +25 -25
- package/node_modules/@aws-sdk/client-ses/dist-cjs/index.js +5 -5
- package/node_modules/@aws-sdk/client-ses/dist-es/SESClient.js +5 -5
- package/node_modules/@aws-sdk/client-ses/dist-types/SESClient.d.ts +2 -2
- package/node_modules/@aws-sdk/client-ses/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ses/dist-types/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ses/dist-types/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ses/dist-types/ts3.4/SESClient.d.ts +2 -2
- package/node_modules/@aws-sdk/client-ses/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ses/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ses/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ses/package.json +17 -17
- package/node_modules/@aws-sdk/client-ssm/dist-cjs/index.js +5 -5
- package/node_modules/@aws-sdk/client-ssm/dist-es/SSMClient.js +5 -5
- package/node_modules/@aws-sdk/client-ssm/dist-types/SSMClient.d.ts +2 -2
- package/node_modules/@aws-sdk/client-ssm/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ssm/dist-types/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ssm/dist-types/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ssm/dist-types/ts3.4/SSMClient.d.ts +2 -2
- package/node_modules/@aws-sdk/client-ssm/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ssm/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ssm/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ssm/package.json +17 -17
- package/node_modules/@aws-sdk/client-sso/dist-cjs/index.js +5 -5
- package/node_modules/@aws-sdk/client-sso/dist-es/SSOClient.js +5 -5
- package/node_modules/@aws-sdk/client-sso/dist-types/SSOClient.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/SSOClient.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sso/package.json +14 -14
- package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js +5 -5
- package/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js +5 -5
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/SSOOIDCClient.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/SSOOIDCClient.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sso-oidc/package.json +16 -16
- package/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js +5 -5
- package/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js +5 -5
- package/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STSClient.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sts/package.json +16 -16
- package/node_modules/@aws-sdk/core/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +30 -6
- package/node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js +29 -9
- package/node_modules/@aws-sdk/credential-provider-node/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-bucket-endpoint/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-expect-continue/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-host-header/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js +27 -10
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/throw-200-exceptions.js +27 -10
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/throw-200-exceptions.d.ts +1 -2
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/throw-200-exceptions.d.ts +0 -2
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +6 -4
- package/node_modules/@aws-sdk/middleware-signing/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +2 -2
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +4 -4
- package/node_modules/@smithy/signature-v4/dist-types/SignatureV4.d.ts +1 -1
- package/node_modules/@smithy/signature-v4/dist-types/ts3.4/SignatureV4.d.ts +1 -1
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/package.json +10 -10
|
@@ -441,25 +441,43 @@ var resolveS3Config = /* @__PURE__ */ __name((input, {
|
|
|
441
441
|
|
|
442
442
|
// src/throw-200-exceptions.ts
|
|
443
443
|
|
|
444
|
-
var
|
|
444
|
+
var import_util_stream = require("@smithy/util-stream");
|
|
445
|
+
var THROW_IF_EMPTY_BODY = {
|
|
446
|
+
CopyObjectCommand: true,
|
|
447
|
+
UploadPartCopyCommand: true,
|
|
448
|
+
CompleteMultipartUploadCommand: true
|
|
449
|
+
};
|
|
450
|
+
var MAX_BYTES_TO_INSPECT = 3e3;
|
|
451
|
+
var throw200ExceptionsMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => {
|
|
445
452
|
const result = await next(args);
|
|
446
453
|
const { response } = result;
|
|
447
|
-
if (!import_protocol_http.HttpResponse.isInstance(response))
|
|
454
|
+
if (!import_protocol_http.HttpResponse.isInstance(response)) {
|
|
448
455
|
return result;
|
|
449
|
-
|
|
450
|
-
|
|
456
|
+
}
|
|
457
|
+
const { statusCode, body: sourceBody } = response;
|
|
458
|
+
if (statusCode < 200 || statusCode >= 300) {
|
|
451
459
|
return result;
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
460
|
+
}
|
|
461
|
+
let bodyCopy = sourceBody;
|
|
462
|
+
let body = sourceBody;
|
|
463
|
+
if (sourceBody && typeof sourceBody === "object" && !(sourceBody instanceof Uint8Array)) {
|
|
464
|
+
[bodyCopy, body] = await (0, import_util_stream.splitStream)(sourceBody);
|
|
465
|
+
}
|
|
466
|
+
response.body = body;
|
|
467
|
+
const bodyBytes = await collectBody(bodyCopy, {
|
|
468
|
+
streamCollector: async (stream) => {
|
|
469
|
+
return (0, import_util_stream.headStream)(stream, MAX_BYTES_TO_INSPECT);
|
|
470
|
+
}
|
|
471
|
+
});
|
|
472
|
+
const bodyStringTail = config.utf8Encoder(bodyBytes.subarray(bodyBytes.length - 16));
|
|
473
|
+
if (bodyBytes.length === 0 && THROW_IF_EMPTY_BODY[context.commandName]) {
|
|
455
474
|
const err = new Error("S3 aborted request");
|
|
456
475
|
err.name = "InternalError";
|
|
457
476
|
throw err;
|
|
458
477
|
}
|
|
459
|
-
if (
|
|
478
|
+
if (bodyStringTail && bodyStringTail.endsWith("</Error>")) {
|
|
460
479
|
response.statusCode = 400;
|
|
461
480
|
}
|
|
462
|
-
response.body = bodyBytes;
|
|
463
481
|
return result;
|
|
464
482
|
}, "throw200ExceptionsMiddleware");
|
|
465
483
|
var collectBody = /* @__PURE__ */ __name((streamBody = new Uint8Array(), context) => {
|
|
@@ -468,7 +486,6 @@ var collectBody = /* @__PURE__ */ __name((streamBody = new Uint8Array(), context
|
|
|
468
486
|
}
|
|
469
487
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
470
488
|
}, "collectBody");
|
|
471
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
472
489
|
var throw200ExceptionsMiddlewareOptions = {
|
|
473
490
|
relation: "after",
|
|
474
491
|
toMiddleware: "deserializerMiddleware",
|
|
@@ -1,23 +1,41 @@
|
|
|
1
1
|
import { HttpResponse } from "@smithy/protocol-http";
|
|
2
|
-
|
|
2
|
+
import { headStream, splitStream } from "@smithy/util-stream";
|
|
3
|
+
const THROW_IF_EMPTY_BODY = {
|
|
4
|
+
CopyObjectCommand: true,
|
|
5
|
+
UploadPartCopyCommand: true,
|
|
6
|
+
CompleteMultipartUploadCommand: true,
|
|
7
|
+
};
|
|
8
|
+
const MAX_BYTES_TO_INSPECT = 3000;
|
|
9
|
+
export const throw200ExceptionsMiddleware = (config) => (next, context) => async (args) => {
|
|
3
10
|
const result = await next(args);
|
|
4
11
|
const { response } = result;
|
|
5
|
-
if (!HttpResponse.isInstance(response))
|
|
12
|
+
if (!HttpResponse.isInstance(response)) {
|
|
6
13
|
return result;
|
|
7
|
-
|
|
8
|
-
|
|
14
|
+
}
|
|
15
|
+
const { statusCode, body: sourceBody } = response;
|
|
16
|
+
if (statusCode < 200 || statusCode >= 300) {
|
|
9
17
|
return result;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
18
|
+
}
|
|
19
|
+
let bodyCopy = sourceBody;
|
|
20
|
+
let body = sourceBody;
|
|
21
|
+
if (sourceBody && typeof sourceBody === "object" && !(sourceBody instanceof Uint8Array)) {
|
|
22
|
+
[bodyCopy, body] = await splitStream(sourceBody);
|
|
23
|
+
}
|
|
24
|
+
response.body = body;
|
|
25
|
+
const bodyBytes = await collectBody(bodyCopy, {
|
|
26
|
+
streamCollector: async (stream) => {
|
|
27
|
+
return headStream(stream, MAX_BYTES_TO_INSPECT);
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
const bodyStringTail = config.utf8Encoder(bodyBytes.subarray(bodyBytes.length - 16));
|
|
31
|
+
if (bodyBytes.length === 0 && THROW_IF_EMPTY_BODY[context.commandName]) {
|
|
13
32
|
const err = new Error("S3 aborted request");
|
|
14
33
|
err.name = "InternalError";
|
|
15
34
|
throw err;
|
|
16
35
|
}
|
|
17
|
-
if (
|
|
36
|
+
if (bodyStringTail && bodyStringTail.endsWith("</Error>")) {
|
|
18
37
|
response.statusCode = 400;
|
|
19
38
|
}
|
|
20
|
-
response.body = bodyBytes;
|
|
21
39
|
return result;
|
|
22
40
|
};
|
|
23
41
|
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
@@ -26,7 +44,6 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
|
26
44
|
}
|
|
27
45
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
28
46
|
};
|
|
29
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
30
47
|
export const throw200ExceptionsMiddlewareOptions = {
|
|
31
48
|
relation: "after",
|
|
32
49
|
toMiddleware: "deserializerMiddleware",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { DeserializeMiddleware, Encoder, Pluggable, RelativeMiddlewareOptions
|
|
1
|
+
import { DeserializeMiddleware, Encoder, Pluggable, RelativeMiddlewareOptions } from "@smithy/types";
|
|
2
2
|
type PreviouslyResolved = {
|
|
3
|
-
streamCollector: StreamCollector;
|
|
4
3
|
utf8Encoder: Encoder;
|
|
5
4
|
};
|
|
6
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-sdk-s3",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.616.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 middleware-sdk-s3",
|
|
@@ -26,11 +26,13 @@
|
|
|
26
26
|
"@aws-sdk/types": "3.609.0",
|
|
27
27
|
"@aws-sdk/util-arn-parser": "3.568.0",
|
|
28
28
|
"@smithy/node-config-provider": "^3.1.4",
|
|
29
|
-
"@smithy/protocol-http": "^4.0.
|
|
30
|
-
"@smithy/signature-v4": "^
|
|
31
|
-
"@smithy/smithy-client": "^3.1.
|
|
29
|
+
"@smithy/protocol-http": "^4.0.4",
|
|
30
|
+
"@smithy/signature-v4": "^4.0.0",
|
|
31
|
+
"@smithy/smithy-client": "^3.1.8",
|
|
32
32
|
"@smithy/types": "^3.3.0",
|
|
33
33
|
"@smithy/util-config-provider": "^3.0.0",
|
|
34
|
+
"@smithy/util-stream": "^3.1.0",
|
|
35
|
+
"@smithy/util-utf8": "^3.0.0",
|
|
34
36
|
"tslib": "^2.6.2"
|
|
35
37
|
},
|
|
36
38
|
"devDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-signing",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.616.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 middleware-signing",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@aws-sdk/types": "3.609.0",
|
|
26
26
|
"@smithy/property-provider": "^3.1.3",
|
|
27
|
-
"@smithy/protocol-http": "^4.0.
|
|
28
|
-
"@smithy/signature-v4": "^
|
|
27
|
+
"@smithy/protocol-http": "^4.0.4",
|
|
28
|
+
"@smithy/signature-v4": "^4.0.0",
|
|
29
29
|
"@smithy/types": "^3.3.0",
|
|
30
30
|
"@smithy/util-middleware": "^3.0.3",
|
|
31
31
|
"tslib": "^2.6.2"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-user-agent",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.616.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 middleware-user-agent",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@aws-sdk/types": "3.609.0",
|
|
26
26
|
"@aws-sdk/util-endpoints": "3.614.0",
|
|
27
|
-
"@smithy/protocol-http": "^4.0.
|
|
27
|
+
"@smithy/protocol-http": "^4.0.4",
|
|
28
28
|
"@smithy/types": "^3.3.0",
|
|
29
29
|
"tslib": "^2.6.2"
|
|
30
30
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/signature-v4-multi-region",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.616.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",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
},
|
|
21
21
|
"license": "Apache-2.0",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@aws-sdk/middleware-sdk-s3": "3.
|
|
23
|
+
"@aws-sdk/middleware-sdk-s3": "3.616.0",
|
|
24
24
|
"@aws-sdk/types": "3.609.0",
|
|
25
|
-
"@smithy/protocol-http": "^4.0.
|
|
26
|
-
"@smithy/signature-v4": "^
|
|
25
|
+
"@smithy/protocol-http": "^4.0.4",
|
|
26
|
+
"@smithy/signature-v4": "^4.0.0",
|
|
27
27
|
"@smithy/types": "^3.3.0",
|
|
28
28
|
"tslib": "^2.6.2"
|
|
29
29
|
},
|
|
@@ -18,7 +18,7 @@ export interface SignatureV4Init {
|
|
|
18
18
|
* A constructor function for a hash object that will calculate SHA-256 HMAC
|
|
19
19
|
* checksums.
|
|
20
20
|
*/
|
|
21
|
-
sha256
|
|
21
|
+
sha256: ChecksumConstructor | HashConstructor;
|
|
22
22
|
/**
|
|
23
23
|
* Whether to uri-escape the request URI path as part of computing the
|
|
24
24
|
* canonical request string. This is required for every AWS service, except
|
|
@@ -18,7 +18,7 @@ export interface SignatureV4Init {
|
|
|
18
18
|
* A constructor function for a hash object that will calculate SHA-256 HMAC
|
|
19
19
|
* checksums.
|
|
20
20
|
*/
|
|
21
|
-
sha256
|
|
21
|
+
sha256: ChecksumConstructor | HashConstructor;
|
|
22
22
|
/**
|
|
23
23
|
* Whether to uri-escape the request URI path as part of computing the
|
|
24
24
|
* canonical request string. This is required for every AWS service, except
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/signature-v4",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
37
|
-
"@smithy/protocol-http": "^4.0.
|
|
37
|
+
"@smithy/protocol-http": "^4.0.4",
|
|
38
38
|
"concurrently": "7.0.0",
|
|
39
39
|
"downlevel-dts": "0.10.1",
|
|
40
40
|
"rimraf": "3.0.2",
|
package/package.json
CHANGED
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
"jsii-pacmak": "^1.101.0",
|
|
70
70
|
"jsii-rosetta": "~5.3.0",
|
|
71
71
|
"jsonfile": "^6.1.0",
|
|
72
|
-
"projen": "^0.84.
|
|
72
|
+
"projen": "^0.84.6",
|
|
73
73
|
"standard-version": "^9",
|
|
74
|
-
"ts-jest": "^29.2.
|
|
74
|
+
"ts-jest": "^29.2.3",
|
|
75
75
|
"ts-node": "^10.9.2",
|
|
76
76
|
"typescript": "^5.5.3"
|
|
77
77
|
},
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
"constructs": "^10.0.5"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@aws-sdk/client-cloudwatch-logs": "^3.
|
|
84
|
-
"@aws-sdk/client-route-53": "^3.
|
|
85
|
-
"@aws-sdk/client-s3": "^3.
|
|
86
|
-
"@aws-sdk/client-ses": "^3.
|
|
87
|
-
"@aws-sdk/client-ssm": "^3.
|
|
83
|
+
"@aws-sdk/client-cloudwatch-logs": "^3.616.0",
|
|
84
|
+
"@aws-sdk/client-route-53": "^3.616.0",
|
|
85
|
+
"@aws-sdk/client-s3": "^3.616.0",
|
|
86
|
+
"@aws-sdk/client-ses": "^3.616.0",
|
|
87
|
+
"@aws-sdk/client-ssm": "^3.616.0",
|
|
88
88
|
"async-retry": "^1.3.3",
|
|
89
89
|
"axios": "^1.7.2",
|
|
90
90
|
"cdk-nag": "^2.28.161",
|
|
@@ -115,13 +115,13 @@
|
|
|
115
115
|
"publishConfig": {
|
|
116
116
|
"access": "public"
|
|
117
117
|
},
|
|
118
|
-
"version": "0.0.
|
|
118
|
+
"version": "0.0.97",
|
|
119
119
|
"jest": {
|
|
120
120
|
"coverageProvider": "v8",
|
|
121
121
|
"testMatch": [
|
|
122
|
-
"<rootDir>/@(src|test)
|
|
122
|
+
"<rootDir>/@(src|test)/**/*(*.)@(spec|test).ts?(x)",
|
|
123
123
|
"<rootDir>/@(src|test)/**/__tests__/**/*.ts?(x)",
|
|
124
|
-
"<rootDir>/@(projenrc)
|
|
124
|
+
"<rootDir>/@(projenrc)/**/*(*.)@(spec|test).ts?(x)",
|
|
125
125
|
"<rootDir>/@(projenrc)/**/__tests__/**/*.ts?(x)"
|
|
126
126
|
],
|
|
127
127
|
"clearMocks": true,
|