@aws-sdk/credential-provider-http
Advanced tools
Comparing version 3.568.0 to 3.575.0
@@ -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,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 @@ }, |
26364
592
+ Added@aws-sdk/types@3.575.0(transitive)
+ Added@smithy/abort-controller@3.0.0(transitive)
+ Added@smithy/fetch-http-handler@3.0.1(transitive)
+ Added@smithy/is-array-buffer@3.0.0(transitive)
+ Added@smithy/middleware-endpoint@3.0.1(transitive)
+ Added@smithy/middleware-serde@3.0.0(transitive)
+ Added@smithy/middleware-stack@3.0.0(transitive)
+ Added@smithy/node-config-provider@3.1.0(transitive)
+ Added@smithy/node-http-handler@3.0.0(transitive)
+ Added@smithy/property-provider@3.1.0(transitive)
+ Added@smithy/protocol-http@4.0.0(transitive)
+ Added@smithy/querystring-builder@3.0.0(transitive)
+ Added@smithy/querystring-parser@3.0.0(transitive)
+ Added@smithy/shared-ini-file-loader@3.1.0(transitive)
+ Added@smithy/smithy-client@3.1.1(transitive)
+ Added@smithy/types@3.0.0(transitive)
+ Added@smithy/url-parser@3.0.0(transitive)
+ Added@smithy/util-base64@3.0.0(transitive)
+ Added@smithy/util-buffer-from@3.0.0(transitive)
+ Added@smithy/util-hex-encoding@3.0.0(transitive)
+ Added@smithy/util-middleware@3.0.0(transitive)
+ Added@smithy/util-stream@3.0.1(transitive)
+ Added@smithy/util-uri-escape@3.0.0(transitive)
+ Added@smithy/util-utf8@3.0.0(transitive)
- Removed@aws-sdk/types@3.567.0(transitive)
- Removed@smithy/abort-controller@2.2.0(transitive)
- Removed@smithy/fetch-http-handler@2.5.0(transitive)
- Removed@smithy/is-array-buffer@2.2.0(transitive)
- Removed@smithy/middleware-endpoint@2.5.1(transitive)
- Removed@smithy/middleware-serde@2.3.0(transitive)
- Removed@smithy/middleware-stack@2.2.0(transitive)
- Removed@smithy/node-config-provider@2.3.0(transitive)
- Removed@smithy/node-http-handler@2.5.0(transitive)
- Removed@smithy/property-provider@2.2.0(transitive)
- Removed@smithy/protocol-http@3.3.0(transitive)
- Removed@smithy/querystring-builder@2.2.0(transitive)
- Removed@smithy/querystring-parser@2.2.0(transitive)
- Removed@smithy/shared-ini-file-loader@2.4.0(transitive)
- Removed@smithy/smithy-client@2.5.1(transitive)
- Removed@smithy/types@2.12.0(transitive)
- Removed@smithy/url-parser@2.2.0(transitive)
- Removed@smithy/util-base64@2.3.0(transitive)
- Removed@smithy/util-buffer-from@2.2.0(transitive)
- Removed@smithy/util-hex-encoding@2.2.0(transitive)
- Removed@smithy/util-middleware@2.2.0(transitive)
- Removed@smithy/util-stream@2.2.0(transitive)
- Removed@smithy/util-uri-escape@2.2.0(transitive)
- Removed@smithy/util-utf8@2.3.0(transitive)
Updated@aws-sdk/types@3.575.0
Updated@smithy/protocol-http@^4.0.0
Updated@smithy/smithy-client@^3.0.0
Updated@smithy/types@^3.0.0
Updated@smithy/util-stream@^3.0.0