cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [13/15] ios commit: Update bundled ios-sim to 6.0.0
Date Mon, 19 Jun 2017 00:27:59 GMT
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/cp.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/cp.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/cp.js
deleted file mode 100644
index a1bc529..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/cp.js
+++ /dev/null
@@ -1,200 +0,0 @@
-var fs = require('fs');
-var path = require('path');
-var common = require('./common');
-
-// Buffered file copy, synchronous
-// (Using readFileSync() + writeFileSync() could easily cause a memory overflow
-//  with large files)
-function copyFileSync(srcFile, destFile) {
-  if (!fs.existsSync(srcFile))
-    common.error('copyFileSync: no such file or directory: ' + srcFile);
-
-  var BUF_LENGTH = 64*1024,
-      buf = new Buffer(BUF_LENGTH),
-      bytesRead = BUF_LENGTH,
-      pos = 0,
-      fdr = null,
-      fdw = null;
-
-  try {
-    fdr = fs.openSync(srcFile, 'r');
-  } catch(e) {
-    common.error('copyFileSync: could not read src file ('+srcFile+')');
-  }
-
-  try {
-    fdw = fs.openSync(destFile, 'w');
-  } catch(e) {
-    common.error('copyFileSync: could not write to dest file (code='+e.code+'):'+destFile);
-  }
-
-  while (bytesRead === BUF_LENGTH) {
-    bytesRead = fs.readSync(fdr, buf, 0, BUF_LENGTH, pos);
-    fs.writeSync(fdw, buf, 0, bytesRead);
-    pos += bytesRead;
-  }
-
-  fs.closeSync(fdr);
-  fs.closeSync(fdw);
-
-  fs.chmodSync(destFile, fs.statSync(srcFile).mode);
-}
-
-// Recursively copies 'sourceDir' into 'destDir'
-// Adapted from https://github.com/ryanmcgrath/wrench-js
-//
-// Copyright (c) 2010 Ryan McGrath
-// Copyright (c) 2012 Artur Adib
-//
-// Licensed under the MIT License
-// http://www.opensource.org/licenses/mit-license.php
-function cpdirSyncRecursive(sourceDir, destDir, opts) {
-  if (!opts) opts = {};
-
-  /* Create the directory where all our junk is moving to; read the mode of the source directory and mirror it */
-  var checkDir = fs.statSync(sourceDir);
-  try {
-    fs.mkdirSync(destDir, checkDir.mode);
-  } catch (e) {
-    //if the directory already exists, that's okay
-    if (e.code !== 'EEXIST') throw e;
-  }
-
-  var files = fs.readdirSync(sourceDir);
-
-  for (var i = 0; i < files.length; i++) {
-    var srcFile = sourceDir + "/" + files[i];
-    var destFile = destDir + "/" + files[i];
-    var srcFileStat = fs.lstatSync(srcFile);
-
-    if (srcFileStat.isDirectory()) {
-      /* recursion this thing right on back. */
-      cpdirSyncRecursive(srcFile, destFile, opts);
-    } else if (srcFileStat.isSymbolicLink()) {
-      var symlinkFull = fs.readlinkSync(srcFile);
-      fs.symlinkSync(symlinkFull, destFile);
-    } else {
-      /* At this point, we've hit a file actually worth copying... so copy it on over. */
-      if (fs.existsSync(destFile) && !opts.force) {
-        common.log('skipping existing file: ' + files[i]);
-      } else {
-        copyFileSync(srcFile, destFile);
-      }
-    }
-
-  } // for files
-} // cpdirSyncRecursive
-
-
-//@
-//@ ### cp([options ,] source [,source ...], dest)
-//@ ### cp([options ,] source_array, dest)
-//@ Available options:
-//@
-//@ + `-f`: force
-//@ + `-r, -R`: recursive
-//@
-//@ Examples:
-//@
-//@ ```javascript
-//@ cp('file1', 'dir1');
-//@ cp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp');
-//@ cp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above
-//@ ```
-//@
-//@ Copies files. The wildcard `*` is accepted.
-function _cp(options, sources, dest) {
-  options = common.parseOptions(options, {
-    'f': 'force',
-    'R': 'recursive',
-    'r': 'recursive'
-  });
-
-  // Get sources, dest
-  if (arguments.length < 3) {
-    common.error('missing <source> and/or <dest>');
-  } else if (arguments.length > 3) {
-    sources = [].slice.call(arguments, 1, arguments.length - 1);
-    dest = arguments[arguments.length - 1];
-  } else if (typeof sources === 'string') {
-    sources = [sources];
-  } else if ('length' in sources) {
-    sources = sources; // no-op for array
-  } else {
-    common.error('invalid arguments');
-  }
-
-  var exists = fs.existsSync(dest),
-      stats = exists && fs.statSync(dest);
-
-  // Dest is not existing dir, but multiple sources given
-  if ((!exists || !stats.isDirectory()) && sources.length > 1)
-    common.error('dest is not a directory (too many sources)');
-
-  // Dest is an existing file, but no -f given
-  if (exists && stats.isFile() && !options.force)
-    common.error('dest file already exists: ' + dest);
-
-  if (options.recursive) {
-    // Recursive allows the shortcut syntax "sourcedir/" for "sourcedir/*"
-    // (see Github issue #15)
-    sources.forEach(function(src, i) {
-      if (src[src.length - 1] === '/')
-        sources[i] += '*';
-    });
-
-    // Create dest
-    try {
-      fs.mkdirSync(dest, parseInt('0777', 8));
-    } catch (e) {
-      // like Unix's cp, keep going even if we can't create dest dir
-    }
-  }
-
-  sources = common.expand(sources);
-
-  sources.forEach(function(src) {
-    if (!fs.existsSync(src)) {
-      common.error('no such file or directory: '+src, true);
-      return; // skip file
-    }
-
-    // If here, src exists
-    if (fs.statSync(src).isDirectory()) {
-      if (!options.recursive) {
-        // Non-Recursive
-        common.log(src + ' is a directory (not copied)');
-      } else {
-        // Recursive
-        // 'cp /a/source dest' should create 'source' in 'dest'
-        var newDest = path.join(dest, path.basename(src)),
-            checkDir = fs.statSync(src);
-        try {
-          fs.mkdirSync(newDest, checkDir.mode);
-        } catch (e) {
-          //if the directory already exists, that's okay
-          if (e.code !== 'EEXIST') throw e;
-        }
-
-        cpdirSyncRecursive(src, newDest, {force: options.force});
-      }
-      return; // done with dir
-    }
-
-    // If here, src is a file
-
-    // When copying to '/path/dir':
-    //    thisDest = '/path/dir/file1'
-    var thisDest = dest;
-    if (fs.existsSync(dest) && fs.statSync(dest).isDirectory())
-      thisDest = path.normalize(dest + '/' + path.basename(src));
-
-    if (fs.existsSync(thisDest) && !options.force) {
-      common.error('dest file already exists: ' + thisDest, true);
-      return; // skip file
-    }
-
-    copyFileSync(src, thisDest);
-  }); // forEach(src)
-}
-module.exports = _cp;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/dirs.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/dirs.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/dirs.js
deleted file mode 100644
index 58fae8b..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/dirs.js
+++ /dev/null
@@ -1,191 +0,0 @@
-var common = require('./common');
-var _cd = require('./cd');
-var path = require('path');
-
-// Pushd/popd/dirs internals
-var _dirStack = [];
-
-function _isStackIndex(index) {
-  return (/^[\-+]\d+$/).test(index);
-}
-
-function _parseStackIndex(index) {
-  if (_isStackIndex(index)) {
-    if (Math.abs(index) < _dirStack.length + 1) { // +1 for pwd
-      return (/^-/).test(index) ? Number(index) - 1 : Number(index);
-    } else {
-      common.error(index + ': directory stack index out of range');
-    }
-  } else {
-    common.error(index + ': invalid number');
-  }
-}
-
-function _actualDirStack() {
-  return [process.cwd()].concat(_dirStack);
-}
-
-//@
-//@ ### pushd([options,] [dir | '-N' | '+N'])
-//@
-//@ Available options:
-//@
-//@ + `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated.
-//@
-//@ Arguments:
-//@
-//@ + `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`.
-//@ + `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.
-//@ + `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.
-//@
-//@ Examples:
-//@
-//@ ```javascript
-//@ // process.cwd() === '/usr'
-//@ pushd('/etc'); // Returns /etc /usr
-//@ pushd('+1');   // Returns /usr /etc
-//@ ```
-//@
-//@ Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack.
-function _pushd(options, dir) {
-  if (_isStackIndex(options)) {
-    dir = options;
-    options = '';
-  }
-
-  options = common.parseOptions(options, {
-    'n' : 'no-cd'
-  });
-
-  var dirs = _actualDirStack();
-
-  if (dir === '+0') {
-    return dirs; // +0 is a noop
-  } else if (!dir) {
-    if (dirs.length > 1) {
-      dirs = dirs.splice(1, 1).concat(dirs);
-    } else {
-      return common.error('no other directory');
-    }
-  } else if (_isStackIndex(dir)) {
-    var n = _parseStackIndex(dir);
-    dirs = dirs.slice(n).concat(dirs.slice(0, n));
-  } else {
-    if (options['no-cd']) {
-      dirs.splice(1, 0, dir);
-    } else {
-      dirs.unshift(dir);
-    }
-  }
-
-  if (options['no-cd']) {
-    dirs = dirs.slice(1);
-  } else {
-    dir = path.resolve(dirs.shift());
-    _cd('', dir);
-  }
-
-  _dirStack = dirs;
-  return _dirs('');
-}
-exports.pushd = _pushd;
-
-//@
-//@ ### popd([options,] ['-N' | '+N'])
-//@
-//@ Available options:
-//@
-//@ + `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated.
-//@
-//@ Arguments:
-//@
-//@ + `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero.
-//@ + `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero.
-//@
-//@ Examples:
-//@
-//@ ```javascript
-//@ echo(process.cwd()); // '/usr'
-//@ pushd('/etc');       // '/etc /usr'
-//@ echo(process.cwd()); // '/etc'
-//@ popd();              // '/usr'
-//@ echo(process.cwd()); // '/usr'
-//@ ```
-//@
-//@ When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack.
-function _popd(options, index) {
-  if (_isStackIndex(options)) {
-    index = options;
-    options = '';
-  }
-
-  options = common.parseOptions(options, {
-    'n' : 'no-cd'
-  });
-
-  if (!_dirStack.length) {
-    return common.error('directory stack empty');
-  }
-
-  index = _parseStackIndex(index || '+0');
-
-  if (options['no-cd'] || index > 0 || _dirStack.length + index === 0) {
-    index = index > 0 ? index - 1 : index;
-    _dirStack.splice(index, 1);
-  } else {
-    var dir = path.resolve(_dirStack.shift());
-    _cd('', dir);
-  }
-
-  return _dirs('');
-}
-exports.popd = _popd;
-
-//@
-//@ ### dirs([options | '+N' | '-N'])
-//@
-//@ Available options:
-//@
-//@ + `-c`: Clears the directory stack by deleting all of the elements.
-//@
-//@ Arguments:
-//@
-//@ + `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero.
-//@ + `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero.
-//@
-//@ Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified.
-//@
-//@ See also: pushd, popd
-function _dirs(options, index) {
-  if (_isStackIndex(options)) {
-    index = options;
-    options = '';
-  }
-
-  options = common.parseOptions(options, {
-    'c' : 'clear'
-  });
-
-  if (options['clear']) {
-    _dirStack = [];
-    return _dirStack;
-  }
-
-  var stack = _actualDirStack();
-
-  if (index) {
-    index = _parseStackIndex(index);
-
-    if (index < 0) {
-      index = stack.length + index;
-    }
-
-    common.log(stack[index]);
-    return stack[index];
-  }
-
-  common.log(stack.join(' '));
-
-  return stack;
-}
-exports.dirs = _dirs;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/echo.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/echo.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/echo.js
deleted file mode 100644
index 760ea84..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/echo.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var common = require('./common');
-
-//@
-//@ ### echo(string [,string ...])
-//@
-//@ Examples:
-//@
-//@ ```javascript
-//@ echo('hello world');
-//@ var str = echo('hello world');
-//@ ```
-//@
-//@ Prints string to stdout, and returns string with additional utility methods
-//@ like `.to()`.
-function _echo() {
-  var messages = [].slice.call(arguments, 0);
-  console.log.apply(this, messages);
-  return common.ShellString(messages.join(' '));
-}
-module.exports = _echo;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/error.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/error.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/error.js
deleted file mode 100644
index cca3efb..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/error.js
+++ /dev/null
@@ -1,10 +0,0 @@
-var common = require('./common');
-
-//@
-//@ ### error()
-//@ Tests if error occurred in the last command. Returns `null` if no error occurred,
-//@ otherwise returns string explaining the error
-function error() {
-  return common.state.error;
-};
-module.exports = error;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/exec.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/exec.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/exec.js
deleted file mode 100644
index 7ccdbc0..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/exec.js
+++ /dev/null
@@ -1,181 +0,0 @@
-var common = require('./common');
-var _tempDir = require('./tempdir');
-var _pwd = require('./pwd');
-var path = require('path');
-var fs = require('fs');
-var child = require('child_process');
-
-// Hack to run child_process.exec() synchronously (sync avoids callback hell)
-// Uses a custom wait loop that checks for a flag file, created when the child process is done.
-// (Can't do a wait loop that checks for internal Node variables/messages as
-// Node is single-threaded; callbacks and other internal state changes are done in the
-// event loop).
-function execSync(cmd, opts) {
-  var tempDir = _tempDir();
-  var stdoutFile = path.resolve(tempDir+'/'+common.randomFileName()),
-      codeFile = path.resolve(tempDir+'/'+common.randomFileName()),
-      scriptFile = path.resolve(tempDir+'/'+common.randomFileName()),
-      sleepFile = path.resolve(tempDir+'/'+common.randomFileName());
-
-  var options = common.extend({
-    silent: common.config.silent
-  }, opts);
-
-  var previousStdoutContent = '';
-  // Echoes stdout changes from running process, if not silent
-  function updateStdout() {
-    if (options.silent || !fs.existsSync(stdoutFile))
-      return;
-
-    var stdoutContent = fs.readFileSync(stdoutFile, 'utf8');
-    // No changes since last time?
-    if (stdoutContent.length <= previousStdoutContent.length)
-      return;
-
-    process.stdout.write(stdoutContent.substr(previousStdoutContent.length));
-    previousStdoutContent = stdoutContent;
-  }
-
-  function escape(str) {
-    return (str+'').replace(/([\\"'])/g, "\\$1").replace(/\0/g, "\\0");
-  }
-
-  cmd += ' > '+stdoutFile+' 2>&1'; // works on both win/unix
-
-  var script =
-   "var child = require('child_process')," +
-   "     fs = require('fs');" +
-   "child.exec('"+escape(cmd)+"', {env: process.env, maxBuffer: 20*1024*1024}, function(err) {" +
-   "  fs.writeFileSync('"+escape(codeFile)+"', err ? err.code.toString() : '0');" +
-   "});";
-
-  if (fs.existsSync(scriptFile)) common.unlinkSync(scriptFile);
-  if (fs.existsSync(stdoutFile)) common.unlinkSync(stdoutFile);
-  if (fs.existsSync(codeFile)) common.unlinkSync(codeFile);
-
-  fs.writeFileSync(scriptFile, script);
-  child.exec('"'+process.execPath+'" '+scriptFile, {
-    env: process.env,
-    cwd: _pwd(),
-    maxBuffer: 20*1024*1024
-  });
-
-  // The wait loop
-  // sleepFile is used as a dummy I/O op to mitigate unnecessary CPU usage
-  // (tried many I/O sync ops, writeFileSync() seems to be only one that is effective in reducing
-  // CPU usage, though apparently not so much on Windows)
-  while (!fs.existsSync(codeFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); }
-  while (!fs.existsSync(stdoutFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); }
-
-  // At this point codeFile exists, but it's not necessarily flushed yet.
-  // Keep reading it until it is.
-  var code = parseInt('', 10);
-  while (isNaN(code)) {
-    code = parseInt(fs.readFileSync(codeFile, 'utf8'), 10);
-  }
-
-  var stdout = fs.readFileSync(stdoutFile, 'utf8');
-
-  // No biggie if we can't erase the files now -- they're in a temp dir anyway
-  try { common.unlinkSync(scriptFile); } catch(e) {}
-  try { common.unlinkSync(stdoutFile); } catch(e) {}
-  try { common.unlinkSync(codeFile); } catch(e) {}
-  try { common.unlinkSync(sleepFile); } catch(e) {}
-
-  // some shell return codes are defined as errors, per http://tldp.org/LDP/abs/html/exitcodes.html
-  if (code === 1 || code === 2 || code >= 126)  {
-      common.error('', true); // unix/shell doesn't really give an error message after non-zero exit codes
-  }
-  // True if successful, false if not
-  var obj = {
-    code: code,
-    output: stdout
-  };
-  return obj;
-} // execSync()
-
-// Wrapper around exec() to enable echoing output to console in real time
-function execAsync(cmd, opts, callback) {
-  var output = '';
-
-  var options = common.extend({
-    silent: common.config.silent
-  }, opts);
-
-  var c = child.exec(cmd, {env: process.env, maxBuffer: 20*1024*1024}, function(err) {
-    if (callback)
-      callback(err ? err.code : 0, output);
-  });
-
-  c.stdout.on('data', function(data) {
-    output += data;
-    if (!options.silent)
-      process.stdout.write(data);
-  });
-
-  c.stderr.on('data', function(data) {
-    output += data;
-    if (!options.silent)
-      process.stdout.write(data);
-  });
-
-  return c;
-}
-
-//@
-//@ ### exec(command [, options] [, callback])
-//@ Available options (all `false` by default):
-//@
-//@ + `async`: Asynchronous execution. Defaults to true if a callback is provided.
-//@ + `silent`: Do not echo program output to console.
-//@
-//@ Examples:
-//@
-//@ ```javascript
-//@ var version = exec('node --version', {silent:true}).output;
-//@
-//@ var child = exec('some_long_running_process', {async:true});
-//@ child.stdout.on('data', function(data) {
-//@   /* ... do something with data ... */
-//@ });
-//@
-//@ exec('some_long_running_process', function(code, output) {
-//@   console.log('Exit code:', code);
-//@   console.log('Program output:', output);
-//@ });
-//@ ```
-//@
-//@ Executes the given `command` _synchronously_, unless otherwise specified.
-//@ When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's
-//@ `output` (stdout + stderr)  and its exit `code`. Otherwise returns the child process object, and
-//@ the `callback` gets the arguments `(code, output)`.
-//@
-//@ **Note:** For long-lived processes, it's best to run `exec()` asynchronously as
-//@ the current synchronous implementation uses a lot of CPU. This should be getting
-//@ fixed soon.
-function _exec(command, options, callback) {
-  if (!command)
-    common.error('must specify command');
-
-  // Callback is defined instead of options.
-  if (typeof options === 'function') {
-    callback = options;
-    options = { async: true };
-  }
-
-  // Callback is defined with options.
-  if (typeof options === 'object' && typeof callback === 'function') {
-    options.async = true;
-  }
-
-  options = common.extend({
-    silent: common.config.silent,
-    async: false
-  }, options);
-
-  if (options.async)
-    return execAsync(command, options, callback);
-  else
-    return execSync(command, options);
-}
-module.exports = _exec;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/find.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/find.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/find.js
deleted file mode 100644
index d9eeec2..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/find.js
+++ /dev/null
@@ -1,51 +0,0 @@
-var fs = require('fs');
-var common = require('./common');
-var _ls = require('./ls');
-
-//@
-//@ ### find(path [,path ...])
-//@ ### find(path_array)
-//@ Examples:
-//@
-//@ ```javascript
-//@ find('src', 'lib');
-//@ find(['src', 'lib']); // same as above
-//@ find('.').filter(function(file) { return file.match(/\.js$/); });
-//@ ```
-//@
-//@ Returns array of all files (however deep) in the given paths.
-//@
-//@ The main difference from `ls('-R', path)` is that the resulting file names
-//@ include the base directories, e.g. `lib/resources/file1` instead of just `file1`.
-function _find(options, paths) {
-  if (!paths)
-    common.error('no path specified');
-  else if (typeof paths === 'object')
-    paths = paths; // assume array
-  else if (typeof paths === 'string')
-    paths = [].slice.call(arguments, 1);
-
-  var list = [];
-
-  function pushFile(file) {
-    if (common.platform === 'win')
-      file = file.replace(/\\/g, '/');
-    list.push(file);
-  }
-
-  // why not simply do ls('-R', paths)? because the output wouldn't give the base dirs
-  // to get the base dir in the output, we need instead ls('-R', 'dir/*') for every directory
-
-  paths.forEach(function(file) {
-    pushFile(file);
-
-    if (fs.statSync(file).isDirectory()) {
-      _ls('-RA', file+'/*').forEach(function(subfile) {
-        pushFile(subfile);
-      });
-    }
-  });
-
-  return list;
-}
-module.exports = _find;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/grep.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/grep.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/grep.js
deleted file mode 100644
index 00c7d6a..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/grep.js
+++ /dev/null
@@ -1,52 +0,0 @@
-var common = require('./common');
-var fs = require('fs');
-
-//@
-//@ ### grep([options ,] regex_filter, file [, file ...])
-//@ ### grep([options ,] regex_filter, file_array)
-//@ Available options:
-//@
-//@ + `-v`: Inverse the sense of the regex and print the lines not matching the criteria.
-//@
-//@ Examples:
-//@
-//@ ```javascript
-//@ grep('-v', 'GLOBAL_VARIABLE', '*.js');
-//@ grep('GLOBAL_VARIABLE', '*.js');
-//@ ```
-//@
-//@ Reads input string from given files and returns a string containing all lines of the
-//@ file that match the given `regex_filter`. Wildcard `*` accepted.
-function _grep(options, regex, files) {
-  options = common.parseOptions(options, {
-    'v': 'inverse'
-  });
-
-  if (!files)
-    common.error('no paths given');
-
-  if (typeof files === 'string')
-    files = [].slice.call(arguments, 2);
-  // if it's array leave it as it is
-
-  files = common.expand(files);
-
-  var grep = '';
-  files.forEach(function(file) {
-    if (!fs.existsSync(file)) {
-      common.error('no such file or directory: ' + file, true);
-      return;
-    }
-
-    var contents = fs.readFileSync(file, 'utf8'),
-        lines = contents.split(/\r*\n/);
-    lines.forEach(function(line) {
-      var matched = line.match(regex);
-      if ((options.inverse && !matched) || (!options.inverse && matched))
-        grep += line + '\n';
-    });
-  });
-
-  return common.ShellString(grep);
-}
-module.exports = _grep;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/ls.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/ls.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/ls.js
deleted file mode 100644
index 3345db4..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/ls.js
+++ /dev/null
@@ -1,126 +0,0 @@
-var path = require('path');
-var fs = require('fs');
-var common = require('./common');
-var _cd = require('./cd');
-var _pwd = require('./pwd');
-
-//@
-//@ ### ls([options ,] path [,path ...])
-//@ ### ls([options ,] path_array)
-//@ Available options:
-//@
-//@ + `-R`: recursive
-//@ + `-A`: all files (include files beginning with `.`, except for `.` and `..`)
-//@
-//@ Examples:
-//@
-//@ ```javascript
-//@ ls('projs/*.js');
-//@ ls('-R', '/users/me', '/tmp');
-//@ ls('-R', ['/users/me', '/tmp']); // same as above
-//@ ```
-//@
-//@ Returns array of files in the given path, or in current directory if no path provided.
-function _ls(options, paths) {
-  options = common.parseOptions(options, {
-    'R': 'recursive',
-    'A': 'all',
-    'a': 'all_deprecated'
-  });
-
-  if (options.all_deprecated) {
-    // We won't support the -a option as it's hard to image why it's useful
-    // (it includes '.' and '..' in addition to '.*' files)
-    // For backwards compatibility we'll dump a deprecated message and proceed as before
-    common.log('ls: Option -a is deprecated. Use -A instead');
-    options.all = true;
-  }
-
-  if (!paths)
-    paths = ['.'];
-  else if (typeof paths === 'object')
-    paths = paths; // assume array
-  else if (typeof paths === 'string')
-    paths = [].slice.call(arguments, 1);
-
-  var list = [];
-
-  // Conditionally pushes file to list - returns true if pushed, false otherwise
-  // (e.g. prevents hidden files to be included unless explicitly told so)
-  function pushFile(file, query) {
-    // hidden file?
-    if (path.basename(file)[0] === '.') {
-      // not explicitly asking for hidden files?
-      if (!options.all && !(path.basename(query)[0] === '.' && path.basename(query).length > 1))
-        return false;
-    }
-
-    if (common.platform === 'win')
-      file = file.replace(/\\/g, '/');
-
-    list.push(file);
-    return true;
-  }
-
-  paths.forEach(function(p) {
-    if (fs.existsSync(p)) {
-      var stats = fs.statSync(p);
-      // Simple file?
-      if (stats.isFile()) {
-        pushFile(p, p);
-        return; // continue
-      }
-
-      // Simple dir?
-      if (stats.isDirectory()) {
-        // Iterate over p contents
-        fs.readdirSync(p).forEach(function(file) {
-          if (!pushFile(file, p))
-            return;
-
-          // Recursive?
-          if (options.recursive) {
-            var oldDir = _pwd();
-            _cd('', p);
-            if (fs.statSync(file).isDirectory())
-              list = list.concat(_ls('-R'+(options.all?'A':''), file+'/*'));
-            _cd('', oldDir);
-          }
-        });
-        return; // continue
-      }
-    }
-
-    // p does not exist - possible wildcard present
-
-    var basename = path.basename(p);
-    var dirname = path.dirname(p);
-    // Wildcard present on an existing dir? (e.g. '/tmp/*.js')
-    if (basename.search(/\*/) > -1 && fs.existsSync(dirname) && fs.statSync(dirname).isDirectory) {
-      // Escape special regular expression chars
-      var regexp = basename.replace(/(\^|\$|\(|\)|<|>|\[|\]|\{|\}|\.|\+|\?)/g, '\\$1');
-      // Translates wildcard into regex
-      regexp = '^' + regexp.replace(/\*/g, '.*') + '$';
-      // Iterate over directory contents
-      fs.readdirSync(dirname).forEach(function(file) {
-        if (file.match(new RegExp(regexp))) {
-          if (!pushFile(path.normalize(dirname+'/'+file), basename))
-            return;
-
-          // Recursive?
-          if (options.recursive) {
-            var pp = dirname + '/' + file;
-            if (fs.lstatSync(pp).isDirectory())
-              list = list.concat(_ls('-R'+(options.all?'A':''), pp+'/*'));
-          } // recursive
-        } // if file matches
-      }); // forEach
-      return;
-    }
-
-    common.error('no such file or directory: ' + p, true);
-  });
-
-  return list;
-}
-module.exports = _ls;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/mkdir.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/mkdir.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/mkdir.js
deleted file mode 100644
index 5a7088f..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/mkdir.js
+++ /dev/null
@@ -1,68 +0,0 @@
-var common = require('./common');
-var fs = require('fs');
-var path = require('path');
-
-// Recursively creates 'dir'
-function mkdirSyncRecursive(dir) {
-  var baseDir = path.dirname(dir);
-
-  // Base dir exists, no recursion necessary
-  if (fs.existsSync(baseDir)) {
-    fs.mkdirSync(dir, parseInt('0777', 8));
-    return;
-  }
-
-  // Base dir does not exist, go recursive
-  mkdirSyncRecursive(baseDir);
-
-  // Base dir created, can create dir
-  fs.mkdirSync(dir, parseInt('0777', 8));
-}
-
-//@
-//@ ### mkdir([options ,] dir [, dir ...])
-//@ ### mkdir([options ,] dir_array)
-//@ Available options:
-//@
-//@ + `p`: full path (will create intermediate dirs if necessary)
-//@
-//@ Examples:
-//@
-//@ ```javascript
-//@ mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g');
-//@ mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above
-//@ ```
-//@
-//@ Creates directories.
-function _mkdir(options, dirs) {
-  options = common.parseOptions(options, {
-    'p': 'fullpath'
-  });
-  if (!dirs)
-    common.error('no paths given');
-
-  if (typeof dirs === 'string')
-    dirs = [].slice.call(arguments, 1);
-  // if it's array leave it as it is
-
-  dirs.forEach(function(dir) {
-    if (fs.existsSync(dir)) {
-      if (!options.fullpath)
-          common.error('path already exists: ' + dir, true);
-      return; // skip dir
-    }
-
-    // Base dir does not exist, and no -p option given
-    var baseDir = path.dirname(dir);
-    if (!fs.existsSync(baseDir) && !options.fullpath) {
-      common.error('no such file or directory: ' + baseDir, true);
-      return; // skip dir
-    }
-
-    if (options.fullpath)
-      mkdirSyncRecursive(dir);
-    else
-      fs.mkdirSync(dir, parseInt('0777', 8));
-  });
-} // mkdir
-module.exports = _mkdir;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/mv.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/mv.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/mv.js
deleted file mode 100644
index 11f9607..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/mv.js
+++ /dev/null
@@ -1,80 +0,0 @@
-var fs = require('fs');
-var path = require('path');
-var common = require('./common');
-
-//@
-//@ ### mv(source [, source ...], dest')
-//@ ### mv(source_array, dest')
-//@ Available options:
-//@
-//@ + `f`: force
-//@
-//@ Examples:
-//@
-//@ ```javascript
-//@ mv('-f', 'file', 'dir/');
-//@ mv('file1', 'file2', 'dir/');
-//@ mv(['file1', 'file2'], 'dir/'); // same as above
-//@ ```
-//@
-//@ Moves files. The wildcard `*` is accepted.
-function _mv(options, sources, dest) {
-  options = common.parseOptions(options, {
-    'f': 'force'
-  });
-
-  // Get sources, dest
-  if (arguments.length < 3) {
-    common.error('missing <source> and/or <dest>');
-  } else if (arguments.length > 3) {
-    sources = [].slice.call(arguments, 1, arguments.length - 1);
-    dest = arguments[arguments.length - 1];
-  } else if (typeof sources === 'string') {
-    sources = [sources];
-  } else if ('length' in sources) {
-    sources = sources; // no-op for array
-  } else {
-    common.error('invalid arguments');
-  }
-
-  sources = common.expand(sources);
-
-  var exists = fs.existsSync(dest),
-      stats = exists && fs.statSync(dest);
-
-  // Dest is not existing dir, but multiple sources given
-  if ((!exists || !stats.isDirectory()) && sources.length > 1)
-    common.error('dest is not a directory (too many sources)');
-
-  // Dest is an existing file, but no -f given
-  if (exists && stats.isFile() && !options.force)
-    common.error('dest file already exists: ' + dest);
-
-  sources.forEach(function(src) {
-    if (!fs.existsSync(src)) {
-      common.error('no such file or directory: '+src, true);
-      return; // skip file
-    }
-
-    // If here, src exists
-
-    // When copying to '/path/dir':
-    //    thisDest = '/path/dir/file1'
-    var thisDest = dest;
-    if (fs.existsSync(dest) && fs.statSync(dest).isDirectory())
-      thisDest = path.normalize(dest + '/' + path.basename(src));
-
-    if (fs.existsSync(thisDest) && !options.force) {
-      common.error('dest file already exists: ' + thisDest, true);
-      return; // skip file
-    }
-
-    if (path.resolve(src) === path.dirname(path.resolve(thisDest))) {
-      common.error('cannot move to self: '+src, true);
-      return; // skip file
-    }
-
-    fs.renameSync(src, thisDest);
-  }); // forEach(src)
-} // mv
-module.exports = _mv;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/popd.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/popd.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/popd.js
deleted file mode 100644
index 11ea24f..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/popd.js
+++ /dev/null
@@ -1 +0,0 @@
-// see dirs.js
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/pushd.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/pushd.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/pushd.js
deleted file mode 100644
index 11ea24f..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/pushd.js
+++ /dev/null
@@ -1 +0,0 @@
-// see dirs.js
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/pwd.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/pwd.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/pwd.js
deleted file mode 100644
index 41727bb..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/pwd.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var path = require('path');
-var common = require('./common');
-
-//@
-//@ ### pwd()
-//@ Returns the current directory.
-function _pwd(options) {
-  var pwd = path.resolve(process.cwd());
-  return common.ShellString(pwd);
-}
-module.exports = _pwd;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/rm.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/rm.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/rm.js
deleted file mode 100644
index 3abe6e1..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/rm.js
+++ /dev/null
@@ -1,145 +0,0 @@
-var common = require('./common');
-var fs = require('fs');
-
-// Recursively removes 'dir'
-// Adapted from https://github.com/ryanmcgrath/wrench-js
-//
-// Copyright (c) 2010 Ryan McGrath
-// Copyright (c) 2012 Artur Adib
-//
-// Licensed under the MIT License
-// http://www.opensource.org/licenses/mit-license.php
-function rmdirSyncRecursive(dir, force) {
-  var files;
-
-  files = fs.readdirSync(dir);
-
-  // Loop through and delete everything in the sub-tree after checking it
-  for(var i = 0; i < files.length; i++) {
-    var file = dir + "/" + files[i],
-        currFile = fs.lstatSync(file);
-
-    if(currFile.isDirectory()) { // Recursive function back to the beginning
-      rmdirSyncRecursive(file, force);
-    }
-
-    else if(currFile.isSymbolicLink()) { // Unlink symlinks
-      if (force || isWriteable(file)) {
-        try {
-          common.unlinkSync(file);
-        } catch (e) {
-          common.error('could not remove file (code '+e.code+'): ' + file, true);
-        }
-      }
-    }
-
-    else // Assume it's a file - perhaps a try/catch belongs here?
-      if (force || isWriteable(file)) {
-        try {
-          common.unlinkSync(file);
-        } catch (e) {
-          common.error('could not remove file (code '+e.code+'): ' + file, true);
-        }
-      }
-  }
-
-  // Now that we know everything in the sub-tree has been deleted, we can delete the main directory.
-  // Huzzah for the shopkeep.
-
-  var result;
-  try {
-    result = fs.rmdirSync(dir);
-  } catch(e) {
-    common.error('could not remove directory (code '+e.code+'): ' + dir, true);
-  }
-
-  return result;
-} // rmdirSyncRecursive
-
-// Hack to determine if file has write permissions for current user
-// Avoids having to check user, group, etc, but it's probably slow
-function isWriteable(file) {
-  var writePermission = true;
-  try {
-    var __fd = fs.openSync(file, 'a');
-    fs.closeSync(__fd);
-  } catch(e) {
-    writePermission = false;
-  }
-
-  return writePermission;
-}
-
-//@
-//@ ### rm([options ,] file [, file ...])
-//@ ### rm([options ,] file_array)
-//@ Available options:
-//@
-//@ + `-f`: force
-//@ + `-r, -R`: recursive
-//@
-//@ Examples:
-//@
-//@ ```javascript
-//@ rm('-rf', '/tmp/*');
-//@ rm('some_file.txt', 'another_file.txt');
-//@ rm(['some_file.txt', 'another_file.txt']); // same as above
-//@ ```
-//@
-//@ Removes files. The wildcard `*` is accepted.
-function _rm(options, files) {
-  options = common.parseOptions(options, {
-    'f': 'force',
-    'r': 'recursive',
-    'R': 'recursive'
-  });
-  if (!files)
-    common.error('no paths given');
-
-  if (typeof files === 'string')
-    files = [].slice.call(arguments, 1);
-  // if it's array leave it as it is
-
-  files = common.expand(files);
-
-  files.forEach(function(file) {
-    if (!fs.existsSync(file)) {
-      // Path does not exist, no force flag given
-      if (!options.force)
-        common.error('no such file or directory: '+file, true);
-
-      return; // skip file
-    }
-
-    // If here, path exists
-
-    var stats = fs.lstatSync(file);
-    if (stats.isFile() || stats.isSymbolicLink()) {
-
-      // Do not check for file writing permissions
-      if (options.force) {
-        common.unlinkSync(file);
-        return;
-      }
-
-      if (isWriteable(file))
-        common.unlinkSync(file);
-      else
-        common.error('permission denied: '+file, true);
-
-      return;
-    } // simple file
-
-    // Path is an existing directory, but no -r flag given
-    if (stats.isDirectory() && !options.recursive) {
-      common.error('path is a directory', true);
-      return; // skip path
-    }
-
-    // Recursively remove existing directory
-    if (stats.isDirectory() && options.recursive) {
-      rmdirSyncRecursive(file, options.force);
-    }
-  }); // forEach(file)
-} // rm
-module.exports = _rm;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/sed.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/sed.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/sed.js
deleted file mode 100644
index 9783252..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/sed.js
+++ /dev/null
@@ -1,43 +0,0 @@
-var common = require('./common');
-var fs = require('fs');
-
-//@
-//@ ### sed([options ,] search_regex, replace_str, file)
-//@ Available options:
-//@
-//@ + `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_
-//@
-//@ Examples:
-//@
-//@ ```javascript
-//@ sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js');
-//@ sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js');
-//@ ```
-//@
-//@ Reads an input string from `file` and performs a JavaScript `replace()` on the input
-//@ using the given search regex and replacement string. Returns the new string after replacement.
-function _sed(options, regex, replacement, file) {
-  options = common.parseOptions(options, {
-    'i': 'inplace'
-  });
-
-  if (typeof replacement === 'string')
-    replacement = replacement; // no-op
-  else if (typeof replacement === 'number')
-    replacement = replacement.toString(); // fallback
-  else
-    common.error('invalid replacement string');
-
-  if (!file)
-    common.error('no file given');
-
-  if (!fs.existsSync(file))
-    common.error('no such file or directory: ' + file);
-
-  var result = fs.readFileSync(file, 'utf8').replace(regex, replacement);
-  if (options.inplace)
-    fs.writeFileSync(file, result, 'utf8');
-
-  return common.ShellString(result);
-}
-module.exports = _sed;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/tempdir.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/tempdir.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/tempdir.js
deleted file mode 100644
index 45953c2..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/tempdir.js
+++ /dev/null
@@ -1,56 +0,0 @@
-var common = require('./common');
-var os = require('os');
-var fs = require('fs');
-
-// Returns false if 'dir' is not a writeable directory, 'dir' otherwise
-function writeableDir(dir) {
-  if (!dir || !fs.existsSync(dir))
-    return false;
-
-  if (!fs.statSync(dir).isDirectory())
-    return false;
-
-  var testFile = dir+'/'+common.randomFileName();
-  try {
-    fs.writeFileSync(testFile, ' ');
-    common.unlinkSync(testFile);
-    return dir;
-  } catch (e) {
-    return false;
-  }
-}
-
-
-//@
-//@ ### tempdir()
-//@
-//@ Examples:
-//@
-//@ ```javascript
-//@ var tmp = tempdir(); // "/tmp" for most *nix platforms
-//@ ```
-//@
-//@ Searches and returns string containing a writeable, platform-dependent temporary directory.
-//@ Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir).
-function _tempDir() {
-  var state = common.state;
-  if (state.tempDir)
-    return state.tempDir; // from cache
-
-  state.tempDir = writeableDir(os.tempDir && os.tempDir()) || // node 0.8+
-                  writeableDir(process.env['TMPDIR']) ||
-                  writeableDir(process.env['TEMP']) ||
-                  writeableDir(process.env['TMP']) ||
-                  writeableDir(process.env['Wimp$ScrapDir']) || // RiscOS
-                  writeableDir('C:\\TEMP') || // Windows
-                  writeableDir('C:\\TMP') || // Windows
-                  writeableDir('\\TEMP') || // Windows
-                  writeableDir('\\TMP') || // Windows
-                  writeableDir('/tmp') ||
-                  writeableDir('/var/tmp') ||
-                  writeableDir('/usr/tmp') ||
-                  writeableDir('.'); // last resort
-
-  return state.tempDir;
-}
-module.exports = _tempDir;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/test.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/test.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/test.js
deleted file mode 100644
index 8a4ac7d..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/test.js
+++ /dev/null
@@ -1,85 +0,0 @@
-var common = require('./common');
-var fs = require('fs');
-
-//@
-//@ ### test(expression)
-//@ Available expression primaries:
-//@
-//@ + `'-b', 'path'`: true if path is a block device
-//@ + `'-c', 'path'`: true if path is a character device
-//@ + `'-d', 'path'`: true if path is a directory
-//@ + `'-e', 'path'`: true if path exists
-//@ + `'-f', 'path'`: true if path is a regular file
-//@ + `'-L', 'path'`: true if path is a symboilc link
-//@ + `'-p', 'path'`: true if path is a pipe (FIFO)
-//@ + `'-S', 'path'`: true if path is a socket
-//@
-//@ Examples:
-//@
-//@ ```javascript
-//@ if (test('-d', path)) { /* do something with dir */ };
-//@ if (!test('-f', path)) continue; // skip if it's a regular file
-//@ ```
-//@
-//@ Evaluates expression using the available primaries and returns corresponding value.
-function _test(options, path) {
-  if (!path)
-    common.error('no path given');
-
-  // hack - only works with unary primaries
-  options = common.parseOptions(options, {
-    'b': 'block',
-    'c': 'character',
-    'd': 'directory',
-    'e': 'exists',
-    'f': 'file',
-    'L': 'link',
-    'p': 'pipe',
-    'S': 'socket'
-  });
-
-  var canInterpret = false;
-  for (var key in options)
-    if (options[key] === true) {
-      canInterpret = true;
-      break;
-    }
-
-  if (!canInterpret)
-    common.error('could not interpret expression');
-
-  if (options.link) {
-    try {
-      return fs.lstatSync(path).isSymbolicLink();
-    } catch(e) {
-      return false;
-    }
-  }
-
-  if (!fs.existsSync(path))
-    return false;
-
-  if (options.exists)
-    return true;
-
-  var stats = fs.statSync(path);
-
-  if (options.block)
-    return stats.isBlockDevice();
-
-  if (options.character)
-    return stats.isCharacterDevice();
-
-  if (options.directory)
-    return stats.isDirectory();
-
-  if (options.file)
-    return stats.isFile();
-
-  if (options.pipe)
-    return stats.isFIFO();
-
-  if (options.socket)
-    return stats.isSocket();
-} // test
-module.exports = _test;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/to.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/to.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/to.js
deleted file mode 100644
index f029999..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/to.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var common = require('./common');
-var fs = require('fs');
-var path = require('path');
-
-//@
-//@ ### 'string'.to(file)
-//@
-//@ Examples:
-//@
-//@ ```javascript
-//@ cat('input.txt').to('output.txt');
-//@ ```
-//@
-//@ Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as
-//@ those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_
-function _to(options, file) {
-  if (!file)
-    common.error('wrong arguments');
-
-  if (!fs.existsSync( path.dirname(file) ))
-      common.error('no such file or directory: ' + path.dirname(file));
-
-  try {
-    fs.writeFileSync(file, this.toString(), 'utf8');
-  } catch(e) {
-    common.error('could not write to file (code '+e.code+'): '+file, true);
-  }
-}
-module.exports = _to;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/toEnd.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/toEnd.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/toEnd.js
deleted file mode 100644
index f6d099d..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/toEnd.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var common = require('./common');
-var fs = require('fs');
-var path = require('path');
-
-//@
-//@ ### 'string'.toEnd(file)
-//@
-//@ Examples:
-//@
-//@ ```javascript
-//@ cat('input.txt').toEnd('output.txt');
-//@ ```
-//@
-//@ Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as
-//@ those returned by `cat`, `grep`, etc).
-function _toEnd(options, file) {
-  if (!file)
-    common.error('wrong arguments');
-
-  if (!fs.existsSync( path.dirname(file) ))
-      common.error('no such file or directory: ' + path.dirname(file));
-
-  try {
-    fs.appendFileSync(file, this.toString(), 'utf8');
-  } catch(e) {
-    common.error('could not append to file (code '+e.code+'): '+file, true);
-  }
-}
-module.exports = _toEnd;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/which.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/which.js b/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/which.js
deleted file mode 100644
index fadb96c..0000000
--- a/node_modules/ios-sim/node_modules/simctl/node_modules/shelljs/src/which.js
+++ /dev/null
@@ -1,79 +0,0 @@
-var common = require('./common');
-var fs = require('fs');
-var path = require('path');
-
-// Cross-platform method for splitting environment PATH variables
-function splitPath(p) {
-  for (i=1;i<2;i++) {}
-
-  if (!p)
-    return [];
-
-  if (common.platform === 'win')
-    return p.split(';');
-  else
-    return p.split(':');
-}
-
-//@
-//@ ### which(command)
-//@
-//@ Examples:
-//@
-//@ ```javascript
-//@ var nodeExec = which('node');
-//@ ```
-//@
-//@ Searches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions.
-//@ Returns string containing the absolute path to the command.
-function _which(options, cmd) {
-  if (!cmd)
-    common.error('must specify command');
-
-  var pathEnv = process.env.path || process.env.Path || process.env.PATH,
-      pathArray = splitPath(pathEnv),
-      where = null;
-
-  // No relative/absolute paths provided?
-  if (cmd.search(/\//) === -1) {
-    // Search for command in PATH
-    pathArray.forEach(function(dir) {
-      if (where)
-        return; // already found it
-
-      var attempt = path.resolve(dir + '/' + cmd);
-      if (fs.existsSync(attempt)) {
-        where = attempt;
-        return;
-      }
-
-      if (common.platform === 'win') {
-        var baseAttempt = attempt;
-        attempt = baseAttempt + '.exe';
-        if (fs.existsSync(attempt)) {
-          where = attempt;
-          return;
-        }
-        attempt = baseAttempt + '.cmd';
-        if (fs.existsSync(attempt)) {
-          where = attempt;
-          return;
-        }
-        attempt = baseAttempt + '.bat';
-        if (fs.existsSync(attempt)) {
-          where = attempt;
-          return;
-        }
-      } // if 'win'
-    });
-  }
-
-  // Command not found anywhere?
-  if (!fs.existsSync(cmd) && !where)
-    return null;
-
-  where = where || path.resolve(cmd);
-
-  return common.ShellString(where);
-}
-module.exports = _which;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/package.json
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/package.json b/node_modules/ios-sim/node_modules/simctl/package.json
index f1d5fa6..7be0b62 100644
--- a/node_modules/ios-sim/node_modules/simctl/package.json
+++ b/node_modules/ios-sim/node_modules/simctl/package.json
@@ -1,45 +1,99 @@
 {
-  "name": "simctl",
-  "version": "1.0.0",
-  "description": "library for Xcode 8+ simctl utility on macOS",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/phonegap/simctl.git"
+  "_args": [
+    [
+      {
+        "raw": "simctl@^1.0.0",
+        "scope": null,
+        "escapedName": "simctl",
+        "name": "simctl",
+        "rawSpec": "^1.0.0",
+        "spec": ">=1.0.0 <2.0.0",
+        "type": "range"
+      },
+      "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/ios-sim"
+    ]
+  ],
+  "_from": "simctl@>=1.0.0 <2.0.0",
+  "_id": "simctl@1.0.1",
+  "_inCache": true,
+  "_location": "/ios-sim/simctl",
+  "_nodeVersion": "6.7.0",
+  "_npmOperationalInternal": {
+    "host": "s3://npm-registry-packages",
+    "tmp": "tmp/simctl-1.0.1.tgz_1497479983508_0.9374380426015705"
+  },
+  "_npmUser": {
+    "name": "shazron",
+    "email": "shazron@gmail.com"
+  },
+  "_npmVersion": "3.10.9",
+  "_phantomChildren": {},
+  "_requested": {
+    "raw": "simctl@^1.0.0",
+    "scope": null,
+    "escapedName": "simctl",
+    "name": "simctl",
+    "rawSpec": "^1.0.0",
+    "spec": ">=1.0.0 <2.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/ios-sim"
+  ],
+  "_resolved": "https://registry.npmjs.org/simctl/-/simctl-1.0.1.tgz",
+  "_shasum": "e73ce62891c952b2ae78499acdccbe3cf897a2e8",
+  "_shrinkwrap": null,
+  "_spec": "simctl@^1.0.0",
+  "_where": "/Users/shazron/Documents/git/apache/cordova-ios/node_modules/ios-sim",
+  "author": {
+    "name": "Shazron Abdullah"
+  },
+  "bugs": {
+    "url": "https://github.com/phonegap/simctl/issues"
   },
-  "main": "simctl.js",
   "dependencies": {
     "shelljs": "^0.2.6",
     "tail": "^0.4.0"
   },
+  "description": "library for Xcode 8+ simctl utility on macOS",
   "devDependencies": {
     "jasmine-node": "^1.14.5",
     "jscs": "^2.11.0",
     "jshint": "^2.9.1"
   },
-  "scripts": {
-    "test": "npm run jasmine",
-    "posttest": "npm run jshint",
-    "jshint": "jshint lib ./simctl.js",
-    "postjshint": "npm run jscs",
-    "jscs": "jscs lib ./simctl.js",
-    "jasmine": "jasmine-node --captureExceptions --color spec"
+  "directories": {},
+  "dist": {
+    "shasum": "e73ce62891c952b2ae78499acdccbe3cf897a2e8",
+    "tarball": "https://registry.npmjs.org/simctl/-/simctl-1.0.1.tgz"
   },
+  "gitHead": "27193e094e2293b06d5d3536d1f99c4785699fdc",
+  "homepage": "https://github.com/phonegap/simctl#readme",
   "keywords": [
     "simctl",
     "iOS Simulator"
   ],
-  "author": {
-    "name": "Shazron Abdullah"
-  },
   "license": "MIT",
-  "readme": "[![Build status](https://ci.appveyor.com/api/projects/status/4p87ytoudwh7g132/branch/master?svg=true)](https://ci.appveyor.com/project/shazron/simctl/branch/master)\n[![Build Status](https://travis-ci.org/phonegap/ios-sim.svg?branch=master)](https://travis-ci.org/phonegap/simctl)\n\n## library wrapper for Xcode's simctl utility on OS X\n\nUsed by [ios-sim](https://www.npmjs.com/package/ios-sim)\n\n## Requirements\n\nXcode 8 or greater\n",
-  "readmeFilename": "README.md",
-  "gitHead": "125abc5f0b0581ab59c682fde46225622d53be55",
-  "bugs": {
-    "url": "https://github.com/phonegap/simctl/issues"
+  "main": "simctl.js",
+  "maintainers": [
+    {
+      "name": "shazron",
+      "email": "shazron@gmail.com"
+    }
+  ],
+  "name": "simctl",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/phonegap/simctl.git"
   },
-  "homepage": "https://github.com/phonegap/simctl#readme",
-  "_id": "simctl@1.0.0",
-  "_shasum": "49e26d850d8dc8850bf63fbf83eb817732721140",
-  "_from": "simctl@>=1.0.0 <2.0.0"
+  "scripts": {
+    "jasmine": "jasmine-node --captureExceptions --color spec",
+    "jscs": "jscs lib ./simctl.js",
+    "jshint": "jshint lib ./simctl.js",
+    "postjshint": "npm run jscs",
+    "posttest": "npm run jshint",
+    "test": "npm run jasmine"
+  },
+  "version": "1.0.1"
 }

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/node_modules/simctl/simctl.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/node_modules/simctl/simctl.js b/node_modules/ios-sim/node_modules/simctl/simctl.js
index 1fb78ce..5cecea8 100644
--- a/node_modules/ios-sim/node_modules/simctl/simctl.js
+++ b/node_modules/ios-sim/node_modules/simctl/simctl.js
@@ -46,9 +46,9 @@ exports = module.exports = {
 
         if (obj.code !== 0) {
             obj.output  = 'simctl was not found.\n';
-            obj.output += 'Check that you have Xcode 7.x installed:\n';
+            obj.output += 'Check that you have Xcode 8.x installed:\n';
             obj.output += '\txcodebuild --version';
-            obj.output += 'Check that you have Xcode 7.x selected:\n';
+            obj.output += 'Check that you have Xcode 8.x selected:\n';
             obj.output += '\txcode-select --print-path';
         }
 

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/package.json
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/package.json b/node_modules/ios-sim/package.json
index a05c90b..44a43f1 100644
--- a/node_modules/ios-sim/package.json
+++ b/node_modules/ios-sim/package.json
@@ -1,54 +1,123 @@
 {
-  "name": "ios-sim",
-  "version": "5.1.0",
-  "preferGlobal": "true",
-  "description": "launch iOS apps into the iOS Simulator from the command line (Xcode 7.0+)",
-  "main": "ios-sim.js",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/phonegap/ios-sim.git"
+  "_args": [
+    [
+      {
+        "raw": "ios-sim@^6.0.0",
+        "scope": null,
+        "escapedName": "ios-sim",
+        "name": "ios-sim",
+        "rawSpec": "^6.0.0",
+        "spec": ">=6.0.0 <7.0.0",
+        "type": "range"
+      },
+      "/Users/shazron/Documents/git/apache/cordova-ios"
+    ]
+  ],
+  "_from": "ios-sim@>=6.0.0 <7.0.0",
+  "_id": "ios-sim@6.0.0",
+  "_inCache": true,
+  "_location": "/ios-sim",
+  "_nodeVersion": "6.7.0",
+  "_npmOperationalInternal": {
+    "host": "s3://npm-registry-packages",
+    "tmp": "tmp/ios-sim-6.0.0.tgz_1497480385698_0.14935097587294877"
   },
-  "engines": {
-    "node": ">=0.10.0"
+  "_npmUser": {
+    "name": "shazron",
+    "email": "shazron@gmail.com"
   },
-  "keywords": [
-    "ios-sim",
-    "iOS Simulator"
+  "_npmVersion": "3.10.9",
+  "_phantomChildren": {
+    "abbrev": "1.0.9",
+    "tail": "0.4.0"
+  },
+  "_requested": {
+    "raw": "ios-sim@^6.0.0",
+    "scope": null,
+    "escapedName": "ios-sim",
+    "name": "ios-sim",
+    "rawSpec": "^6.0.0",
+    "spec": ">=6.0.0 <7.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/"
   ],
+  "_resolved": "https://registry.npmjs.org/ios-sim/-/ios-sim-6.0.0.tgz",
+  "_shasum": "6a8633f23ef43c43cd5f366e4115f358eef138ad",
+  "_shrinkwrap": null,
+  "_spec": "ios-sim@^6.0.0",
+  "_where": "/Users/shazron/Documents/git/apache/cordova-ios",
+  "author": {
+    "name": "Shazron Abdullah"
+  },
   "bin": {
     "ios-sim": "./bin/ios-sim"
   },
   "bugs": {
     "url": "https://github.com/phonegap/ios-sim/issues"
   },
-  "author": {
-    "name": "Shazron Abdullah"
-  },
-  "license": "MIT",
   "dependencies": {
-    "plist": "^1.2.0",
-    "simctl": "^1.0.0",
+    "bplist-parser": "^0.0.6",
     "nopt": "1.0.9",
-    "bplist-parser": "^0.0.6"
+    "plist": "^1.2.0",
+    "simctl": "^1.0.0"
   },
+  "description": "launch iOS apps into the iOS Simulator from the command line (Xcode 7.0+)",
   "devDependencies": {
     "jasmine-node": "^1.14.5",
     "jscs": "^2.11.0",
     "jshint": "^2.9.1"
   },
+  "directories": {},
+  "dist": {
+    "shasum": "6a8633f23ef43c43cd5f366e4115f358eef138ad",
+    "tarball": "https://registry.npmjs.org/ios-sim/-/ios-sim-6.0.0.tgz"
+  },
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "gitHead": "4bbe6b3307b594d9bf78775418fea139e71eabb1",
+  "homepage": "https://github.com/phonegap/ios-sim#readme",
+  "keywords": [
+    "ios-sim",
+    "iOS Simulator"
+  ],
+  "license": "MIT",
+  "main": "ios-sim.js",
+  "maintainers": [
+    {
+      "name": "macdonst",
+      "email": "simon.macdonald@gmail.com"
+    },
+    {
+      "name": "purplecabbage",
+      "email": "purplecabbage@gmail.com"
+    },
+    {
+      "name": "shazron",
+      "email": "shazron@gmail.com"
+    },
+    {
+      "name": "stevegill",
+      "email": "stevengill97@gmail.com"
+    }
+  ],
+  "name": "ios-sim",
+  "optionalDependencies": {},
+  "preferGlobal": "true",
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/phonegap/ios-sim.git"
+  },
   "scripts": {
-    "test": "npm run jasmine",
-    "posttest": "npm run jshint",
+    "jasmine": "jasmine-node --captureExceptions --color spec",
+    "jscs": "jscs src ./ios-sim.js",
     "jshint": "jshint src ./ios-sim.js",
     "postjshint": "npm run jscs",
-    "jscs": "jscs src ./ios-sim.js",
-    "jasmine": "jasmine-node --captureExceptions --color spec"
+    "posttest": "npm run jshint",
+    "test": "npm run jasmine"
   },
-  "readme": "[![Build status](https://ci.appveyor.com/api/projects/status/0kw833771uu622fs?svg=true)](https://ci.appveyor.com/project/shazron/ios-sim)\n[![Build Status](https://travis-ci.org/phonegap/ios-sim.svg?branch=master)](https://travis-ci.org/phonegap/ios-sim)\n\nios-sim\n=======\n\nSupports Xcode 6 only since version 3.x.\n\nThe ios-sim tool is a command-line utility that launches an iOS application on the iOS Simulator. This allows for niceties such as automated testing without having to open Xcode.\n\nFeatures\n--------\n\n* Choose the device family to simulate, i.e. iPhone or iPad. Run using \"showdevicetypes\" option to see available device types, and pass it in as the \"devicetypeid\" parameter.\n\nSee the `--help` option for more info.\n\nThe unimplemented options below are in the [backlog](https://github.com/phonegap/ios-sim/milestones/ios-sim%204.2.0)\n\nUsage\n-----\n\n```\n\n    Usage: ios-sim <command> <options> [--args ...]\n        \n    Commands:\n      showsdk
 s                        List the available iOS SDK versions\n      showdevicetypes                 List the available device types\n      launch <application path>       Launch the application at the specified path on the iOS Simulator\n      start                           Launch iOS Simulator without an app\n      install <application path>      Install the application at the specified path on the iOS Simulator without launching the app\n\n    Options:\n      --version                       Print the version of ios-sim\n      --help                          Show this help text\n      --exit                          Exit after startup\n      --log <log file path>           The path where log of the app running in the Simulator will be redirected to\n      --devicetypeid <device type>    The id of the device type that should be simulated (Xcode6+). Use 'showdevicetypes' to list devices.\n                                      e.g \"com.apple.CoreSimulator.SimDeviceType.Resizable-iPh
 one6, 8.0\"\n                                  \n    Removed in version 4.x:\n      --stdout <stdout file path>     The path where stdout of the simulator will be redirected to (defaults to stdout of ios-sim)\n      --stderr <stderr file path>     The path where stderr of the simulator will be redirected to (defaults to stderr of ios-sim)\n      --sdk <sdkversion>              The iOS SDK version to run the application on (defaults to the latest)\n      --family <device family>        The device type that should be simulated (defaults to `iphone')\n      --retina                        Start a retina device\n      --tall                          In combination with --retina flag, start the tall version of the retina device (e.g. iPhone 5 (4-inch))\n      --64bit                         In combination with --retina flag and the --tall flag, start the 64bit version of the tall retina device (e.g. iPhone 5S (4-inch 64bit))\n                                    \n    Unimplemented in thi
 s version:\n      --verbose                       Set the output level to verbose\n      --timeout <seconds>             The timeout time to wait for a response from the Simulator. Default value: 30 seconds\n      --args <...>                    All following arguments will be passed on to the application\n      --env <environment file path>   A plist file containing environment key-value pairs that should be set\n      --setenv NAME=VALUE             Set an environment variable\n                                  \n```\n\nInstallation\n------------\n\nChoose one of the following installation methods.\n\n### Node JS\n\nInstall using node.js (at least 0.10.20):\n\n    $ npm install ios-sim -g\n\n### Zip\n\nDownload a zip file:\n\n    $ curl -L https://github.com/phonegap/ios-sim/archive/master.zip -o ios-sim.zip\n    $ unzip ios-sim.zip\n\n### Git\n\nDownload using git clone:\n\n    $ git clone git://github.com/phonegap/ios-sim.git\n\nTroubleshooting\n---------------\n\nMake sure you 
 enable Developer Mode on your machine:\n\n    $ DevToolsSecurity -enable\n\nMake sure multiple instances of launchd_sim are not running:\n\n    $ killall launchd_sim\n\nLicense\n-------\n\nThis project is available under the MIT license. See [LICENSE][license].\n\n[license]: https://github.com/phonegap/ios-sim/blob/master/LICENSE\n",
-  "readmeFilename": "README.md",
-  "gitHead": "38adbeb0a9cb0d6af537618bd21cf5d5a42f2d58",
-  "homepage": "https://github.com/phonegap/ios-sim#readme",
-  "_id": "ios-sim@5.1.0",
-  "_shasum": "5d78a29e520ba0973145fb4257eb9b2a41018da6",
-  "_from": "ios-sim@>=5.1.0 <6.0.0"
+  "version": "6.0.0"
 }

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/spec/lib.spec.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/spec/lib.spec.js b/node_modules/ios-sim/spec/lib.spec.js
index d832717..7fa0e88 100644
--- a/node_modules/ios-sim/spec/lib.spec.js
+++ b/node_modules/ios-sim/spec/lib.spec.js
@@ -16,6 +16,7 @@
     specific language governing permissions and limitations
     under the License.
 */
+var lib = require('../src/lib');
 
 describe('lib end-to-end', function() {
 
@@ -25,6 +26,33 @@ describe('lib end-to-end', function() {
     afterEach(function() {
     });
 
-    // it('', function(done) {
-    // });
+    describe('when parsing env variables', function() {
+        it("should return empty map on null value", function() {
+            expect(lib._parseEnvironmentVariables(null)).toEqual({});
+        });
+        it("should return empty map on undefined value", function() {
+            expect(lib._parseEnvironmentVariables(undefined)).toEqual({});
+        });
+        describe('without simctl fix', function() {
+            it("should return valid map for valid env variable", function() {
+                expect(lib._parseEnvironmentVariables(["KEY=VALUE"], false)).toEqual({"KEY":"VALUE"});
+            });
+        });
+        describe('with simctl fix', function() {
+            it("should add SIMCTL_CHILD_ prefix to all keys", function() {
+                expect(lib._parseEnvironmentVariables(["KEY=VALUE", "KEY2=VALUE2"], true))
+                .toEqual(
+                    {
+                        "SIMCTL_CHILD_KEY":"VALUE",
+                        "SIMCTL_CHILD_KEY2":"VALUE2"
+                    }
+                );
+            });
+        });
+    })
+
+    it('init should not process.exit when called as a lib', function() {
+        var code = lib.init();
+        expect(!isNaN(code)).toBe(true);
+    });
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/src/cli.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/src/cli.js b/node_modules/ios-sim/src/cli.js
index ba15ed1..206ce2f 100644
--- a/node_modules/ios-sim/src/cli.js
+++ b/node_modules/ios-sim/src/cli.js
@@ -37,7 +37,10 @@ var nopt;
 function init() {
     try {
         nopt = require('nopt');
-        command_lib.init();
+        var code = command_lib.init();
+        if (code !== 0) {
+            process.exit(code);
+        }
     } catch (e) {
         console.error(
             'Please run npm install from this directory:\n\t' +
@@ -57,7 +60,7 @@ function cli(inputArgs) {
             'use-gdb': Boolean,
             'uuid': String,
             'env': String,
-            'setenv': String,
+            'setenv': Array,
             'stdout': path,
             'stderr': path,
             'timeout': Number,

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/src/commands.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/src/commands.js b/node_modules/ios-sim/src/commands.js
index e801223..4869ed2 100644
--- a/node_modules/ios-sim/src/commands.js
+++ b/node_modules/ios-sim/src/commands.js
@@ -31,7 +31,7 @@ var path = require('path'),
 var command_lib = {
 
     init: function() {
-        lib.init();
+        return lib.init();
     },
 
     //jscs:disable disallowUnusedParams
@@ -57,7 +57,7 @@ var command_lib = {
 
         app_path = args.argv.remain[1];
 
-        lib.launch(app_path, args.devicetypeid, args.log, args.exit, args.args);
+        lib.launch(app_path, args.devicetypeid, args.log, args.exit, args.setenv, args.args);
     },
 
     install: function(args) {

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/ios-sim/src/lib.js
----------------------------------------------------------------------
diff --git a/node_modules/ios-sim/src/lib.js b/node_modules/ios-sim/src/lib.js
index 8ea464e..1063851 100644
--- a/node_modules/ios-sim/src/lib.js
+++ b/node_modules/ios-sim/src/lib.js
@@ -189,7 +189,7 @@ function getDeviceFromDeviceTypeId(devicetypeid) {
     }
 
     // prepend iOS to runtime version, if necessary
-    if (ret_obj.runtime.indexOf('iOS') === -1) {
+    if (ret_obj.runtime.indexOf('OS') === -1) {
         ret_obj.runtime = util.format('iOS %s', ret_obj.runtime);
     }
 
@@ -218,6 +218,44 @@ function getDeviceFromDeviceTypeId(devicetypeid) {
     return ret_obj;
 }
 
+// Parses array of KEY=Value strings into map of strings
+// If fixsymctl == true, updates variables for correct usage with simctl
+function parseEnvironmentVariables(envVariables, fixsymctl) {
+    envVariables = envVariables || [];
+    fixsymctl = typeof fixsymctl != 'undefined' ? fixsymctl : true;
+
+    var envMap = {};
+    envVariables.forEach(function(variable) {
+        var envPair = variable.split('=', 2);
+        if (envPair.length == 2) {
+            var key = envPair[0];
+            var value = envPair[1];
+            if (fixsymctl) {
+                key = 'SIMCTL_CHILD_' + key;
+            }
+            envMap[ key ] = value;
+        }
+    });
+    return envMap;
+}
+
+// Injects specified environt variables to the process and then runs action
+// returns environment variables back to original state after action completes
+function withInjectedEnvironmentVariablesToProcess(process, envVariables, action) {
+    var oldVariables = util._extend({}, process.env);
+
+    // Inject additional environment variables to process
+    for (var key in envVariables) {
+        var value = envVariables[key];
+        process.env[key] = value;
+    }
+
+    action();
+
+    // restore old envs
+    process.env = oldVariables;
+}
+
 // replace hyphens in iPad Pro name which differ in 'Device Types' and 'Devices'
 function filterDeviceName(deviceName) {
     // replace hyphens in iPad Pro name which differ in 'Device Types' and 'Devices'
@@ -236,12 +274,13 @@ var lib = {
         var output = simctl.check_prerequisites();
         if (output.code !== 0) {
             console.error(output.output);
-            process.exit(2);
         }
 
         if (!bplist) {
             bplist = require('bplist-parser');
         }
+
+        return output.code;
     },
 
     //jscs:disable disallowUnusedParams
@@ -305,7 +344,7 @@ var lib = {
     },
     //jscs:enable disallowUnusedParams
 
-    launch: function(app_path, devicetypeid, log, exit, argv) {
+    launch: function(app_path, devicetypeid, log, exit, setenv, argv) {
         var wait_for_debugger = false;
         var info_plist_path;
         var app_identifier;
@@ -334,22 +373,27 @@ var lib = {
             }
 
             argv = argv || [];
-
-            // get the deviceid from --devicetypeid
-            // --devicetypeid is a string in the form "devicetype, runtime_version" (optional: runtime_version)
-            var device = getDeviceFromDeviceTypeId(devicetypeid);
-
-            // so now we have the deviceid, we can proceed
-            simctl.extensions.start(device.id);
-            simctl.install(device.id, app_path);
-            simctl.launch(wait_for_debugger, device.id, app_identifier, argv);
-            simctl.extensions.log(device.id, log);
-            if (log) {
-                console.log(util.format('logPath: %s', path.resolve(log)));
-            }
-            if (exit) {
-                process.exit(0);
-            }
+            setenv = setenv || [];
+
+            var environmentVariables = parseEnvironmentVariables(setenv);
+
+            withInjectedEnvironmentVariablesToProcess(process, environmentVariables, function() {
+                // get the deviceid from --devicetypeid
+                // --devicetypeid is a string in the form "devicetype, runtime_version" (optional: runtime_version)
+                var device = getDeviceFromDeviceTypeId(devicetypeid);
+
+                // so now we have the deviceid, we can proceed
+                simctl.extensions.start(device.id);
+                simctl.install(device.id, app_path);
+                simctl.launch(wait_for_debugger, device.id, app_identifier, argv);
+                simctl.extensions.log(device.id, log);
+                if (log) {
+                    console.log(util.format('logPath: %s', path.resolve(log)));
+                }
+                if (exit) {
+                    process.exit(0);
+                }
+            });
         });
     },
 
@@ -399,7 +443,10 @@ var lib = {
         }
 
         simctl.extensions.start(device.id);
-    }
+    },
+
+    _parseEnvironmentVariables: parseEnvironmentVariables
+
 };
 
 module.exports = lib;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/pegjs/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/node_modules/pegjs/CHANGELOG.md b/node_modules/pegjs/CHANGELOG.md
index 2212735..26afd3e 100644
--- a/node_modules/pegjs/CHANGELOG.md
+++ b/node_modules/pegjs/CHANGELOG.md
@@ -4,6 +4,116 @@ Change Log
 This file documents all notable changes to PEG.js. The releases follow [semantic
 versioning](http://semver.org/).
 
+0.10.0
+------
+
+Released: August 19, 2016
+
+### Major Changes
+
+  * **Parsers can be generated in multiple module formats.** The available
+    formats are: CommonJS (the default), AMD, UMD, globals, and bare (not
+    available from the command-line).
+
+    The format can be specified using the `format` option of the `peg.generate`
+    function or the `--format` option on the command-line.
+
+    It is also possible to specify parser dependencies using the `dependencies`
+    option of the `peg.generate` function or the `--dependency`/`-d` option on
+    the command-line. This is mainly useful for the UMD format, where the
+    dependencies are translated into both AMD dependencies and CommonJS
+    `require` calls.
+
+  * **Browser version of PEG.js is now in the UMD format.** This means it will try
+    to detect AMD or Node.js/CommonJS module loader and define itself as a
+    module. If no loader is found, it will export itself using a global
+    variable.
+
+  * **API polishing.** The `peg.buildParser` function was renamed to
+    `peg.generate`. The global variable the browser version of PEG.js is
+    available in when no loader is detected was renamed from `PEG` to `peg`.
+
+  * **CLI improvements.** There is new `--output`/`-o` command-line option which
+    allows to specify the output file. The old way of specifying the output file
+    using a second argument was removed. To make room for the new `-o` option
+    the old one (a shortcut for `--optimize`) was renamed to `-O`. All these
+    changes make PEG.js conform to traditional compiler command-line interface.
+
+    It is now also possible to use `-` as a file name on the command-line (with
+    the usual meaning of standard input/output).
+
+  * **Improved error messages.** Both messages produced by PEG.js and generated
+    parsers were improved.
+
+  * **Duplicate rule definitions are reported as errors.**
+
+  * **Duplicate labels are reported as errors.**
+
+### Minor Changes
+
+  * Exposed the AST node visitor builder as `peg.compiler.visitor`. This is
+    useful mainly for plugins which manipulate the AST.
+
+  * Exposed the function which builds messages of exceptions produced by
+    generated parsers as `SyntaxError.buildMessage`. This is useful mainly for
+    customizing these error messages.
+
+  * The `error` and `expected` functions now accept an optional `location`
+    parameter. This allows to customize the location in which the resulting
+    syntax error is reported.
+
+  * Refactored expectations reported in the `expected` property of exceptions
+    produced by generated parsers. They are no longer de-duplicated and sorted,
+    their format changed to be more machine-readable, and they no longer contain
+    human-readable descriptions.
+
+  * The `found` property of exceptions produced by the `error` function is now
+    set to `null`.
+
+  * Removed access to the parser object in parser code via the `parser`
+    variable.
+
+  * Made handling of optional parameters consistent with ES 2015. Specifically,
+    passing `undefined` as a parameter value is now equivalent to not passing
+    the parameter at all.
+
+  * Renamed several compiler passes.
+
+  * Generated parsers no longer consider `\r`, `\u2028`, and `\u2029` as
+    newlines (only `\n` and `\r\n`).
+
+  * Simplified the arithmetics example grammar.
+
+  * Switched from `first`/`rest` to `head`/`tail` in PEG.js grammar and example
+    grammars.
+
+  * Started using ESLint instead of JSHint and fixed various problems it found.
+
+  * Added [contribution
+    guidelines](https://github.com/pegjs/pegjs/blob/master/CONTRIBUTING.md).
+
+  * Removed support for io.js.
+
+### Bug Fixes
+
+  * Fixed `bin/pegjs` so that invoking it with one non-option argument which is
+    an extension-less file doesn’t cause that file to be overwritten.
+
+  * Fixed label scoping so that labels in expressions like `(a:"a")` or `(a:"a"
+    b:"b" c:"c")` aren’t visible from the outside.
+
+  * Fixed escaping of generated JavaScript strings & regexps to also escape DEL
+    (U+007F).
+
+  * Fixed the JSON example grammar to correctly handle characters with code
+    points above U+10FF in strings.
+
+  * Fixed multiple compatibility issues of `tools/impact` on OS X.
+
+  * Fixed slow deduplication of expectation descriptions.
+
+[Complete set of changes](https://github.com/pegjs/pegjs/compare/v0.9.0...v0.10.0)
+
 0.9.0
 -----
 

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4490abf2/node_modules/pegjs/LICENSE
----------------------------------------------------------------------
diff --git a/node_modules/pegjs/LICENSE b/node_modules/pegjs/LICENSE
index 89232b5..a3706aa 100644
--- a/node_modules/pegjs/LICENSE
+++ b/node_modules/pegjs/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2010-2015 David Majda
+Copyright (c) 2010-2016 David Majda
 
 Permission is hereby granted, free of charge, to any person
 obtaining a copy of this software and associated documentation


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


Mime
View raw message