azure-publish-settings
Advanced tools
Comparing version 1.0.1 to 1.1.0
24
index.js
@@ -1,6 +0,6 @@ | ||
'use strict'; | ||
"use strict"; | ||
var fs = require('fs'); | ||
var xml = require('xml2js'); | ||
var Promise = require('bluebird'); | ||
var fs = require("fs"); | ||
var xml = require("xml2js"); | ||
var Promise = require("bluebird"); | ||
@@ -17,3 +17,3 @@ var siteNamePattern = /\/\/([a-z0-9\-]+)\./i; | ||
profile.passive = passive === 'true'; | ||
profile.passive = passive === "true"; | ||
} | ||
@@ -25,4 +25,4 @@ }; | ||
return method === 'msdeploy' | ||
? 'web' | ||
return method === "msdeploy" | ||
? "web" | ||
: method; | ||
@@ -80,2 +80,10 @@ } | ||
if (settings.web) { | ||
settings.kudu = { | ||
website: settings.name, | ||
username: settings.web.username, | ||
password: settings.web.password | ||
}; | ||
} | ||
return callback(null, settings); | ||
@@ -90,3 +98,3 @@ } | ||
var options = { | ||
attrkey: 'attr' | ||
attrkey: "attr" | ||
}; | ||
@@ -93,0 +101,0 @@ |
{ | ||
"name": "azure-publish-settings", | ||
"description": "Reads Azure publish settings for use with Web Deploy, FTP, Git and Kudu.", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"license": "Apache-2.0", | ||
@@ -24,3 +24,11 @@ "author": "Ben Quarmby", | ||
"url": "https://github.com/benquarmby/azure-publish-settings/issues" | ||
}, | ||
"scripts": { | ||
"test": "gulp test" | ||
}, | ||
"devDependencies": { | ||
"gulp": "^3.9.1", | ||
"gulp-byo-jslint": "^1.1.1", | ||
"gulp-jasmine": "^2.4.1" | ||
} | ||
} |
# azure-publish-settings | ||
Reads Azure publish settings for use with Web Deploy, FTP, Git and Kudu. | ||
Reads Azure publish settings for use with Web Deploy, FTP, Git and Kudu. Includes first class support for working with [kudu-api](https://github.com/itsananderson/kudu-api). | ||
@@ -11,15 +11,15 @@ ## Installation | ||
```JavaScript | ||
var aps = require('azure-publish-settings'); | ||
var aps = require("azure-publish-settings"); | ||
// Traditional | ||
aps.read('path/to/MySite.PublishSettings', function (err, settings) { | ||
var siteName = settings.name; | ||
aps.read("path/to/MySite.PublishSettings", function (err, settings) { | ||
var iisSite = settings.web.iisSite; | ||
var username = settings.web.username; | ||
var password = settings.web.password; | ||
// Use settings with kudu-api | ||
// Use settings with Web Deploy etc. | ||
}); | ||
// Promise | ||
aps.readAsync('path/to/MySite.PublishSettings') | ||
aps.readAsync("path/to/MySite.PublishSettings") | ||
.then(function (settings) { | ||
@@ -32,2 +32,12 @@ var ftpUrl = settings.ftp.url; | ||
}); | ||
// Integration with kudu-api | ||
var kuduApi = require("kudu-api"); | ||
aps.read("path/to/MySite.PublishSettings", function (err, settings) { | ||
// Use the "kudu" property to pass credentials directly to kudu-api | ||
var api = kuduApi(settings.kudu); | ||
// Use kudu-api to manage an Azure web app | ||
}); | ||
``` | ||
@@ -34,0 +44,0 @@ |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
23838
191
0
151
3