Comparing version 2.0.17 to 2.0.18
@@ -68,3 +68,3 @@ var AWS = require('./core'); | ||
* * **timeout** [Integer] — The number of milliseconds to wait before | ||
* giving up on a connection attempt. Defaults to no timeout. | ||
* giving up on a connection attempt. Defaults to no timeout (0). | ||
* * **xhrAsync** [Boolean] — Whether the SDK will send asynchronous | ||
@@ -71,0 +71,0 @@ * HTTP requests. Used in the browser environment only. Set to false to |
@@ -20,3 +20,3 @@ /** | ||
*/ | ||
VERSION: '2.0.17', | ||
VERSION: '2.0.18', | ||
@@ -23,0 +23,0 @@ /** |
@@ -12,2 +12,12 @@ var AWS = require('../core'); | ||
* | ||
* This credentials class will timeout after 1 second of inactivity by default. | ||
* If your requests to the EC2 metadata service are timing out, you can increase | ||
* the value by configuring them directly: | ||
* | ||
* ```javascript | ||
* AWS.config.credentials = new AWS.EC2MetadataCredentials({ | ||
* httpOptions: { timeout: 5000 } // 5 second timeout | ||
* }); | ||
* ``` | ||
* | ||
* @!macro nobrowser | ||
@@ -18,2 +28,8 @@ */ | ||
AWS.Credentials.call(this); | ||
options = options ? AWS.util.copy(options) : {}; | ||
if (!options.httpOptions) options.httpOptions = {}; | ||
options.httpOptions = AWS.util.merge( | ||
{timeout: this.defaultTimeout}, options.httpOptions); | ||
this.metadataService = new AWS.MetadataService(options); | ||
@@ -24,2 +40,7 @@ this.metadata = {}; | ||
/** | ||
* @api private | ||
*/ | ||
defaultTimeout: 1000, | ||
/** | ||
* Loads the credentials from the instance metadata service | ||
@@ -26,0 +47,0 @@ * |
@@ -28,3 +28,4 @@ var AWS = require('../core'); | ||
* ```javascript | ||
* AWS.config.credentials = SharedIniFileCredentials({profile: 'myprofile'}); | ||
* var creds = new AWS.SharedIniFileCredentials({profile: 'myprofile'}); | ||
* AWS.config.credentials = creds; | ||
* ``` | ||
@@ -31,0 +32,0 @@ * |
@@ -11,3 +11,7 @@ var AWS = require('./core'); | ||
* @!attribute [r] httpOptions | ||
* @return [map] a map of options to pass to the underlying HTTP request | ||
* @return [map] a map of options to pass to the underlying HTTP request: | ||
* | ||
* * **timeout** (Number) — a timeout value in milliseconds to wait | ||
* before aborting the connection. Set to 0 for no timeout. | ||
* | ||
* @!macro nobrowser | ||
@@ -26,5 +30,9 @@ */ | ||
/** | ||
* Options | ||
* Default HTTP options. By default, the metadata service is set to not | ||
* timeout on long requests. This means that on non-EC2 machines, this | ||
* request will never return. If you are calling this operation from an | ||
* environment that may not always run on EC2, set a `timeout` value so | ||
* the SDK will abort the request after a given number of milliseconds. | ||
*/ | ||
httpOptions: { timeout: 1000 }, | ||
httpOptions: { timeout: 0 }, | ||
@@ -37,3 +45,6 @@ /** | ||
* @option options httpOptions [map] a map of options to pass to the | ||
* underlying HTTP request | ||
* underlying HTTP request: | ||
* | ||
* * **timeout** (Number) — a timeout value in milliseconds to wait | ||
* before aborting the connection. Set to 0 for no timeout. | ||
*/ | ||
@@ -40,0 +51,0 @@ constructor: function MetadataService(options) { |
@@ -330,2 +330,3 @@ var AWS = require('./core'); | ||
* from the service. | ||
* @context [AWS.Request] the request object being sent. | ||
* @param err [Error] the error object returned from the request. | ||
@@ -332,0 +333,0 @@ * Set to `null` if the request is successful. |
@@ -122,3 +122,2 @@ var AWS = require('./core'); | ||
* to retrieve. | ||
* @api experimental | ||
* @since v1.4.0 | ||
@@ -156,3 +155,2 @@ */ | ||
* requests | ||
* @api experimental | ||
* @since v1.4.0 | ||
@@ -159,0 +157,0 @@ */ |
{ | ||
"name": "aws-sdk", | ||
"description": "AWS SDK for JavaScript", | ||
"version": "2.0.17", | ||
"version": "2.0.18", | ||
"author": { | ||
@@ -26,3 +26,4 @@ "name":"Amazon Web Services", | ||
"chai": "*", | ||
"istanbul": "*" | ||
"istanbul": "*", | ||
"coveralls": "2.x" | ||
}, | ||
@@ -61,3 +62,4 @@ "dependencies": { | ||
"test" : "npm -s run-script lint && npm -s run-script unit && npm -s run-script buildertest && npm -s run-script browsertest && ([ -f configuration ] && npm -s run-script integration || true)", | ||
"unit" : "istanbul test mocha -- test test/json test/model test/protocol test/query test/services test/signers test/xml", | ||
"unit" : "istanbul `[ $COVERAGE ] && echo 'cover _mocha' || echo 'test mocha'` -- test test/json test/model test/protocol test/query test/services test/signers test/xml", | ||
"coverage": "istanbul cover ./node_modules/mocha/bin/_mocha -- test test/json test/model test/protocol test/query test/services test/signers test/xml", | ||
"browsertest": "rake browser:test", | ||
@@ -64,0 +66,0 @@ "buildertest": "mocha --compilers coffee:coffee-script -s 1000 -t 10000 dist-tools/test", |
@@ -1,3 +0,5 @@ | ||
# AWS SDK for JavaScript [![Version](https://badge.fury.io/js/aws-sdk.png)](http://badge.fury.io/js/aws-sdk) [![Build Status](https://travis-ci.org/aws/aws-sdk-js.png?branch=master)](https://travis-ci.org/aws/aws-sdk-js) | ||
# AWS SDK for JavaScript | ||
[![Version](https://badge.fury.io/js/aws-sdk.png)](http://badge.fury.io/js/aws-sdk) [![Build Status](https://travis-ci.org/aws/aws-sdk-js.png?branch=master)](https://travis-ci.org/aws/aws-sdk-js) [![Coverage Status](https://coveralls.io/repos/aws/aws-sdk-js/badge.png?branch=master)](https://coveralls.io/r/aws/aws-sdk-js?branch=master) | ||
The official AWS SDK for JavaScript, available for browsers and mobile devices, | ||
@@ -21,3 +23,3 @@ or Node.js backends | ||
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.0.17.min.js"></script> | ||
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.0.18.min.js"></script> | ||
@@ -24,0 +26,0 @@ ### In Node.js |
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
297712
7544
109
12