@aws-sdk/middleware-sdk-s3-control 3.357.0 → 3.369.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/host-prefix-deduplication/deduplicateHostPrefix.js +7 -3
- package/dist-cjs/process-arnables-plugin/update-arnables-request.js +1 -1
- package/dist-cjs/redirect-from-postid.js +1 -1
- package/dist-es/host-prefix-deduplication/deduplicateHostPrefix.js +7 -3
- package/dist-es/process-arnables-plugin/update-arnables-request.js +1 -1
- package/dist-es/redirect-from-postid.js +1 -1
- package/dist-types/configurations.d.ts +1 -1
- package/dist-types/host-prefix-deduplication/hostPrefixDeduplicationMiddleware.d.ts +1 -1
- package/dist-types/process-arnables-plugin/getProcessArnablesPlugin.d.ts +1 -1
- package/dist-types/process-arnables-plugin/parse-outpost-arnables.d.ts +1 -1
- package/dist-types/process-arnables-plugin/update-arnables-request.d.ts +1 -1
- package/dist-types/redirect-from-postid.d.ts +1 -1
- package/dist-types/ts3.4/configurations.d.ts +1 -1
- package/dist-types/ts3.4/host-prefix-deduplication/hostPrefixDeduplicationMiddleware.d.ts +1 -1
- package/dist-types/ts3.4/process-arnables-plugin/getProcessArnablesPlugin.d.ts +1 -1
- package/dist-types/ts3.4/process-arnables-plugin/parse-outpost-arnables.d.ts +1 -1
- package/dist-types/ts3.4/process-arnables-plugin/update-arnables-request.d.ts +1 -1
- package/dist-types/ts3.4/redirect-from-postid.d.ts +1 -1
- package/package.json +7 -5
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.deduplicateHostPrefix = void 0;
|
|
4
|
+
const util_endpoints_1 = require("@aws-sdk/util-endpoints");
|
|
4
5
|
const deduplicateHostPrefix = (hostname) => {
|
|
5
|
-
const [
|
|
6
|
-
if (
|
|
7
|
-
return
|
|
6
|
+
const [p1, p2, p3, p4, ...rest] = hostname.split(".");
|
|
7
|
+
if ((0, util_endpoints_1.isIpAddress)(`${p1}.${p2}.${p3}.${parseInt(p4, 10)}`)) {
|
|
8
|
+
return hostname;
|
|
9
|
+
}
|
|
10
|
+
if (p1 === p2) {
|
|
11
|
+
return [p2, p3, p4, ...rest].join(".");
|
|
8
12
|
}
|
|
9
13
|
return hostname;
|
|
10
14
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateArnablesRequestMiddlewareOptions = exports.updateArnablesRequestMiddleware = void 0;
|
|
4
|
-
const protocol_http_1 = require("@
|
|
4
|
+
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const getOutpostEndpoint_1 = require("./getOutpostEndpoint");
|
|
7
7
|
const ACCOUNT_ID_HEADER = "x-amz-account-id";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRedirectFromPostIdPlugin = exports.redirectFromPostIdMiddlewareOptions = exports.redirectFromPostIdMiddleware = void 0;
|
|
4
|
-
const protocol_http_1 = require("@
|
|
4
|
+
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
5
|
const constants_1 = require("./constants");
|
|
6
6
|
const process_arnables_plugin_1 = require("./process-arnables-plugin");
|
|
7
7
|
const redirectFromPostIdMiddleware = (config) => (next, context) => async (args) => {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { isIpAddress } from "@aws-sdk/util-endpoints";
|
|
1
2
|
export const deduplicateHostPrefix = (hostname) => {
|
|
2
|
-
const [
|
|
3
|
-
if (
|
|
4
|
-
return
|
|
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(".");
|
|
5
9
|
}
|
|
6
10
|
return hostname;
|
|
7
11
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpRequest } from "@
|
|
1
|
+
import { HttpRequest } from "@smithy/protocol-http";
|
|
2
2
|
import { CONTEXT_ACCOUNT_ID, CONTEXT_ARN_REGION, CONTEXT_OUTPOST_ID } from "../constants";
|
|
3
3
|
import { getOutpostEndpoint } from "./getOutpostEndpoint";
|
|
4
4
|
const ACCOUNT_ID_HEADER = "x-amz-account-id";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpRequest } from "@
|
|
1
|
+
import { HttpRequest } from "@smithy/protocol-http";
|
|
2
2
|
import { CONTEXT_SIGNING_SERVICE } from "./constants";
|
|
3
3
|
import { getOutpostEndpoint } from "./process-arnables-plugin";
|
|
4
4
|
export const redirectFromPostIdMiddleware = (config) => (next, context) => async (args) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuildHandlerOptions, BuildMiddleware, Provider } from "@
|
|
1
|
+
import { BuildHandlerOptions, BuildMiddleware, Provider } from "@smithy/types";
|
|
2
2
|
export interface UpdateArnablesRequestMiddlewareConfig {
|
|
3
3
|
isCustomEndpoint?: boolean;
|
|
4
4
|
useFipsEndpoint: Provider<boolean>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuildHandlerOptions, BuildMiddleware, Pluggable, Provider } from "@
|
|
1
|
+
import { BuildHandlerOptions, BuildMiddleware, Pluggable, Provider } from "@smithy/types";
|
|
2
2
|
import { S3ControlResolvedConfig } from "./configurations";
|
|
3
3
|
type InputType = {
|
|
4
4
|
OutpostId?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Provider, RegionInfoProvider } from "@
|
|
1
|
+
import { Provider, RegionInfoProvider } from "@smithy/types";
|
|
2
2
|
export { NODE_USE_ARN_REGION_CONFIG_OPTIONS } from "@aws-sdk/middleware-bucket-endpoint";
|
|
3
3
|
export interface S3ControlInputConfig {
|
|
4
4
|
useArnRegion?: boolean | Provider<boolean>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuildHandlerOptions, BuildMiddleware, Provider } from "@
|
|
1
|
+
import { BuildHandlerOptions, BuildMiddleware, Provider } from "@smithy/types";
|
|
2
2
|
export interface UpdateArnablesRequestMiddlewareConfig {
|
|
3
3
|
isCustomEndpoint?: boolean;
|
|
4
4
|
useFipsEndpoint: Provider<boolean>;
|
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.369.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
6
6
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -21,14 +21,16 @@
|
|
|
21
21
|
},
|
|
22
22
|
"license": "Apache-2.0",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@aws-sdk/middleware-bucket-endpoint": "3.
|
|
25
|
-
"@aws-sdk/
|
|
26
|
-
"@aws-sdk/types": "3.357.0",
|
|
24
|
+
"@aws-sdk/middleware-bucket-endpoint": "3.369.0",
|
|
25
|
+
"@aws-sdk/types": "3.369.0",
|
|
27
26
|
"@aws-sdk/util-arn-parser": "3.310.0",
|
|
27
|
+
"@aws-sdk/util-endpoints": "3.369.0",
|
|
28
|
+
"@smithy/protocol-http": "^1.1.0",
|
|
29
|
+
"@smithy/types": "^1.1.0",
|
|
28
30
|
"tslib": "^2.5.0"
|
|
29
31
|
},
|
|
30
32
|
"devDependencies": {
|
|
31
|
-
"@
|
|
33
|
+
"@smithy/middleware-stack": "^1.0.1",
|
|
32
34
|
"@tsconfig/recommended": "1.0.1",
|
|
33
35
|
"concurrently": "7.0.0",
|
|
34
36
|
"downlevel-dts": "0.10.1",
|