You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2015/02/13 02:05:44 UTC

[1/5] cordova-lib git commit: CB-8416: added createpackagejson command

Repository: cordova-lib
Updated Branches:
  refs/heads/master 37567dab7 -> f37d6a6f1


CB-8416: added createpackagejson command


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/fcf37d03
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/fcf37d03
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/fcf37d03

Branch: refs/heads/master
Commit: fcf37d03d12301d26cb4bcbb0107b085325f40d6
Parents: 5f957e5
Author: Steve Gill <st...@gmail.com>
Authored: Fri Feb 6 11:55:51 2015 -0800
Committer: Steve Gill <st...@gmail.com>
Committed: Fri Feb 6 11:55:51 2015 -0800

----------------------------------------------------------------------
 cordova-lib/package.json                     |   9 +-
 cordova-lib/src/PluginInfo.js                |  18 ++-
 cordova-lib/src/plugman/createpackagejson.js |  59 +++++++++
 cordova-lib/src/plugman/defaults.json        |   1 +
 cordova-lib/src/plugman/init-defaults.js     | 138 ++++++++++++++++++++++
 cordova-lib/src/plugman/plugman.js           |  11 +-
 6 files changed, 229 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/fcf37d03/cordova-lib/package.json
----------------------------------------------------------------------
diff --git a/cordova-lib/package.json b/cordova-lib/package.json
index 357176b..434b4a0 100644
--- a/cordova-lib/package.json
+++ b/cordova-lib/package.json
@@ -18,9 +18,12 @@
   "engineStrict": true,
   "dependencies": {
     "bplist-parser": "0.0.6",
+    "cordova-js": "3.7.3",
+    "d8": "0.4.4",
     "dep-graph": "1.1.0",
     "elementtree": "0.1.5",
     "glob": "4.0.6",
+    "init-package-json": "^1.2.0",
     "mime": "1.2.11",
     "npm": "1.3.4",
     "npmconf": "0.1.16",
@@ -33,13 +36,11 @@
     "semver": "2.0.11",
     "shelljs": "0.3.0",
     "tar": "1.0.2",
+    "through2": "0.6.3",
     "underscore": "1.7.0",
-    "xcode": "0.6.7",
-    "cordova-js": "3.7.3",
-    "d8": "0.4.4",
     "unorm": "1.3.3",
     "valid-identifier": "0.0.1",
-    "through2": "0.6.3"
+    "xcode": "0.6.7"
   },
   "devDependencies": {
     "istanbul": "^0.3.4",

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/fcf37d03/cordova-lib/src/PluginInfo.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/PluginInfo.js b/cordova-lib/src/PluginInfo.js
index 8375d74..e0690e8 100644
--- a/cordova-lib/src/PluginInfo.js
+++ b/cordova-lib/src/PluginInfo.js
@@ -265,7 +265,12 @@ function PluginInfo(dirname) {
             return { name: n.attrib.name };
         });
     };
