@aws-sdk/middleware-sdk-s3-control 3.188.0 → 3.193.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/CHANGELOG.md +23 -0
- package/dist-cjs/process-arnables-plugin/getOutpostEndpoint.js +4 -0
- package/dist-cjs/process-arnables-plugin/parse-outpost-arnables.js +14 -4
- package/dist-es/process-arnables-plugin/getOutpostEndpoint.js +4 -0
- package/dist-es/process-arnables-plugin/parse-outpost-arnables.js +13 -4
- package/dist-types/configurations.d.ts +4 -4
- 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 +4 -4
- 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 +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,29 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.193.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.192.0...v3.193.0) (2022-10-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **endpoint:** test fixes for s3-control related to endpoints 2.0 ([#4065](https://github.com/aws/aws-sdk-js-v3/issues/4065)) ([25af672](https://github.com/aws/aws-sdk-js-v3/commit/25af672e313406dcc331e154c385fc325b93a4a2))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.190.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.189.0...v3.190.0) (2022-10-17)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **endpoint:** e2e test fixes for endpoints 2.0 all services ([#4044](https://github.com/aws/aws-sdk-js-v3/issues/4044)) ([b53f5bd](https://github.com/aws/aws-sdk-js-v3/commit/b53f5bdd2bb4f0d1bab208ef2cd8f67d56291934))
|
|
23
|
+
* **endpoint:** endpoints 2.0 all-service TS compilation fixes ([#4043](https://github.com/aws/aws-sdk-js-v3/issues/4043)) ([f2da618](https://github.com/aws/aws-sdk-js-v3/commit/f2da6182298d4d6b02e84fb723492c07c27469a8))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
6
29
|
# [3.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13)
|
|
7
30
|
|
|
8
31
|
**Note:** Version bump only for package @aws-sdk/middleware-sdk-s3-control
|
|
@@ -6,6 +6,10 @@ const getOutpostEndpoint = (hostname, { isCustomEndpoint, regionOverride, useFip
|
|
|
6
6
|
if (isCustomEndpoint) {
|
|
7
7
|
return hostname;
|
|
8
8
|
}
|
|
9
|
+
const match = hostname.match(REGEX_S3CONTROL_HOSTNAME);
|
|
10
|
+
if (!match) {
|
|
11
|
+
return hostname;
|
|
12
|
+
}
|
|
9
13
|
const [matched, prefix, fips, region] = hostname.match(REGEX_S3CONTROL_HOSTNAME);
|
|
10
14
|
return [
|
|
11
15
|
`s3-outposts${useFipsEndpoint ? "-fips" : ""}`,
|
|
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.parseOutpostArnablesMiddleawareOptions = exports.parseOutpostArnablesMiddleaware = void 0;
|
|
4
4
|
const middleware_bucket_endpoint_1 = require("@aws-sdk/middleware-bucket-endpoint");
|
|
5
5
|
const util_arn_parser_1 = require("@aws-sdk/util-arn-parser");
|
|
6
|
+
const util_endpoints_1 = require("@aws-sdk/util-endpoints");
|
|
6
7
|
const constants_1 = require("../constants");
|
|
7
8
|
const parseOutpostArnablesMiddleaware = (options) => (next, context) => async (args) => {
|
|
9
|
+
var _a, _b, _c, _d;
|
|
8
10
|
const { input } = args;
|
|
9
11
|
const parameter = input.Name && (0, util_arn_parser_1.validate)(input.Name) ? "Name" : input.Bucket && (0, util_arn_parser_1.validate)(input.Bucket) ? "Bucket" : undefined;
|
|
10
12
|
if (!parameter)
|
|
@@ -14,10 +16,18 @@ const parseOutpostArnablesMiddleaware = (options) => (next, context) => async (a
|
|
|
14
16
|
const useFipsEndpoint = await options.useFipsEndpoint();
|
|
15
17
|
const useDualstackEndpoint = await options.useDualstackEndpoint();
|
|
16
18
|
const baseRegion = clientRegion;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
let clientPartition;
|
|
20
|
+
let signingRegion;
|
|
21
|
+
if (options.regionInfoProvider) {
|
|
22
|
+
({ partition: clientPartition, signingRegion = baseRegion } = (await options.regionInfoProvider(baseRegion, {
|
|
23
|
+
useFipsEndpoint,
|
|
24
|
+
useDualstackEndpoint,
|
|
25
|
+
})));
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
signingRegion = ((_d = (_c = (_b = (_a = context.endpointV2) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.authSchemes) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.signingRegion) || baseRegion;
|
|
29
|
+
clientPartition = (0, util_endpoints_1.partition)(signingRegion).name;
|
|
30
|
+
}
|
|
21
31
|
const validatorOptions = {
|
|
22
32
|
useFipsEndpoint,
|
|
23
33
|
useDualstackEndpoint,
|
|
@@ -3,6 +3,10 @@ export const getOutpostEndpoint = (hostname, { isCustomEndpoint, regionOverride,
|
|
|
3
3
|
if (isCustomEndpoint) {
|
|
4
4
|
return hostname;
|
|
5
5
|
}
|
|
6
|
+
const match = hostname.match(REGEX_S3CONTROL_HOSTNAME);
|
|
7
|
+
if (!match) {
|
|
8
|
+
return hostname;
|
|
9
|
+
}
|
|
6
10
|
const [matched, prefix, fips, region] = hostname.match(REGEX_S3CONTROL_HOSTNAME);
|
|
7
11
|
return [
|
|
8
12
|
`s3-outposts${useFipsEndpoint ? "-fips" : ""}`,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { getArnResources as getS3AccesspointArnResources, validateAccountId, validateNoDualstack, validateOutpostService, validatePartition, validateRegion, } from "@aws-sdk/middleware-bucket-endpoint";
|
|
2
2
|
import { parse as parseArn, validate as validateArn } from "@aws-sdk/util-arn-parser";
|
|
3
|
+
import { partition } from "@aws-sdk/util-endpoints";
|
|
3
4
|
import { CONTEXT_ARN_REGION, CONTEXT_OUTPOST_ID, CONTEXT_SIGNING_REGION, CONTEXT_SIGNING_SERVICE } from "../constants";
|
|
4
5
|
export const parseOutpostArnablesMiddleaware = (options) => (next, context) => async (args) => {
|
|
5
6
|
const { input } = args;
|
|
@@ -11,10 +12,18 @@ export const parseOutpostArnablesMiddleaware = (options) => (next, context) => a
|
|
|
11
12
|
const useFipsEndpoint = await options.useFipsEndpoint();
|
|
12
13
|
const useDualstackEndpoint = await options.useDualstackEndpoint();
|
|
13
14
|
const baseRegion = clientRegion;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
let clientPartition;
|
|
16
|
+
let signingRegion;
|
|
17
|
+
if (options.regionInfoProvider) {
|
|
18
|
+
({ partition: clientPartition, signingRegion = baseRegion } = (await options.regionInfoProvider(baseRegion, {
|
|
19
|
+
useFipsEndpoint,
|
|
20
|
+
useDualstackEndpoint,
|
|
21
|
+
})));
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
signingRegion = context.endpointV2?.properties?.authSchemes?.[0]?.signingRegion || baseRegion;
|
|
25
|
+
clientPartition = partition(signingRegion).name;
|
|
26
|
+
}
|
|
18
27
|
const validatorOptions = {
|
|
19
28
|
useFipsEndpoint,
|
|
20
29
|
useDualstackEndpoint,
|
|
@@ -7,9 +7,9 @@ export interface S3ControlInputConfig {
|
|
|
7
7
|
useArnRegion?: boolean | Provider<boolean>;
|
|
8
8
|
}
|
|
9
9
|
interface PreviouslyResolved {
|
|
10
|
-
isCustomEndpoint
|
|
10
|
+
isCustomEndpoint?: boolean;
|
|
11
11
|
region: Provider<string>;
|
|
12
|
-
regionInfoProvider
|
|
12
|
+
regionInfoProvider?: RegionInfoProvider;
|
|
13
13
|
useFipsEndpoint: Provider<boolean>;
|
|
14
14
|
useDualstackEndpoint: Provider<boolean>;
|
|
15
15
|
}
|
|
@@ -18,7 +18,7 @@ export interface S3ControlResolvedConfig {
|
|
|
18
18
|
* Whether the endpoint is specified by caller.
|
|
19
19
|
* @internal
|
|
20
20
|
*/
|
|
21
|
-
isCustomEndpoint
|
|
21
|
+
isCustomEndpoint?: boolean;
|
|
22
22
|
/**
|
|
23
23
|
* Enables FIPS compatible endpoints.
|
|
24
24
|
*/
|
|
@@ -39,6 +39,6 @@ export interface S3ControlResolvedConfig {
|
|
|
39
39
|
* Fetch related hostname, signing name or signing region with given region.
|
|
40
40
|
* @internal
|
|
41
41
|
*/
|
|
42
|
-
regionInfoProvider
|
|
42
|
+
regionInfoProvider?: RegionInfoProvider;
|
|
43
43
|
}
|
|
44
44
|
export declare function resolveS3ControlConfig<T>(input: T & PreviouslyResolved & S3ControlInputConfig): T & S3ControlResolvedConfig;
|
|
@@ -4,19 +4,19 @@ export interface S3ControlInputConfig {
|
|
|
4
4
|
useArnRegion?: boolean | Provider<boolean>;
|
|
5
5
|
}
|
|
6
6
|
interface PreviouslyResolved {
|
|
7
|
-
isCustomEndpoint
|
|
7
|
+
isCustomEndpoint?: boolean;
|
|
8
8
|
region: Provider<string>;
|
|
9
|
-
regionInfoProvider
|
|
9
|
+
regionInfoProvider?: RegionInfoProvider;
|
|
10
10
|
useFipsEndpoint: Provider<boolean>;
|
|
11
11
|
useDualstackEndpoint: Provider<boolean>;
|
|
12
12
|
}
|
|
13
13
|
export interface S3ControlResolvedConfig {
|
|
14
|
-
isCustomEndpoint
|
|
14
|
+
isCustomEndpoint?: boolean;
|
|
15
15
|
useFipsEndpoint: Provider<boolean>;
|
|
16
16
|
useDualstackEndpoint: Provider<boolean>;
|
|
17
17
|
useArnRegion: Provider<boolean>;
|
|
18
18
|
region: Provider<string>;
|
|
19
|
-
regionInfoProvider
|
|
19
|
+
regionInfoProvider?: RegionInfoProvider;
|
|
20
20
|
}
|
|
21
21
|
export declare function resolveS3ControlConfig<T>(
|
|
22
22
|
input: T & PreviouslyResolved & S3ControlInputConfig
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BuildHandlerOptions, BuildMiddleware, Provider } from "@aws-sdk/types";
|
|
2
2
|
export interface UpdateArnablesRequestMiddlewareConfig {
|
|
3
|
-
isCustomEndpoint
|
|
3
|
+
isCustomEndpoint?: boolean;
|
|
4
4
|
useFipsEndpoint: Provider<boolean>;
|
|
5
5
|
}
|
|
6
6
|
export declare const updateArnablesRequestMiddleware: (
|
|
@@ -9,7 +9,7 @@ declare type InputType = {
|
|
|
9
9
|
OutpostId?: string;
|
|
10
10
|
};
|
|
11
11
|
export interface RedirectFromPostIdMiddlewareConfig {
|
|
12
|
-
isCustomEndpoint
|
|
12
|
+
isCustomEndpoint?: boolean;
|
|
13
13
|
useFipsEndpoint: Provider<boolean>;
|
|
14
14
|
}
|
|
15
15
|
export declare const redirectFromPostIdMiddleware: (
|
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.193.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",
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
},
|
|
21
21
|
"license": "Apache-2.0",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@aws-sdk/middleware-bucket-endpoint": "3.
|
|
24
|
-
"@aws-sdk/protocol-http": "3.
|
|
25
|
-
"@aws-sdk/types": "3.
|
|
23
|
+
"@aws-sdk/middleware-bucket-endpoint": "3.193.0",
|
|
24
|
+
"@aws-sdk/protocol-http": "3.193.0",
|
|
25
|
+
"@aws-sdk/types": "3.193.0",
|
|
26
26
|
"@aws-sdk/util-arn-parser": "3.188.0",
|
|
27
27
|
"tslib": "^2.3.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@aws-sdk/middleware-stack": "3.
|
|
30
|
+
"@aws-sdk/middleware-stack": "3.193.0",
|
|
31
31
|
"@tsconfig/recommended": "1.0.1",
|
|
32
32
|
"concurrently": "7.0.0",
|
|
33
33
|
"downlevel-dts": "0.10.1",
|