New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

azure-mgmt-subscription

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azure-mgmt-subscription - npm Package Compare versions

Comparing version 0.9.1-pre.2 to 0.9.2

23

lib/subscription.js

@@ -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.
//
//

@@ -26,12 +26,9 @@ var exports = module.exports;

*
* NOTE: These APIs are still in development and should not be used.
*
* @param {string} [credentials.subscriptionId] The subscription identifier.
* @param {string} [credentials.cert] The cert value.
* @param {string} [credentials.key] The key value.
* @param {object} credentials The credential object (typically common.TokenCloudCredential or common.CerficateCloudCredential)
* @param {string} [baseUri] The base uri.
* @param {array} [filters] Optional array of service filters
* @return {SubscriptionClient} A new SubscriptionClient object.
*/
exports.createSubscriptionClient = function (credentials, baseUri) {
return new exports.SubscriptionClient.SubscriptionClient(credentials, baseUri);
};
exports.createSubscriptionClient = function (credentials, baseUri, filters) {
return new exports.SubscriptionClient.SubscriptionClient(credentials, baseUri, filters);
};

@@ -33,7 +33,5 @@ /* jshint latedef:false */

/**
* @class
*/
var SubscriptionClient = (function() {
var SubscriptionClient = ( /** @lends SubscriptionClient */ function() {
/**
* @class
* Initializes a new instance of the SubscriptionClient class.

@@ -47,4 +45,6 @@ * @constructor

* Management requests.
*
* @param {Array} filters
*/
function SubscriptionClient(credentials, baseUri) {
function SubscriptionClient(credentials, baseUri, filters) {
if (credentials === null || credentials === undefined) {

@@ -54,3 +54,3 @@ throw new Error('credentials cannot be null.');

SubscriptionClient['super_'].call(this, credentials);
SubscriptionClient['super_'].call(this, credentials, filters);

@@ -62,2 +62,7 @@ this.credentials = credentials;

}
/**
* Provides an instance of the
* [SubscriptionOperations](-SubscriptionOperations.html) object.
* @type {object}
*/
this.subscriptions = new SubscriptionOperations(this);

@@ -73,7 +78,10 @@ }

/**
* @class
*/
var SubscriptionOperations = (function() {
var SubscriptionOperations = ( /** @lends SubscriptionOperations */ function() {
/**
* @class
* __NOTE__: An instance of this class is automatically created for an
* instance of the [SubscriptionClient] {@link
* SubscriptionClient~SubscriptionClient}.
* See [subscriptions] {@link
* SubscriptionClient~SubscriptionClient#subscriptions}.
* Initializes a new instance of the SubscriptionOperations class.

@@ -103,3 +111,12 @@ * @constructor

// Construct URL
var url2 = this.client.baseUri + '/subscriptions';
var baseUrl = this.client.baseUri;
var url2 = '/subscriptions';
// Trim '/' character from the end of baseUrl and beginning of url.
if (baseUrl[baseUrl.length - 1] === '/') {
baseUrl = baseUrl.substring(0, (baseUrl.length - 1) + 0);
}
if (url2[0] === '/') {
url2 = url2.substring(1);
}
url2 = baseUrl + '/' + url2;

@@ -111,2 +128,3 @@ // Create HTTP transport objects

httpRequest.url = url2;
// Set Headers

@@ -116,4 +134,2 @@ httpRequest.headers['Content-Type'] = 'application/xml;charset=utf-8';

// Set Credentials
// Send Request

@@ -126,12 +142,10 @@ return this.client.pipeline(httpRequest, function (err, response, body) {

if (statusCode !== 200) {
return callback(body);
return callback(new Error(body));
}
// Create Result
var result = { subscriptions: [] };
result.statusCode = statusCode;
result.requestId = response.headers['x-ms-request-id'];
var result = null;
// Deserialize Response
var responseContent = body;
result = { subscriptions: [] };
var options = {};

@@ -258,2 +272,5 @@ options.trim = true;

result.statusCode = statusCode;
result.requestId = response.headers['x-ms-request-id'];
return callback(null, result);

@@ -260,0 +277,0 @@ });

@@ -13,3 +13,3 @@ {

],
"version": "0.9.1-pre.2",
"version": "0.9.2",
"description": "Windows Azure Subscription Management Client Library for node",

@@ -35,3 +35,3 @@ "tags": [

"dependencies": {
"azure-common": "0.9.1-pre.2"
"azure-common": "0.9.2"
},

@@ -38,0 +38,0 @@ "homepage": "http://github.com/WindowsAzure/azure-sdk-for-node",

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