@aws-sdk/util-endpoints
Advanced tools
Comparing version 3.171.0 to 3.174.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [3.174.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.173.0...v3.174.0) (2022-09-19) | ||
### Features | ||
* **util-endpoints:** add aws.isVirtualHostableS3Bucket ([#3967](https://github.com/aws/aws-sdk-js-v3/issues/3967)) ([2fbe419](https://github.com/aws/aws-sdk-js-v3/commit/2fbe4199b971b0da966369c36a28521ba389a466)) | ||
# [3.171.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.170.0...v3.171.0) (2022-09-14) | ||
@@ -8,0 +19,0 @@ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("./isVirtualHostableS3Bucket"), exports); | ||
tslib_1.__exportStar(require("./parseArn"), exports); | ||
tslib_1.__exportStar(require("./partition"), exports); |
@@ -5,2 +5,3 @@ "use strict"; | ||
const types_1 = require("@aws-sdk/types"); | ||
const isIpAddress_1 = require("./isIpAddress"); | ||
const DEFAULT_PORTS = { | ||
@@ -10,3 +11,2 @@ [types_1.EndpointURLScheme.HTTP]: 80, | ||
}; | ||
const IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`); | ||
const parseURL = (value) => { | ||
@@ -32,3 +32,3 @@ const whatwgURL = (() => { | ||
} | ||
const isIp = IP_V4_REGEX.test(hostname) || (hostname.startsWith("[") && hostname.endsWith("]")); | ||
const isIp = (0, isIpAddress_1.isIpAddress)(hostname); | ||
const authority = `${host}${value.includes(`${host}:${DEFAULT_PORTS[scheme]}`) ? `:${DEFAULT_PORTS[scheme]}` : ``}`; | ||
@@ -35,0 +35,0 @@ return { |
@@ -0,2 +1,3 @@ | ||
export * from "./isVirtualHostableS3Bucket"; | ||
export * from "./parseArn"; | ||
export * from "./partition"; |
var _a; | ||
import { EndpointURLScheme } from "@aws-sdk/types"; | ||
import { isIpAddress } from "./isIpAddress"; | ||
var DEFAULT_PORTS = (_a = {}, | ||
@@ -7,3 +8,2 @@ _a[EndpointURLScheme.HTTP] = 80, | ||
_a); | ||
var IP_V4_REGEX = new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"); | ||
export var parseURL = function (value) { | ||
@@ -29,3 +29,3 @@ var whatwgURL = (function () { | ||
} | ||
var isIp = IP_V4_REGEX.test(hostname) || (hostname.startsWith("[") && hostname.endsWith("]")); | ||
var isIp = isIpAddress(hostname); | ||
var authority = "".concat(host).concat(value.includes("".concat(host, ":").concat(DEFAULT_PORTS[scheme])) ? ":".concat(DEFAULT_PORTS[scheme]) : ""); | ||
@@ -32,0 +32,0 @@ return { |
@@ -0,2 +1,3 @@ | ||
export * from "./isVirtualHostableS3Bucket"; | ||
export * from "./parseArn"; | ||
export * from "./partition"; |
@@ -0,2 +1,3 @@ | ||
export * from "./isVirtualHostableS3Bucket"; | ||
export * from "./parseArn"; | ||
export * from "./partition"; |
{ | ||
"name": "@aws-sdk/util-endpoints", | ||
"version": "3.171.0", | ||
"version": "3.174.0", | ||
"description": "Utilities to help with endpoint resolution", | ||
@@ -5,0 +5,0 @@ "main": "./dist-cjs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
87936
166
1813