-
+    
+    self.getPlatformsArray = function() {
+        return self._et.findall('platform').map(function(n) {
+            return n.attrib.name;
+        });
+    };
     self.getFrameworks = function(platform) {
         return _getTags(self._et, 'framework', platform, function(el) {
             var ret = {
@@ -301,8 +306,19 @@ function PluginInfo(dirname) {
     if (self.keywords) {
         self.keywords = self.keywords.split(',').map( function(s) { return s.trim(); } );
     }
+    self.getKeywordsAndPlatforms = function () {
+        return self.keywords.concat('cordovaplugin').concat(addCordova(self.getPlatformsArray()));
+    };
 }  // End of PluginInfo constructor.
 
+// Helper function used to prefix every element of an array with cordova-
+// Useful when we want to modify platforms to be cordova-platform
+function addCordova(someArray) {
+    someArray.forEach(function(element, index, array) {
+        array[index] = 'cordova-' + element;
+    });
+    return someArray;
+}
 
 // Helper function used by most of the getSomething methods of PluginInfo.
 // Get all elements of a given name. Both in root and in platform sections

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/fcf37d03/cordova-lib/src/plugman/createpackagejson.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/createpackagejson.js b/cordova-lib/src/plugman/createpackagejson.js
new file mode 100644
index 0000000..fc6eeec
--- /dev/null
+++ b/cordova-lib/src/plugman/createpackagejson.js
@@ -0,0 +1,59 @@
+/**
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    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.
+*/
+
+var Q = require('q'),
+    fs = require('fs'),
+    path = require('path'),
+    PluginInfo = require('../PluginInfo'),
+    events = require('../events'),
+    init = require('init-package-json');
+
+//returns a promise
+function createPackageJson(args) {
+    var plugin_path = args[0];
+
+    var pluginInfo = new PluginInfo(plugin_path);
+   
+    var defaults = {
+        id:pluginInfo.id,
+        version:pluginInfo.version,
+        description:pluginInfo.description,
+        license:pluginInfo.license,
+        keywords:pluginInfo.getKeywordsAndPlatforms(),
+        repository:pluginInfo.repo,
+        bugs:pluginInfo.issue,
+        engines:pluginInfo.getEngines(),
+        platforms: pluginInfo.getPlatformsArray()
+    };
+
+    fs.writeFile(path.join(__dirname,'defaults.json'), JSON.stringify(defaults), 'utf8', function (err) {
+        if (err) throw err;
+        events.emit('verbose', 'defaults.json created from plugin.xml');
+        var initFile = require.resolve('./init-defaults');
+        var dir = process.cwd();
+
+        init(dir, initFile, {}, function (err, data) {
+            if(err) throw err;
+            events.emit('verbose', 'Package.json successfully created');
+        }); 
+    });
+    return Q();
+}
+
+module.exports = createPackageJson;

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/fcf37d03/cordova-lib/src/plugman/defaults.json
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/defaults.json b/cordova-lib/src/plugman/defaults.json
new file mode 100644
index 0000000..885af9e
--- /dev/null
+++ b/cordova-lib/src/plugman/defaults.json
@@ -0,0 +1 @@
+{"id":"org.apache.cordova.device","version":"0.2.14-dev","description":"Cordova Device Plugin","license":"Apache 2.0","repository":"https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git","bugs":"https://issues.apache.org/jira/browse/CB/component/12320648","engines":[],"platforms":["firefoxos","tizen","android","amazon-fireos","ubuntu","ios","blackberry10","wp7","wp8","windows8","windows","browser"]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/fcf37d03/cordova-lib/src/plugman/init-defaults.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/init-defaults.js b/cordova-lib/src/plugman/init-defaults.js
new file mode 100644
index 0000000..9948a7f
--- /dev/null
+++ b/cordova-lib/src/plugman/init-defaults.js
@@ -0,0 +1,138 @@
+/* global dirname */
+/* global config */
+/* global package */
+/* global basename */
+/* global yes */
+/* global prompt */
+
+var fs = require('fs'),
+    path = require('path'),
+    defaults = require('./defaults.json');
+
+
+function readDeps (test) { return function (cb) {
+    fs.readdir('node_modules', function (er, dir) {
+        if (er) return cb();
+        var deps = {};
+        var n = dir.length;
+        if (n === 0) return cb(null, deps);
+        dir.forEach(function (d) {
+            if (d.match(/^\./)) return next();
+
+            var dp = path.join(dirname, 'node_modules', d, 'package.json');
+            fs.readFile(dp, 'utf8', function (er, p) {
+                if (er) return next();
+                try { p = JSON.parse(p); }
+                catch (e) { return next(); }
+                if (!p.version) return next();
+                deps[d] = config.get('save-exact') ? p.version : config.get('save-prefix') + p.version;
+                return next();
+            });
+        });
+        function next () {
+            if (--n === 0) return cb(null, deps);
+        }
+    });
+};}
+
+var name = package.name || basename;
+exports.name = yes ? name : prompt('name', name);
+
+var version = package.version ||
+              defaults.version ||
+              config.get('init.version') ||
+              config.get('init-version') ||
+              '1.0.0';
+exports.version = yes ? version : prompt('version', version);
+
+if (!package.description) {
+    if(defaults.description){
+        exports.description = defaults.description;
+    } else {
+        exports.description = yes ? '' : prompt('description');
+    }
+}
+
+if(!package.cordova) {
+    exports.cordova = {};
+    if(defaults.id) {
+        exports.cordova.id = defaults.id;
+    }
+    if(defaults.platforms) {
+        exports.cordova.platforms = defaults.platforms;
+    }
+}
+
+if (!package.dependencies) {
+    exports.dependencies = readDeps(false);
+}
+
+if (!package.devDependencies) {
+    exports.devDependencies = readDeps(true);
+}
+
+if (!package.repository) {
+    exports.repository = function (cb) {
+        fs.readFile('.git/config', 'utf8', function (er, gconf) {
+            if (er || !gconf) {
+                if(defaults.repository) {
+                    return cb(null, yes ? defaults.repository : prompt('git repository', defaults.repository));
+                }
+                return cb(null, yes ? '' : prompt('git repository'));
+            } 
+            gconf = gconf.split(/\r?\n/);
+            var i = gconf.indexOf('[remote "origin"]');
+            var u;
+            if(i !== -1) {
+                u = gconf[i + 1];
+                if (!u.match(/^\s*url =/)) u = gconf[i + 2];
+                if (!u.match(/^\s*url =/)) u = null;
+                else u = u.replace(/^\s*url = /, '');
+            }
+            if (u && u.match(/^git@github.com:/))
+                u = u.replace(/^git@github.com:/, 'https://github.com/');
+
+            return cb(null, yes ? u : prompt('git repository', u));
+        });
+    };
+}
+
+if (!package.keywords) {
+    if(defaults.keywords) {
+        exports.keywords = defaults.keywords;
+    }else {
+        exports.keywords = yes ? '' : prompt('keywords', function (s) {
+            if (!s) return undefined;
+            if (Array.isArray(s)) s = s.join(' ');
+            if (typeof s !== 'string') return s;
+            return s.split(/[\s,]+/);
+        });
+    }
+}
+
+if (!package.engines) {
+    if(defaults.engines && defaults.engines.length > 0) {
+        exports.engines = defaults.engines;
+    }
+}
+
+if (!package.author) {
+    exports.author = (config.get('init.author.name') ||
+                     config.get('init-author-name')) ?
+                     {
+                        'name' : config.get('init.author.name') ||
+                            config.get('init-author-name'),
+                        'email' : config.get('init.author.email') ||
+                            config.get('init-author-email'),
+                        'url' : config.get('init.author.url') ||
+                            config.get('init-author-url')
+                     }
+                     : prompt('author');
+}
+
+var license = package.license ||
+              defaults.license ||
+              config.get('init.license') ||
+              config.get('init-license') ||
+              'ISC';
+exports.license = yes ? license : prompt('license', license);

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/fcf37d03/cordova-lib/src/plugman/plugman.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/plugman.js b/cordova-lib/src/plugman/plugman.js
index b464441..73eb8bf 100644
--- a/cordova-lib/src/plugman/plugman.js
+++ b/cordova-lib/src/plugman/plugman.js
@@ -76,6 +76,7 @@ addProperty(plugman, 'search', './search', true);
 addProperty(plugman, 'info', './info', true);
 addProperty(plugman, 'create', './create', true);
 addProperty(plugman, 'platform', './platform_operation', true);
+addProperty(plugman, 'createpackagejson', './createpackagejson', true);
 
 plugman.commands =  {
     'config'   : function(cli_opts) {
@@ -143,7 +144,6 @@ plugman.commands =  {
             else console.log('user added');
         });
     },
-
     'search'   : function(cli_opts) {
         plugman.search(cli_opts.argv.remain, function(err, plugins) {
             if (err) throw err;
@@ -217,7 +217,14 @@ plugman.commands =  {
             return console.log( plugman.help() );
         }
         plugman.platform( { operation: operation, platform_name: cli_opts.platform_name } );
-    }
+    },
+    'createpackagejson'  : function(cli_opts) {
+        var plugin_path = cli_opts.argv.remain;
+        if(!plugin_path) {
+            return console.log(plugman.help());
+        }
+        plugman.createpackagejson(plugin_path);
+    },
 };
 
 module.exports = plugman;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[4/5] cordova-lib git commit: made a few updates based on comments

Posted by st...@apache.org.
made a few updates based on comments


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/e539aa5d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/e539aa5d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/e539aa5d

Branch: refs/heads/master
Commit: e539aa5dace0b370812ced54e52ebaf381ad0fd5
Parents: 0d0279c
Author: Steve Gill <st...@gmail.com>
Authored: Thu Feb 12 16:53:21 2015 -0800
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Feb 12 16:53:21 2015 -0800

----------------------------------------------------------------------
 cordova-lib/src/PluginInfo.js                |  6 +--
 cordova-lib/src/plugman/createpackagejson.js |  4 +-
 cordova-lib/src/plugman/init-defaults.js     | 47 ++++++++++++-----------
 cordova-lib/src/plugman/plugman.js           |  2 +-
 cordova-lib/src/plugman/registry/registry.js | 10 ++++-
 5 files changed, 38 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/e539aa5d/cordova-lib/src/PluginInfo.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/PluginInfo.js b/cordova-lib/src/PluginInfo.js
index e0690e8..accf59b 100644
--- a/cordova-lib/src/PluginInfo.js
+++ b/cordova-lib/src/PluginInfo.js
@@ -314,10 +314,10 @@ function PluginInfo(dirname) {
 // Helper function used to prefix every element of an array with cordova-
 // Useful when we want to modify platforms to be cordova-platform
 function addCordova(someArray) {
-    someArray.forEach(function(element, index, array) {
-        array[index] = 'cordova-' + element;
+    var newArray = someArray.map(function(element) {
+        return 'cordova-' + element;
     });
-    return someArray;
+    return newArray;
 }
 
 // Helper function used by most of the getSomething methods of PluginInfo.

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/e539aa5d/cordova-lib/src/plugman/createpackagejson.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/createpackagejson.js b/cordova-lib/src/plugman/createpackagejson.js
index fc6eeec..0058abd 100644
--- a/cordova-lib/src/plugman/createpackagejson.js
+++ b/cordova-lib/src/plugman/createpackagejson.js
@@ -25,9 +25,7 @@ var Q = require('q'),
     init = require('init-package-json');
 
 //returns a promise
-function createPackageJson(args) {
-    var plugin_path = args[0];
-
+function createPackageJson(plugin_path) {
     var pluginInfo = new PluginInfo(plugin_path);
    
     var defaults = {

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/e539aa5d/cordova-lib/src/plugman/init-defaults.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/init-defaults.js b/cordova-lib/src/plugman/init-defaults.js
index 9948a7f..5e03349 100644
--- a/cordova-lib/src/plugman/init-defaults.js
+++ b/cordova-lib/src/plugman/init-defaults.js
@@ -4,36 +4,39 @@
 /* global basename */
 /* global yes */
 /* global prompt */
+// PromZard file that is used by createpackagejson and init-package-json module
 
 var fs = require('fs'),
     path = require('path'),
     defaults = require('./defaults.json');
 
 
-function readDeps (test) { return function (cb) {
-    fs.readdir('node_modules', function (er, dir) {
-        if (er) return cb();
-        var deps = {};
-        var n = dir.length;
-        if (n === 0) return cb(null, deps);
-        dir.forEach(function (d) {
-            if (d.match(/^\./)) return next();
-
-            var dp = path.join(dirname, 'node_modules', d, 'package.json');
-            fs.readFile(dp, 'utf8', function (er, p) {
-                if (er) return next();
-                try { p = JSON.parse(p); }
-                catch (e) { return next(); }
-                if (!p.version) return next();
-                deps[d] = config.get('save-exact') ? p.version : config.get('save-prefix') + p.version;
-                return next();
+function readDeps (test) { 
+    return function (cb) {
+        fs.readdir('node_modules', function (er, dir) {
+            if (er) return cb();
+            var deps = {};
+            var n = dir.length;
+            if (n === 0) return cb(null, deps);
+            dir.forEach(function (d) {
+                if (d.match(/^\./)) return next();
+
+                var dp = path.join(dirname, 'node_modules', d, 'package.json');
+                fs.readFile(dp, 'utf8', function (er, p) {
+                    if (er) return next();
+                    try { p = JSON.parse(p); }
+                    catch (e) { return next(); }
+                    if (!p.version) return next();
+                    deps[d] = config.get('save-exact') ? p.version : config.get('save-prefix') + p.version;
+                    return next();
+                });
             });
+            function next () {
+                if (--n === 0) return cb(null, deps);
+            }
         });
-        function next () {
-            if (--n === 0) return cb(null, deps);
-        }
-    });
-};}
+    };
+}
 
 var name = package.name || basename;
 exports.name = yes ? name : prompt('name', name);

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/e539aa5d/cordova-lib/src/plugman/plugman.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/plugman.js b/cordova-lib/src/plugman/plugman.js
index 73eb8bf..97d4d0d 100644
--- a/cordova-lib/src/plugman/plugman.js
+++ b/cordova-lib/src/plugman/plugman.js
@@ -219,7 +219,7 @@ plugman.commands =  {
         plugman.platform( { operation: operation, platform_name: cli_opts.platform_name } );
     },
     'createpackagejson'  : function(cli_opts) {
-        var plugin_path = cli_opts.argv.remain;
+        var plugin_path = cli_opts.argv.remain[0];
         if(!plugin_path) {
             return console.log(plugman.help());
         }

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/e539aa5d/cordova-lib/src/plugman/registry/registry.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/registry/registry.js b/cordova-lib/src/plugman/registry/registry.js
index 4e5e8c6..680027d 100644
--- a/cordova-lib/src/plugman/registry/registry.js
+++ b/cordova-lib/src/plugman/registry/registry.js
@@ -89,8 +89,14 @@ module.exports = {
         .then(function(settings) {
             if(fs.existsSync(path.join(dir,'package.json'))) {
                 events.emit('verbose', 'temporarily moving existing package.json so we can create one to publish to the cordova plugins registry');
-                //rename package.json to pacakge.json1 temporarily 
-                fs.renameSync(path.join(dir,'package.json'),path.join(dir,'package.json1')); 
+                if(fs.existsSync(path.join(dir,'package.json1'))) {
+                    //package.json1 already exists, maybe due to an past failed attempt to publish
+                    //we will assume that the rename has already happened.
+                    events.emit('verbose', 'package.json1 already exists. Will use');
+                } else {
+                    //rename package.json to pacakge.json1 temporarily 
+                    fs.renameSync(path.join(dir,'package.json'),path.join(dir,'package.json1')); 
+                }
             }
             return manifest.generatePackageJsonFromPluginXml(dir)
             .then(function() {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[5/5] cordova-lib git commit: Merge branch 'master' into CB-8416

Posted by st...@apache.org.
Merge branch 'master' into CB-8416


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/f37d6a6f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/f37d6a6f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/f37d6a6f

Branch: refs/heads/master
Commit: f37d6a6f1149fdc554d9e7e2179c2a7f028ef9ca
Parents: e539aa5 37567da
Author: Steve Gill <st...@gmail.com>
Authored: Thu Feb 12 16:53:50 2015 -0800
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Feb 12 16:53:50 2015 -0800

----------------------------------------------------------------------
 .../spec-plugman/platforms/windows.spec.js      | 419 ++++++++++++++
 .../spec-plugman/platforms/windows8.spec.js     | 137 -----
 .../org.test.plugins.dummyplugin/plugin.xml     |  22 +-
 .../src/windows/dummer.js                       |   1 +
 .../src/windows/dummy1.dll                      |   0
 .../src/windows/dummy1.vcxproj                  |   7 +
 .../src/windows/dummy2.dll                      |   0
 .../src/windows/dummy2.vcxproj                  |   7 +
 .../src/windows/dummy3.dll                      |   0
 .../src/windows/dummy3.vcxproj                  |   7 +
 .../src/windows/dummy4.dll                      |   0
 .../src/windows/dummy4.vcxproj                  |   7 +
 .../src/windows8/dummer.js                      |   1 -
 .../org.test.plugins.faultyplugin/plugin.xml    |  14 +-
 .../src/windows/faultyPlugin.js                 |   1 +
 .../src/windows8/faultyPlugin.js                |   1 -
 .../projects/windows/CordovaApp.Phone.jsproj    |  99 ++++
 .../projects/windows/CordovaApp.Windows.jsproj  |  99 ++++
 .../windows/CordovaApp.Windows80.jsproj         |  93 ++++
 .../projects/windows/CordovaApp.projitems       |  32 ++
 .../projects/windows/CordovaApp.shproj          |  30 +
 .../projects/windows/CordovaApp.sln             | 134 +++++
 .../projects/windows/CordovaApp.vs2012.sln      |  64 +++
 .../windows/CordovaApp_TemporaryKey.pfx         | Bin 0 -> 2544 bytes
 .../spec-plugman/projects/windows/VERSION       |   1 +
 .../spec-plugman/projects/windows/config.xml    |  14 +
 .../projects/windows/package.phone.appxmanifest |  57 ++
 .../windows/package.windows.appxmanifest        |  58 ++
 .../windows/package.windows80.appxmanifest      |  50 ++
 cordova-lib/src/PluginInfo.js                   |   9 +-
 cordova-lib/src/cordova/platform.js             |  56 +-
 cordova-lib/src/cordova/plugin.js               |  23 +
 cordova-lib/src/cordova/util.js                 |  18 +-
 cordova-lib/src/plugman/platforms/windows.js    |  52 +-
 cordova-lib/src/util/windows/jsproj.js          | 309 -----------
 cordova-lib/src/util/windows/jsprojManager.js   | 544 +++++++++++++++++++
 36 files changed, 1866 insertions(+), 500 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f37d6a6f/cordova-lib/src/PluginInfo.js
----------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[2/5] cordova-lib git commit: CB-8416 updated plugman publish to temporarily rename existing package.json files

Posted by st...@apache.org.
CB-8416 updated plugman publish to temporarily rename existing package.json files


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/adab8c9a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/adab8c9a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/adab8c9a

Branch: refs/heads/master
Commit: adab8c9accfd769019837bb1cc36a2975f9742b0
Parents: fcf37d0
Author: Steve Gill <st...@gmail.com>
Authored: Fri Feb 6 12:29:49 2015 -0800
Committer: Steve Gill <st...@gmail.com>
Committed: Fri Feb 6 12:29:49 2015 -0800

----------------------------------------------------------------------
 .gitignore                                   |  2 ++
 cordova-lib/src/plugman/defaults.json        |  1 -
 cordova-lib/src/plugman/registry/registry.js | 10 ++++++++++
 3 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/adab8c9a/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 88da92b..a7f3e17 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,5 @@ spec-cordova/fixtures/projects/cordova
 .idea/*
 .gitcore
 *.jar
+src/plugman/defaults.json
+cordova-lib/src/plugman/defaults.json

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/adab8c9a/cordova-lib/src/plugman/defaults.json
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/defaults.json b/cordova-lib/src/plugman/defaults.json
deleted file mode 100644
index 885af9e..0000000
--- a/cordova-lib/src/plugman/defaults.json
+++ /dev/null
@@ -1 +0,0 @@
-{"id":"org.apache.cordova.device","version":"0.2.14-dev","description":"Cordova Device Plugin","license":"Apache 2.0","repository":"https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git","bugs":"https://issues.apache.org/jira/browse/CB/component/12320648","engines":[],"platforms":["firefoxos","tizen","android","amazon-fireos","ubuntu","ios","blackberry10","wp7","wp8","windows8","windows","browser"]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/adab8c9a/cordova-lib/src/plugman/registry/registry.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/registry/registry.js b/cordova-lib/src/plugman/registry/registry.js
index 17e5056..4e5e8c6 100644
--- a/cordova-lib/src/plugman/registry/registry.js
+++ b/cordova-lib/src/plugman/registry/registry.js
@@ -87,6 +87,11 @@ module.exports = {
         var dir = args[0] || '.';
         return initSettings()
         .then(function(settings) {
+            if(fs.existsSync(path.join(dir,'package.json'))) {
+                events.emit('verbose', 'temporarily moving existing package.json so we can create one to publish to the cordova plugins registry');
+                //rename package.json to pacakge.json1 temporarily 
+                fs.renameSync(path.join(dir,'package.json'),path.join(dir,'package.json1')); 
+            }
             return manifest.generatePackageJsonFromPluginXml(dir)
             .then(function() {
                 return Q.ninvoke(npm, 'load', settings);
@@ -98,6 +103,11 @@ module.exports = {
                 return Q.ninvoke(npm.commands, 'publish', args);
             }).then(function() {
                 fs.unlink(path.resolve(dir, 'package.json'));
+                //rename package.json1 to package.json if it exists
+                if(fs.existsSync(path.join(dir,'package.json1'))) {
+                    events.emit('verbose', 'restoring original package.json');
+                    fs.renameSync(path.join(dir,'package.json1'),path.join(dir,'package.json')); 
+                }
             }).catch(function(err){
                 return err;
             });


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[3/5] cordova-lib git commit: Merge branch 'master' into CB-8416

Posted by st...@apache.org.
Merge branch 'master' into CB-8416


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/0d0279c8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/0d0279c8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/0d0279c8

Branch: refs/heads/master
Commit: 0d0279c84c82bb2aa79a8a116184b4f43617c0cb
Parents: adab8c9 0ee180c
Author: Steve Gill <st...@gmail.com>
Authored: Fri Feb 6 12:32:30 2015 -0800
Committer: Steve Gill <st...@gmail.com>
Committed: Fri Feb 6 12:32:30 2015 -0800

----------------------------------------------------------------------
 .../spec-plugman/install-browserify.spec.js     |   2 +-
 cordova-lib/spec-plugman/install.spec.js        |   2 +-
 .../spec-plugman/platforms/android.spec.js      | 227 +++++++++----------
 .../org.test.plugins.dummyplugin/extra.gradle   |   1 +
 .../plugin-lib/AndroidManifest.xml              |   5 +
 .../plugin-lib/libFile                          |   1 +
 .../plugin-lib/project.properties               |   1 +
 .../org.test.plugins.dummyplugin/plugin.xml     |   3 +
 .../projects/android_install/local.properties   |   1 +
 .../projects/android_one/project.properties     |   4 +
 .../projects/android_uninstall/local.properties |   1 +
 .../spec-plugman/uninstall-browserify.spec.js   |   2 +-
 cordova-lib/spec-plugman/uninstall.spec.js      |  30 +--
 cordova-lib/src/cordova/compile.js              |   6 +-
 cordova-lib/src/cordova/platform.js             |  10 +-
 cordova-lib/src/plugman/install.js              |  16 +-
 cordova-lib/src/plugman/platforms/android.js    |  70 +++---
 cordova-lib/src/plugman/util/action-stack.js    |  14 +-
 cordova-lib/src/plugman/util/android-project.js |  47 +++-
 19 files changed, 246 insertions(+), 197 deletions(-)
----------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org