Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

monaca-lib

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monaca-lib - npm Package Compare versions

Comparing version 1.1.0-rc.5 to 1.1.0-rc.6

test.js

4

CHANGELOG.md

@@ -5,3 +5,3 @@

v1.1.0-rc.5
v1.1.0-rc.6
----

@@ -23,2 +23,4 @@ * monaca: Added `isBuildOnly` parameter to `Monaca.createProject()` API.

* localkit: Kill adb processes on shutdown.
* localkit: Add ability to override config.xml project name in `Localkit.addProject()` and `Localkit.setProjects()`.
* monaca: Don't save cloud project id in `Monaca.cloneProject()`.

@@ -25,0 +27,0 @@ v1.0.4

{
"name": "monaca-lib",
"version": "1.1.0-rc.5",
"version": "1.1.0-rc.6",
"description": "Monaca cloud API bindings for JavaScript",

@@ -5,0 +5,0 @@ "main": "./src/main.js",

@@ -380,6 +380,9 @@ (function() {

* @param {String} projectPath - Path to project directory.
* @param {Object} options Project parameters
* @param {String} options.name Project name. This name will override the name in config.xml
* @return {Promise}
*/
Localkit.prototype.addProject = function(projectPath) {
var deferred = Q.defer();
Localkit.prototype.addProject = function(projectPath, options) {
var deferred = Q.defer(),
options = options || {};

@@ -414,3 +417,4 @@ this.monaca.getLocalProjectId(projectPath).then(

fileWatcher: fileWatcher,
path: projectPath
path: projectPath,
name: options.name
};

@@ -703,11 +707,17 @@

* @param {Array} pathList - List of project directories.
* @param {Array} optionsList - List of options objects.
* @return {Promise}
*/
Localkit.prototype.setProjects = function(pathList) {
var deferred = Q.defer();
Localkit.prototype.setProjects = function(pathList, optionsList) {
var deferred = Q.defer(),
optionsList = optionsList || {};
var getProjects = Q.all(
pathList.map(function(path) {
var deferred = Q.defer();
var getProjects = function() {
var promises = [];
for (var i = 0, l = pathList.length; i < l; i ++) {
var path = pathList[i],
options = optionsList[i],
deferred = Q.defer();
this.monaca.getLocalProjectId(path).then(

@@ -717,3 +727,4 @@ function(projectId) {

path: path,
projectId: projectId
projectId: projectId,
options: options
});

@@ -726,7 +737,9 @@ },

return deferred.promise;
}.bind(this))
);
promises.push(deferred.promise);
}
getProjects.then(
return Q.all(promises);
}.bind(this);
getProjects().then(
function(projects) {

@@ -739,3 +752,3 @@ var promises = [];

if (!this.projects[project.projectId]) {
promises.push(this.addProject(project.path));
promises.push(this.addProject(project.path, project.options));
}

@@ -783,3 +796,18 @@ }

if (this.projects.hasOwnProperty(id)) {
promises.push(this.monaca.getProjectInfo(this.projects[id].path));
var deferred = Q.defer(),
_project = this.projects[id];
this.monaca.getProjectInfo(_project.path)
.then(
function(project) {
project.name = _project.name || project.name;
deferred.resolve(project);
},
function(error) {
deferred.reject(error);
}
);
promises.push(deferred.promise);
}

@@ -786,0 +814,0 @@ }

@@ -1042,11 +1042,3 @@ (function() {

function() {
// Save project id.
localProperties.set(destDir, 'project_id', projectId).then(
function() {
deferred.resolve(destDir);
},
function() {
deferred.reject(error);
}
);
deferred.resolve(destDir);
},

@@ -1057,3 +1049,2 @@ function(error) {

);
}.bind(this),

@@ -1060,0 +1051,0 @@ function(error) {

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