@aws-sdk/middleware-sdk-s3-control 3.743.0 → 3.782.0

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/dist-cjs/index.js CHANGED
@@ -19,8 +19,8 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
20
 
21
21
  // src/index.ts
22
- var src_exports = {};
23
- __export(src_exports, {
22
+ var index_exports = {};
23
+ __export(index_exports, {
24
24
  NODE_USE_ARN_REGION_CONFIG_OPTIONS: () => import_middleware_bucket_endpoint.NODE_USE_ARN_REGION_CONFIG_OPTIONS,
25
25
  getHostPrefixDeduplicationPlugin: () => getHostPrefixDeduplicationPlugin,
26
26
  getProcessArnablesPlugin: () => getProcessArnablesPlugin,
@@ -35,16 +35,15 @@ __export(src_exports, {
35
35
  updateArnablesRequestMiddleware: () => updateArnablesRequestMiddleware,
36
36
  updateArnablesRequestMiddlewareOptions: () => updateArnablesRequestMiddlewareOptions
37
37
  });
38
- module.exports = __toCommonJS(src_exports);
38
+ module.exports = __toCommonJS(index_exports);
39
39
 
40
40
  // src/configurations.ts
41
41
  var import_middleware_bucket_endpoint = require("@aws-sdk/middleware-bucket-endpoint");
42
42
  function resolveS3ControlConfig(input) {
43
43
  const { useArnRegion = false } = input;
44
- return {
45
- ...input,
44
+ return Object.assign(input, {
46
45
  useArnRegion: typeof useArnRegion === "function" ? useArnRegion : () => Promise.resolve(useArnRegion)
47
- };
46
+ });
48
47
  }
49
48
  __name(resolveS3ControlConfig, "resolveS3ControlConfig");
50
49
 
@@ -64,8 +63,7 @@ var CONTEXT_SIGNING_REGION = "signing_region";
64
63
  var parseOutpostArnablesMiddleaware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => {
65
64
  const { input } = args;
66
65
  const parameter = input.Name && (0, import_util_arn_parser.validate)(input.Name) ? "Name" : input.Bucket && (0, import_util_arn_parser.validate)(input.Bucket) ? "Bucket" : void 0;
67
- if (!parameter)
68
- return next(args);
66
+ if (!parameter) return next(args);
69
67
  const clientRegion = await options.region();
70
68
  const useArnRegion = await options.useArnRegion();
71
69
  const useFipsEndpoint = await options.useFipsEndpoint();
@@ -111,8 +109,7 @@ var parseOutpostArnablesMiddleaware = /* @__PURE__ */ __name((options) => (next,
111
109
  } else if (input.AccountId !== arn.accountId) {
112
110
  throw new Error(`AccountId is incompatible with account id inferred from ${parameter}`);
113
111
  }
114
- if (useArnRegion)
115
- context[CONTEXT_ARN_REGION] = arn.region;
112
+ if (useArnRegion) context[CONTEXT_ARN_REGION] = arn.region;
116
113
  return next(args);
117
114
  }, "parseOutpostArnablesMiddleaware");
118
115
  var parseOutpostArnablesMiddleawareOptions = {
@@ -193,10 +190,8 @@ var ACCOUNT_ID_HEADER = "x-amz-account-id";
193
190
  var OUTPOST_ID_HEADER = "x-amz-outpost-id";
194
191
  var updateArnablesRequestMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => {
195
192
  const { request } = args;
196
- if (!import_protocol_http.HttpRequest.isInstance(request))
197
- return next(args);
198
- if (context[CONTEXT_ACCOUNT_ID])
199
- request.headers[ACCOUNT_ID_HEADER] = context[CONTEXT_ACCOUNT_ID];
193
+ if (!import_protocol_http.HttpRequest.isInstance(request)) return next(args);
194
+ if (context[CONTEXT_ACCOUNT_ID]) request.headers[ACCOUNT_ID_HEADER] = context[CONTEXT_ACCOUNT_ID];
200
195
  if (context[CONTEXT_OUTPOST_ID]) {
201
196
  const { isCustomEndpoint } = config;
202
197
  const useFipsEndpoint = await config.useFipsEndpoint();
@@ -217,10 +212,10 @@ var updateArnablesRequestMiddlewareOptions = {
217
212
 
218
213
  // src/process-arnables-plugin/getProcessArnablesPlugin.ts
219
214
  var getProcessArnablesPlugin = /* @__PURE__ */ __name((options) => ({
220
- applyToStack: (clientStack) => {
215
+ applyToStack: /* @__PURE__ */ __name((clientStack) => {
221
216
  clientStack.add(parseOutpostArnablesMiddleaware(options), parseOutpostArnablesMiddleawareOptions);
222
217
  clientStack.add(updateArnablesRequestMiddleware(options), updateArnablesRequestMiddlewareOptions);
223
- }
218
+ }, "applyToStack")
224
219
  }), "getProcessArnablesPlugin");
225
220
 
226
221
  // src/host-prefix-deduplication/deduplicateHostPrefix.ts
@@ -254,17 +249,16 @@ var hostPrefixDeduplicationMiddlewareOptions = {
254
249
  override: true
255
250
  };
256
251
  var getHostPrefixDeduplicationPlugin = /* @__PURE__ */ __name((config) => ({
257
- applyToStack: (clientStack) => {
252
+ applyToStack: /* @__PURE__ */ __name((clientStack) => {
258
253
  clientStack.addRelativeTo(hostPrefixDeduplicationMiddleware(), hostPrefixDeduplicationMiddlewareOptions);
259
- }
254
+ }, "applyToStack")
260
255
  }), "getHostPrefixDeduplicationPlugin");
261
256
 
262
257
  // src/redirect-from-postid.ts
263
258
 
264
259
  var redirectFromPostIdMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => {
265
260
  const { input, request } = args;
266
- if (!import_protocol_http.HttpRequest.isInstance(request))
267
- return next(args);
261
+ if (!import_protocol_http.HttpRequest.isInstance(request)) return next(args);
268
262
  if (input.OutpostId) {
269
263
  const { isCustomEndpoint } = config;
270
264
  const useFipsEndpoint = await config.useFipsEndpoint();
@@ -280,9 +274,9 @@ var redirectFromPostIdMiddlewareOptions = {
280
274
  override: true
281
275
  };
282
276
  var getRedirectFromPostIdPlugin = /* @__PURE__ */ __name((options) => ({
283
- applyToStack: (clientStack) => {
277
+ applyToStack: /* @__PURE__ */ __name((clientStack) => {
284
278
  clientStack.add(redirectFromPostIdMiddleware(options), redirectFromPostIdMiddlewareOptions);
285
- }
279
+ }, "applyToStack")
286
280
  }), "getRedirectFromPostIdPlugin");
287
281
  // Annotate the CommonJS export names for ESM import in node:
288
282
 
@@ -1,8 +1,7 @@
1
1
  export { NODE_USE_ARN_REGION_CONFIG_OPTIONS } from "@aws-sdk/middleware-bucket-endpoint";
2
2
  export function resolveS3ControlConfig(input) {
3
3
  const { useArnRegion = false } = input;
4
- return {
5
- ...input,
4
+ return Object.assign(input, {
6
5
  useArnRegion: typeof useArnRegion === "function" ? useArnRegion : () => Promise.resolve(useArnRegion),
7
- };
6
+ });
8
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-sdk-s3-control",
3
- "version": "3.743.0",
3
+ "version": "3.782.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-control",
@@ -24,17 +24,17 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@aws-sdk/middleware-bucket-endpoint": "3.734.0",
28
- "@aws-sdk/types": "3.734.0",
27
+ "@aws-sdk/middleware-bucket-endpoint": "3.775.0",
28
+ "@aws-sdk/types": "3.775.0",
29
29
  "@aws-sdk/util-arn-parser": "3.723.0",
30
- "@aws-sdk/util-endpoints": "3.743.0",
31
- "@smithy/protocol-http": "^5.0.1",
32
- "@smithy/types": "^4.1.0",
33
- "@smithy/util-endpoints": "^3.0.1",
30
+ "@aws-sdk/util-endpoints": "3.782.0",
31
+ "@smithy/protocol-http": "^5.1.0",
32
+ "@smithy/types": "^4.2.0",
33
+ "@smithy/util-endpoints": "^3.0.2",
34
34
  "tslib": "^2.6.2"
35
35
  },
36
36
  "devDependencies": {
37
- "@smithy/middleware-stack": "^4.0.1",
37
+ "@smithy/middleware-stack": "^4.0.2",
38
38
  "@tsconfig/recommended": "1.0.1",
39
39
  "concurrently": "7.0.0",
40
40
  "downlevel-dts": "0.10.1",