Socket
Socket
Sign inDemoInstall

@aws-sdk/credential-provider-http

Package Overview
Dependencies
25
Maintainers
5
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.568.0 to 3.575.0

5

dist-cjs/fromHttp/fromHttp.browser.js

@@ -10,4 +10,3 @@ "use strict";

const fromHttp = (options) => {
var _a, _b, _c;
(_a = options.logger) === null || _a === void 0 ? void 0 : _a.debug("@aws-sdk/credential-provider-http", "fromHttp");
options.logger?.debug("@aws-sdk/credential-provider-http", "fromHttp");
let host;

@@ -31,4 +30,4 @@ const full = options.credentialsFullUri;

return (0, requestHelpers_1.getCredentials)(result.response);
}, (_b = options.maxRetries) !== null && _b !== void 0 ? _b : 3, (_c = options.timeout) !== null && _c !== void 0 ? _c : 1000);
}, options.maxRetries ?? 3, options.timeout ?? 1000);
};
exports.fromHttp = fromHttp;

17

dist-cjs/fromHttp/fromHttp.js

@@ -17,9 +17,8 @@ "use strict";

const fromHttp = (options) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
(_a = options.logger) === null || _a === void 0 ? void 0 : _a.debug("@aws-sdk/credential-provider-http", "fromHttp");
options.logger?.debug("@aws-sdk/credential-provider-http", "fromHttp");
let host;
const relative = (_b = options.awsContainerCredentialsRelativeUri) !== null && _b !== void 0 ? _b : process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];
const full = (_c = options.awsContainerCredentialsFullUri) !== null && _c !== void 0 ? _c : process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];
const token = (_d = options.awsContainerAuthorizationToken) !== null && _d !== void 0 ? _d : process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];
const tokenFile = (_e = options.awsContainerAuthorizationTokenFile) !== null && _e !== void 0 ? _e : process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];
const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];
const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];
const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];
const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];
if (relative && full) {

@@ -46,4 +45,4 @@ console.warn("AWS SDK HTTP credentials provider:", "you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.");

const requestHandler = new node_http_handler_1.NodeHttpHandler({
requestTimeout: (_f = options.timeout) !== null && _f !== void 0 ? _f : 1000,
connectionTimeout: (_g = options.timeout) !== null && _g !== void 0 ? _g : 1000,
requestTimeout: options.timeout ?? 1000,
connectionTimeout: options.timeout ?? 1000,
});

@@ -65,4 +64,4 @@ return (0, retry_wrapper_1.retryWrapper)(async () => {

}
}, (_h = options.maxRetries) !== null && _h !== void 0 ? _h : 3, (_j = options.timeout) !== null && _j !== void 0 ? _j : 1000);
}, options.maxRetries ?? 3, options.timeout ?? 1000);
};
exports.fromHttp = fromHttp;

@@ -23,4 +23,3 @@ "use strict";

async function getCredentials(response) {
var _a, _b;
const contentType = (_b = (_a = response === null || response === void 0 ? void 0 : response.headers["content-type"]) !== null && _a !== void 0 ? _a : response === null || response === void 0 ? void 0 : response.headers["Content-Type"]) !== null && _b !== void 0 ? _b : "";
const contentType = response?.headers["content-type"] ?? response?.headers["Content-Type"] ?? "";
if (!contentType.includes("json")) {

@@ -27,0 +26,0 @@ console.warn("HTTP credential provider response header content-type was not application/json. Observed: " + contentType + ".");

{
"name": "@aws-sdk/credential-provider-http",
"version": "3.568.0",
"version": "3.575.0",
"description": "AWS credential provider for containers and HTTP sources",

@@ -29,10 +29,10 @@ "main": "./dist-cjs/index.js",

"dependencies": {
"@aws-sdk/types": "3.567.0",
"@smithy/fetch-http-handler": "^2.5.0",
"@smithy/node-http-handler": "^2.5.0",
"@smithy/property-provider": "^2.2.0",
"@smithy/protocol-http": "^3.3.0",
"@smithy/smithy-client": "^2.5.1",
"@smithy/types": "^2.12.0",
"@smithy/util-stream": "^2.2.0",
"@aws-sdk/types": "3.575.0",
"@smithy/fetch-http-handler": "^3.0.0",
"@smithy/node-http-handler": "^3.0.0",
"@smithy/property-provider": "^3.0.0",
"@smithy/protocol-http": "^4.0.0",
"@smithy/smithy-client": "^3.0.0",
"@smithy/types": "^3.0.0",
"@smithy/util-stream": "^3.0.0",
"tslib": "^2.6.2"

@@ -39,0 +39,0 @@ },

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc