Socket
Socket
Sign inDemoInstall

@aws-sdk/middleware-user-agent

Package Overview
Dependencies
Maintainers
5
Versions
186
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/middleware-user-agent - npm Package Compare versions

Comparing version 3.666.0 to 3.667.0

14

dist-cjs/index.js

@@ -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) {
}
}
}

3

dist-types/check-features.d.ts
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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc