@aws-sdk/middleware-user-agent
Advanced tools
Comparing version 3.666.0 to 3.667.0
@@ -71,3 +71,3 @@ "use strict"; | ||
async function checkFeatures(context, config, args) { | ||
var _a; | ||
var _a, _b; | ||
const request = args.request; | ||
@@ -87,2 +87,14 @@ if (typeof config.accountIdEndpointMode === "function") { | ||
} | ||
if (typeof config.credentials === "function") { | ||
try { | ||
const credentials = await ((_b = config.credentials) == null ? void 0 : _b.call(config)); | ||
if (credentials.accountId) { | ||
(0, import_core2.setFeature)(context, "RESOLVED_ACCOUNT_ID", "T"); | ||
} | ||
for (const [key, value] of Object.entries(credentials.$source ?? {})) { | ||
(0, import_core2.setFeature)(context, key, value); | ||
} | ||
} catch (e) { | ||
} | ||
} | ||
} | ||
@@ -89,0 +101,0 @@ __name(checkFeatures, "checkFeatures"); |
@@ -17,2 +17,15 @@ import { setFeature } from "@aws-sdk/core"; | ||
} | ||
if (typeof config.credentials === "function") { | ||
try { | ||
const credentials = await config.credentials?.(); | ||
if (credentials.accountId) { | ||
setFeature(context, "RESOLVED_ACCOUNT_ID", "T"); | ||
} | ||
for (const [key, value] of Object.entries(credentials.$source ?? {})) { | ||
setFeature(context, key, value); | ||
} | ||
} | ||
catch (e) { | ||
} | ||
} | ||
} |
import type { AccountIdEndpointMode } from "@aws-sdk/core/account-id-endpoint"; | ||
import type { AwsHandlerExecutionContext } from "@aws-sdk/types"; | ||
import type { BuildHandlerArguments, Provider } from "@smithy/types"; | ||
import type { AwsCredentialIdentityProvider, BuildHandlerArguments, Provider } from "@smithy/types"; | ||
/** | ||
@@ -8,2 +8,3 @@ * @internal | ||
type PreviouslyResolved = Partial<{ | ||
credentials?: AwsCredentialIdentityProvider; | ||
accountIdEndpointMode?: Provider<AccountIdEndpointMode>; | ||
@@ -10,0 +11,0 @@ }>; |
import { AccountIdEndpointMode } from "@aws-sdk/core/account-id-endpoint"; | ||
import { AwsHandlerExecutionContext } from "@aws-sdk/types"; | ||
import { BuildHandlerArguments, Provider } from "@smithy/types"; | ||
import { | ||
AwsCredentialIdentityProvider, | ||
BuildHandlerArguments, | ||
Provider, | ||
} from "@smithy/types"; | ||
type PreviouslyResolved = Partial<{ | ||
credentials?: AwsCredentialIdentityProvider; | ||
accountIdEndpointMode?: Provider<AccountIdEndpointMode>; | ||
@@ -6,0 +11,0 @@ }>; |
{ | ||
"name": "@aws-sdk/middleware-user-agent", | ||
"version": "3.666.0", | ||
"version": "3.667.0", | ||
"scripts": { | ||
@@ -25,5 +25,5 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", | ||
"dependencies": { | ||
"@aws-sdk/core": "3.666.0", | ||
"@aws-sdk/types": "3.664.0", | ||
"@aws-sdk/util-endpoints": "3.664.0", | ||
"@aws-sdk/core": "3.667.0", | ||
"@aws-sdk/types": "3.667.0", | ||
"@aws-sdk/util-endpoints": "3.667.0", | ||
"@smithy/core": "^2.4.8", | ||
@@ -30,0 +30,0 @@ "@smithy/protocol-http": "^4.1.4", |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
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
34260
534
1
+ Added@aws-sdk/core@3.667.0(transitive)
+ Added@aws-sdk/types@3.667.0(transitive)
+ Added@aws-sdk/util-endpoints@3.667.0(transitive)
- Removed@aws-sdk/core@3.666.0(transitive)
- Removed@aws-sdk/types@3.664.0(transitive)
- Removed@aws-sdk/util-endpoints@3.664.0(transitive)
Updated@aws-sdk/core@3.667.0
Updated@aws-sdk/types@3.667.0