grunt-mobify-cloud
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -45,3 +45,5 @@ /* | ||
saveCredentials: { | ||
src: settingsPath | ||
options: { | ||
settingsPath: './.mobify' | ||
} | ||
}, | ||
@@ -48,0 +50,0 @@ nodeunit: { |
@@ -108,1 +108,8 @@ var grunt = require('grunt'); | ||
}; | ||
exports.getSettingsPath = function() { | ||
if (process.platform === 'win32'){ | ||
return process.env.USERPROFILE + '/.mobify'; | ||
} | ||
return process.env.HOME + '/.mobify'; | ||
}; |
{ | ||
"name": "grunt-mobify-cloud", | ||
"description": "A plugin for working with Mobify projects", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"homepage": "http://cloud.mobify.com", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -12,3 +12,3 @@ module.exports = function(grunt) { | ||
projectSlug: '', | ||
settingsFile: '.mobify', | ||
settingsFile: Utils.getSettingsPath(), | ||
origin: 'https://cloud.mobify.com' | ||
@@ -24,3 +24,2 @@ }); | ||
function uploadArchive() { | ||
var settingsFile = options.settingsFile; | ||
var requestOptions = { | ||
@@ -33,3 +32,3 @@ // `projectName` is for backwards compatibility. The documented | ||
requestOptions.auth = Utils.readCredentials(settingsFile); | ||
requestOptions.auth = Utils.readCredentials(options.settingsFile); | ||
@@ -36,0 +35,0 @@ // Check build path, then create the build object |
var saveCredentials = require('../lib/saveCredentials'); | ||
var Utils = require('../lib/utils'); | ||
module.exports = function(grunt) { | ||
grunt.registerMultiTask('saveCredentials', 'Store your mobify cloud credentials', function(){ | ||
grunt.registerTask('saveCredentials', 'Store your mobify cloud credentials', function(){ | ||
var options = this.options({ | ||
settingsPath: Utils.getSettingsPath() | ||
}); | ||
var settingsPath = this.files[0].orig.src[0]; | ||
var username = grunt.option('user'); | ||
var key = grunt.option('key'); | ||
return saveCredentials(username, key, settingsPath); | ||
return saveCredentials(username, key, options.settingsPath); | ||
}); | ||
}; |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances 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
45448
22
363
9