You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2016/05/27 00:36:27 UTC
[3/3] ios commit: CB-11117: Optimize prepare for ios platform,
clean prepared files
CB-11117: Optimize prepare for ios platform, clean prepared files
Merge updated node modules
Fix node_modules exclusions in .gitignore
Fix failing unit tests for prepare
Use platform config.xml for clean
This closes #220
Signed-off-by: Shazron Abdullah <sh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/3d3a746c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/3d3a746c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/3d3a746c
Branch: refs/heads/master
Commit: 3d3a746cf86f63908da513a7c12001ee6dac7ebb
Parents: 8ad8acb
Author: Jason Ginchereau <ja...@microsoft.com>
Authored: Tue Apr 26 16:01:02 2016 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu May 26 17:33:18 2016 -0700
----------------------------------------------------------------------
.gitignore | 5 +-
bin/templates/scripts/cordova/Api.js | 3 +
bin/templates/scripts/cordova/clean | 3 +
bin/templates/scripts/cordova/lib/prepare.js | 206 ++++++---
node_modules/.bin/ios-sim | 16 +-
node_modules/.bin/ios-sim.cmd | 7 +
node_modules/.bin/nopt | 16 +-
node_modules/.bin/nopt.cmd | 7 +
node_modules/.bin/pegjs.cmd | 7 +
node_modules/.bin/shjs | 16 +-
node_modules/.bin/shjs.cmd | 7 +
node_modules/.bin/uuid | 15 +
node_modules/.bin/uuid.cmd | 7 +
node_modules/abbrev/package.json | 6 +-
node_modules/ansi/package.json | 4 +-
node_modules/balanced-match/.npmignore | 7 +-
node_modules/balanced-match/.travis.yml | 3 -
node_modules/balanced-match/Makefile | 6 -
node_modules/balanced-match/README.md | 4 +-
node_modules/balanced-match/example.js | 5 -
node_modules/balanced-match/index.js | 8 +
node_modules/balanced-match/package.json | 40 +-
node_modules/balanced-match/test/balanced.js | 84 ----
node_modules/base64-js/package.json | 6 +-
node_modules/big-integer/package.json | 4 +-
node_modules/bplist-creator/package.json | 6 +-
node_modules/bplist-parser/package.json | 4 +-
node_modules/brace-expansion/package.json | 30 +-
node_modules/concat-map/package.json | 4 +-
node_modules/cordova-common/RELEASENOTES.md | 54 +--
node_modules/cordova-common/cordova-common.js | 50 ++-
node_modules/cordova-common/package.json | 43 +-
.../src/ConfigChanges/ConfigFile.js | 48 ++-
.../cordova-common/src/CordovaLogger.js | 10 +-
node_modules/cordova-common/src/FileUpdater.js | 422 +++++++++++++++++++
.../cordova-common/src/PluginInfo/PluginInfo.js | 2 +-
node_modules/cordova-common/src/events.js | 2 +-
.../cordova-common/src/util/addProperty.js | 32 ++
.../cordova-registry-mapper/package.json | 6 +-
node_modules/elementtree/package.json | 4 +-
node_modules/glob/package.json | 4 +-
node_modules/inflight/.eslintrc | 17 -
node_modules/inflight/package.json | 45 +-
node_modules/inflight/test.js | 97 -----
node_modules/inherits/package.json | 4 +-
node_modules/ios-sim/.github/CONTRIBUTING.md | 29 ++
node_modules/ios-sim/.github/ISSUE_TEMPLATE.md | 24 ++
node_modules/ios-sim/node_modules/.bin/nopt | 16 +-
node_modules/ios-sim/node_modules/.bin/nopt.cmd | 7 +
.../node_modules/bplist-parser/package.json | 84 +++-
.../ios-sim/node_modules/nopt/package.json | 99 +++--
node_modules/ios-sim/package.json | 127 +++---
node_modules/lodash-node/package.json | 4 +-
node_modules/lodash/package.json | 6 +-
node_modules/minimatch/package.json | 17 +-
node_modules/node-uuid/.npmignore | 2 +
node_modules/node-uuid/LICENSE.md | 22 +-
node_modules/node-uuid/README.md | 69 ++-
node_modules/node-uuid/bin/uuid | 26 ++
node_modules/node-uuid/bower.json | 23 +
node_modules/node-uuid/component.json | 25 ++
node_modules/node-uuid/package.json | 76 ++--
node_modules/node-uuid/test/test.js | 23 +-
node_modules/node-uuid/uuid.js | 153 ++++---
node_modules/nopt/package.json | 92 +++-
node_modules/once/package.json | 4 +-
node_modules/os-homedir/package.json | 4 +-
node_modules/os-tmpdir/package.json | 4 +-
node_modules/osenv/package.json | 4 +-
node_modules/path-is-absolute/package.json | 4 +-
node_modules/pegjs/package.json | 4 +-
node_modules/plist/package.json | 131 +++---
node_modules/q/package.json | 164 ++++---
node_modules/sax/package.json | 4 +-
node_modules/semver/package.json | 4 +-
node_modules/shelljs/package.json | 111 +++--
node_modules/simctl/node_modules/.bin/shjs | 16 +-
node_modules/simctl/node_modules/.bin/shjs.cmd | 7 +
.../simctl/node_modules/shelljs/package.json | 6 +-
node_modules/simctl/package.json | 6 +-
.../node_modules/base64-js/package.json | 4 +-
.../node_modules/bplist-parser/package.json | 4 +-
.../node_modules/plist/package.json | 4 +-
.../node_modules/util-deprecate/package.json | 4 +-
.../node_modules/xmlbuilder/package.json | 4 +-
node_modules/simple-plist/package.json | 4 +-
node_modules/stream-buffers/package.json | 4 +-
node_modules/tail/package.json | 6 +-
node_modules/underscore/package.json | 4 +-
node_modules/unorm/package.json | 6 +-
node_modules/util-deprecate/package.json | 6 +-
node_modules/wrappy/package.json | 41 +-
node_modules/wrappy/test/basic.js | 51 ---
node_modules/xcode/lib/pbxFile.js | 11 +-
node_modules/xcode/lib/pbxProject.js | 48 ++-
node_modules/xcode/package.json | 34 +-
node_modules/xmlbuilder/package.json | 6 +-
node_modules/xmldom/package.json | 6 +-
package.json | 2 +-
tests/spec/unit/prepare.spec.js | 30 +-
100 files changed, 2034 insertions(+), 1018 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index a15f7cb..c7a2057 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,9 @@ tmp
*.pbxuser
xcuserdata
console.log
-node_modules/
+node_modules/jshint
+node_modules/jasmine-node
+node_modules/rewire
+node_modules/istanbul
coverage/
npm-debug.log
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/bin/templates/scripts/cordova/Api.js
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/Api.js b/bin/templates/scripts/cordova/Api.js
index ad67f8a..9a184d7 100644
--- a/bin/templates/scripts/cordova/Api.js
+++ b/bin/templates/scripts/cordova/Api.js
@@ -316,6 +316,9 @@ Api.prototype.clean = function(cleanOptions) {
return require('./lib/check_reqs').run()
.then(function () {
return require('./lib/clean').run.call(self, cleanOptions);
+ })
+ .then(function () {
+ return require('./lib/prepare').clean.call(self, cleanOptions);
});
};
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/bin/templates/scripts/cordova/clean
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/clean b/bin/templates/scripts/cordova/clean
index 8f7d303..56665c4 100755
--- a/bin/templates/scripts/cordova/clean
+++ b/bin/templates/scripts/cordova/clean
@@ -37,6 +37,9 @@ var opts = nopt({
// Make buildOptions compatible with PlatformApi clean method spec
opts.argv = opts.argv.original;
+// Skip cleaning prepared files when not invoking via cordova CLI.
+opts.noPrepare = true;
+
require('./loggingHelper').adjustLoggerLevel(opts);
new Api().clean(opts).done(function() {
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/bin/templates/scripts/cordova/lib/prepare.js
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/lib/prepare.js b/bin/templates/scripts/cordova/lib/prepare.js
index 5451aea..d08f510 100644
--- a/bin/templates/scripts/cordova/lib/prepare.js
+++ b/bin/templates/scripts/cordova/lib/prepare.js
@@ -31,10 +31,11 @@ var ConfigParser = require('cordova-common').ConfigParser;
var CordovaError = require('cordova-common').CordovaError;
var projectFile = require('./projectFile');
var configMunger = require('./configMunger');
+var FileUpdater = require('cordova-common').FileUpdater;
/*jshint sub:true*/
-module.exports.prepare = function (cordovaProject) {
+module.exports.prepare = function (cordovaProject, options) {
var self = this;
this._config = updateConfigFile(cordovaProject.projectConfig,
@@ -47,14 +48,36 @@ module.exports.prepare = function (cordovaProject) {
return updateProject(self._config, self.locations);
})
.then(function () {
- handleIcons(cordovaProject.projectConfig, self.locations.xcodeCordovaProj);
- handleSplashScreens(cordovaProject.projectConfig, self.locations.xcodeCordovaProj);
+ updateIcons(cordovaProject, self.locations);
+ updateSplashScreens(cordovaProject, self.locations);
})
.then(function () {
events.emit('verbose', 'Prepared iOS project successfully');
});
};
+module.exports.clean = function (options) {
+ // A cordovaProject isn't passed into the clean() function, because it might have
+ // been called from the platform shell script rather than the CLI. Check for the
+ // noPrepare option passed in by the non-CLI clean script. If that's present, or if
+ // there's no config.xml found at the project root, then don't clean prepared files.
+ var projectRoot = path.resolve(this.root, '../..');
+ var projectConfigFile = path.join(projectRoot, 'config.xml');
+ if ((options && options.noPrepare) || !fs.existsSync(projectConfigFile) ||
+ !fs.existsSync(this.locations.configXml)) {
+ return Q();
+ }
+
+ var projectConfig = new ConfigParser(this.locations.configXml);
+
+ var self = this;
+ return Q().then(function () {
+ cleanWww(projectRoot, self.locations);
+ cleanIcons(projectRoot, projectConfig, self.locations);
+ cleanSplashScreens(projectRoot, projectConfig, self.locations);
+ });
+};
+
/**
* Updates config files in project based on app's config.xml and config munge,
* generated by plugins.
@@ -91,29 +114,51 @@ function updateConfigFile(sourceConfig, configMunger, locations) {
}
/**
+ * Logs all file operations via the verbose event stream, indented.
+ */
+function logFileOp(message) {
+ events.emit('verbose', ' ' + message);
+}
+
+/**
* Updates platform 'www' directory by replacing it with contents of
* 'platform_www' and app www. Also copies project's overrides' folder into
* the platform 'www' folder
*
- * @param {Object} cordovaProject An object which describes cordova project.
- * @param {Object} destinations An object that contains destination
+ * @param {Object} cordovaProject An object which describes cordova project.
+ * @param {boolean} destinations An object that contains destinations
* paths for www files.
*/
function updateWww(cordovaProject, destinations) {
- shell.rm('-rf', destinations.www);
- shell.mkdir('-p', destinations.www);
- // Copy source files from project's www directory
- shell.cp('-rf', path.join(cordovaProject.locations.www, '*'), destinations.www);
- // Override www sources by files in 'platform_www' directory
- shell.cp('-rf', path.join(destinations.platformWww, '*'), destinations.www);
+ var sourceDirs = [
+ path.relative(cordovaProject.root, cordovaProject.locations.www),
+ path.relative(cordovaProject.root, destinations.platformWww)
+ ];
// If project contains 'merges' for our platform, use them as another overrides
var merges_path = path.join(cordovaProject.root, 'merges', 'ios');
if (fs.existsSync(merges_path)) {
events.emit('verbose', 'Found "merges/ios" folder. Copying its contents into the iOS project.');
- var overrides = path.join(merges_path, '*');
- shell.cp('-rf', overrides, destinations.www);
+ sourceDirs.push(path.join('merges', 'ios'));
}
+
+ var targetDir = path.relative(cordovaProject.root, destinations.www);
+ events.emit(
+ 'verbose', 'Merging and updating files from [' + sourceDirs.join(', ') + '] to ' + targetDir);
+ FileUpdater.mergeAndUpdateDir(
+ sourceDirs, targetDir, { rootDir: cordovaProject.root }, logFileOp);
+}
+
+/**
+ * Cleans all files from the platform 'www' directory.
+ */
+function cleanWww(projectRoot, locations) {
+ var targetDir = path.relative(projectRoot, locations.www);
+ events.emit('verbose', 'Cleaning ' + targetDir);
+
+ // No source paths are specified, so mergeAndUpdateDir() will clear the target directory.
+ FileUpdater.mergeAndUpdateDir(
+ [], targetDir, { rootDir: projectRoot, all: true }, logFileOp);
}
/**
@@ -125,7 +170,6 @@ function updateWww(cordovaProject, destinations) {
*/
function updateProject(platformConfig, locations) {
-
// CB-6992 it is necessary to normalize characters
// because node and shell scripts handles unicode symbols differently
// We need to normalize the name to NFD form since iOS uses NFD unicode form
@@ -262,11 +306,7 @@ function handleBuildSettings(platformConfig, locations) {
return Q();
}
-function handleIcons(projectConfig, platformRoot) {
-
- var icons = projectConfig.getIcons('ios');
- var appRoot = path.dirname(projectConfig.path);
-
+function mapIconResources(icons, iconsDir) {
// See https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html
// for launch images sizes reference.
var platformIcons = [
@@ -289,31 +329,64 @@ function handleIcons(projectConfig, platformRoot) {
{dest: 'icon-83.5@2x.png', width: 167, height: 167}
];
- var destIconsFolder;
- var xcassetsExists = folderExists(path.join(platformRoot, 'Images.xcassets/'));
+ var pathMap = {};
+ platformIcons.forEach(function (item) {
+ var icon = icons.getBySize(item.width, item.height) || icons.getDefault();
+ if (icon) {
+ var target = path.join(iconsDir, item.dest);
+ pathMap[target] = icon.src;
+ }
+ });
+ return pathMap;
+}
+
+function getIconsDir(projectRoot, platformProjDir) {
+ var iconsDir;
+ var xcassetsExists = folderExists(path.join(projectRoot, platformProjDir, 'Images.xcassets/'));
if (xcassetsExists) {
- destIconsFolder = 'Images.xcassets/AppIcon.appiconset/';
+ iconsDir = path.join(platformProjDir, 'Images.xcassets/AppIcon.appiconset/');
} else {
- destIconsFolder = 'Resources/icons/';
+ iconsDir = path.join(platformProjDir, 'Resources/icons/');
}
- platformIcons.forEach(function (item) {
- var icon = icons.getBySize(item.width, item.height) || icons.getDefault();
- if (icon){
- var src = path.join(appRoot, icon.src),
- dest = path.join(platformRoot, destIconsFolder, item.dest);
- events.emit('verbose', 'Copying icon from ' + src + ' to ' + dest);
- shell.cp('-f', src, dest);
- }
- });
+ return iconsDir;
}
-function handleSplashScreens(projectConfig, platformRoot) {
+function updateIcons(cordovaProject, locations) {
+ var icons = cordovaProject.projectConfig.getIcons('ios');
+
+ if (icons.length === 0) {
+ events.emit('verbose', 'This app does not have icons defined');
+ return;
+ }
+
+ var platformProjDir = path.relative(cordovaProject.root, locations.xcodeCordovaProj);
+ var iconsDir = getIconsDir(cordovaProject.root, platformProjDir);
+ var resourceMap = mapIconResources(icons, iconsDir);
+ events.emit('verbose', 'Updating icons at ' + iconsDir);
+ FileUpdater.updatePaths(
+ resourceMap, { rootDir: cordovaProject.root }, logFileOp);
+}
- var appRoot = path.dirname(projectConfig.path);
+function cleanIcons(projectRoot, projectConfig, locations) {
+ var icons = projectConfig.getIcons('android');
+ if (icons.length > 0) {
+ var platformProjDir = path.relative(projectRoot, locations.xcodeCordovaProj);
+ var iconsDir = getIconsDir(projectRoot, platformProjDir);
+ var resourceMap = mapIconResources(icons, iconsDir);
+ Object.keys(resourceMap).forEach(function (targetIconPath) {
+ resourceMap[targetIconPath] = null;
+ });
+ events.emit('verbose', 'Cleaning icons at ' + iconsDir);
+
+ // Source paths are removed from the map, so updatePaths() will delete the target files.
+ FileUpdater.updatePaths(
+ resourceMap, { rootDir: projectRoot, all: true }, logFileOp);
+ }
+}
- var splashScreens = projectConfig.getSplashScreens('ios');
+function mapSplashScreenResources(splashScreens, splashScreensDir) {
var platformSplashScreens = [
{dest: 'Default~iphone.png', width: 320, height: 480},
{dest: 'Default@2x~iphone.png', width: 640, height: 960},
@@ -327,24 +400,61 @@ function handleSplashScreens(projectConfig, platformRoot) {
{dest: 'Default-Landscape-736h.png', width: 2208, height: 1242}
];
- var destSplashFolder;
- var xcassetsExists = folderExists(path.join(platformRoot, 'Images.xcassets/'));
+ var pathMap = {};
+ platformSplashScreens.forEach(function (item) {
+ var splash = splashScreens.getBySize(item.width, item.height);
+ if (splash) {
+ var target = path.join(splashScreensDir, item.dest);
+ pathMap[target] = splash.src;
+ }
+ });
+ return pathMap;
+}
+
+function getSplashScreensDir(projectRoot, platformProjDir) {
+ var splashScreensDir;
+ var xcassetsExists = folderExists(path.join(projectRoot, platformProjDir, 'Images.xcassets/'));
if (xcassetsExists) {
- destSplashFolder = 'Images.xcassets/LaunchImage.launchimage/';
+ splashScreensDir = path.join(platformProjDir, 'Images.xcassets/LaunchImage.launchimage/');
} else {
- destSplashFolder = 'Resources/splash/';
+ splashScreensDir = path.join(platformProjDir, 'Resources/splash/');
}
- platformSplashScreens.forEach(function(item) {
- var splash = splashScreens.getBySize(item.width, item.height);
- if (splash){
- var src = path.join(appRoot, splash.src),
- dest = path.join(platformRoot, destSplashFolder, item.dest);
- events.emit('verbose', 'Copying splash from ' + src + ' to ' + dest);
- shell.cp('-f', src, dest);
- }
- });
+ return splashScreensDir;
+}
+
+function updateSplashScreens(cordovaProject, locations) {
+ var splashScreens = cordovaProject.projectConfig.getSplashScreens('ios');
+
+ if (splashScreens.length === 0) {
+ events.emit('verbose', 'This app does not have splash screens defined');
+ return;
+ }
+
+ var platformProjDir = path.relative(cordovaProject.root, locations.xcodeCordovaProj);
+ var splashScreensDir = getSplashScreensDir(cordovaProject.root, platformProjDir);
+ var resourceMap = mapSplashScreenResources(splashScreens, splashScreensDir);
+ events.emit('verbose', 'Updating splash screens at ' + splashScreensDir);
+ FileUpdater.updatePaths(
+ resourceMap, { rootDir: cordovaProject.root }, logFileOp);
+}
+
+function cleanSplashScreens(projectRoot, projectConfig, locations) {
+ var splashScreens = projectConfig.getSplashScreens('android');
+ if (splashScreens.length > 0) {
+ var platformProjDir = path.relative(projectRoot, locations.xcodeCordovaProj);
+ var splashScreensDir = getSplashScreensDir(projectRoot, platformProjDir);
+ var resourceMap = mapIconResources(splashScreens, splashScreensDir);
+ Object.keys(resourceMap).forEach(function (targetSplashPath) {
+ resourceMap[targetSplashPath] = null;
+ });
+ events.emit('verbose', 'Cleaning splash screens at ' + splashScreensDir);
+
+ // Source paths are removed from the map, so updatePaths() will delete the target files.
+ FileUpdater.updatePaths(
+ resourceMap, { rootDir: projectRoot, all: true }, logFileOp);
+ }
}
/**
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/.bin/ios-sim
----------------------------------------------------------------------
diff --git a/node_modules/.bin/ios-sim b/node_modules/.bin/ios-sim
index c435a8c..fa593cb 120000
--- a/node_modules/.bin/ios-sim
+++ b/node_modules/.bin/ios-sim
@@ -1 +1,15 @@
-../ios-sim/bin/ios-sim
\ No newline at end of file
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../ios-sim/bin/ios-sim" "$@"
+ ret=$?
+else
+ node "$basedir/../ios-sim/bin/ios-sim" "$@"
+ ret=$?
+fi
+exit $ret
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/.bin/ios-sim.cmd
----------------------------------------------------------------------
diff --git a/node_modules/.bin/ios-sim.cmd b/node_modules/.bin/ios-sim.cmd
new file mode 100644
index 0000000..85cc81a
--- /dev/null
+++ b/node_modules/.bin/ios-sim.cmd
@@ -0,0 +1,7 @@
+@IF EXIST "%~dp0\node.exe" (
+ "%~dp0\node.exe" "%~dp0\..\ios-sim\bin\ios-sim" %*
+) ELSE (
+ @SETLOCAL
+ @SET PATHEXT=%PATHEXT:;.JS;=;%
+ node "%~dp0\..\ios-sim\bin\ios-sim" %*
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/.bin/nopt
----------------------------------------------------------------------
diff --git a/node_modules/.bin/nopt b/node_modules/.bin/nopt
index 6b6566e..714334e 120000
--- a/node_modules/.bin/nopt
+++ b/node_modules/.bin/nopt
@@ -1 +1,15 @@
-../nopt/bin/nopt.js
\ No newline at end of file
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../nopt/bin/nopt.js" "$@"
+ ret=$?
+else
+ node "$basedir/../nopt/bin/nopt.js" "$@"
+ ret=$?
+fi
+exit $ret
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/.bin/nopt.cmd
----------------------------------------------------------------------
diff --git a/node_modules/.bin/nopt.cmd b/node_modules/.bin/nopt.cmd
new file mode 100644
index 0000000..1626454
--- /dev/null
+++ b/node_modules/.bin/nopt.cmd
@@ -0,0 +1,7 @@
+@IF EXIST "%~dp0\node.exe" (
+ "%~dp0\node.exe" "%~dp0\..\nopt\bin\nopt.js" %*
+) ELSE (
+ @SETLOCAL
+ @SET PATHEXT=%PATHEXT:;.JS;=;%
+ node "%~dp0\..\nopt\bin\nopt.js" %*
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/.bin/pegjs.cmd
----------------------------------------------------------------------
diff --git a/node_modules/.bin/pegjs.cmd b/node_modules/.bin/pegjs.cmd
new file mode 100644
index 0000000..717a8a9
--- /dev/null
+++ b/node_modules/.bin/pegjs.cmd
@@ -0,0 +1,7 @@
+@IF EXIST "%~dp0\node.exe" (
+ "%~dp0\node.exe" "%~dp0\..\pegjs\bin\pegjs" %*
+) ELSE (
+ @SETLOCAL
+ @SET PATHEXT=%PATHEXT:;.JS;=;%
+ node "%~dp0\..\pegjs\bin\pegjs" %*
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/.bin/shjs
----------------------------------------------------------------------
diff --git a/node_modules/.bin/shjs b/node_modules/.bin/shjs
index a044997..1d45691 120000
--- a/node_modules/.bin/shjs
+++ b/node_modules/.bin/shjs
@@ -1 +1,15 @@
-../shelljs/bin/shjs
\ No newline at end of file
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../shelljs/bin/shjs" "$@"
+ ret=$?
+else
+ node "$basedir/../shelljs/bin/shjs" "$@"
+ ret=$?
+fi
+exit $ret
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/.bin/shjs.cmd
----------------------------------------------------------------------
diff --git a/node_modules/.bin/shjs.cmd b/node_modules/.bin/shjs.cmd
new file mode 100644
index 0000000..3d98b0b
--- /dev/null
+++ b/node_modules/.bin/shjs.cmd
@@ -0,0 +1,7 @@
+@IF EXIST "%~dp0\node.exe" (
+ "%~dp0\node.exe" "%~dp0\..\shelljs\bin\shjs" %*
+) ELSE (
+ @SETLOCAL
+ @SET PATHEXT=%PATHEXT:;.JS;=;%
+ node "%~dp0\..\shelljs\bin\shjs" %*
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/.bin/uuid
----------------------------------------------------------------------
diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid
new file mode 100644
index 0000000..4f0e8e6
--- /dev/null
+++ b/node_modules/.bin/uuid
@@ -0,0 +1,15 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+ "$basedir/node" "$basedir/../node-uuid/bin/uuid" "$@"
+ ret=$?
+else
+ node "$basedir/../node-uuid/bin/uuid" "$@"
+ ret=$?
+fi
+exit $ret
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/.bin/uuid.cmd
----------------------------------------------------------------------
diff --git a/node_modules/.bin/uuid.cmd b/node_modules/.bin/uuid.cmd
new file mode 100644
index 0000000..9f2abd0
--- /dev/null
+++ b/node_modules/.bin/uuid.cmd
@@ -0,0 +1,7 @@
+@IF EXIST "%~dp0\node.exe" (
+ "%~dp0\node.exe" "%~dp0\..\node-uuid\bin\uuid" %*
+) ELSE (
+ @SETLOCAL
+ @SET PATHEXT=%PATHEXT:;.JS;=;%
+ node "%~dp0\..\node-uuid\bin\uuid" %*
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/abbrev/package.json
----------------------------------------------------------------------
diff --git a/node_modules/abbrev/package.json b/node_modules/abbrev/package.json
index f33cf75..afd28ed 100644
--- a/node_modules/abbrev/package.json
+++ b/node_modules/abbrev/package.json
@@ -2,7 +2,7 @@
"_args": [
[
"abbrev@1",
- "/Users/omefire/Projects/cordova-ios/node_modules/ios-sim/node_modules/nopt"
+ "D:\\Cordova\\cordova-ios\\node_modules\\ios-sim\\node_modules\\nopt"
]
],
"_from": "abbrev@>=1.0.0 <2.0.0",
@@ -33,7 +33,7 @@
"_shasum": "5b6035b2ee9d4fb5cf859f08a9be81b208491843",
"_shrinkwrap": null,
"_spec": "abbrev@1",
- "_where": "/Users/omefire/Projects/cordova-ios/node_modules/ios-sim/node_modules/nopt",
+ "_where": "D:\\Cordova\\cordova-ios\\node_modules\\ios-sim\\node_modules\\nopt",
"author": {
"email": "i@izs.me",
"name": "Isaac Z. Schlueter"
@@ -49,7 +49,7 @@
"directories": {},
"dist": {
"shasum": "5b6035b2ee9d4fb5cf859f08a9be81b208491843",
- "tarball": "http://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz"
+ "tarball": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz"
},
"gitHead": "821d09ce7da33627f91bbd8ed631497ed6f760c2",
"homepage": "https://github.com/isaacs/abbrev-js#readme",
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/ansi/package.json
----------------------------------------------------------------------
diff --git a/node_modules/ansi/package.json b/node_modules/ansi/package.json
index c018813..8286df4 100644
--- a/node_modules/ansi/package.json
+++ b/node_modules/ansi/package.json
@@ -2,7 +2,7 @@
"_args": [
[
"ansi@^0.3.1",
- "d:\\cordova\\cordova-ios\\node_modules\\cordova-common"
+ "D:\\Cordova\\cordova-ios\\node_modules\\cordova-common"
]
],
"_from": "ansi@>=0.3.1 <0.4.0",
@@ -32,7 +32,7 @@
"_shasum": "0c42d4fb17160d5a9af1e484bace1c66922c1b21",
"_shrinkwrap": null,
"_spec": "ansi@^0.3.1",
- "_where": "d:\\cordova\\cordova-ios\\node_modules\\cordova-common",
+ "_where": "D:\\Cordova\\cordova-ios\\node_modules\\cordova-common",
"author": {
"email": "nathan@tootallnate.net",
"name": "Nathan Rajlich",
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/balanced-match/.npmignore
----------------------------------------------------------------------
diff --git a/node_modules/balanced-match/.npmignore b/node_modules/balanced-match/.npmignore
index fd4f2b0..ae5d8c3 100644
--- a/node_modules/balanced-match/.npmignore
+++ b/node_modules/balanced-match/.npmignore
@@ -1,2 +1,5 @@
-node_modules
-.DS_Store
+test
+.gitignore
+.travis.yml
+Makefile
+example.js
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/balanced-match/.travis.yml
----------------------------------------------------------------------
diff --git a/node_modules/balanced-match/.travis.yml b/node_modules/balanced-match/.travis.yml
deleted file mode 100644
index 6e5919d..0000000
--- a/node_modules/balanced-match/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/balanced-match/Makefile
----------------------------------------------------------------------
diff --git a/node_modules/balanced-match/Makefile b/node_modules/balanced-match/Makefile
deleted file mode 100644
index fa5da71..0000000
--- a/node_modules/balanced-match/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-test:
- @node_modules/.bin/tape test/*.js
-
-.PHONY: test
-
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/balanced-match/README.md
----------------------------------------------------------------------
diff --git a/node_modules/balanced-match/README.md b/node_modules/balanced-match/README.md
index 421f3aa..d6880b2 100644
--- a/node_modules/balanced-match/README.md
+++ b/node_modules/balanced-match/README.md
@@ -1,6 +1,6 @@
# balanced-match
-Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`.
+Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well!
[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)
[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)
@@ -16,6 +16,7 @@ var balanced = require('balanced-match');
console.log(balanced('{', '}', 'pre{in{nested}}post'));
console.log(balanced('{', '}', 'pre{first}between{second}post'));
+console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'));
```
The matches are:
@@ -28,6 +29,7 @@ $ node example.js
pre: 'pre',
body: 'first',
post: 'between{second}post' }
+{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
```
## API
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/balanced-match/example.js
----------------------------------------------------------------------
diff --git a/node_modules/balanced-match/example.js b/node_modules/balanced-match/example.js
deleted file mode 100644
index c02ad34..0000000
--- a/node_modules/balanced-match/example.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var balanced = require('./');
-
-console.log(balanced('{', '}', 'pre{in{nested}}post'));
-console.log(balanced('{', '}', 'pre{first}between{second}post'));
-
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/balanced-match/index.js
----------------------------------------------------------------------
diff --git a/node_modules/balanced-match/index.js b/node_modules/balanced-match/index.js
index 75f3d71..4670f7f 100644
--- a/node_modules/balanced-match/index.js
+++ b/node_modules/balanced-match/index.js
@@ -1,5 +1,8 @@
module.exports = balanced;
function balanced(a, b, str) {
+ if (a instanceof RegExp) a = maybeMatch(a, str);
+ if (b instanceof RegExp) b = maybeMatch(b, str);
+
var r = range(a, b, str);
return r && {
@@ -11,6 +14,11 @@ function balanced(a, b, str) {
};
}
+function maybeMatch(reg, str) {
+ var m = str.match(reg);
+ return m ? m[0] : null;
+}
+
balanced.range = range;
function range(a, b, str) {
var begs, beg, left, right, result;
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/balanced-match/package.json
----------------------------------------------------------------------
diff --git a/node_modules/balanced-match/package.json b/node_modules/balanced-match/package.json
index f761b40..51c2262 100644
--- a/node_modules/balanced-match/package.json
+++ b/node_modules/balanced-match/package.json
@@ -1,38 +1,42 @@
{
"_args": [
[
- "balanced-match@^0.3.0",
- "d:\\cordova\\cordova-ios\\node_modules\\brace-expansion"
+ "balanced-match@^0.4.1",
+ "D:\\Cordova\\cordova-ios\\node_modules\\brace-expansion"
]
],
- "_from": "balanced-match@>=0.3.0 <0.4.0",
- "_id": "balanced-match@0.3.0",
+ "_from": "balanced-match@>=0.4.1 <0.5.0",
+ "_id": "balanced-match@0.4.1",
"_inCache": true,
"_installable": true,
"_location": "/balanced-match",
- "_nodeVersion": "4.2.1",
+ "_nodeVersion": "6.0.0",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/balanced-match-0.4.1.tgz_1462129663650_0.39764496590942144"
+ },
"_npmUser": {
"email": "julian@juliangruber.com",
"name": "juliangruber"
},
- "_npmVersion": "2.14.7",
+ "_npmVersion": "3.8.6",
"_phantomChildren": {},
"_requested": {
"name": "balanced-match",
- "raw": "balanced-match@^0.3.0",
- "rawSpec": "^0.3.0",
+ "raw": "balanced-match@^0.4.1",
+ "rawSpec": "^0.4.1",
"scope": null,
- "spec": ">=0.3.0 <0.4.0",
+ "spec": ">=0.4.1 <0.5.0",
"type": "range"
},
"_requiredBy": [
"/brace-expansion"
],
- "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz",
- "_shasum": "a91cdd1ebef1a86659e70ff4def01625fc2d6756",
+ "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz",
+ "_shasum": "19053e2e0748eadb379da6c09d455cf5e1039335",
"_shrinkwrap": null,
- "_spec": "balanced-match@^0.3.0",
- "_where": "d:\\cordova\\cordova-ios\\node_modules\\brace-expansion",
+ "_spec": "balanced-match@^0.4.1",
+ "_where": "D:\\Cordova\\cordova-ios\\node_modules\\brace-expansion",
"author": {
"email": "mail@juliangruber.com",
"name": "Julian Gruber",
@@ -44,14 +48,14 @@
"dependencies": {},
"description": "Match balanced character pairs, like \"{\" and \"}\"",
"devDependencies": {
- "tape": "~4.2.2"
+ "tape": "~4.5.0"
},
"directories": {},
"dist": {
- "shasum": "a91cdd1ebef1a86659e70ff4def01625fc2d6756",
- "tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz"
+ "shasum": "19053e2e0748eadb379da6c09d455cf5e1039335",
+ "tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz"
},
- "gitHead": "a7114b0986554787e90b7ac595a043ca75ea77e5",
+ "gitHead": "7004b289baaaab6a832f4901735e29d37cc2a863",
"homepage": "https://github.com/juliangruber/balanced-match",
"keywords": [
"match",
@@ -94,5 +98,5 @@
],
"files": "test/*.js"
},
- "version": "0.3.0"
+ "version": "0.4.1"
}
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/balanced-match/test/balanced.js
----------------------------------------------------------------------
diff --git a/node_modules/balanced-match/test/balanced.js b/node_modules/balanced-match/test/balanced.js
deleted file mode 100644
index f5e98e3..0000000
--- a/node_modules/balanced-match/test/balanced.js
+++ /dev/null
@@ -1,84 +0,0 @@
-var test = require('tape');
-var balanced = require('..');
-
-test('balanced', function(t) {
- t.deepEqual(balanced('{', '}', 'pre{in{nest}}post'), {
- start: 3,
- end: 12,
- pre: 'pre',
- body: 'in{nest}',
- post: 'post'
- });
- t.deepEqual(balanced('{', '}', '{{{{{{{{{in}post'), {
- start: 8,
- end: 11,
- pre: '{{{{{{{{',
- body: 'in',
- post: 'post'
- });
- t.deepEqual(balanced('{', '}', 'pre{body{in}post'), {
- start: 8,
- end: 11,
- pre: 'pre{body',
- body: 'in',
- post: 'post'
- });
- t.deepEqual(balanced('{', '}', 'pre}{in{nest}}post'), {
- start: 4,
- end: 13,
- pre: 'pre}',
- body: 'in{nest}',
- post: 'post'
- });
- t.deepEqual(balanced('{', '}', 'pre{body}between{body2}post'), {
- start: 3,
- end: 8,
- pre: 'pre',
- body: 'body',
- post: 'between{body2}post'
- });
- t.notOk(balanced('{', '}', 'nope'), 'should be notOk');
- t.deepEqual(balanced('<b>', '</b>', 'pre<b>in<b>nest</b></b>post'), {
- start: 3,
- end: 19,
- pre: 'pre',
- body: 'in<b>nest</b>',
- post: 'post'
- });
- t.deepEqual(balanced('<b>', '</b>', 'pre</b><b>in<b>nest</b></b>post'), {
- start: 7,
- end: 23,
- pre: 'pre</b>',
- body: 'in<b>nest</b>',
- post: 'post'
- });
- t.deepEqual(balanced('{{', '}}', 'pre{{{in}}}post'), {
- start: 3,
- end: 9,
- pre: 'pre',
- body: '{in}',
- post: 'post'
- });
- t.deepEqual(balanced('{{{', '}}', 'pre{{{in}}}post'), {
- start: 3,
- end: 8,
- pre: 'pre',
- body: 'in',
- post: '}post'
- });
- t.deepEqual(balanced('{', '}', 'pre{{first}in{second}post'), {
- start: 4,
- end: 10,
- pre: 'pre{',
- body: 'first',
- post: 'in{second}post'
- });
- t.deepEqual(balanced('<?', '?>', 'pre<?>post'), {
- start: 3,
- end: 4,
- pre: 'pre',
- body: '',
- post: 'post'
- });
- t.end();
-});
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/base64-js/package.json
----------------------------------------------------------------------
diff --git a/node_modules/base64-js/package.json b/node_modules/base64-js/package.json
index 2ba7707..17e7672 100644
--- a/node_modules/base64-js/package.json
+++ b/node_modules/base64-js/package.json
@@ -2,7 +2,7 @@
"_args": [
[
"base64-js@0.0.8",
- "/Users/omefire/Projects/cordova-ios/node_modules/plist"
+ "D:\\Cordova\\cordova-ios\\node_modules\\plist"
]
],
"_from": "base64-js@0.0.8",
@@ -32,7 +32,7 @@
"_shasum": "1101e9544f4a76b1bc3b26d452ca96d7a35e7978",
"_shrinkwrap": null,
"_spec": "base64-js@0.0.8",
- "_where": "/Users/omefire/Projects/cordova-ios/node_modules/plist",
+ "_where": "D:\\Cordova\\cordova-ios\\node_modules\\plist",
"author": {
"email": "t.jameson.little@gmail.com",
"name": "T. Jameson Little"
@@ -48,7 +48,7 @@
"directories": {},
"dist": {
"shasum": "1101e9544f4a76b1bc3b26d452ca96d7a35e7978",
- "tarball": "http://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz"
+ "tarball": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz"
},
"engines": {
"node": ">= 0.4"
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/big-integer/package.json
----------------------------------------------------------------------
diff --git a/node_modules/big-integer/package.json b/node_modules/big-integer/package.json
index 0429247..5b7f93c 100644
--- a/node_modules/big-integer/package.json
+++ b/node_modules/big-integer/package.json
@@ -2,7 +2,7 @@
"_args": [
[
"big-integer@^1.6.7",
- "d:\\cordova\\cordova-ios\\node_modules\\bplist-parser"
+ "D:\\Cordova\\cordova-ios\\node_modules\\bplist-parser"
]
],
"_from": "big-integer@>=1.6.7 <2.0.0",
@@ -36,7 +36,7 @@
"_shasum": "33d27d3b7388dfcc4b86d3130c10740cec01fb9e",
"_shrinkwrap": null,
"_spec": "big-integer@^1.6.7",
- "_where": "d:\\cordova\\cordova-ios\\node_modules\\bplist-parser",
+ "_where": "D:\\Cordova\\cordova-ios\\node_modules\\bplist-parser",
"author": {
"email": "peter.e.c.olson+npm@gmail.com",
"name": "Peter Olson"
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/bplist-creator/package.json
----------------------------------------------------------------------
diff --git a/node_modules/bplist-creator/package.json b/node_modules/bplist-creator/package.json
index a253169..0535c11 100644
--- a/node_modules/bplist-creator/package.json
+++ b/node_modules/bplist-creator/package.json
@@ -2,7 +2,7 @@
"_args": [
[
"bplist-creator@0.0.4",
- "d:\\cordova\\cordova-ios\\node_modules\\simple-plist"
+ "D:\\Cordova\\cordova-ios\\node_modules\\simple-plist"
]
],
"_from": "bplist-creator@0.0.4",
@@ -31,7 +31,7 @@
"_shasum": "4ac0496782e127a85c1d2026a4f5eb22a7aff991",
"_shrinkwrap": null,
"_spec": "bplist-creator@0.0.4",
- "_where": "d:\\cordova\\cordova-ios\\node_modules\\simple-plist",
+ "_where": "D:\\Cordova\\cordova-ios\\node_modules\\simple-plist",
"author": {
"name": "https://github.com/nearinfinity/node-bplist-parser.git"
},
@@ -49,7 +49,7 @@
"directories": {},
"dist": {
"shasum": "4ac0496782e127a85c1d2026a4f5eb22a7aff991",
- "tarball": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.4.tgz"
+ "tarball": "http://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.4.tgz"
},
"homepage": "https://github.com/nearinfinity/node-bplist-creator",
"keywords": [
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/bplist-parser/package.json
----------------------------------------------------------------------
diff --git a/node_modules/bplist-parser/package.json b/node_modules/bplist-parser/package.json
index f57f8ca..9d6dfd9 100644
--- a/node_modules/bplist-parser/package.json
+++ b/node_modules/bplist-parser/package.json
@@ -2,7 +2,7 @@
"_args": [
[
"bplist-parser@^0.1.0",
- "d:\\cordova\\cordova-ios\\node_modules\\cordova-common"
+ "D:\\Cordova\\cordova-ios\\node_modules\\cordova-common"
]
],
"_from": "bplist-parser@>=0.1.0 <0.2.0",
@@ -32,7 +32,7 @@
"_shasum": "d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6",
"_shrinkwrap": null,
"_spec": "bplist-parser@^0.1.0",
- "_where": "d:\\cordova\\cordova-ios\\node_modules\\cordova-common",
+ "_where": "D:\\Cordova\\cordova-ios\\node_modules\\cordova-common",
"author": {
"email": "joe.ferner@nearinfinity.com",
"name": "Joe Ferner"
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/brace-expansion/package.json
----------------------------------------------------------------------
diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json
index 3f935cc..d962f2d 100644
--- a/node_modules/brace-expansion/package.json
+++ b/node_modules/brace-expansion/package.json
@@ -2,24 +2,24 @@
"_args": [
[
"brace-expansion@^1.0.0",
- "d:\\cordova\\cordova-ios\\node_modules\\minimatch"
+ "D:\\Cordova\\cordova-ios\\node_modules\\minimatch"
]
],
"_from": "brace-expansion@>=1.0.0 <2.0.0",
- "_id": "brace-expansion@1.1.3",
+ "_id": "brace-expansion@1.1.4",
"_inCache": true,
"_installable": true,
"_location": "/brace-expansion",
- "_nodeVersion": "5.5.0",
+ "_nodeVersion": "6.0.0",
"_npmOperationalInternal": {
- "host": "packages-6-west.internal.npmjs.com",
- "tmp": "tmp/brace-expansion-1.1.3.tgz_1455216688668_0.948847763473168"
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/brace-expansion-1.1.4.tgz_1462130058897_0.14984136167913675"
},
"_npmUser": {
"email": "julian@juliangruber.com",
"name": "juliangruber"
},
- "_npmVersion": "3.3.12",
+ "_npmVersion": "3.8.6",
"_phantomChildren": {},
"_requested": {
"name": "brace-expansion",
@@ -32,11 +32,11 @@
"_requiredBy": [
"/minimatch"
],
- "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.3.tgz",
- "_shasum": "46bff50115d47fc9ab89854abb87d98078a10991",
+ "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.4.tgz",
+ "_shasum": "464a204c77f482c085c2a36c456bbfbafb67a127",
"_shrinkwrap": null,
"_spec": "brace-expansion@^1.0.0",
- "_where": "d:\\cordova\\cordova-ios\\node_modules\\minimatch",
+ "_where": "D:\\Cordova\\cordova-ios\\node_modules\\minimatch",
"author": {
"email": "mail@juliangruber.com",
"name": "Julian Gruber",
@@ -46,19 +46,19 @@
"url": "https://github.com/juliangruber/brace-expansion/issues"
},
"dependencies": {
- "balanced-match": "^0.3.0",
+ "balanced-match": "^0.4.1",
"concat-map": "0.0.1"
},
"description": "Brace expansion as known from sh/bash",
"devDependencies": {
- "tape": "4.4.0"
+ "tape": "4.5.1"
},
"directories": {},
"dist": {
- "shasum": "46bff50115d47fc9ab89854abb87d98078a10991",
- "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.3.tgz"
+ "shasum": "464a204c77f482c085c2a36c456bbfbafb67a127",
+ "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.4.tgz"
},
- "gitHead": "f0da1bb668e655f67b6b2d660c6e1c19e2a6f231",
+ "gitHead": "1660b75d0bf03b022e7888b576cd5a4080692c1d",
"homepage": "https://github.com/juliangruber/brace-expansion",
"keywords": [],
"license": "MIT",
@@ -100,5 +100,5 @@
],
"files": "test/*.js"
},
- "version": "1.1.3"
+ "version": "1.1.4"
}
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/concat-map/package.json
----------------------------------------------------------------------
diff --git a/node_modules/concat-map/package.json b/node_modules/concat-map/package.json
index 16ebabf..01848c6 100644
--- a/node_modules/concat-map/package.json
+++ b/node_modules/concat-map/package.json
@@ -2,7 +2,7 @@
"_args": [
[
"concat-map@0.0.1",
- "d:\\cordova\\cordova-ios\\node_modules\\brace-expansion"
+ "D:\\Cordova\\cordova-ios\\node_modules\\brace-expansion"
]
],
"_from": "concat-map@0.0.1",
@@ -31,7 +31,7 @@
"_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
"_shrinkwrap": null,
"_spec": "concat-map@0.0.1",
- "_where": "d:\\cordova\\cordova-ios\\node_modules\\brace-expansion",
+ "_where": "D:\\Cordova\\cordova-ios\\node_modules\\brace-expansion",
"author": {
"email": "mail@substack.net",
"name": "James Halliday",
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/cordova-common/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/node_modules/cordova-common/RELEASENOTES.md b/node_modules/cordova-common/RELEASENOTES.md
index 350d5c9..7a99cc9 100644
--- a/node_modules/cordova-common/RELEASENOTES.md
+++ b/node_modules/cordova-common/RELEASENOTES.md
@@ -20,39 +20,45 @@
-->
# Cordova-common Release Notes
+### 1.3.0 (May 12, 2016)
+* [CB-11259](https://issues.apache.org/jira/browse/CB-11259): Improving prepare and build logging
+* [CB-11194](https://issues.apache.org/jira/browse/CB-11194) Improve cordova load time
+* [CB-1117](https://issues.apache.org/jira/browse/CB-1117) Add `FileUpdater` module to `cordova-common`.
+* [CB-11131](https://issues.apache.org/jira/browse/CB-11131) Fix `TypeError: message.toUpperCase` is not a function in `CordovaLogger`
+
### 1.2.0 (Apr 18, 2016)
-* CB-11022 Save modulesMetadata to both www and platform_www when necessary
-* CB-10833 Deduplicate common logic for plugin installation/uninstallation
-* CB-10822 Manage plugins/modules metadata using PlatformJson
-* CB-10940 Can't add Android platform from path
-* CB-10965 xml helper allows multiple instances to be merge in config.xml
+* [CB-11022](https://issues.apache.org/jira/browse/CB-11022) Save modulesMetadata to both www and platform_www when necessary
+* [CB-10833](https://issues.apache.org/jira/browse/CB-10833) Deduplicate common logic for plugin installation/uninstallation
+* [CB-10822](https://issues.apache.org/jira/browse/CB-10822) Manage plugins/modules metadata using PlatformJson
+* [CB-10940](https://issues.apache.org/jira/browse/CB-10940) Can't add Android platform from path
+* [CB-10965](https://issues.apache.org/jira/browse/CB-10965) xml helper allows multiple instances to be merge in config.xml
### 1.1.1 (Mar 18, 2016)
-* CB-10694 Update test to reflect merging of CB-9264 fix
-* CB-10694 Platform-specific configuration preferences don't override global settings
-* CB-9264 Duplicate entries in `config.xml`
-* CB-10791 Add `adjustLoggerLevel` to `cordova-common.CordovaLogger`
-* CB-10662 Add tests for `ConfigParser.getStaticResources`
-* CB-10622 fix target attribute being ignored for images in `config.xml`.
-* CB-10583 Protect plugin preferences from adding extra Array properties.
+* [CB-10694](https://issues.apache.org/jira/browse/CB-10694) Update test to reflect merging of [CB-9264](https://issues.apache.org/jira/browse/CB-9264) fix
+* [CB-10694](https://issues.apache.org/jira/browse/CB-10694) Platform-specific configuration preferences don't override global settings
+* [CB-9264](https://issues.apache.org/jira/browse/CB-9264) Duplicate entries in `config.xml`
+* [CB-10791](https://issues.apache.org/jira/browse/CB-10791) Add `adjustLoggerLevel` to `cordova-common.CordovaLogger`
+* [CB-10662](https://issues.apache.org/jira/browse/CB-10662) Add tests for `ConfigParser.getStaticResources`
+* [CB-10622](https://issues.apache.org/jira/browse/CB-10622) fix target attribute being ignored for images in `config.xml`.
+* [CB-10583](https://issues.apache.org/jira/browse/CB-10583) Protect plugin preferences from adding extra Array properties.
### 1.1.0 (Feb 16, 2016)
-* CB-10482 Remove references to windows8 from cordova-lib/cli
-* CB-10430 Adds forwardEvents method to easily connect two EventEmitters
-* CB-10176 Adds CordovaLogger class, based on logger module from cordova-cli
-* CB-10052 Expose child process' io streams via promise progress notification
-* CB-10497 Prefer .bat over .cmd on windows platform
-* CB-9984 Bumps plist version and fixes failing cordova-common test
+* [CB-10482](https://issues.apache.org/jira/browse/CB-10482) Remove references to windows8 from cordova-lib/cli
+* [CB-10430](https://issues.apache.org/jira/browse/CB-10430) Adds forwardEvents method to easily connect two EventEmitters
+* [CB-10176](https://issues.apache.org/jira/browse/CB-10176) Adds CordovaLogger class, based on logger module from cordova-cli
+* [CB-10052](https://issues.apache.org/jira/browse/CB-10052) Expose child process' io streams via promise progress notification
+* [CB-10497](https://issues.apache.org/jira/browse/CB-10497) Prefer .bat over .cmd on windows platform
+* [CB-9984](https://issues.apache.org/jira/browse/CB-9984) Bumps plist version and fixes failing cordova-common test
### 1.0.0 (Oct 29, 2015)
-* CB-9890 Documents cordova-common
-* CB-9598 Correct cordova-lib -> cordova-common in README
+* [CB-9890](https://issues.apache.org/jira/browse/CB-9890) Documents cordova-common
+* [CB-9598](https://issues.apache.org/jira/browse/CB-9598) Correct cordova-lib -> cordova-common in README
* Pick ConfigParser changes from apache@0c3614e
-* CB-9743 Removes system frameworks handling from ConfigChanges
-* CB-9598 Cleans out code which has been moved to `cordova-common`
+* [CB-9743](https://issues.apache.org/jira/browse/CB-9743) Removes system frameworks handling from ConfigChanges
+* [CB-9598](https://issues.apache.org/jira/browse/CB-9598) Cleans out code which has been moved to `cordova-common`
* Pick ConfigParser changes from apache@ddb027b
* Picking CordovaError changes from apache@a3b1fca
-* CB-9598 Adds tests and fixtures based on existing cordova-lib ones
-* CB-9598 Initial implementation for cordova-common
+* [CB-9598](https://issues.apache.org/jira/browse/CB-9598) Adds tests and fixtures based on existing cordova-lib ones
+* [CB-9598](https://issues.apache.org/jira/browse/CB-9598) Initial implementation for cordova-common
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/cordova-common/cordova-common.js
----------------------------------------------------------------------
diff --git a/node_modules/cordova-common/cordova-common.js b/node_modules/cordova-common/cordova-common.js
index 1f97b66..dcaf7a4 100644
--- a/node_modules/cordova-common/cordova-common.js
+++ b/node_modules/cordova-common/cordova-common.js
@@ -17,26 +17,30 @@
under the License.
*/
-exports = module.exports = {
- events: require('./src/events'),
- superspawn: require('./src/superspawn'),
-
- ActionStack: require('./src/ActionStack'),
- CordovaError: require('./src/CordovaError/CordovaError'),
- CordovaLogger: require('./src/CordovaLogger'),
- CordovaExternalToolErrorContext: require('./src/CordovaError/CordovaExternalToolErrorContext'),
- PlatformJson: require('./src/PlatformJson'),
- ConfigParser: require('./src/ConfigParser/ConfigParser.js'),
-
- PluginInfo: require('./src/PluginInfo/PluginInfo.js'),
- PluginInfoProvider: require('./src/PluginInfo/PluginInfoProvider.js'),
-
- PluginManager: require('./src/PluginManager'),
-
- ConfigChanges: require('./src/ConfigChanges/ConfigChanges.js'),
- ConfigKeeper: require('./src/ConfigChanges/ConfigKeeper.js'),
- ConfigFile: require('./src/ConfigChanges/ConfigFile.js'),
- mungeUtil: require('./src/ConfigChanges/munge-util.js'),
-
- xmlHelpers: require('./src/util/xml-helpers')
-};
+var addProperty = require('./src/util/addProperty');
+
+module.exports = { };
+
+addProperty(module, 'events', './src/events');
+addProperty(module, 'superspawn', './src/superspawn');
+
+addProperty(module, 'ActionStack', './src/ActionStack');
+addProperty(module, 'CordovaError', './src/CordovaError/CordovaError');
+addProperty(module, 'CordovaLogger', './src/CordovaLogger');
+addProperty(module, 'CordovaExternalToolErrorContext', './src/CordovaError/CordovaExternalToolErrorContext');
+addProperty(module, 'PlatformJson', './src/PlatformJson');
+addProperty(module, 'ConfigParser', './src/ConfigParser/ConfigParser');
+addProperty(module, 'FileUpdater', './src/FileUpdater');
+
+addProperty(module, 'PluginInfo', './src/PluginInfo/PluginInfo');
+addProperty(module, 'PluginInfoProvider', './src/PluginInfo/PluginInfoProvider');
+
+addProperty(module, 'PluginManager', './src/PluginManager');
+
+addProperty(module, 'ConfigChanges', './src/ConfigChanges/ConfigChanges');
+addProperty(module, 'ConfigKeeper', './src/ConfigChanges/ConfigKeeper');
+addProperty(module, 'ConfigFile', './src/ConfigChanges/ConfigFile');
+addProperty(module, 'mungeUtil', './src/ConfigChanges/munge-util');
+
+addProperty(module, 'xmlHelpers', './src/util/xml-helpers');
+
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/cordova-common/package.json
----------------------------------------------------------------------
diff --git a/node_modules/cordova-common/package.json b/node_modules/cordova-common/package.json
index 73ef986..5b868ba 100644
--- a/node_modules/cordova-common/package.json
+++ b/node_modules/cordova-common/package.json
@@ -1,42 +1,42 @@
{
"_args": [
[
- "cordova-common@1.2.0",
- "d:\\cordova\\cordova-ios"
+ "cordova-common@^1.3.0",
+ "D:\\Cordova\\cordova-ios"
]
],
- "_from": "cordova-common@1.2.0",
- "_id": "cordova-common@1.2.0",
+ "_from": "cordova-common@>=1.3.0 <2.0.0",
+ "_id": "cordova-common@1.3.0",
"_inCache": true,
"_installable": true,
"_location": "/cordova-common",
- "_nodeVersion": "5.9.1",
+ "_nodeVersion": "5.4.1",
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/cordova-common-1.2.0.tgz_1461227352417_0.14771279646083713"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/cordova-common-1.3.0.tgz_1464130094288_0.48495062021538615"
},
"_npmUser": {
- "email": "kotikov.vladimir@gmail.com",
- "name": "kotikov.vladimir"
+ "email": "stevengill97@gmail.com",
+ "name": "stevegill"
},
- "_npmVersion": "3.8.5",
+ "_npmVersion": "3.9.0",
"_phantomChildren": {},
"_requested": {
"name": "cordova-common",
- "raw": "cordova-common@1.2.0",
- "rawSpec": "1.2.0",
+ "raw": "cordova-common@^1.3.0",
+ "rawSpec": "^1.3.0",
"scope": null,
- "spec": "1.2.0",
- "type": "version"
+ "spec": ">=1.3.0 <2.0.0",
+ "type": "range"
},
"_requiredBy": [
"/"
],
- "_resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-1.2.0.tgz",
- "_shasum": "474b7f77c6c89d3f995c947d96046edf2e8c404d",
+ "_resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-1.3.0.tgz",
+ "_shasum": "f75161f6aa7cef5486fd5d69a3b0a1f628334491",
"_shrinkwrap": null,
- "_spec": "cordova-common@1.2.0",
- "_where": "d:\\cordova\\cordova-ios",
+ "_spec": "cordova-common@^1.3.0",
+ "_where": "D:\\Cordova\\cordova-ios",
"author": {
"name": "Apache Software Foundation"
},
@@ -51,6 +51,7 @@
"cordova-registry-mapper": "^1.1.8",
"elementtree": "^0.1.6",
"glob": "^5.0.13",
+ "minimatch": "^3.0.0",
"osenv": "^0.1.3",
"plist": "^1.2.0",
"q": "^1.4.1",
@@ -69,8 +70,8 @@
},
"directories": {},
"dist": {
- "shasum": "474b7f77c6c89d3f995c947d96046edf2e8c404d",
- "tarball": "https://registry.npmjs.org/cordova-common/-/cordova-common-1.2.0.tgz"
+ "shasum": "f75161f6aa7cef5486fd5d69a3b0a1f628334491",
+ "tarball": "https://registry.npmjs.org/cordova-common/-/cordova-common-1.3.0.tgz"
},
"engineStrict": true,
"engines": {
@@ -117,5 +118,5 @@
"jshint": "node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint spec",
"test": "npm run jshint && npm run jasmine"
},
- "version": "1.2.0"
+ "version": "1.3.0"
}
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js
----------------------------------------------------------------------
diff --git a/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js b/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js
index dd9ebbc..9c540b9 100644
--- a/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js
+++ b/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js
@@ -17,13 +17,17 @@
var fs = require('fs');
var path = require('path');
-var bplist = require('bplist-parser');
-var et = require('elementtree');
-var glob = require('glob');
-var plist = require('plist');
-
-var plist_helpers = require('../util/plist-helpers');
-var xml_helpers = require('../util/xml-helpers');
+var modules = {};
+var addProperty = require('../util/addProperty');
+
+// Use delay loading to ensure plist and other node modules to not get loaded
+// on Android, Windows platforms
+addProperty(module, 'bplist', 'bplist-parser', modules);
+addProperty(module, 'et', 'elementtree', modules);
+addProperty(module, 'glob', 'glob', modules);
+addProperty(module, 'plist', 'plist', modules);
+addProperty(module, 'plist_helpers', '../util/plist-helpers', modules);
+addProperty(module, 'xml_helpers', '../util/xml-helpers', modules);
/******************************************************************************
* ConfigFile class
@@ -67,7 +71,7 @@ function ConfigFile_load() {
// the same in a future release
if (ext == '.xml' || ext == '.appxmanifest') {
self.type = 'xml';
- self.data = xml_helpers.parseElementtreeSync(filepath);
+ self.data = modules.xml_helpers.parseElementtreeSync(filepath);
} else {
// plist file
self.type = 'plist';
@@ -76,8 +80,8 @@ function ConfigFile_load() {
// Do we still need to support binary plist?
// If yes, use plist.parseStringSync() and read the file once.
self.data = isBinaryPlist(filepath) ?
- bplist.parseBuffer(fs.readFileSync(filepath)) :
- plist.parse(fs.readFileSync(filepath, 'utf8'));
+ modules.bplist.parseBuffer(fs.readFileSync(filepath)) :
+ modules.plist.parse(fs.readFileSync(filepath, 'utf8'));
}
}
@@ -88,7 +92,7 @@ ConfigFile.prototype.save = function ConfigFile_save() {
} else {
// plist
var regExp = new RegExp('<string>[ \t\r\n]+?</string>', 'g');
- fs.writeFileSync(self.filepath, plist.build(self.data).replace(regExp, '<string></string>'));
+ fs.writeFileSync(self.filepath, modules.plist.build(self.data).replace(regExp, '<string></string>'));
}
self.is_changed = false;
};
@@ -98,16 +102,16 @@ ConfigFile.prototype.graft_child = function ConfigFile_graft_child(selector, xml
var filepath = self.filepath;
var result;
if (self.type === 'xml') {
- var xml_to_graft = [et.XML(xml_child.xml)];
- result = xml_helpers.graftXML(self.data, xml_to_graft, selector, xml_child.after);
+ var xml_to_graft = [modules.et.XML(xml_child.xml)];
+ result = modules.xml_helpers.graftXML(self.data, xml_to_graft, selector, xml_child.after);
if ( !result) {
- throw new Error('grafting xml at selector "' + selector + '" from "' + filepath + '" during config install went bad :(');
+ throw new Error('Unable to graft xml at selector "' + selector + '" from "' + filepath + '" during config install');
}
} else {
// plist file
- result = plist_helpers.graftPLIST(self.data, xml_child.xml, selector);
+ result = modules.plist_helpers.graftPLIST(self.data, xml_child.xml, selector);
if ( !result ) {
- throw new Error('grafting to plist "' + filepath + '" during config install went bad :(');
+ throw new Error('Unable to graft plist "' + filepath + '" during config install');
}
}
self.is_changed = true;
@@ -118,11 +122,11 @@ ConfigFile.prototype.prune_child = function ConfigFile_prune_child(selector, xml
var filepath = self.filepath;
var result;
if (self.type === 'xml') {
- var xml_to_graft = [et.XML(xml_child.xml)];
- result = xml_helpers.pruneXML(self.data, xml_to_graft, selector);
+ var xml_to_graft = [modules.et.XML(xml_child.xml)];
+ result = modules.xml_helpers.pruneXML(self.data, xml_to_graft, selector);
} else {
// plist file
- result = plist_helpers.prunePLIST(self.data, xml_child.xml, selector);
+ result = modules.plist_helpers.prunePLIST(self.data, xml_child.xml, selector);
}
if (!result) {
var err_msg = 'Pruning at selector "' + selector + '" from "' + filepath + '" went bad.';
@@ -140,7 +144,7 @@ function resolveConfigFilePath(project_dir, platform, file) {
if (file.indexOf('*') > -1) {
// handle wildcards in targets using glob.
- matches = glob.sync(path.join(project_dir, '**', file));
+ matches = modules.glob.sync(path.join(project_dir, '**', file));
if (matches.length) filepath = matches[0];
// [CB-5989] multiple Info.plist files may exist. default to $PROJECT_NAME-Info.plist
@@ -167,7 +171,7 @@ function resolveConfigFilePath(project_dir, platform, file) {
} else if (platform == 'android') {
filepath = path.join(project_dir, 'res', 'xml', 'config.xml');
} else {
- matches = glob.sync(path.join(project_dir, '**', 'config.xml'));
+ matches = modules.glob.sync(path.join(project_dir, '**', 'config.xml'));
if (matches.length) filepath = matches[0];
}
return filepath;
@@ -180,7 +184,7 @@ function resolveConfigFilePath(project_dir, platform, file) {
// Find out the real name of an iOS project
// TODO: glob is slow, need a better way or caching, or avoid using more than once.
function getIOSProjectname(project_dir) {
- var matches = glob.sync(path.join(project_dir, '*.xcodeproj'));
+ var matches = modules.glob.sync(path.join(project_dir, '*.xcodeproj'));
var iospath;
if (matches.length === 1) {
iospath = path.basename(matches[0],'.xcodeproj');
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/cordova-common/src/CordovaLogger.js
----------------------------------------------------------------------
diff --git a/node_modules/cordova-common/src/CordovaLogger.js b/node_modules/cordova-common/src/CordovaLogger.js
index 852d298..71bc7e8 100644
--- a/node_modules/cordova-common/src/CordovaLogger.js
+++ b/node_modules/cordova-common/src/CordovaLogger.js
@@ -89,7 +89,7 @@ CordovaLogger.prototype.log = function (logLevel, message) {
var isVerbose = this.logLevel === 'verbose';
var cursor = this.stdoutCursor;
- if(message instanceof Error || logLevel === CordovaLogger.ERROR) {
+ if (message instanceof Error || logLevel === CordovaLogger.ERROR) {
message = formatError(message, isVerbose);
cursor = this.stderrCursor;
}
@@ -196,10 +196,10 @@ CordovaLogger.prototype.subscribe = function (eventEmitter) {
function formatError(error, isVerbose) {
var message = '';
- if(error instanceof CordovaError) {
+ if (error instanceof CordovaError) {
message = error.toString(isVerbose);
- } else if(error instanceof Error) {
- if(isVerbose) {
+ } else if (error instanceof Error) {
+ if (isVerbose) {
message = error.stack;
} else {
message = error.message;
@@ -209,7 +209,7 @@ function formatError(error, isVerbose) {
message = error;
}
- if(message.toUpperCase().indexOf('ERROR:') !== 0) {
+ if (typeof message === 'string' && message.toUpperCase().indexOf('ERROR:') !== 0) {
// Needed for backward compatibility with external tools
message = 'Error: ' + message;
}
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/cordova-common/src/FileUpdater.js
----------------------------------------------------------------------
diff --git a/node_modules/cordova-common/src/FileUpdater.js b/node_modules/cordova-common/src/FileUpdater.js
new file mode 100644
index 0000000..a09f39c
--- /dev/null
+++ b/node_modules/cordova-common/src/FileUpdater.js
@@ -0,0 +1,422 @@
+/**
+ 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.
+*/
+
+"use strict";
+
+var fs = require("fs");
+var path = require("path");
+var shell = require("shelljs");
+var minimatch = require("minimatch");
+
+/**
+ * Logging callback used in the FileUpdater methods.
+ * @callback loggingCallback
+ * @param {string} message A message describing a single file update operation.
+ */
+
+/**
+ * Updates a target file or directory with a source file or directory. (Directory updates are
+ * not recursive.) Stats for target and source items must be passed in. This is an internal
+ * helper function used by other methods in this module.
+ *
+ * @param {?string} sourcePath Source file or directory to be used to update the
+ * destination. If the source is null, then the destination is deleted if it exists.
+ * @param {?fs.Stats} sourceStats An instance of fs.Stats for the source path, or null if
+ * the source does not exist.
+ * @param {string} targetPath Required destination file or directory to be updated. If it does
+ * not exist, it will be created.
+ * @param {?fs.Stats} targetStats An instance of fs.Stats for the target path, or null if
+ * the target does not exist.
+ * @param {Object} [options] Optional additional parameters for the update.
+ * @param {string} [options.rootDir] Optional root directory (such as a project) to which target
+ * and source path parameters are relative; may be omitted if the paths are absolute. The
+ * rootDir is always omitted from any logged paths, to make the logs easier to read.
+ * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times.
+ * Otherwise, a file is copied if the source's last-modified time is greather than or
+ * equal to the target's last-modified time, or if the file sizes are different.
+ * @param {loggingCallback} [log] Optional logging callback that takes a string message
+ * describing any file operations that are performed.
+ * @return {boolean} true if any changes were made, or false if the force flag is not set
+ * and everything was up to date
+ */
+function updatePathWithStats(sourcePath, sourceStats, targetPath, targetStats, options, log) {
+ var updated = false;
+
+ var rootDir = (options && options.rootDir) || "";
+ var copyAll = (options && options.all) || false;
+
+ var targetFullPath = path.join(rootDir || "", targetPath);
+
+ if (sourceStats) {
+ var sourceFullPath = path.join(rootDir || "", sourcePath);
+
+ if (targetStats) {
+ // The target exists. But if the directory status doesn't match the source, delete it.
+ if (targetStats.isDirectory() && !sourceStats.isDirectory()) {
+ log("rmdir " + targetPath + " (source is a file)");
+ shell.rm("-rf", targetFullPath);
+ targetStats = null;
+ updated = true;
+ } else if (!targetStats.isDirectory() && sourceStats.isDirectory()) {
+ log("delete " + targetPath + " (source is a directory)");
+ shell.rm("-f", targetFullPath);
+ targetStats = null;
+ updated = true;
+ }
+ }
+
+ if (!targetStats) {
+ if (sourceStats.isDirectory()) {
+ // The target directory does not exist, so it should be created.
+ log("mkdir " + targetPath);
+ shell.mkdir("-p", targetFullPath);
+ updated = true;
+ } else if (sourceStats.isFile()) {
+ // The target file does not exist, so it should be copied from the source.
+ log("copy " + sourcePath + " " + targetPath + (copyAll ? "" : " (new file)"));
+ shell.cp("-f", sourceFullPath, targetFullPath);
+ updated = true;
+ }
+ } else if (sourceStats.isFile() && targetStats.isFile()) {
+ // The source and target paths both exist and are files.
+ if (copyAll) {
+ // The caller specified all files should be copied.
+ log("copy " + sourcePath + " " + targetPath);
+ shell.cp("-f", sourceFullPath, targetFullPath);
+ updated = true;
+ } else {
+ // Copy if the source has been modified since it was copied to the target, or if
+ // the file sizes are different. (The latter catches most cases in which something
+ // was done to the file after copying.) Comparison is >= rather than > to allow
+ // for timestamps lacking sub-second precision in some filesystems.
+ if (sourceStats.mtime.getTime() >= targetStats.mtime.getTime() ||
+ sourceStats.size !== targetStats.size) {
+ log("copy " + sourcePath + " " + targetPath + " (updated file)");
+ shell.cp("-f", sourceFullPath, targetFullPath);
+ updated = true;
+ }
+ }
+ }
+ } else if (targetStats) {
+ // The target exists but the source is null, so the target should be deleted.
+ if (targetStats.isDirectory()) {
+ log("rmdir " + targetPath + (copyAll ? "" : " (no source)"));
+ shell.rm("-rf", targetFullPath);
+ } else {
+ log("delete " + targetPath + (copyAll ? "" : " (no source)"));
+ shell.rm("-f", targetFullPath);
+ }
+ updated = true;
+ }
+
+ return updated;
+}
+
+/**
+ * Helper for updatePath and updatePaths functions. Queries stats for source and target
+ * and ensures target directory exists before copying a file.
+ */
+function updatePathInternal(sourcePath, targetPath, options, log) {
+ var rootDir = (options && options.rootDir) || "";
+ var targetFullPath = path.join(rootDir, targetPath);
+ var targetStats = fs.existsSync(targetFullPath) ? fs.statSync(targetFullPath) : null;
+ var sourceStats = null;
+
+ if (sourcePath) {
+ // A non-null source path was specified. It should exist.
+ var sourceFullPath = path.join(rootDir, sourcePath);
+ if (!fs.existsSync(sourceFullPath)) {
+ throw new Error("Source path does not exist: " + sourcePath);
+ }
+
+ sourceStats = fs.statSync(sourceFullPath);
+
+ // Create the target's parent directory if it doesn't exist.
+ var parentDir = path.dirname(targetFullPath);
+ if (!fs.existsSync(parentDir)) {
+ shell.mkdir("-p", parentDir);
+ }
+ }
+
+ return updatePathWithStats(sourcePath, sourceStats, targetPath, targetStats, options, log);
+}
+
+/**
+ * Updates a target file or directory with a source file or directory. (Directory updates are
+ * not recursive.)
+ *
+ * @param {?string} sourcePath Source file or directory to be used to update the
+ * destination. If the source is null, then the destination is deleted if it exists.
+ * @param {string} targetPath Required destination file or directory to be updated. If it does
+ * not exist, it will be created.
+ * @param {Object} [options] Optional additional parameters for the update.
+ * @param {string} [options.rootDir] Optional root directory (such as a project) to which target
+ * and source path parameters are relative; may be omitted if the paths are absolute. The
+ * rootDir is always omitted from any logged paths, to make the logs easier to read.
+ * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times.
+ * Otherwise, a file is copied if the source's last-modified time is greather than or
+ * equal to the target's last-modified time, or if the file sizes are different.
+ * @param {loggingCallback} [log] Optional logging callback that takes a string message
+ * describing any file operations that are performed.
+ * @return {boolean} true if any changes were made, or false if the force flag is not set
+ * and everything was up to date
+ */
+function updatePath(sourcePath, targetPath, options, log) {
+ if (sourcePath !== null && typeof sourcePath !== "string") {
+ throw new Error("A source path (or null) is required.");
+ }
+
+ if (!targetPath || typeof targetPath !== "string") {
+ throw new Error("A target path is required.");
+ }
+
+ log = log || function(message) { };
+
+ return updatePathInternal(sourcePath, targetPath, options, log);
+}
+
+/**
+ * Updates files and directories based on a mapping from target paths to source paths. Targets
+ * with null sources in the map are deleted.
+ *
+ * @param {Object} pathMap A dictionary mapping from target paths to source paths.
+ * @param {Object} [options] Optional additional parameters for the update.
+ * @param {string} [options.rootDir] Optional root directory (such as a project) to which target
+ * and source path parameters are relative; may be omitted if the paths are absolute. The
+ * rootDir is always omitted from any logged paths, to make the logs easier to read.
+ * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times.
+ * Otherwise, a file is copied if the source's last-modified time is greather than or
+ * equal to the target's last-modified time, or if the file sizes are different.
+ * @param {loggingCallback} [log] Optional logging callback that takes a string message
+ * describing any file operations that are performed.
+ * @return {boolean} true if any changes were made, or false if the force flag is not set
+ * and everything was up to date
+ */
+function updatePaths(pathMap, options, log) {
+ if (!pathMap || typeof pathMap !== "object" || Array.isArray(pathMap)) {
+ throw new Error("An object mapping from target paths to source paths is required.");
+ }
+
+ log = log || function(message) { };
+
+ var updated = false;
+
+ // Iterate in sorted order to ensure directories are created before files under them.
+ Object.keys(pathMap).sort().forEach(function (targetPath) {
+ var sourcePath = pathMap[targetPath];
+ updated = updatePathInternal(sourcePath, targetPath, options, log) || updated;
+ });
+
+ return updated;
+}
+
+/**
+ * Updates a target directory with merged files and subdirectories from source directories.
+ *
+ * @param {string|string[]} sourceDirs Required source directory or array of source directories
+ * to be merged into the target. The directories are listed in order of precedence; files in
+ * directories later in the array supersede files in directories earlier in the array
+ * (regardless of timestamps).
+ * @param {string} targetDir Required destination directory to be updated. If it does not exist,
+ * it will be created. If it exists, newer files from source directories will be copied over,
+ * and files missing in the source directories will be deleted.
+ * @param {Object} [options] Optional additional parameters for the update.
+ * @param {string} [options.rootDir] Optional root directory (such as a project) to which target
+ * and source path parameters are relative; may be omitted if the paths are absolute. The
+ * rootDir is always omitted from any logged paths, to make the logs easier to read.
+ * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times.
+ * Otherwise, a file is copied if the source's last-modified time is greather than or
+ * equal to the target's last-modified time, or if the file sizes are different.
+ * @param {string|string[]} [options.include] Optional glob string or array of glob strings that
+ * are tested against both target and source relative paths to determine if they are included
+ * in the merge-and-update. If unspecified, all items are included.
+ * @param {string|string[]} [options.exclude] Optional glob string or array of glob strings that
+ * are tested against both target and source relative paths to determine if they are excluded
+ * from the merge-and-update. Exclusions override inclusions. If unspecified, no items are
+ * excluded.
+ * @param {loggingCallback} [log] Optional logging callback that takes a string message
+ * describing any file operations that are performed.
+ * @return {boolean} true if any changes were made, or false if the force flag is not set
+ * and everything was up to date
+ */
+function mergeAndUpdateDir(sourceDirs, targetDir, options, log) {
+ if (sourceDirs && typeof sourceDirs === "string") {
+ sourceDirs = [ sourceDirs ];
+ } else if (!Array.isArray(sourceDirs)) {
+ throw new Error("A source directory path or array of paths is required.");
+ }
+
+ if (!targetDir || typeof targetDir !== "string") {
+ throw new Error("A target directory path is required.");
+ }
+
+ log = log || function(message) { };
+
+ var rootDir = (options && options.rootDir) || "";
+
+ var include = (options && options.include) || [ "**" ];
+ if (typeof include === "string") {
+ include = [ include ];
+ } else if (!Array.isArray(include)) {
+ throw new Error("Include parameter must be a glob string or array of glob strings.");
+ }
+
+ var exclude = (options && options.exclude) || [];
+ if (typeof exclude === "string") {
+ exclude = [ exclude ];
+ } else if (!Array.isArray(exclude)) {
+ throw new Error("Exclude parameter must be a glob string or array of glob strings.");
+ }
+
+ // Scan the files in each of the source directories.
+ var sourceMaps = [];
+ for (var i in sourceDirs) {
+ var sourceFullPath = path.join(rootDir, sourceDirs[i]);
+ if (!fs.existsSync(sourceFullPath)) {
+ throw new Error("Source directory does not exist: " + sourceDirs[i]);
+ }
+ sourceMaps[i] = mapDirectory(rootDir, sourceDirs[i], include, exclude);
+ }
+
+ // Scan the files in the target directory, if it exists.
+ var targetMap = {};
+ var targetFullPath = path.join(rootDir, targetDir);
+ if (fs.existsSync(targetFullPath)) {
+ targetMap = mapDirectory(rootDir, targetDir, include, exclude);
+ }
+
+ var pathMap = mergePathMaps(sourceMaps, targetMap, targetDir);
+
+ var updated = false;
+
+ // Iterate in sorted order to ensure directories are created before files under them.
+ Object.keys(pathMap).sort().forEach(function (subPath) {
+ var entry = pathMap[subPath];
+ updated = updatePathWithStats(
+ entry.sourcePath,
+ entry.sourceStats,
+ entry.targetPath,
+ entry.targetStats,
+ options,
+ log) || updated;
+ });
+
+ return updated;
+}
+
+/**
+ * Creates a dictionary map of all files and directories under a path.
+ */
+function mapDirectory(rootDir, subDir, include, exclude) {
+ var dirMap = { "": { subDir: subDir, stats: fs.statSync(path.join(rootDir, subDir)) } };
+ mapSubdirectory(rootDir, subDir, "", include, exclude, dirMap);
+ return dirMap;
+
+ function mapSubdirectory(rootDir, subDir, relativeDir, include, exclude, dirMap) {
+ var itemMapped = false;
+ var items = fs.readdirSync(path.join(rootDir, subDir, relativeDir));
+ for (var i in items) {
+ var relativePath = path.join(relativeDir, items[i]);
+
+ // Skip any files or directories (and everything under) that match an exclude glob.
+ if (matchGlobArray(relativePath, exclude)) {
+ continue;
+ }
+
+ // Stats obtained here (required at least to know where to recurse in directories)
+ // are saved for later, where the modified times may also be used. This minimizes
+ // the number of file I/O operations performed.
+ var fullPath = path.join(rootDir, subDir, relativePath);
+ var stats = fs.statSync(fullPath);
+
+ if (stats.isDirectory()) {
+ // Directories are included if either something under them is included or they
+ // match an include glob.
+ if (mapSubdirectory(rootDir, subDir, relativePath, include, exclude, dirMap) ||
+ matchGlobArray(relativePath, include)) {
+ dirMap[relativePath] = { subDir: subDir, stats: stats };
+ itemMapped = true;
+ }
+ } else if (stats.isFile()) {
+ // Files are included only if they match an include glob.
+ if (matchGlobArray(relativePath, include)) {
+ dirMap[relativePath] = { subDir: subDir, stats: stats };
+ itemMapped = true;
+ }
+ }
+ }
+ return itemMapped;
+ }
+
+ function matchGlobArray(path, globs) {
+ for (var i in globs) {
+ if (minimatch(path, globs[i])) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
+
+/**
+ * Merges together multiple source maps and a target map into a single mapping from
+ * relative paths to objects with target and source paths and stats.
+ */
+function mergePathMaps(sourceMaps, targetMap, targetDir) {
+ // Merge multiple source maps together, along with target path info.
+ // Entries in later source maps override those in earlier source maps.
+ // Target stats will be filled in below for targets that exist.
+ var pathMap = {};
+ sourceMaps.forEach(function (sourceMap) {
+ for (var sourceSubPath in sourceMap) {
+ var sourceEntry = sourceMap[sourceSubPath];
+ pathMap[sourceSubPath] = {
+ targetPath: path.join(targetDir, sourceSubPath),
+ targetStats: null,
+ sourcePath: path.join(sourceEntry.subDir, sourceSubPath),
+ sourceStats: sourceEntry.stats
+ };
+ }
+ });
+
+ // Fill in target stats for targets that exist, and create entries
+ // for targets that don't have any corresponding sources.
+ for (var subPath in targetMap) {
+ var entry = pathMap[subPath];
+ if (entry) {
+ entry.targetStats = targetMap[subPath].stats;
+ } else {
+ pathMap[subPath] = {
+ targetPath: path.join(targetDir, subPath),
+ targetStats: targetMap[subPath].stats,
+ sourcePath: null,
+ sourceStats: null
+ };
+ }
+ }
+
+ return pathMap;
+}
+
+module.exports = {
+ updatePath: updatePath,
+ updatePaths: updatePaths,
+ mergeAndUpdateDir: mergeAndUpdateDir
+};
+
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/cordova-common/src/PluginInfo/PluginInfo.js
----------------------------------------------------------------------
diff --git a/node_modules/cordova-common/src/PluginInfo/PluginInfo.js b/node_modules/cordova-common/src/PluginInfo/PluginInfo.js
index e1a1b31..77199ec 100644
--- a/node_modules/cordova-common/src/PluginInfo/PluginInfo.js
+++ b/node_modules/cordova-common/src/PluginInfo/PluginInfo.js
@@ -331,7 +331,7 @@ function PluginInfo(dirname) {
///// PluginInfo Constructor logic /////
self.filepath = path.join(dirname, 'plugin.xml');
if (!fs.existsSync(self.filepath)) {
- throw new CordovaError('Cannot find plugin.xml for plugin \'' + path.basename(dirname) + '\'. Please try adding it again.');
+ throw new CordovaError('Cannot find plugin.xml for plugin "' + path.basename(dirname) + '". Please try adding it again.');
}
self.dir = dirname;
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3d3a746c/node_modules/cordova-common/src/events.js
----------------------------------------------------------------------
diff --git a/node_modules/cordova-common/src/events.js b/node_modules/cordova-common/src/events.js
index 8751976..e702bd8 100644
--- a/node_modules/cordova-common/src/events.js
+++ b/node_modules/cordova-common/src/events.js
@@ -40,7 +40,7 @@ module.exports.forwardEventsTo = function (eventEmitter) {
}
if (!(eventEmitter instanceof EventEmitter))
- throw new Error('Cordova events could be redirected to another EventEmitter instance only');
+ throw new Error('Cordova events can be redirected to another EventEmitter instance only');
// CB-10940 Skipping forwarding to self to avoid infinite recursion.
// This is the case when the modules are npm-linked.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org