@smithy/middleware-endpoint
Advanced tools
Comparing version 3.2.8 to 4.0.0
@@ -35,3 +35,3 @@ var __defProp = Object.defineProperty; | ||
var resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => { | ||
const bucket = (endpointParams == null ? void 0 : endpointParams.Bucket) || ""; | ||
const bucket = endpointParams?.Bucket || ""; | ||
if (typeof endpointParams.Bucket === "string") { | ||
@@ -79,3 +79,3 @@ endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); | ||
const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; | ||
const configValue = (credentials == null ? void 0 : credentials.credentialScope) ?? (credentials == null ? void 0 : credentials.CredentialScope); | ||
const configValue = credentials?.credentialScope ?? credentials?.CredentialScope; | ||
return configValue; | ||
@@ -87,3 +87,3 @@ }; | ||
const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; | ||
const configValue = (credentials == null ? void 0 : credentials.accountId) ?? (credentials == null ? void 0 : credentials.AccountId); | ||
const configValue = credentials?.accountId ?? credentials?.AccountId; | ||
return configValue; | ||
@@ -146,5 +146,4 @@ }; | ||
var resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => { | ||
var _a; | ||
const endpointParams = {}; | ||
const instructions = ((_a = instructionsSupplier == null ? void 0 : instructionsSupplier.getEndpointParameterInstructions) == null ? void 0 : _a.call(instructionsSupplier)) || {}; | ||
const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {}; | ||
for (const [name, instruction] of Object.entries(instructions)) { | ||
@@ -186,3 +185,2 @@ switch (instruction.type) { | ||
return (next, context) => async (args) => { | ||
var _a, _b, _c; | ||
if (config.endpoint) { | ||
@@ -202,4 +200,4 @@ (0, import_core.setFeature)(context, "ENDPOINT_OVERRIDE", "N"); | ||
context.endpointV2 = endpoint; | ||
context.authSchemes = (_a = endpoint.properties) == null ? void 0 : _a.authSchemes; | ||
const authScheme = (_b = context.authSchemes) == null ? void 0 : _b[0]; | ||
context.authSchemes = endpoint.properties?.authSchemes; | ||
const authScheme = context.authSchemes?.[0]; | ||
if (authScheme) { | ||
@@ -209,3 +207,3 @@ context["signing_region"] = authScheme.signingRegion; | ||
const smithyContext = (0, import_util_middleware.getSmithyContext)(context); | ||
const httpAuthOption = (_c = smithyContext == null ? void 0 : smithyContext.selectedHttpAuthScheme) == null ? void 0 : _c.httpAuthOption; | ||
const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption; | ||
if (httpAuthOption) { | ||
@@ -212,0 +210,0 @@ httpAuthOption.signingProperties = Object.assign( |
{ | ||
"name": "@smithy/middleware-endpoint", | ||
"version": "3.2.8", | ||
"version": "4.0.0", | ||
"scripts": { | ||
@@ -27,9 +27,9 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", | ||
"dependencies": { | ||
"@smithy/core": "^2.5.7", | ||
"@smithy/middleware-serde": "^3.0.11", | ||
"@smithy/node-config-provider": "^3.1.12", | ||
"@smithy/shared-ini-file-loader": "^3.1.12", | ||
"@smithy/types": "^3.7.2", | ||
"@smithy/url-parser": "^3.0.11", | ||
"@smithy/util-middleware": "^3.0.11", | ||
"@smithy/core": "^3.0.0", | ||
"@smithy/middleware-serde": "^4.0.0", | ||
"@smithy/node-config-provider": "^4.0.0", | ||
"@smithy/shared-ini-file-loader": "^4.0.0", | ||
"@smithy/types": "^4.0.0", | ||
"@smithy/url-parser": "^4.0.0", | ||
"@smithy/util-middleware": "^4.0.0", | ||
"tslib": "^2.6.2" | ||
@@ -44,3 +44,3 @@ }, | ||
"engines": { | ||
"node": ">=16.0.0" | ||
"node": ">=18.0.0" | ||
}, | ||
@@ -47,0 +47,0 @@ "typesVersions": { |
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
59698
1136
+ Added@smithy/abort-controller@4.0.1(transitive)
+ Added@smithy/core@3.1.0(transitive)
+ Added@smithy/fetch-http-handler@5.0.1(transitive)
+ Added@smithy/is-array-buffer@4.0.0(transitive)
+ Added@smithy/middleware-serde@4.0.1(transitive)
+ Added@smithy/node-config-provider@4.0.1(transitive)
+ Added@smithy/node-http-handler@4.0.1(transitive)
+ Added@smithy/property-provider@4.0.1(transitive)
+ Added@smithy/protocol-http@5.0.1(transitive)
+ Added@smithy/querystring-builder@4.0.1(transitive)
+ Added@smithy/querystring-parser@4.0.1(transitive)
+ Added@smithy/shared-ini-file-loader@4.0.1(transitive)
+ Added@smithy/types@4.1.0(transitive)
+ Added@smithy/url-parser@4.0.1(transitive)
+ Added@smithy/util-base64@4.0.0(transitive)
+ Added@smithy/util-body-length-browser@4.0.0(transitive)
+ Added@smithy/util-buffer-from@4.0.0(transitive)
+ Added@smithy/util-hex-encoding@4.0.0(transitive)
+ Added@smithy/util-middleware@4.0.1(transitive)
+ Added@smithy/util-stream@4.0.1(transitive)
+ Added@smithy/util-uri-escape@4.0.0(transitive)
+ Added@smithy/util-utf8@4.0.0(transitive)
- Removed@smithy/abort-controller@3.1.9(transitive)
- Removed@smithy/core@2.5.7(transitive)
- Removed@smithy/fetch-http-handler@4.1.3(transitive)
- Removed@smithy/is-array-buffer@3.0.0(transitive)
- Removed@smithy/middleware-serde@3.0.11(transitive)
- Removed@smithy/node-config-provider@3.1.12(transitive)
- Removed@smithy/node-http-handler@3.3.3(transitive)
- Removed@smithy/property-provider@3.1.11(transitive)
- Removed@smithy/protocol-http@4.1.8(transitive)
- Removed@smithy/querystring-builder@3.0.11(transitive)
- Removed@smithy/querystring-parser@3.0.11(transitive)
- Removed@smithy/shared-ini-file-loader@3.1.12(transitive)
- Removed@smithy/types@3.7.2(transitive)
- Removed@smithy/url-parser@3.0.11(transitive)
- Removed@smithy/util-base64@3.0.0(transitive)
- Removed@smithy/util-body-length-browser@3.0.0(transitive)
- Removed@smithy/util-buffer-from@3.0.0(transitive)
- Removed@smithy/util-hex-encoding@3.0.0(transitive)
- Removed@smithy/util-middleware@3.0.11(transitive)
- Removed@smithy/util-stream@3.3.4(transitive)
- Removed@smithy/util-uri-escape@3.0.0(transitive)
- Removed@smithy/util-utf8@3.0.0(transitive)
Updated@smithy/core@^3.0.0
Updated@smithy/types@^4.0.0
Updated@smithy/url-parser@^4.0.0