@aws-sdk/util-endpoints
Advanced tools
Comparing version 3.178.0 to 3.182.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [3.182.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.181.0...v3.182.0) (2022-09-30) | ||
### Bug Fixes | ||
* **endpoint:** misc fixes for endpoints 2.0 based on service unit tests ([#4002](https://github.com/aws/aws-sdk-js-v3/issues/4002)) ([77788f9](https://github.com/aws/aws-sdk-js-v3/commit/77788f9a9c7274d0cdec7832b6ed72325c9262e6)) | ||
# [3.178.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.177.0...v3.178.0) (2022-09-23) | ||
@@ -8,0 +19,0 @@ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isValidHostLabel = void 0; | ||
const VALID_HOST_LABEL_REGEX = new RegExp(`^(?![0-9]+$)(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); | ||
const VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); | ||
const isValidHostLabel = (value, allowSubDomains = false) => { | ||
@@ -6,0 +6,0 @@ if (!allowSubDomains) { |
@@ -9,3 +9,9 @@ "use strict"; | ||
if (typeof expression === "string") { | ||
return new URL(expression); | ||
try { | ||
return new URL(expression); | ||
} | ||
catch (error) { | ||
console.error(`Failed to construct URL with ${expression}`, error); | ||
throw error; | ||
} | ||
} | ||
@@ -12,0 +18,0 @@ throw new types_1.EndpointError(`Endpoint URL must be a string, got ${typeof expression}`); |
import { __values } from "tslib"; | ||
var VALID_HOST_LABEL_REGEX = new RegExp("^(?![0-9]+$)(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"); | ||
var VALID_HOST_LABEL_REGEX = new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"); | ||
export var isValidHostLabel = function (value, allowSubDomains) { | ||
@@ -4,0 +4,0 @@ var e_1, _a; |
@@ -6,5 +6,11 @@ import { EndpointError } from "../types"; | ||
if (typeof expression === "string") { | ||
return new URL(expression); | ||
try { | ||
return new URL(expression); | ||
} | ||
catch (error) { | ||
console.error("Failed to construct URL with ".concat(expression), error); | ||
throw error; | ||
} | ||
} | ||
throw new EndpointError("Endpoint URL must be a string, got ".concat(typeof expression)); | ||
}; |
{ | ||
"name": "@aws-sdk/util-endpoints", | ||
"version": "3.178.0", | ||
"version": "3.182.0", | ||
"description": "Utilities to help with endpoint resolution", | ||
@@ -5,0 +5,0 @@ "main": "./dist-cjs/index.js", |
88967
1827