@aws-sdk/middleware-bucket-endpoint 3.40.0 → 3.47.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 CHANGED
@@ -3,6 +3,44 @@
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.47.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.46.0...v3.47.0) (2022-01-15)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/middleware-bucket-endpoint
9
+
10
+
11
+
12
+
13
+
14
+ # [3.46.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.45.0...v3.46.0) (2022-01-07)
15
+
16
+
17
+ ### Features
18
+
19
+ * **packages:** end support for Node.js 10.x ([#3141](https://github.com/aws/aws-sdk-js-v3/issues/3141)) ([1a62865](https://github.com/aws/aws-sdk-js-v3/commit/1a6286513f7cdb556708845c512861c5f92eb883))
20
+
21
+
22
+
23
+
24
+
25
+ # [3.41.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.40.1...v3.41.0) (2021-11-11)
26
+
27
+ **Note:** Version bump only for package @aws-sdk/middleware-bucket-endpoint
28
+
29
+
30
+
31
+
32
+
33
+ ## [3.40.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.40.0...v3.40.1) (2021-11-08)
34
+
35
+
36
+ ### Bug Fixes
37
+
38
+ * **middleware-bucket-endpoint:** remove dualstack from hostname before processing ([#3003](https://github.com/aws/aws-sdk-js-v3/issues/3003)) ([d7aa2c3](https://github.com/aws/aws-sdk-js-v3/commit/d7aa2c329c62a9c2957631502bfe8da7fda86a4f))
39
+
40
+
41
+
42
+
43
+
6
44
  # [3.40.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.39.0...v3.40.0) (2021-11-05)
7
45
 
8
46
 
@@ -5,7 +5,7 @@ const DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/;
5
5
  const IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/;
6
6
  const DOTS_PATTERN = /\.\./;
7
7
  exports.DOT_PATTERN = /\./;
8
- exports.S3_HOSTNAME_PATTERN = /^(.+\.)?s3[.-]([a-z0-9-]+)\./;
8
+ exports.S3_HOSTNAME_PATTERN = /^(.+\.)?s3(-fips)?(\.dualstack)?[.-]([a-z0-9-]+)\./;
9
9
  const S3_US_EAST_1_ALTNAME_PATTERN = /^s3(-external-1)?\.amazonaws\.com$/;
10
10
  const AWS_PARTITION_SUFFIX = "amazonaws.com";
11
11
  const isBucketNameOptions = (options) => typeof options.bucketName === "string";
@@ -14,7 +14,7 @@ const isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName
14
14
  exports.isDnsCompatibleBucketName = isDnsCompatibleBucketName;
15
15
  const getRegionalSuffix = (hostname) => {
16
16
  const parts = hostname.match(exports.S3_HOSTNAME_PATTERN);
17
- return [parts[2], hostname.replace(new RegExp(`^${parts[0]}`), "")];
17
+ return [parts[4], hostname.replace(new RegExp(`^${parts[0]}`), "")];
18
18
  };
19
19
  const getSuffix = (hostname) => S3_US_EAST_1_ALTNAME_PATTERN.test(hostname) ? ["us-east-1", AWS_PARTITION_SUFFIX] : getRegionalSuffix(hostname);
20
20
  exports.getSuffix = getSuffix;
@@ -3,7 +3,7 @@ var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/;
3
3
  var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/;
4
4
  var DOTS_PATTERN = /\.\./;
5
5
  export var DOT_PATTERN = /\./;
6
- export var S3_HOSTNAME_PATTERN = /^(.+\.)?s3[.-]([a-z0-9-]+)\./;
6
+ export var S3_HOSTNAME_PATTERN = /^(.+\.)?s3(-fips)?(\.dualstack)?[.-]([a-z0-9-]+)\./;
7
7
  var S3_US_EAST_1_ALTNAME_PATTERN = /^s3(-external-1)?\.amazonaws\.com$/;
8
8
  var AWS_PARTITION_SUFFIX = "amazonaws.com";
9
9
  export var isBucketNameOptions = function (options) { return typeof options.bucketName === "string"; };
@@ -12,7 +12,7 @@ export var isDnsCompatibleBucketName = function (bucketName) {
12
12
  };
13
13
  var getRegionalSuffix = function (hostname) {
14
14
  var parts = hostname.match(S3_HOSTNAME_PATTERN);
15
- return [parts[2], hostname.replace(new RegExp("^" + parts[0]), "")];
15
+ return [parts[4], hostname.replace(new RegExp("^" + parts[0]), "")];
16
16
  };
17
17
  export var getSuffix = function (hostname) {
18
18
  return S3_US_EAST_1_ALTNAME_PATTERN.test(hostname) ? ["us-east-1", AWS_PARTITION_SUFFIX] : getRegionalSuffix(hostname);
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-bucket-endpoint",
3
- "version": "3.40.0",
3
+ "version": "3.47.0",
4
4
  "scripts": {
5
5
  "build": "yarn build:cjs && yarn build:es && yarn build:types",
6
6
  "build:cjs": "tsc -p tsconfig.cjs.json",
7
7
  "build:es": "tsc -p tsconfig.es.json",
8
8
  "build:types": "tsc -p tsconfig.types.json",
9
- "downlevel-dts": "downlevel-dts dist-types dist-types/ts3.4",
9
+ "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
10
+ "clean": "rimraf ./dist-*",
10
11
  "test": "jest"
11
12
  },
12
13
  "main": "./dist-cjs/index.js",
@@ -18,21 +19,18 @@
18
19
  },
19
20
  "license": "Apache-2.0",
20
21
  "dependencies": {
21
- "@aws-sdk/protocol-http": "3.40.0",
22
- "@aws-sdk/types": "3.40.0",
23
- "@aws-sdk/util-arn-parser": "3.37.0",
24
- "@aws-sdk/util-config-provider": "3.40.0",
22
+ "@aws-sdk/protocol-http": "3.47.0",
23
+ "@aws-sdk/types": "3.47.0",
24
+ "@aws-sdk/util-arn-parser": "3.47.0",
25
+ "@aws-sdk/util-config-provider": "3.47.0",
25
26
  "tslib": "^2.3.0"
26
27
  },
27
28
  "devDependencies": {
28
- "@aws-sdk/middleware-stack": "3.40.0",
29
- "@aws-sdk/node-config-provider": "3.40.0",
30
- "@types/jest": "^26.0.4",
31
- "jest": "^26.1.0",
32
- "typescript": "~4.3.5"
29
+ "@aws-sdk/middleware-stack": "3.47.0",
30
+ "@aws-sdk/node-config-provider": "3.47.0"
33
31
  },
34
32
  "engines": {
35
- "node": ">= 10.0.0"
33
+ "node": ">= 12.0.0"
36
34
  },
37
35
  "typesVersions": {
38
36
  "<4.0": {