@smithy/config-resolver
Advanced tools
Comparing version 3.0.13 to 4.0.0
@@ -156,8 +156,5 @@ var __defProp = Object.defineProperty; | ||
// src/regionInfo/getHostnameFromVariants.ts | ||
var getHostnameFromVariants = /* @__PURE__ */ __name((variants = [], { useFipsEndpoint, useDualstackEndpoint }) => { | ||
var _a; | ||
return (_a = variants.find( | ||
({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack") | ||
)) == null ? void 0 : _a.hostname; | ||
}, "getHostnameFromVariants"); | ||
var getHostnameFromVariants = /* @__PURE__ */ __name((variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find( | ||
({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack") | ||
)?.hostname, "getHostnameFromVariants"); | ||
@@ -191,8 +188,7 @@ // src/regionInfo/getResolvedHostname.ts | ||
}) => { | ||
var _a, _b, _c, _d, _e; | ||
const partition = getResolvedPartition(region, { partitionHash }); | ||
const resolvedRegion = region in regionHash ? region : ((_a = partitionHash[partition]) == null ? void 0 : _a.endpoint) ?? region; | ||
const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region; | ||
const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint }; | ||
const regionHostname = getHostnameFromVariants((_b = regionHash[resolvedRegion]) == null ? void 0 : _b.variants, hostnameOptions); | ||
const partitionHostname = getHostnameFromVariants((_c = partitionHash[partition]) == null ? void 0 : _c.variants, hostnameOptions); | ||
const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions); | ||
const partitionHostname = getHostnameFromVariants(partitionHash[partition]?.variants, hostnameOptions); | ||
const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname }); | ||
@@ -203,3 +199,3 @@ if (hostname === void 0) { | ||
const signingRegion = getResolvedSigningRegion(hostname, { | ||
signingRegion: (_d = regionHash[resolvedRegion]) == null ? void 0 : _d.signingRegion, | ||
signingRegion: regionHash[resolvedRegion]?.signingRegion, | ||
regionRegex: partitionHash[partition].regionRegex, | ||
@@ -213,3 +209,3 @@ useFipsEndpoint | ||
...signingRegion && { signingRegion }, | ||
...((_e = regionHash[resolvedRegion]) == null ? void 0 : _e.signingService) && { | ||
...regionHash[resolvedRegion]?.signingService && { | ||
signingService: regionHash[resolvedRegion].signingService | ||
@@ -216,0 +212,0 @@ } |
@@ -12,2 +12,5 @@ import { Endpoint, Provider, UrlParser } from "@smithy/types"; | ||
} | ||
/** | ||
* @internal | ||
*/ | ||
interface PreviouslyResolved { | ||
@@ -14,0 +17,0 @@ urlParser: UrlParser; |
@@ -20,2 +20,5 @@ import { Endpoint, Provider, RegionInfoProvider, UrlParser } from "@smithy/types"; | ||
} | ||
/** | ||
* @internal | ||
*/ | ||
interface PreviouslyResolved { | ||
@@ -48,3 +51,3 @@ regionInfoProvider: RegionInfoProvider; | ||
* | ||
* @deprecated endpoints rulesets use @smithy/middleware-endpoint resolveEndpointConfig. | ||
* @deprecated endpoints rulesets use \@smithy/middleware-endpoint resolveEndpointConfig. | ||
* All generated clients should migrate to Endpoints 2.0 endpointRuleSet traits. | ||
@@ -51,0 +54,0 @@ */ |
@@ -12,2 +12,5 @@ import { Endpoint, Provider, UrlParser } from "@smithy/types"; | ||
} | ||
/** | ||
* @internal | ||
*/ | ||
interface PreviouslyResolved { | ||
@@ -14,0 +17,0 @@ urlParser: UrlParser; |
@@ -20,2 +20,5 @@ import { Endpoint, Provider, RegionInfoProvider, UrlParser } from "@smithy/types"; | ||
} | ||
/** | ||
* @internal | ||
*/ | ||
interface PreviouslyResolved { | ||
@@ -48,3 +51,3 @@ regionInfoProvider: RegionInfoProvider; | ||
* | ||
* @deprecated endpoints rulesets use @smithy/middleware-endpoint resolveEndpointConfig. | ||
* @deprecated endpoints rulesets use \@smithy/middleware-endpoint resolveEndpointConfig. | ||
* All generated clients should migrate to Endpoints 2.0 endpointRuleSet traits. | ||
@@ -51,0 +54,0 @@ */ |
{ | ||
"name": "@smithy/config-resolver", | ||
"version": "3.0.13", | ||
"version": "4.0.0", | ||
"scripts": { | ||
@@ -27,6 +27,6 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", | ||
"dependencies": { | ||
"@smithy/node-config-provider": "^3.1.12", | ||
"@smithy/types": "^3.7.2", | ||
"@smithy/util-config-provider": "^3.0.0", | ||
"@smithy/util-middleware": "^3.0.11", | ||
"@smithy/node-config-provider": "^4.0.0", | ||
"@smithy/types": "^4.0.0", | ||
"@smithy/util-config-provider": "^4.0.0", | ||
"@smithy/util-middleware": "^4.0.0", | ||
"tslib": "^2.6.2" | ||
@@ -41,3 +41,3 @@ }, | ||
"engines": { | ||
"node": ">=16.0.0" | ||
"node": ">=18.0.0" | ||
}, | ||
@@ -44,0 +44,0 @@ "typesVersions": { |
1066
51539
+ Added@smithy/node-config-provider@4.0.1(transitive)
+ Added@smithy/property-provider@4.0.1(transitive)
+ Added@smithy/shared-ini-file-loader@4.0.1(transitive)
+ Added@smithy/types@4.1.0(transitive)
+ Added@smithy/util-config-provider@4.0.0(transitive)
+ Added@smithy/util-middleware@4.0.1(transitive)
- Removed@smithy/node-config-provider@3.1.12(transitive)
- Removed@smithy/property-provider@3.1.11(transitive)
- Removed@smithy/shared-ini-file-loader@3.1.12(transitive)
- Removed@smithy/types@3.7.2(transitive)
- Removed@smithy/util-config-provider@3.0.0(transitive)
- Removed@smithy/util-middleware@3.0.11(transitive)
Updated@smithy/types@^4.0.0