@aws-sdk/util-endpoints 3.183.0 → 3.188.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,25 @@
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.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **endpoint:** misc endpoints 2.0 fixes for s3 ([#4031](https://github.com/aws/aws-sdk-js-v3/issues/4031)) ([f8926a5](https://github.com/aws/aws-sdk-js-v3/commit/f8926a56cf9a25c2e6a5c91089543094e32d5c4b))
12
+
13
+
14
+
15
+
16
+
17
+ # [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)
18
+
19
+ **Note:** Version bump only for package @aws-sdk/util-endpoints
20
+
21
+
22
+
23
+
24
+
6
25
  # [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
7
26
 
8
27
  **Note:** Version bump only for package @aws-sdk/util-endpoints
@@ -4,7 +4,7 @@ exports.resolveEndpoint = void 0;
4
4
  const types_1 = require("./types");
5
5
  const utils_1 = require("./utils");
6
6
  const resolveEndpoint = (ruleSetObject, options) => {
7
- var _a;
7
+ var _a, _b;
8
8
  const { endpointParams, logger } = options;
9
9
  const { parameters, rules } = ruleSetObject;
10
10
  const paramsWithDefault = Object.entries(parameters)
@@ -23,6 +23,17 @@ const resolveEndpoint = (ruleSetObject, options) => {
23
23
  throw new types_1.EndpointError(`Missing required parameter: '${requiredParam}'`);
24
24
  }
25
25
  }
26
- return (0, utils_1.evaluateRules)(rules, { endpointParams, logger, referenceRecord: {} });
26
+ const endpoint = (0, utils_1.evaluateRules)(rules, { endpointParams, logger, referenceRecord: {} });
27
+ if ((_b = options.endpointParams) === null || _b === void 0 ? void 0 : _b.Endpoint) {
28
+ try {
29
+ const givenEndpoint = new URL(options.endpointParams.Endpoint);
30
+ const { protocol, port } = givenEndpoint;
31
+ endpoint.url.protocol = protocol;
32
+ endpoint.url.port = port;
33
+ }
34
+ catch (e) {
35
+ }
36
+ }
37
+ return endpoint;
27
38
  };
28
39
  exports.resolveEndpoint = resolveEndpoint;
@@ -19,5 +19,16 @@ export const resolveEndpoint = (ruleSetObject, options) => {
19
19
  throw new EndpointError(`Missing required parameter: '${requiredParam}'`);
20
20
  }
21
21
  }
22
- return evaluateRules(rules, { endpointParams, logger, referenceRecord: {} });
22
+ const endpoint = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} });
23
+ if (options.endpointParams?.Endpoint) {
24
+ try {
25
+ const givenEndpoint = new URL(options.endpointParams.Endpoint);
26
+ const { protocol, port } = givenEndpoint;
27
+ endpoint.url.protocol = protocol;
28
+ endpoint.url.port = port;
29
+ }
30
+ catch (e) {
31
+ }
32
+ }
33
+ return endpoint;
23
34
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-endpoints",
3
- "version": "3.183.0",
3
+ "version": "3.188.0",
4
4
  "description": "Utilities to help with endpoint resolution",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "license": "Apache-2.0",
23
23
  "dependencies": {
24
- "@aws-sdk/types": "3.183.0",
24
+ "@aws-sdk/types": "3.188.0",
25
25
  "tslib": "^2.3.1"
26
26
  },
27
27
  "engines": {