@aws-sdk/middleware-sdk-s3-control 3.782.0 → 3.796.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
@@ -218,26 +218,9 @@ var getProcessArnablesPlugin = /* @__PURE__ */ __name((options) => ({
218
218
  }, "applyToStack")
219
219
  }), "getProcessArnablesPlugin");
220
220
 
221
- // src/host-prefix-deduplication/deduplicateHostPrefix.ts
222
- var import_util_endpoints2 = require("@smithy/util-endpoints");
223
- var deduplicateHostPrefix = /* @__PURE__ */ __name((hostname) => {
224
- const [p1, p2, p3, p4, ...rest] = hostname.split(".");
225
- if ((0, import_util_endpoints2.isIpAddress)(`${p1}.${p2}.${p3}.${parseInt(p4, 10)}`)) {
226
- return hostname;
227
- }
228
- if (p1 === p2) {
229
- return [p2, p3, p4, ...rest].join(".");
230
- }
231
- return hostname;
232
- }, "deduplicateHostPrefix");
233
-
234
221
  // src/host-prefix-deduplication/hostPrefixDeduplicationMiddleware.ts
235
222
  var hostPrefixDeduplicationMiddleware = /* @__PURE__ */ __name(() => {
236
- return (next, context) => async (args) => {
237
- const httpRequest = args.request ?? {};
238
- if (httpRequest?.hostname) {
239
- httpRequest.hostname = deduplicateHostPrefix(httpRequest.hostname);
240
- }
223
+ return (next, context) => (args) => {
241
224
  return next(args);
242
225
  };
243
226
  }, "hostPrefixDeduplicationMiddleware");
@@ -1,10 +1,5 @@
1
- import { deduplicateHostPrefix } from "./deduplicateHostPrefix";
2
1
  export const hostPrefixDeduplicationMiddleware = () => {
3
- return (next, context) => async (args) => {
4
- const httpRequest = (args.request ?? {});
5
- if (httpRequest?.hostname) {
6
- httpRequest.hostname = deduplicateHostPrefix(httpRequest.hostname);
7
- }
2
+ return (next, context) => (args) => {
8
3
  return next(args);
9
4
  };
10
5
  };
@@ -1,17 +1,17 @@
1
1
  import { Pluggable, RelativeMiddlewareOptions, SerializeMiddleware } from "@smithy/types";
2
2
  /**
3
3
  * @internal
4
- * This customization handles an edge case where
5
- * a hostprefix may be duplicated in the endpoint ruleset resolution
6
- * and hostPrefix serialization via the pre-endpoints 2.0 trait,
7
- * and which cannot be reconciled automatically.
4
+ * @deprecated - the middleware is no longer necessary since hostPrefix was
5
+ * removed by S3Control codegen customization's model preprocessing.
8
6
  */
9
7
  export declare const hostPrefixDeduplicationMiddleware: () => SerializeMiddleware<any, any>;
10
8
  /**
11
9
  * @internal
10
+ * @deprecated
12
11
  */
13
12
  export declare const hostPrefixDeduplicationMiddlewareOptions: RelativeMiddlewareOptions;
14
13
  /**
15
14
  * @internal
15
+ * @deprecated
16
16
  */
17
17
  export declare const getHostPrefixDeduplicationPlugin: <T>(config: T) => Pluggable<any, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-sdk-s3-control",
3
- "version": "3.782.0",
3
+ "version": "3.796.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",
@@ -27,7 +27,7 @@
27
27
  "@aws-sdk/middleware-bucket-endpoint": "3.775.0",
28
28
  "@aws-sdk/types": "3.775.0",
29
29
  "@aws-sdk/util-arn-parser": "3.723.0",
30
- "@aws-sdk/util-endpoints": "3.782.0",
30
+ "@aws-sdk/util-endpoints": "3.787.0",
31
31
  "@smithy/protocol-http": "^5.1.0",
32
32
  "@smithy/types": "^4.2.0",
33
33
  "@smithy/util-endpoints": "^3.0.2",
@@ -1,11 +0,0 @@
1
- import { isIpAddress } from "@smithy/util-endpoints";
2
- export const deduplicateHostPrefix = (hostname) => {
3
- const [p1, p2, p3, p4, ...rest] = hostname.split(".");
4
- if (isIpAddress(`${p1}.${p2}.${p3}.${parseInt(p4, 10)}`)) {
5
- return hostname;
6
- }
7
- if (p1 === p2) {
8
- return [p2, p3, p4, ...rest].join(".");
9
- }
10
- return hostname;
11
- };
@@ -1,5 +0,0 @@
1
- /**
2
- * @example
3
- * 12345.12345.____.com should become 12345.____.com.
4
- */
5
- export declare const deduplicateHostPrefix: (hostname: string) => string;
@@ -1 +0,0 @@
1
- export declare const deduplicateHostPrefix: (hostname: string) => string;