@aws-sdk/middleware-sdk-s3-control 3.787.0 → 3.804.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 +1 -18
- package/dist-es/host-prefix-deduplication/hostPrefixDeduplicationMiddleware.js +1 -6
- package/dist-types/host-prefix-deduplication/hostPrefixDeduplicationMiddleware.d.ts +4 -4
- package/package.json +6 -6
- package/dist-es/host-prefix-deduplication/deduplicateHostPrefix.js +0 -11
- package/dist-types/host-prefix-deduplication/deduplicateHostPrefix.d.ts +0 -5
- package/dist-types/ts3.4/host-prefix-deduplication/deduplicateHostPrefix.d.ts +0 -1
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) =>
|
|
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) =>
|
|
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
|
-
*
|
|
5
|
-
*
|
|
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.
|
|
3
|
+
"version": "3.804.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,10 +24,10 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@aws-sdk/middleware-bucket-endpoint": "3.
|
|
28
|
-
"@aws-sdk/types": "3.
|
|
29
|
-
"@aws-sdk/util-arn-parser": "3.
|
|
30
|
-
"@aws-sdk/util-endpoints": "3.
|
|
27
|
+
"@aws-sdk/middleware-bucket-endpoint": "3.804.0",
|
|
28
|
+
"@aws-sdk/types": "3.804.0",
|
|
29
|
+
"@aws-sdk/util-arn-parser": "3.804.0",
|
|
30
|
+
"@aws-sdk/util-endpoints": "3.804.0",
|
|
31
31
|
"@smithy/protocol-http": "^5.1.0",
|
|
32
32
|
"@smithy/types": "^4.2.0",
|
|
33
33
|
"@smithy/util-endpoints": "^3.0.2",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"concurrently": "7.0.0",
|
|
40
40
|
"downlevel-dts": "0.10.1",
|
|
41
41
|
"rimraf": "3.0.2",
|
|
42
|
-
"typescript": "~5.
|
|
42
|
+
"typescript": "~5.8.3"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=18.0.0"
|
|
@@ -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 +0,0 @@
|
|
|
1
|
-
export declare const deduplicateHostPrefix: (hostname: string) => string;
|