azure-common
Advanced tools
Comparing version 0.9.1-pre.2 to 0.9.2
@@ -53,2 +53,3 @@ // | ||
exports.TokenCloudCredentials = require('./services/credentials/tokenCloudCredentials'); | ||
exports.AnonymousCloudCredentials = require('./services/credentials/anonymousCloudCredentials'); | ||
@@ -76,2 +77,4 @@ // Other filters | ||
exports.atomHandler = require('./util/atomhandler'); | ||
exports.edmType = require('./util/edmtype'); | ||
exports.edmType = require('./util/edmtype'); | ||
exports.OperationStatus = require('./services/operationstatus'); |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -1,4 +0,4 @@ | ||
// | ||
// | ||
// Copyright (c) Microsoft and contributors. All rights reserved. | ||
// | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
@@ -8,10 +8,10 @@ // you may not use this file except in compliance with the License. | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// | ||
// | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// | ||
@@ -53,4 +53,5 @@ 'use strict'; | ||
nextStream.on('error', function () {}); | ||
return nextStream; | ||
}; | ||
}; | ||
}; |
@@ -135,7 +135,10 @@ /** | ||
function retryCallback(err, result, response, body) { | ||
function retryCallback(err, response, body) { | ||
retryData = newFilter.updateRetryData(retryData, err); | ||
if (err && | ||
!azureutil.objectIsNull(response) && | ||
newFilter.shouldRetry(response.statusCode, retryData)) { | ||
((!azureutil.objectIsNull(response) && | ||
newFilter.shouldRetry(response.statusCode, retryData)) || | ||
err.message === 'ETIMEDOUT' || | ||
err.message === 'ESOCKETTIMEDOUT')) { | ||
// If previous operation ended with an error and the policy allows a retry, do that | ||
@@ -150,3 +153,3 @@ setTimeout(function () { | ||
} | ||
callback(err, result, response, body); | ||
callback(err, response, body); | ||
} | ||
@@ -153,0 +156,0 @@ } |
@@ -127,4 +127,7 @@ /** | ||
if (err && | ||
!azureutil.objectIsNull(response) && | ||
newFilter.shouldRetry(response.statusCode, retryData)) { | ||
((!azureutil.objectIsNull(response) && | ||
newFilter.shouldRetry(response.statusCode, retryData)) || | ||
err.message === 'ETIMEDOUT' || | ||
err.message === 'ESOCKETTIMEDOUT')) { | ||
// If previous operation ended with an error and the policy allows a retry, do that | ||
@@ -131,0 +134,0 @@ setTimeout(function () { |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -1,4 +0,4 @@ | ||
// | ||
// | ||
// Copyright (c) Microsoft and contributors. All rights reserved. | ||
// | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
@@ -8,10 +8,10 @@ // you may not use this file except in compliance with the License. | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// | ||
// | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// | ||
@@ -128,2 +128,32 @@ 'use strict'; | ||
/** | ||
* Helper function for generated code - appends new part of the Uri to the base Uri | ||
* ensuring that any duplicate / characters are removed. | ||
* | ||
* @param {string} baseUri base part of the Uri. | ||
* @param {string} newUriPart New Uri to be combined to base. | ||
* | ||
* @returns {string} The concatenated Uri. | ||
*/ | ||
Service.prototype._appendUri = function (baseUri, newUriPart) { | ||
if (!baseUri && !newUriPart) { | ||
return null; | ||
} | ||
if (!baseUri) { | ||
return newUriPart; | ||
} | ||
if (!newUriPart) { | ||
return baseUri; | ||
} | ||
if (baseUri[baseUri.length - 1] === '/' && newUriPart[0] === '/') { | ||
newUriPart = newUriPart.substr(1); | ||
} | ||
return baseUri + newUriPart; | ||
}; | ||
module.exports = Service; |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -58,3 +58,5 @@ // | ||
if (parent[elementName] !== undefined) { | ||
element = parent[elementName].length === 1 ? parent[elementName][0] : parent[elementName]; | ||
element = parent[elementName].length === 1 ? parent[elementName][0] : | ||
(_.isObject(parent[elementName]) && Object.keys(parent[elementName]).length === 0) ? | ||
null : parent[elementName]; | ||
} | ||
@@ -61,0 +63,0 @@ |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ // |
@@ -0,0 +0,0 @@ Apache License |
@@ -13,3 +13,3 @@ { | ||
], | ||
"version": "0.9.1-pre.2", | ||
"version": "0.9.2", | ||
"description": "Windows Azure Common Client Library for node", | ||
@@ -16,0 +16,0 @@ "tags": [ |
@@ -0,0 +0,0 @@ # Windows Azure SDK for Node.js - Common |
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
44
8291
279194
1