Compare commits

..

6 Commits
5.2.1 ... 5.2.x

Author SHA1 Message Date
Steve Gill
2664180b32 updated bundled cordova-common to 1.4.1 2016-08-17 10:05:02 -07:00
Steve Gill
6c80f58e2a Set VERSION to 5.2.2 (via coho) 2016-07-26 14:57:28 -07:00
Steve Gill
75663f59aa Update JS snapshot to version 5.2.2 (via coho) 2016-07-26 14:57:28 -07:00
Steve Gill
15e0b49aae CB-11626 Updated RELEASENOTES and Version for release 5.2.2 2016-07-26 13:25:19 -07:00
Steve Gill
a5a8868d38 updated cordoova-common to 1.4.0 2016-07-26 13:23:45 -07:00
Joe Bowser
81e5179021 Updaing the gradle for the tests to the latest 2016-07-26 13:21:46 -07:00
65 changed files with 613 additions and 368 deletions

View File

@@ -20,6 +20,9 @@
-->
## Release Notes for Cordova (Android) ##
### 5.2.2 (Jul 26, 2016)
* [CB-11615](https://issues.apache.org/jira/browse/CB-11615) updated `cordoova-common` to `1.4.0`
### 5.2.1 (Jul 11, 2016)
* [CB-9489](https://issues.apache.org/jira/browse/CB-9489) Fixed "endless waiting for emulator" issue
* [CB-11481](https://issues.apache.org/jira/browse/CB-11481) android-library is deprecated use com.android.library instead

View File

@@ -1 +1 @@
5.2.1
5.2.2

View File

@@ -20,7 +20,7 @@
*/
// Coho updates this line:
var VERSION = "5.2.1";
var VERSION = "5.2.2";
module.exports.version = VERSION;

View File

@@ -1,5 +1,5 @@
// Platform: android
// 2fd4bcb84048415922d13d80d35b8d1668e8e150
// d403ce434788ffe1937711d6ebcbcc837fcbcb14
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -19,7 +19,7 @@
under the License.
*/
;(function() {
var PLATFORM_VERSION_BUILD_LABEL = '5.2.1';
var PLATFORM_VERSION_BUILD_LABEL = '5.2.2';
// file: src/scripts/require.js
/*jshint -W079 */
@@ -330,7 +330,7 @@ module.exports = cordova;
});
// file: D:/cordova/cordova-android/cordova-js-src/android/nativeapiprovider.js
// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/android/nativeapiprovider.js
define("cordova/android/nativeapiprovider", function(require, exports, module) {
/**
@@ -353,7 +353,7 @@ module.exports = {
});
// file: D:/cordova/cordova-android/cordova-js-src/android/promptbasednativeapi.js
// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/android/promptbasednativeapi.js
define("cordova/android/promptbasednativeapi", function(require, exports, module) {
/**
@@ -862,7 +862,7 @@ module.exports = channel;
});
// file: D:/cordova/cordova-android/cordova-js-src/exec.js
// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/exec.js
define("cordova/exec", function(require, exports, module) {
/**
@@ -1611,7 +1611,7 @@ exports.reset();
});
// file: D:/cordova/cordova-android/cordova-js-src/platform.js
// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/platform.js
define("cordova/platform", function(require, exports, module) {
// The last resume event that was received that had the result of a plugin call.
@@ -1721,7 +1721,7 @@ function onMessageFromNative(msg) {
});
// file: D:/cordova/cordova-android/cordova-js-src/plugin/android/app.js
// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/plugin/android/app.js
define("cordova/plugin/android/app", function(require, exports, module) {
var exec = require('cordova/exec');
@@ -2083,7 +2083,7 @@ utils.clone = function(obj) {
retVal = {};
for(i in obj){
if(!(i in retVal) || retVal[i] != obj[i]) {
if((!(i in retVal) || retVal[i] != obj[i]) && typeof obj[i] != 'undefined') {
retVal[i] = utils.clone(obj[i]);
}
}

View File

@@ -31,7 +31,7 @@ import android.webkit.WebChromeClient.CustomViewCallback;
* are not expected to implement it.
*/
public interface CordovaWebView {
public static final String CORDOVA_VERSION = "5.2.1";
public static final String CORDOVA_VERSION = "5.2.2";
void init(CordovaInterface cordova, List<PluginEntry> pluginEntries, CordovaPreferences preferences);

16
node_modules/.bin/nopt generated vendored
View File

@@ -1,15 +1 @@
#!/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
../nopt/bin/nopt.js

7
node_modules/.bin/nopt.cmd generated vendored
View File

@@ -1,7 +0,0 @@
@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" %*
)

16
node_modules/.bin/semver generated vendored
View File

@@ -1,15 +1 @@
#!/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/../semver/bin/semver" "$@"
ret=$?
else
node "$basedir/../semver/bin/semver" "$@"
ret=$?
fi
exit $ret
../semver/bin/semver

7
node_modules/.bin/semver.cmd generated vendored
View File

@@ -1,7 +0,0 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\semver\bin\semver" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\semver\bin\semver" %*
)

16
node_modules/.bin/shjs generated vendored
View File

@@ -1,15 +1 @@
#!/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
../shelljs/bin/shjs

7
node_modules/.bin/shjs.cmd generated vendored
View File

@@ -1,7 +0,0 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\shelljs\bin\shjs" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\shelljs\bin\shjs" %*
)

6
node_modules/abbrev/package.json generated vendored
View File

@@ -10,7 +10,7 @@
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\nopt"
"/Users/steveng/repo/cordova/cordova-android/node_modules/nopt"
]
],
"_from": "abbrev@>=1.0.0 <2.0.0",
@@ -41,11 +41,11 @@
"_requiredBy": [
"/nopt"
],
"_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz",
"_resolved": "http://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz",
"_shasum": "91b4792588a7738c25f35dd6f63752a2f8776135",
"_shrinkwrap": null,
"_spec": "abbrev@1",
"_where": "d:\\cordova\\cordova-android\\node_modules\\nopt",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/nopt",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me"

6
node_modules/ansi/package.json generated vendored
View File

@@ -10,7 +10,7 @@
"spec": ">=0.3.1 <0.4.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\cordova-common"
"/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common"
]
],
"_from": "ansi@>=0.3.1 <0.4.0",
@@ -37,11 +37,11 @@
"_requiredBy": [
"/cordova-common"
],
"_resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz",
"_resolved": "http://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz",
"_shasum": "0c42d4fb17160d5a9af1e484bace1c66922c1b21",
"_shrinkwrap": null,
"_spec": "ansi@^0.3.1",
"_where": "d:\\cordova\\cordova-android\\node_modules\\cordova-common",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
"author": {
"name": "Nathan Rajlich",
"email": "nathan@tootallnate.net",

View File

@@ -47,7 +47,7 @@ object with those keys:
If there's no match, `undefined` will be returned.
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']`.
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
### var r = balanced.range(a, b, str)
@@ -56,7 +56,7 @@ array with indexes: `[ <a index>, <b index> ]`.
If there's no match, `undefined` will be returned.
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]`.
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.
## Installation

View File

@@ -30,7 +30,7 @@ function range(a, b, str) {
begs = [];
left = str.length;
while (i < str.length && i >= 0 && ! result) {
while (i >= 0 && !result) {
if (i == ai) {
begs.push(i);
ai = str.indexOf(a, i + 1);

View File

@@ -10,24 +10,24 @@
"spec": ">=0.4.1 <0.5.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\brace-expansion"
"/Users/steveng/repo/cordova/cordova-android/node_modules/brace-expansion"
]
],
"_from": "balanced-match@>=0.4.1 <0.5.0",
"_id": "balanced-match@0.4.1",
"_id": "balanced-match@0.4.2",
"_inCache": true,
"_installable": true,
"_location": "/balanced-match",
"_nodeVersion": "6.0.0",
"_nodeVersion": "4.4.7",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/balanced-match-0.4.1.tgz_1462129663650_0.39764496590942144"
"host": "packages-16-east.internal.npmjs.com",
"tmp": "tmp/balanced-match-0.4.2.tgz_1468834991581_0.6590619895141572"
},
"_npmUser": {
"name": "juliangruber",
"email": "julian@juliangruber.com"
},
"_npmVersion": "3.8.6",
"_npmVersion": "2.15.8",
"_phantomChildren": {},
"_requested": {
"raw": "balanced-match@^0.4.1",
@@ -41,11 +41,11 @@
"_requiredBy": [
"/brace-expansion"
],
"_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz",
"_shasum": "19053e2e0748eadb379da6c09d455cf5e1039335",
"_resolved": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz",
"_shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838",
"_shrinkwrap": null,
"_spec": "balanced-match@^0.4.1",
"_where": "d:\\cordova\\cordova-android\\node_modules\\brace-expansion",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/brace-expansion",
"author": {
"name": "Julian Gruber",
"email": "mail@juliangruber.com",
@@ -57,14 +57,14 @@
"dependencies": {},
"description": "Match balanced character pairs, like \"{\" and \"}\"",
"devDependencies": {
"tape": "~4.5.0"
"tape": "^4.6.0"
},
"directories": {},
"dist": {
"shasum": "19053e2e0748eadb379da6c09d455cf5e1039335",
"tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz"
"shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838",
"tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz"
},
"gitHead": "7004b289baaaab6a832f4901735e29d37cc2a863",
"gitHead": "57c2ea29d89a2844ae3bdcc637c6e2cbb73725e2",
"homepage": "https://github.com/juliangruber/balanced-match",
"keywords": [
"match",
@@ -107,5 +107,5 @@
"android-browser/4.2..latest"
]
},
"version": "0.4.1"
"version": "0.4.2"
}

View File

@@ -10,7 +10,7 @@
"spec": "0.0.8",
"type": "version"
},
"d:\\cordova\\cordova-android\\node_modules\\plist"
"/Users/steveng/repo/cordova/cordova-android/node_modules/plist"
]
],
"_from": "base64-js@0.0.8",
@@ -37,11 +37,11 @@
"_requiredBy": [
"/plist"
],
"_resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz",
"_resolved": "http://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz",
"_shasum": "1101e9544f4a76b1bc3b26d452ca96d7a35e7978",
"_shrinkwrap": null,
"_spec": "base64-js@0.0.8",
"_where": "d:\\cordova\\cordova-android\\node_modules\\plist",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/plist",
"author": {
"name": "T. Jameson Little",
"email": "t.jameson.little@gmail.com"

View File

@@ -10,7 +10,7 @@
"spec": ">=1.6.7 <2.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\bplist-parser"
"/Users/steveng/repo/cordova/cordova-android/node_modules/bplist-parser"
]
],
"_from": "big-integer@>=1.6.7 <2.0.0",
@@ -41,11 +41,11 @@
"_requiredBy": [
"/bplist-parser"
],
"_resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.15.tgz",
"_resolved": "http://registry.npmjs.org/big-integer/-/big-integer-1.6.15.tgz",
"_shasum": "33d27d3b7388dfcc4b86d3130c10740cec01fb9e",
"_shrinkwrap": null,
"_spec": "big-integer@^1.6.7",
"_where": "d:\\cordova\\cordova-android\\node_modules\\bplist-parser",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/bplist-parser",
"author": {
"name": "Peter Olson",
"email": "peter.e.c.olson+npm@gmail.com"

View File

@@ -10,7 +10,7 @@
"spec": ">=0.1.0 <0.2.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\cordova-common"
"/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common"
]
],
"_from": "bplist-parser@>=0.1.0 <0.2.0",
@@ -37,11 +37,11 @@
"_requiredBy": [
"/cordova-common"
],
"_resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz",
"_resolved": "http://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz",
"_shasum": "d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6",
"_shrinkwrap": null,
"_spec": "bplist-parser@^0.1.0",
"_where": "d:\\cordova\\cordova-android\\node_modules\\cordova-common",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
"author": {
"name": "Joe Ferner",
"email": "joe.ferner@nearinfinity.com"

View File

@@ -66,6 +66,16 @@ function expandTop(str) {
if (!str)
return [];
// I don't know why Bash 4.3 does this, but it does.
// Anything starting with {} will have the first two bytes preserved
// but *only* at the top level, so {},a}b will not expand to anything,
// but a{},b}c will be expanded to [a}c,abc].
// One could argue that this is a bug in Bash, but since the goal of
// this module is to match Bash's rules, we escape a leading {}
if (str.substr(0, 2) === '{}') {
str = '\\{\\}' + str.substr(2);
}
return expand(escapeBraces(str), true).map(unescapeBraces);
}

View File

@@ -10,24 +10,24 @@
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\minimatch"
"/Users/steveng/repo/cordova/cordova-android/node_modules/minimatch"
]
],
"_from": "brace-expansion@>=1.0.0 <2.0.0",
"_id": "brace-expansion@1.1.5",
"_id": "brace-expansion@1.1.6",
"_inCache": true,
"_installable": true,
"_location": "/brace-expansion",
"_nodeVersion": "4.4.5",
"_nodeVersion": "4.4.7",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
"tmp": "tmp/brace-expansion-1.1.5.tgz_1465989660138_0.34528115345165133"
"tmp": "tmp/brace-expansion-1.1.6.tgz_1469047715600_0.9362958471756428"
},
"_npmUser": {
"name": "juliangruber",
"email": "julian@juliangruber.com"
},
"_npmVersion": "2.15.5",
"_npmVersion": "2.15.8",
"_phantomChildren": {},
"_requested": {
"raw": "brace-expansion@^1.0.0",
@@ -41,11 +41,11 @@
"_requiredBy": [
"/minimatch"
],
"_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.5.tgz",
"_shasum": "f5b4ad574e2cb7ccc1eb83e6fe79b8ecadf7a526",
"_resolved": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz",
"_shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9",
"_shrinkwrap": null,
"_spec": "brace-expansion@^1.0.0",
"_where": "d:\\cordova\\cordova-android\\node_modules\\minimatch",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/minimatch",
"author": {
"name": "Julian Gruber",
"email": "mail@juliangruber.com",
@@ -60,14 +60,14 @@
},
"description": "Brace expansion as known from sh/bash",
"devDependencies": {
"tape": "4.5.1"
"tape": "^4.6.0"
},
"directories": {},
"dist": {
"shasum": "f5b4ad574e2cb7ccc1eb83e6fe79b8ecadf7a526",
"tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.5.tgz"
"shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9",
"tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz"
},
"gitHead": "ff31acab078f1bb696ac4c55ca56ea24e6495fb6",
"gitHead": "791262fa06625e9c5594cde529a21d82086af5f2",
"homepage": "https://github.com/juliangruber/brace-expansion",
"keywords": [],
"license": "MIT",
@@ -109,5 +109,5 @@
"android-browser/4.2..latest"
]
},
"version": "1.1.5"
"version": "1.1.6"
}

View File

@@ -10,7 +10,7 @@
"spec": "0.0.1",
"type": "version"
},
"d:\\cordova\\cordova-android\\node_modules\\brace-expansion"
"/Users/steveng/repo/cordova/cordova-android/node_modules/brace-expansion"
]
],
"_from": "concat-map@0.0.1",
@@ -36,11 +36,11 @@
"_requiredBy": [
"/brace-expansion"
],
"_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"_resolved": "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
"_shrinkwrap": null,
"_spec": "concat-map@0.0.1",
"_where": "d:\\cordova\\cordova-android\\node_modules\\brace-expansion",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/brace-expansion",
"author": {
"name": "James Halliday",
"email": "mail@substack.net",

View File

@@ -28,7 +28,7 @@ Expoeses shared functionality used by [cordova-lib](https://github.com/apache/co
Represents special instance of NodeJS EventEmitter which is intended to be used to post events to cordova-lib and cordova-cli
Usage:
```
```js
var events = require('cordova-common').events;
events.emit('warn', 'Some warning message')
```
@@ -41,7 +41,7 @@ An error class used by Cordova to throw cordova-specific errors. The CordovaErro
Usage:
```
```js
var CordovaError = require('cordova-common').CordovaError;
throw new CordovaError('Some error message', SOME_ERR_CODE);
```
@@ -53,7 +53,7 @@ See [CordovaError](src/CordovaError/CordovaError.js) for supported error codes.
Exposes functionality to deal with cordova project `config.xml` files. For ConfigParser API reference check [ConfigParser Readme](src/ConfigParser/README.md).
Usage:
```
```js
var ConfigParser = require('cordova-common').ConfigParser;
var appConfig = new ConfigParser('path/to/cordova-app/config.xml');
console.log(appconfig.name() + ':' + appConfig.version());
@@ -64,7 +64,7 @@ console.log(appconfig.name() + ':' + appConfig.version());
`PluginInfo` is a wrapper for cordova plugins' `plugin.xml` files. This class may be instantiated directly or via `PluginInfoProvider`. The difference is that `PluginInfoProvider` caches `PluginInfo` instances based on plugin source directory.
Usage:
```
```js
var PluginInfo: require('cordova-common').PluginInfo;
var PluginInfoProvider: require('cordova-common').PluginInfoProvider;
@@ -80,7 +80,7 @@ console.log('The plugin ' + plugin1.id + ' has version ' + plugin1.version)
Utility module for dealing with sequential tasks. Provides a set of tasks that are needed to be done and reverts all tasks that are already completed if one of those tasks fail to complete. Used internally by cordova-lib and platform's plugin installation routines.
Usage:
```
```js
var ActionStack = require('cordova-common').ActionStack;
var stack = new ActionStack()
@@ -104,7 +104,7 @@ stack.process()
Module for spawning child processes with some advanced logic.
Usage:
```
```js
var superspawn = require('cordova-common').superspawn;
superspawn.spawn('adb', ['devices'])
.progress(function(data){
@@ -121,7 +121,7 @@ superspawn.spawn('adb', ['devices'])
A set of utility methods for dealing with xml files.
Usage:
```
```js
var xml = require('cordova-common').xmlHelpers;
var xmlDoc1 = xml.parseElementtreeSync('some/xml/file');

View File

@@ -20,6 +20,13 @@
-->
# Cordova-common Release Notes
### 1.4.1 (Aug 09, 2016)
* Add general purpose `ConfigParser.getAttribute` API
* [CB-11653](https://issues.apache.org/jira/browse/CB-11653) moved `findProjectRoot` from `cordova-lib` to `cordova-common`
* [CB-11636](https://issues.apache.org/jira/browse/CB-11636) Handle attributes with quotes correctly
* [CB-11645](https://issues.apache.org/jira/browse/CB-11645) added check to see if `getEditConfig` exists before trying to use it
* [CB-9825](https://issues.apache.org/jira/browse/CB-9825) framework tag spec parsing
### 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

View File

@@ -27,6 +27,7 @@ addProperty(module, 'superspawn', './src/superspawn');
addProperty(module, 'ActionStack', './src/ActionStack');
addProperty(module, 'CordovaError', './src/CordovaError/CordovaError');
addProperty(module, 'CordovaLogger', './src/CordovaLogger');
addProperty(module, 'CordovaCheck', './src/CordovaCheck');
addProperty(module, 'CordovaExternalToolErrorContext', './src/CordovaError/CordovaExternalToolErrorContext');
addProperty(module, 'PlatformJson', './src/PlatformJson');
addProperty(module, 'ConfigParser', './src/ConfigParser/ConfigParser');

View File

@@ -2,50 +2,50 @@
"_args": [
[
{
"raw": "cordova-common@^1.3.0",
"raw": "cordova-common@^1.4.0",
"scope": null,
"escapedName": "cordova-common",
"name": "cordova-common",
"rawSpec": "^1.3.0",
"spec": ">=1.3.0 <2.0.0",
"rawSpec": "^1.4.0",
"spec": ">=1.4.0 <2.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android"
"/Users/steveng/repo/cordova/cordova-android"
]
],
"_from": "cordova-common@>=1.3.0 <2.0.0",
"_id": "cordova-common@1.3.0",
"_from": "cordova-common@>=1.4.0 <2.0.0",
"_id": "cordova-common@1.4.1",
"_inCache": true,
"_installable": true,
"_location": "/cordova-common",
"_nodeVersion": "5.4.1",
"_nodeVersion": "6.2.2",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
"tmp": "tmp/cordova-common-1.3.0.tgz_1464130094288_0.48495062021538615"
"tmp": "tmp/cordova-common-1.4.1.tgz_1471306335501_0.6723270947113633"
},
"_npmUser": {
"name": "stevegill",
"email": "stevengill97@gmail.com"
},
"_npmVersion": "3.9.0",
"_npmVersion": "3.9.5",
"_phantomChildren": {},
"_requested": {
"raw": "cordova-common@^1.3.0",
"raw": "cordova-common@^1.4.0",
"scope": null,
"escapedName": "cordova-common",
"name": "cordova-common",
"rawSpec": "^1.3.0",
"spec": ">=1.3.0 <2.0.0",
"rawSpec": "^1.4.0",
"spec": ">=1.4.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-1.3.0.tgz",
"_shasum": "f75161f6aa7cef5486fd5d69a3b0a1f628334491",
"_resolved": "file:cordova-dist-dev/CB-11690/cordova-common-1.4.1.tgz",
"_shasum": "8b4f07b3199b398fff553b32bff66676ecd30ab9",
"_shrinkwrap": null,
"_spec": "cordova-common@^1.3.0",
"_where": "d:\\cordova\\cordova-android",
"_spec": "cordova-common@^1.4.0",
"_where": "/Users/steveng/repo/cordova/cordova-android",
"author": {
"name": "Apache Software Foundation"
},
@@ -79,8 +79,8 @@
},
"directories": {},
"dist": {
"shasum": "f75161f6aa7cef5486fd5d69a3b0a1f628334491",
"tarball": "https://registry.npmjs.org/cordova-common/-/cordova-common-1.3.0.tgz"
"shasum": "8b4f07b3199b398fff553b32bff66676ecd30ab9",
"tarball": "https://registry.npmjs.org/cordova-common/-/cordova-common-1.4.1.tgz"
},
"engineStrict": true,
"engines": {
@@ -127,5 +127,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.3.0"
"version": "1.4.1"
}

View File

@@ -36,9 +36,11 @@ var fs = require('fs'),
et = require('elementtree'),
semver = require('semver'),
events = require('../events'),
ConfigKeeper = require('./ConfigKeeper');
ConfigKeeper = require('./ConfigKeeper'),
CordovaLogger = require('../CordovaLogger');
var mungeutil = require('./munge-util');
var xml_helpers = require('../util/xml-helpers');
exports.PlatformMunger = PlatformMunger;
@@ -95,9 +97,13 @@ function remove_plugin_changes(pluginInfo, is_top_level) {
var plugin_vars = is_top_level ?
platform_config.installed_plugins[pluginInfo.id] :
platform_config.dependent_plugins[pluginInfo.id];
var edit_config_changes = null;
if(pluginInfo.getEditConfigs) {
edit_config_changes = pluginInfo.getEditConfigs(self.platform);
}
// get config munge, aka how did this plugin change various config files
var config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars);
var config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes);
// global munge looks at all plugins' changes to config files
var global_munge = platform_config.config_munge;
var munge = mungeutil.decrement_munge(global_munge, config_munge);
@@ -125,12 +131,45 @@ function remove_plugin_changes(pluginInfo, is_top_level) {
PlatformMunger.prototype.add_plugin_changes = add_plugin_changes;
function add_plugin_changes(pluginInfo, plugin_vars, is_top_level, should_increment) {
function add_plugin_changes(pluginInfo, plugin_vars, is_top_level, should_increment, plugin_force) {
var self = this;
var platform_config = self.platformJson.root;
// get config munge, aka how should this plugin change various config files
var config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars);
var edit_config_changes = null;
if(pluginInfo.getEditConfigs) {
edit_config_changes = pluginInfo.getEditConfigs(self.platform);
}
var config_munge;
if (!edit_config_changes || edit_config_changes.length === 0) {
// get config munge, aka how should this plugin change various config files
config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars);
}
else {
var isConflictingInfo = is_conflicting(edit_config_changes, platform_config.config_munge, self, plugin_force);
if (plugin_force) {
CordovaLogger.get().log(CordovaLogger.WARN, '--force is used. edit-config will overwrite conflicts if any. Conflicting plugins may not work as expected.');
// remove conflicting munges
var conflict_munge = mungeutil.decrement_munge(platform_config.config_munge, isConflictingInfo.conflictingMunge);
for (var conflict_file in conflict_munge.files) {
self.apply_file_munge(conflict_file, conflict_munge.files[conflict_file], /* remove = */ true);
}
// force add new munges
config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes);
}
else if(isConflictingInfo.conflictFound) {
throw new Error('There was a conflict trying to modify attributes with <edit-config> in plugin ' + pluginInfo.id +
'. The conflicting plugin, ' + isConflictingInfo.conflictingPlugin + ', already modified the same attributes. The conflict must be resolved before ' +
pluginInfo.id + ' can be added. You may use --force to add the plugin and overwrite the conflicting attributes.');
}
else {
// no conflicts, will handle edit-config
config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes);
}
}
// global munge looks at all plugins' changes to config files
// TODO: The should_increment param is only used by cordova-cli and is going away soon.
@@ -186,13 +225,17 @@ function reapply_global_munge () {
// generate_plugin_config_munge
// Generate the munge object from plugin.xml + vars
PlatformMunger.prototype.generate_plugin_config_munge = generate_plugin_config_munge;
function generate_plugin_config_munge(pluginInfo, vars) {
function generate_plugin_config_munge(pluginInfo, vars, edit_config_changes) {
var self = this;
vars = vars || {};
var munge = { files: {} };
var changes = pluginInfo.getConfigFiles(self.platform);
if(edit_config_changes) {
Array.prototype.push.apply(changes, edit_config_changes);
}
// Demux 'package.appxmanifest' into relevant platform-specific appx manifests.
// Only spend the cycles if there are version-specific plugin settings
if (self.platform === 'windows' &&
@@ -291,12 +334,69 @@ function generate_plugin_config_munge(pluginInfo, vars) {
});
}
// 2. add into munge
mungeutil.deep_add(munge, change.target, change.parent, { xml: stringified, count: 1, after: change.after });
if (change.mode) {
mungeutil.deep_add(munge, change.file, change.target, { xml: stringified, count: 1, mode: change.mode, plugin: pluginInfo.id });
}
else {
mungeutil.deep_add(munge, change.target, change.parent, { xml: stringified, count: 1, after: change.after });
}
});
});
return munge;
}
function is_conflicting(editchanges, config_munge, self, force) {
var files = config_munge.files;
var conflictFound = false;
var conflictingMunge = { files: {} };
var conflictingParent;
var conflictingPlugin;
editchanges.forEach(function(editchange) {
if (files[editchange.file]) {
var parents = files[editchange.file].parents;
var target = parents[editchange.target];
// Check if the edit target will resolve to an existing target
if (!target || target.length === 0) {
var file_xml = self.config_keeper.get(self.project_dir, self.platform, editchange.file).data;
var resolveEditTarget = xml_helpers.resolveParent(file_xml, editchange.target);
var resolveTarget;
if (resolveEditTarget) {
for (var parent in parents) {
resolveTarget = xml_helpers.resolveParent(file_xml, parent);
if (resolveEditTarget === resolveTarget) {
conflictingParent = parent;
target = parents[parent];
break;
}
}
}
}
else {
conflictingParent = editchange.target;
}
if (target.length !== 0) {
// conflict has been found, exit and throw an error
conflictFound = true;
if (!force) {
// since there has been modifications to the attributes at this target,
// the current plugin should not modify the attributes
conflictingPlugin = target[0].plugin;
return;
}
// need to find all conflicts when --force is used, track conflicting munges
mungeutil.deep_add(conflictingMunge, editchange.file, conflictingParent, target[0]);
}
}
});
return {conflictFound: conflictFound, conflictingPlugin: conflictingPlugin, conflictingMunge: conflictingMunge};
}
// Go over the prepare queue and apply the config munges for each plugin
// that has been (un)installed.
PlatformMunger.prototype.process = PlatformMunger_process;
@@ -313,7 +413,7 @@ function PlatformMunger_process(plugins_dir) {
// Now handle installation
platform_config.prepare_queue.installed.forEach(function(u) {
var pluginInfo = self.pluginInfoProvider.get(path.join(plugins_dir, u.plugin));
self.add_plugin_changes(pluginInfo, u.vars, u.topLevel, true);
self.add_plugin_changes(pluginInfo, u.vars, u.topLevel, true, u.force);
});
// Empty out installed/ uninstalled queues.

View File

@@ -103,7 +103,16 @@ ConfigFile.prototype.graft_child = function ConfigFile_graft_child(selector, xml
var result;
if (self.type === 'xml') {
var xml_to_graft = [modules.et.XML(xml_child.xml)];
result = modules.xml_helpers.graftXML(self.data, xml_to_graft, selector, xml_child.after);
switch (xml_child.mode) {
case 'merge':
result = modules.xml_helpers.graftXMLMerge(self.data, xml_to_graft, selector, xml_child);
break;
case 'overwrite':
result = modules.xml_helpers.graftXMLOverwrite(self.data, xml_to_graft, selector, xml_child);
break;
default:
result = modules.xml_helpers.graftXML(self.data, xml_to_graft, selector, xml_child.after);
}
if ( !result) {
throw new Error('Unable to graft xml at selector "' + selector + '" from "' + filepath + '" during config install');
}
@@ -123,7 +132,14 @@ ConfigFile.prototype.prune_child = function ConfigFile_prune_child(selector, xml
var result;
if (self.type === 'xml') {
var xml_to_graft = [modules.et.XML(xml_child.xml)];
result = modules.xml_helpers.pruneXML(self.data, xml_to_graft, selector);
switch (xml_child.mode) {
case 'merge':
case 'overwrite':
result = modules.xml_helpers.pruneXMLRestore(self.data, selector, xml_child);
break;
default:
result = modules.xml_helpers.pruneXML(self.data, xml_to_graft, selector);
}
} else {
// plist file
result = modules.plist_helpers.prunePLIST(self.data, xml_child.xml, selector);

View File

@@ -52,6 +52,9 @@ exports.deep_remove = function deep_remove(obj, keys /* or key1, key2 .... */ )
return element.xml == k.xml;
});
if (found) {
if (parentArray[index].oldAttrib) {
k.oldAttrib = _.extend({}, parentArray[index].oldAttrib);
}
found.count -= k.count;
if (found.count > 0) {
return false;

View File

@@ -90,20 +90,24 @@ function findElementAttributeValue(attributeName, elems) {
}
ConfigParser.prototype = {
getAttribute: function(attr) {
return this.doc.getroot().attrib[attr];
},
packageName: function(id) {
return this.doc.getroot().attrib['id'];
return this.getAttribute('id');
},
setPackageName: function(id) {
this.doc.getroot().attrib['id'] = id;
},
android_packageName: function() {
return this.doc.getroot().attrib['android-packageName'];
return this.getAttribute('android-packageName');
},
android_activityName: function() {
return this.doc.getroot().attrib['android-activityName'];
return this.getAttribute('android-activityName');
},
ios_CFBundleIdentifier: function() {
return this.doc.getroot().attrib['ios-CFBundleIdentifier'];
return this.getAttribute('ios-CFBundleIdentifier');
},
name: function() {
return getNodeTextSafe(this.doc.find('name'));
@@ -120,16 +124,16 @@ ConfigParser.prototype = {
el.text = text;
},
version: function() {
return this.doc.getroot().attrib['version'];
return this.getAttribute('version');
},
windows_packageVersion: function() {
return this.doc.getroot().attrib('windows-packageVersion');
return this.getAttribute('windows-packageVersion');
},
android_versionCode: function() {
return this.doc.getroot().attrib['android-versionCode'];
return this.getAttribute('android-versionCode');
},
ios_CFBundleVersion: function() {
return this.doc.getroot().attrib['ios-CFBundleVersion'];
return this.getAttribute('ios-CFBundleVersion');
},
setVersion: function(value) {
this.doc.getroot().attrib['version'] = value;

76
node_modules/cordova-common/src/CordovaCheck.js generated vendored Normal file
View File

@@ -0,0 +1,76 @@
/**
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
var fs = require('fs'),
path = require('path');
function isRootDir(dir) {
if (fs.existsSync(path.join(dir, 'www'))) {
if (fs.existsSync(path.join(dir, 'config.xml'))) {
// For sure is.
if (fs.existsSync(path.join(dir, 'platforms'))) {
return 2;
} else {
return 1;
}
}
// Might be (or may be under platforms/).
if (fs.existsSync(path.join(dir, 'www', 'config.xml'))) {
return 1;
}
}
return 0;
}
// Runs up the directory chain looking for a .cordova directory.
// IF it is found we are in a Cordova project.
// Omit argument to use CWD.
function isCordova(dir) {
if (!dir) {
// Prefer PWD over cwd so that symlinked dirs within your PWD work correctly (CB-5687).
var pwd = process.env.PWD;
var cwd = process.cwd();
if (pwd && pwd != cwd && pwd != 'undefined') {
return isCordova(pwd) || isCordova(cwd);
}
return isCordova(cwd);
}
var bestReturnValueSoFar = false;
for (var i = 0; i < 1000; ++i) {
var result = isRootDir(dir);
if (result === 2) {
return dir;
}
if (result === 1) {
bestReturnValueSoFar = dir;
}
var parentDir = path.normalize(path.join(dir, '..'));
// Detect fs root.
if (parentDir == dir) {
return bestReturnValueSoFar;
}
dir = parentDir;
}
console.error('Hit an unhandled case in CordovaCheck.isCordova');
return false;
}
module.exports = {
findProjectRoot : isCordova
};

View File

@@ -162,8 +162,8 @@ PlatformJson.prototype.removePluginMetadata = function (pluginInfo) {
return this;
};
PlatformJson.prototype.addInstalledPluginToPrepareQueue = function(pluginDirName, vars, is_top_level) {
this.root.prepare_queue.installed.push({'plugin':pluginDirName, 'vars':vars, 'topLevel':is_top_level});
PlatformJson.prototype.addInstalledPluginToPrepareQueue = function(pluginDirName, vars, is_top_level, force) {
this.root.prepare_queue.installed.push({'plugin':pluginDirName, 'vars':vars, 'topLevel':is_top_level, 'force':force});
};
PlatformJson.prototype.addUninstalledPluginToPrepareQueue = function(pluginId, is_top_level) {
@@ -276,4 +276,3 @@ function ModuleMetadata (pluginId, jsModule) {
}
module.exports = PlatformJson;

View File

@@ -146,6 +146,22 @@ function PluginInfo(dirname) {
return configFile;
}
self.getEditConfigs = getEditConfigs;
function getEditConfigs(platform) {
var editConfigs = _getTags(self._et, 'edit-config', platform, _parseEditConfigs);
return editConfigs;
}
function _parseEditConfigs(tag) {
var editConfig =
{ file : tag.attrib['file']
, target : tag.attrib['target']
, mode : tag.attrib['mode']
, xmls : tag.getchildren()
};
return editConfig;
}
// <info> tags, both global and within a <platform>
// TODO (kamrik): Do we ever use <info> under <platform>? Example wanted.
self.getInfo = getInfo;
@@ -302,6 +318,7 @@ function PluginInfo(dirname) {
parent: el.attrib.parent,
custom: isStrTrue(el.attrib.custom),
src: el.attrib.src,
spec: el.attrib.spec,
weak: isStrTrue(el.attrib.weak),
versions: el.attrib.versions,
targetDir: el.attrib['target-dir'],
@@ -382,7 +399,7 @@ function _getTags(pelem, tag, platform, transform) {
return tags;
}
// Same as _getTags() but only looks inside a platfrom section.
// Same as _getTags() but only looks inside a platform section.
function _getTagsInPlatform(pelem, tag, platform, transform) {
var platformTag = pelem.find('./platform[@name="' + platform + '"]');
var tags = platformTag ? platformTag.findall(tag) : [];

View File

@@ -123,7 +123,7 @@ PluginManager.prototype.doOperation = function (operation, plugin, options) {
if (operation === PluginManager.INSTALL) {
// Ignore passed `is_top_level` option since platform itself doesn't know
// anything about managing dependencies - it's responsibility of caller.
self.munger.add_plugin_changes(plugin, options.variables, /*is_top_level=*/true, /*should_increment=*/true);
self.munger.add_plugin_changes(plugin, options.variables, /*is_top_level=*/true, /*should_increment=*/true, options.force);
self.munger.platformJson.addPluginMetadata(plugin);
} else {
self.munger.remove_plugin_changes(plugin, /*is_top_level=*/true);

View File

@@ -29,6 +29,9 @@ var fs = require('fs')
, et = require('elementtree')
;
var ROOT = /^\/([^\/]*)/,
ABSOLUTE = /^\/([^\/]*)\/(.*)/;
module.exports = {
// compare two et.XML nodes, see if they match
// compares tagName, text, attributes and children (recursively)
@@ -41,23 +44,9 @@ module.exports = {
return false;
}
var oneAttribKeys = Object.keys(one.attrib),
twoAttribKeys = Object.keys(two.attrib),
i = 0, attribName;
if (!attribMatch(one, two)) return false;
if (oneAttribKeys.length != twoAttribKeys.length) {
return false;
}
for (i; i < oneAttribKeys.length; i++) {
attribName = oneAttribKeys[i];
if (one.attrib[attribName] != two.attrib[attribName]) {
return false;
}
}
for (i; i < one._children.length; i++) {
for (var i = 0; i < one._children.length; i++) {
if (!module.exports.equalNodes(one._children[i], two._children[i])) {
return false;
}
@@ -68,7 +57,7 @@ module.exports = {
// adds node to doc at selector, creating parent if it doesn't exist
graftXML: function(doc, nodes, selector, after) {
var parent = resolveParent(doc, selector);
var parent = module.exports.resolveParent(doc, selector);
if (!parent) {
//Try to create the parent recursively if necessary
try {
@@ -79,7 +68,7 @@ module.exports = {
} catch (e) {
return false;
}
parent = resolveParent(doc, selector);
parent = module.exports.resolveParent(doc, selector);
if (!parent) return false;
}
@@ -97,9 +86,54 @@ module.exports = {
return true;
},
// adds new attributes to doc at selector
// Will only merge if attribute has not been modified already or --force is used
graftXMLMerge: function(doc, nodes, selector, xml) {
var target = module.exports.resolveParent(doc, selector);
if (!target) return false;
// saves the attributes of the original xml before making changes
xml.oldAttrib = _.extend({}, target.attrib);
nodes.forEach(function (node) {
var attributes = node.attrib;
for (var attribute in attributes) {
target.attrib[attribute] = node.attrib[attribute];
}
});
return true;
},
// overwrite all attributes to doc at selector with new attributes
// Will only overwrite if attribute has not been modified already or --force is used
graftXMLOverwrite: function(doc, nodes, selector, xml) {
var target = module.exports.resolveParent(doc, selector);
if (!target) return false;
// saves the attributes of the original xml before making changes
xml.oldAttrib = _.extend({}, target.attrib);
// remove old attributes from target
var targetAttributes = target.attrib;
for (var targetAttribute in targetAttributes) {
delete targetAttributes[targetAttribute];
}
// add new attributes to target
nodes.forEach(function (node) {
var attributes = node.attrib;
for (var attribute in attributes) {
target.attrib[attribute] = node.attrib[attribute];
}
});
return true;
},
// removes node from doc at selector
pruneXML: function(doc, nodes, selector) {
var parent = resolveParent(doc, selector);
var parent = module.exports.resolveParent(doc, selector);
if (!parent) return false;
nodes.forEach(function (node) {
@@ -114,6 +148,19 @@ module.exports = {
return true;
},
// restores attributes from doc at selector
pruneXMLRestore: function(doc, selector, xml) {
var target = module.exports.resolveParent(doc, selector);
if (!target) return false;
if (xml.oldAttrib) {
target.attrib = _.extend({}, xml.oldAttrib);
}
return true;
},
parseElementtreeSync: function (filename) {
var contents = fs.readFileSync(filename, 'utf-8');
if(contents) {
@@ -121,6 +168,30 @@ module.exports = {
contents = contents.substring(contents.indexOf('<'));
}
return new et.ElementTree(et.XML(contents));
},
resolveParent: function (doc, selector) {
var parent, tagName, subSelector;
// handle absolute selector (which elementtree doesn't like)
if (ROOT.test(selector)) {
tagName = selector.match(ROOT)[1];
// test for wildcard "any-tag" root selector
if (tagName == '*' || tagName === doc._root.tag) {
parent = doc._root;
// could be an absolute path, but not selecting the root
if (ABSOLUTE.test(selector)) {
subSelector = selector.match(ABSOLUTE)[2];
parent = parent.find(subSelector);
}
} else {
return false;
}
} else {
parent = doc.find(selector);
}
return parent;
}
};
@@ -152,33 +223,6 @@ function uniqueChild(node, parent) {
}
}
var ROOT = /^\/([^\/]*)/,
ABSOLUTE = /^\/([^\/]*)\/(.*)/;
function resolveParent(doc, selector) {
var parent, tagName, subSelector;
// handle absolute selector (which elementtree doesn't like)
if (ROOT.test(selector)) {
tagName = selector.match(ROOT)[1];
// test for wildcard "any-tag" root selector
if (tagName == '*' || tagName === doc._root.tag) {
parent = doc._root;
// could be an absolute path, but not selecting the root
if (ABSOLUTE.test(selector)) {
subSelector = selector.match(ABSOLUTE)[2];
parent = parent.find(subSelector);
}
} else {
return false;
}
} else {
parent = doc.find(selector);
}
return parent;
}
// Find the index at which to insert an entry. After is a ;-separated priority list
// of tags after which the insertion should be made. E.g. If we need to
// insert an element C, and the rule is that the order of children has to be
@@ -229,47 +273,44 @@ function mergeXml(src, dest, platform, clobber) {
query = srcTag + '',
shouldMerge = true;
if (BLACKLIST.indexOf(srcTag) === -1) {
if (SINGLETONS.indexOf(srcTag) !== -1) {
foundChild = dest.find(query);
if (foundChild) {
destChild = foundChild;
dest.remove(destChild);
}
} else {
//Check for an exact match and if you find one don't add
Object.getOwnPropertyNames(srcChild.attrib).forEach(function (attribute) {
query += '[@' + attribute + '="' + srcChild.attrib[attribute] + '"]';
});
var foundChildren = dest.findall(query);
for(var i = 0; i < foundChildren.length; i++) {
foundChild = foundChildren[i];
if (foundChild && textMatch(srcChild, foundChild) && (Object.keys(srcChild.attrib).length==Object.keys(foundChild.attrib).length)) {
destChild = foundChild;
dest.remove(destChild);
shouldMerge = false;
break;
}
}
}
if (BLACKLIST.indexOf(srcTag) !== -1) return;
mergeXml(srcChild, destChild, platform, clobber && shouldMerge);
dest.append(destChild);
if (SINGLETONS.indexOf(srcTag) !== -1) {
foundChild = dest.find(query);
if (foundChild) {
destChild = foundChild;
dest.remove(destChild);
}
} else {
//Check for an exact match and if you find one don't add
var mergeCandidates = dest.findall(query)
.filter(function (foundChild) {
return foundChild && textMatch(srcChild, foundChild) && attribMatch(srcChild, foundChild);
});
if (mergeCandidates.length > 0) {
destChild = mergeCandidates[0];
dest.remove(destChild);
shouldMerge = false;
}
}
mergeXml(srcChild, destChild, platform, clobber && shouldMerge);
dest.append(destChild);
}
function removeDuplicatePreferences(xml) {
// reduce preference tags to a hashtable to remove dupes
var prefHash = xml.findall('preference[@name][@value]').reduce(function(previousValue, currentValue) {
previousValue[ currentValue.attrib.name ] = currentValue.attrib.value;
return previousValue;
}, {});
// remove all preferences
xml.findall('preference[@name][@value]').forEach(function(pref) {
xml.remove(pref);
});
// write new preferences
Object.keys(prefHash).forEach(function(key, index) {
var element = et.SubElement(xml, 'preference');
@@ -287,3 +328,22 @@ function textMatch(elm1, elm2) {
text2 = elm2.text ? elm2.text.replace(/\s+/, '') : '';
return (text1 === '' || text1 === text2);
}
function attribMatch(one, two) {
var oneAttribKeys = Object.keys(one.attrib);
var twoAttribKeys = Object.keys(two.attrib);
if (oneAttribKeys.length != twoAttribKeys.length) {
return false;
}
for (var i = 0; i < oneAttribKeys.length; i++) {
var attribName = oneAttribKeys[i];
if (one.attrib[attribName] != two.attrib[attribName]) {
return false;
}
}
return true;
}

View File

@@ -10,7 +10,7 @@
"spec": ">=1.1.8 <2.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\cordova-common"
"/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common"
]
],
"_from": "cordova-registry-mapper@>=1.1.8 <2.0.0",
@@ -37,11 +37,11 @@
"_requiredBy": [
"/cordova-common"
],
"_resolved": "https://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.15.tgz",
"_resolved": "http://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.15.tgz",
"_shasum": "e244b9185b8175473bff6079324905115f83dc7c",
"_shrinkwrap": null,
"_spec": "cordova-registry-mapper@^1.1.8",
"_where": "d:\\cordova\\cordova-android\\node_modules\\cordova-common",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
"author": {
"name": "Steve Gill"
},

View File

@@ -10,7 +10,7 @@
"spec": ">=0.1.6 <0.2.0",
"type": "range"
},
"d:\\cordova\\cordova-android"
"/Users/steveng/repo/cordova/cordova-android"
]
],
"_from": "elementtree@>=0.1.6 <0.2.0",
@@ -37,11 +37,11 @@
"/",
"/cordova-common"
],
"_resolved": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz",
"_resolved": "http://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz",
"_shasum": "2ac4c46ea30516c8c4cbdb5e3ac7418e592de20c",
"_shrinkwrap": null,
"_spec": "elementtree@^0.1.6",
"_where": "d:\\cordova\\cordova-android",
"_where": "/Users/steveng/repo/cordova/cordova-android",
"author": {
"name": "Rackspace US, Inc."
},

6
node_modules/glob/package.json generated vendored
View File

@@ -10,7 +10,7 @@
"spec": ">=5.0.13 <6.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\cordova-common"
"/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common"
]
],
"_from": "glob@>=5.0.13 <6.0.0",
@@ -37,11 +37,11 @@
"_requiredBy": [
"/cordova-common"
],
"_resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
"_resolved": "http://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
"_shasum": "1bc936b9e02f4a603fcc222ecf7633d30b8b93b1",
"_shrinkwrap": null,
"_spec": "glob@^5.0.13",
"_where": "d:\\cordova\\cordova-android\\node_modules\\cordova-common",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",

6
node_modules/inflight/package.json generated vendored
View File

@@ -10,7 +10,7 @@
"spec": ">=1.0.4 <2.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\glob"
"/Users/steveng/repo/cordova/cordova-android/node_modules/glob"
]
],
"_from": "inflight@>=1.0.4 <2.0.0",
@@ -41,11 +41,11 @@
"_requiredBy": [
"/glob"
],
"_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz",
"_resolved": "http://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz",
"_shasum": "db3204cd5a9de2e6cd890b85c6e2f66bcf4f620a",
"_shrinkwrap": null,
"_spec": "inflight@^1.0.4",
"_where": "d:\\cordova\\cordova-android\\node_modules\\glob",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/glob",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",

6
node_modules/inherits/package.json generated vendored
View File

@@ -10,7 +10,7 @@
"spec": ">=2.0.0 <3.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\glob"
"/Users/steveng/repo/cordova/cordova-android/node_modules/glob"
]
],
"_from": "inherits@>=2.0.0 <3.0.0",
@@ -36,11 +36,11 @@
"_requiredBy": [
"/glob"
],
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
"_resolved": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
"_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1",
"_shrinkwrap": null,
"_spec": "inherits@2",
"_where": "d:\\cordova\\cordova-android\\node_modules\\glob",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/glob",
"browser": "./inherits_browser.js",
"bugs": {
"url": "https://github.com/isaacs/inherits/issues"

6
node_modules/lodash/package.json generated vendored
View File

@@ -10,7 +10,7 @@
"spec": ">=3.5.0 <4.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\xmlbuilder"
"/Users/steveng/repo/cordova/cordova-android/node_modules/xmlbuilder"
]
],
"_from": "lodash@>=3.5.0 <4.0.0",
@@ -37,11 +37,11 @@
"_requiredBy": [
"/xmlbuilder"
],
"_resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
"_resolved": "http://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
"_shasum": "5bf45e8e49ba4189e17d482789dfd15bd140b7b6",
"_shrinkwrap": null,
"_spec": "lodash@^3.5.0",
"_where": "d:\\cordova\\cordova-android\\node_modules\\xmlbuilder",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/xmlbuilder",
"author": {
"name": "John-David Dalton",
"email": "john.david.dalton@gmail.com",

39
node_modules/minimatch/minimatch.js generated vendored
View File

@@ -9,6 +9,14 @@ try {
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
var expand = require('brace-expansion')
var plTypes = {
'!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
'?': { open: '(?:', close: ')?' },
'+': { open: '(?:', close: ')+' },
'*': { open: '(?:', close: ')*' },
'@': { open: '(?:', close: ')' }
}
// any single thing other than /
// don't need to escape / when using new RegExp()
var qmark = '[^/]'
@@ -277,7 +285,6 @@ function parse (pattern, isSub) {
// ? => one single character
var patternListStack = []
var negativeLists = []
var plType
var stateChar
var inClass = false
var reClassStart = -1
@@ -376,11 +383,12 @@ function parse (pattern, isSub) {
continue
}
plType = stateChar
patternListStack.push({
type: plType,
type: stateChar,
start: i - 1,
reStart: re.length
reStart: re.length,
open: plTypes[stateChar].open,
close: plTypes[stateChar].close
})
// negation is (?:(?!js)[^/]*)
re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
@@ -396,24 +404,14 @@ function parse (pattern, isSub) {
clearStateChar()
hasMagic = true
re += ')'
var pl = patternListStack.pop()
plType = pl.type
// negation is (?:(?!js)[^/]*)
// The others are (?:<pattern>)<type>
switch (plType) {
case '!':
negativeLists.push(pl)
re += ')[^/]*?)'
pl.reEnd = re.length
break
case '?':
case '+':
case '*':
re += plType
break
case '@': break // the default anyway
re += pl.close
if (pl.type === '!') {
negativeLists.push(pl)
}
pl.reEnd = re.length
continue
case '|':
@@ -520,7 +518,8 @@ function parse (pattern, isSub) {
// Go through and escape them, taking care not to double-escape any
// | chars that were already escaped.
for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
var tail = re.slice(pl.reStart + 3)
var tail = re.slice(pl.reStart + pl.open.length)
this.debug('setting tail', re, pl)
// maybe some even number of \, then maybe 1 \, followed by a |
tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
if (!$2) {
@@ -537,7 +536,7 @@ function parse (pattern, isSub) {
return $1 + $1 + $2 + '|'
})
this.debug('tail=%j\n %s', tail, tail)
this.debug('tail=%j\n %s', tail, tail, pl, re)
var t = pl.type === '*' ? star
: pl.type === '?' ? qmark
: '\\' + pl.type

24
node_modules/minimatch/package.json generated vendored
View File

@@ -10,24 +10,24 @@
"spec": ">=3.0.0 <4.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\cordova-common"
"/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common"
]
],
"_from": "minimatch@>=3.0.0 <4.0.0",
"_id": "minimatch@3.0.2",
"_id": "minimatch@3.0.3",
"_inCache": true,
"_installable": true,
"_location": "/minimatch",
"_nodeVersion": "4.4.4",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
"tmp": "tmp/minimatch-3.0.2.tgz_1466194379770_0.11417287751100957"
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/minimatch-3.0.3.tgz_1470678322731_0.1892083385027945"
},
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
},
"_npmVersion": "3.9.1",
"_npmVersion": "3.10.6",
"_phantomChildren": {},
"_requested": {
"raw": "minimatch@^3.0.0",
@@ -42,11 +42,11 @@
"/cordova-common",
"/glob"
],
"_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz",
"_shasum": "0f398a7300ea441e9c348c83d98ab8c9dbf9c40a",
"_resolved": "http://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz",
"_shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774",
"_shrinkwrap": null,
"_spec": "minimatch@^3.0.0",
"_where": "d:\\cordova\\cordova-android\\node_modules\\cordova-common",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -65,8 +65,8 @@
},
"directories": {},
"dist": {
"shasum": "0f398a7300ea441e9c348c83d98ab8c9dbf9c40a",
"tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz"
"shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774",
"tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz"
},
"engines": {
"node": "*"
@@ -74,7 +74,7 @@
"files": [
"minimatch.js"
],
"gitHead": "81edb7c763abd31ba981c87ec5e835f178786be0",
"gitHead": "eed89491bd4a4e6bc463aac0dfb5c29ef0d1dc13",
"homepage": "https://github.com/isaacs/minimatch#readme",
"license": "ISC",
"main": "minimatch.js",
@@ -95,5 +95,5 @@
"posttest": "standard minimatch.js test/*.js",
"test": "tap test/*.js"
},
"version": "3.0.2"
"version": "3.0.3"
}

6
node_modules/nopt/package.json generated vendored
View File

@@ -10,7 +10,7 @@
"spec": ">=3.0.1 <4.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android"
"/Users/steveng/repo/cordova/cordova-android"
]
],
"_from": "nopt@>=3.0.1 <4.0.0",
@@ -37,11 +37,11 @@
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
"_resolved": "http://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
"_shasum": "c6465dbf08abcd4db359317f79ac68a646b28ff9",
"_shrinkwrap": null,
"_spec": "nopt@^3.0.1",
"_where": "d:\\cordova\\cordova-android",
"_where": "/Users/steveng/repo/cordova/cordova-android",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",

6
node_modules/once/package.json generated vendored
View File

@@ -10,7 +10,7 @@
"spec": ">=1.3.0 <2.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\glob"
"/Users/steveng/repo/cordova/cordova-android/node_modules/glob"
]
],
"_from": "once@>=1.3.0 <2.0.0",
@@ -38,11 +38,11 @@
"/glob",
"/inflight"
],
"_resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz",
"_resolved": "http://registry.npmjs.org/once/-/once-1.3.3.tgz",
"_shasum": "b2e261557ce4c314ec8304f3fa82663e4297ca20",
"_shrinkwrap": null,
"_spec": "once@^1.3.0",
"_where": "d:\\cordova\\cordova-android\\node_modules\\glob",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/glob",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",

View File

@@ -10,7 +10,7 @@
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\osenv"
"/Users/steveng/repo/cordova/cordova-android/node_modules/osenv"
]
],
"_from": "os-homedir@>=1.0.0 <2.0.0",
@@ -37,11 +37,11 @@
"_requiredBy": [
"/osenv"
],
"_resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.1.tgz",
"_resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.1.tgz",
"_shasum": "0d62bdf44b916fd3bbdcf2cab191948fb094f007",
"_shrinkwrap": null,
"_spec": "os-homedir@^1.0.0",
"_where": "d:\\cordova\\cordova-android\\node_modules\\osenv",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/osenv",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",

View File

@@ -10,7 +10,7 @@
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\osenv"
"/Users/steveng/repo/cordova/cordova-android/node_modules/osenv"
]
],
"_from": "os-tmpdir@>=1.0.0 <2.0.0",
@@ -37,11 +37,11 @@
"_requiredBy": [
"/osenv"
],
"_resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.1.tgz",
"_resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.1.tgz",
"_shasum": "e9b423a1edaf479882562e92ed71d7743a071b6e",
"_shrinkwrap": null,
"_spec": "os-tmpdir@^1.0.0",
"_where": "d:\\cordova\\cordova-android\\node_modules\\osenv",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/osenv",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",

6
node_modules/osenv/package.json generated vendored
View File

@@ -10,7 +10,7 @@
"spec": ">=0.1.3 <0.2.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\cordova-common"
"/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common"
]
],
"_from": "osenv@>=0.1.3 <0.2.0",
@@ -37,11 +37,11 @@
"_requiredBy": [
"/cordova-common"
],
"_resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz",
"_resolved": "http://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz",
"_shasum": "83cf05c6d6458fc4d5ac6362ea325d92f2754217",
"_shrinkwrap": null,
"_spec": "osenv@^0.1.3",
"_where": "d:\\cordova\\cordova-android\\node_modules\\cordova-common",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",

View File

@@ -10,7 +10,7 @@
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\glob"
"/Users/steveng/repo/cordova/cordova-android/node_modules/glob"
]
],
"_from": "path-is-absolute@>=1.0.0 <2.0.0",
@@ -37,11 +37,11 @@
"_requiredBy": [
"/glob"
],
"_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz",
"_resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz",
"_shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912",
"_shrinkwrap": null,
"_spec": "path-is-absolute@^1.0.0",
"_where": "d:\\cordova\\cordova-android\\node_modules\\glob",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/glob",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",

6
node_modules/plist/package.json generated vendored
View File

@@ -10,7 +10,7 @@
"spec": ">=1.2.0 <2.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\cordova-common"
"/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common"
]
],
"_from": "plist@>=1.2.0 <2.0.0",
@@ -37,11 +37,11 @@
"_requiredBy": [
"/cordova-common"
],
"_resolved": "https://registry.npmjs.org/plist/-/plist-1.2.0.tgz",
"_resolved": "http://registry.npmjs.org/plist/-/plist-1.2.0.tgz",
"_shasum": "084b5093ddc92506e259f874b8d9b1afb8c79593",
"_shrinkwrap": null,
"_spec": "plist@^1.2.0",
"_where": "d:\\cordova\\cordova-android\\node_modules\\cordova-common",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
"author": {
"name": "Nathan Rajlich",
"email": "nathan@tootallnate.net"

View File

@@ -10,7 +10,7 @@
"spec": ">=0.2.3 <0.3.0",
"type": "range"
},
"d:\\cordova\\cordova-android"
"/Users/steveng/repo/cordova/cordova-android"
]
],
"_from": "properties-parser@>=0.2.3 <0.3.0",
@@ -36,11 +36,11 @@
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/properties-parser/-/properties-parser-0.2.3.tgz",
"_resolved": "http://registry.npmjs.org/properties-parser/-/properties-parser-0.2.3.tgz",
"_shasum": "f7591255f707abbff227c7b56b637dbb0373a10f",
"_shrinkwrap": null,
"_spec": "properties-parser@^0.2.3",
"_where": "d:\\cordova\\cordova-android",
"_where": "/Users/steveng/repo/cordova/cordova-android",
"bugs": {
"url": "https://github.com/xavi-/node-properties-parser/issues"
},

6
node_modules/q/package.json generated vendored
View File

@@ -10,7 +10,7 @@
"spec": ">=1.4.1 <2.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android"
"/Users/steveng/repo/cordova/cordova-android"
]
],
"_from": "q@>=1.4.1 <2.0.0",
@@ -38,11 +38,11 @@
"/",
"/cordova-common"
],
"_resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz",
"_resolved": "http://registry.npmjs.org/q/-/q-1.4.1.tgz",
"_shasum": "55705bcd93c5f3673530c2c2cbc0c2b3addc286e",
"_shrinkwrap": null,
"_spec": "q@^1.4.1",
"_where": "d:\\cordova\\cordova-android",
"_where": "/Users/steveng/repo/cordova/cordova-android",
"author": {
"name": "Kris Kowal",
"email": "kris@cixar.com",

6
node_modules/sax/package.json generated vendored
View File

@@ -10,7 +10,7 @@
"spec": "0.3.5",
"type": "version"
},
"d:\\cordova\\cordova-android\\node_modules\\elementtree"
"/Users/steveng/repo/cordova/cordova-android/node_modules/elementtree"
]
],
"_defaultsLoaded": true,
@@ -39,11 +39,11 @@
"_requiredBy": [
"/elementtree"
],
"_resolved": "https://registry.npmjs.org/sax/-/sax-0.3.5.tgz",
"_resolved": "http://registry.npmjs.org/sax/-/sax-0.3.5.tgz",
"_shasum": "88fcfc1f73c0c8bbd5b7c776b6d3f3501eed073d",
"_shrinkwrap": null,
"_spec": "sax@0.3.5",
"_where": "d:\\cordova\\cordova-android\\node_modules\\elementtree",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/elementtree",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",

4
node_modules/semver/README.md generated vendored
View File

@@ -4,6 +4,8 @@ semver(1) -- The semantic versioner for npm
## Usage
$ npm install semver
$ node
var semver = require('semver')
semver.valid('1.2.3') // '1.2.3'
semver.valid('a.b.c') // null
@@ -325,6 +327,8 @@ strings that they parse.
range.
* `maxSatisfying(versions, range)`: Return the highest version in the list
that satisfies the range, or `null` if none of them do.
* `minSatisfying(versions, range)`: Return the lowest version in the list
that satisfies the range, or `null` if none of them do.
* `gtr(version, range)`: Return `true` if version is greater than all the
versions possible in the range.
* `ltr(version, range)`: Return `true` if version is less than all the

22
node_modules/semver/package.json generated vendored
View File

@@ -10,24 +10,24 @@
"spec": ">=5.0.1 <6.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\cordova-common"
"/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common"
]
],
"_from": "semver@>=5.0.1 <6.0.0",
"_id": "semver@5.2.0",
"_id": "semver@5.3.0",
"_inCache": true,
"_installable": true,
"_location": "/semver",
"_nodeVersion": "4.4.4",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/semver-5.2.0.tgz_1467136841238_0.2250258030835539"
"tmp": "tmp/semver-5.3.0.tgz_1468515166602_0.9155273644719273"
},
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
},
"_npmVersion": "3.10.2",
"_npmVersion": "3.10.6",
"_phantomChildren": {},
"_requested": {
"raw": "semver@^5.0.1",
@@ -41,11 +41,11 @@
"_requiredBy": [
"/cordova-common"
],
"_resolved": "https://registry.npmjs.org/semver/-/semver-5.2.0.tgz",
"_shasum": "281995b80c1448209415ddbc4cf50c269cef55c5",
"_resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
"_shasum": "9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f",
"_shrinkwrap": null,
"_spec": "semver@^5.0.1",
"_where": "d:\\cordova\\cordova-android\\node_modules\\cordova-common",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
"bin": {
"semver": "./bin/semver"
},
@@ -59,15 +59,15 @@
},
"directories": {},
"dist": {
"shasum": "281995b80c1448209415ddbc4cf50c269cef55c5",
"tarball": "https://registry.npmjs.org/semver/-/semver-5.2.0.tgz"
"shasum": "9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f",
"tarball": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz"
},
"files": [
"bin",
"range.bnf",
"semver.js"
],
"gitHead": "f7fef36765c53ebe237bf415c3ea002f24aa5621",
"gitHead": "d21444a0658224b152ce54965d02dbe0856afb84",
"homepage": "https://github.com/npm/node-semver#readme",
"license": "ISC",
"main": "semver.js",
@@ -91,5 +91,5 @@
"scripts": {
"test": "tap test/*.js"
},
"version": "5.2.0"
"version": "5.3.0"
}

19
node_modules/semver/semver.js generated vendored
View File

@@ -314,9 +314,9 @@ function SemVer(version, loose) {
else
this.prerelease = m[4].split('.').map(function(id) {
if (/^[0-9]+$/.test(id)) {
var num = +id
var num = +id;
if (num >= 0 && num < MAX_SAFE_INTEGER)
return num
return num;
}
return id;
});
@@ -966,11 +966,11 @@ function replaceXRange(comp, loose) {
} else if (gtlt === '<=') {
// <=0.7.x is actually <0.8.0, since any 0.7.x should
// pass. Similarly, <=7.x is actually <8.0.0, etc.
gtlt = '<'
gtlt = '<';
if (xm)
M = +M + 1
M = +M + 1;
else
m = +m + 1
m = +m + 1;
}
ret = gtlt + M + '.' + m + '.' + p;
@@ -1094,6 +1094,15 @@ function maxSatisfying(versions, range, loose) {
})[0] || null;
}
exports.minSatisfying = minSatisfying;
function minSatisfying(versions, range, loose) {
return versions.filter(function(version) {
return satisfies(version, range, loose);
}).sort(function(a, b) {
return compare(a, b, loose);
})[0] || null;
}
exports.validRange = validRange;
function validRange(range, loose) {
try {

6
node_modules/shelljs/package.json generated vendored
View File

@@ -10,7 +10,7 @@
"spec": ">=0.5.3 <0.6.0",
"type": "range"
},
"d:\\cordova\\cordova-android"
"/Users/steveng/repo/cordova/cordova-android"
]
],
"_from": "shelljs@>=0.5.3 <0.6.0",
@@ -38,11 +38,11 @@
"/",
"/cordova-common"
],
"_resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz",
"_resolved": "http://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz",
"_shasum": "c54982b996c76ef0c1e6b59fbdc5825f5b713113",
"_shrinkwrap": null,
"_spec": "shelljs@^0.5.3",
"_where": "d:\\cordova\\cordova-android",
"_where": "/Users/steveng/repo/cordova/cordova-android",
"author": {
"name": "Artur Adib",
"email": "arturadib@gmail.com"

View File

@@ -10,7 +10,7 @@
"spec": ">=1.8.3 <2.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\cordova-common"
"/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common"
]
],
"_from": "underscore@>=1.8.3 <2.0.0",
@@ -36,11 +36,11 @@
"_requiredBy": [
"/cordova-common"
],
"_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz",
"_resolved": "http://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz",
"_shasum": "4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022",
"_shrinkwrap": null,
"_spec": "underscore@^1.8.3",
"_where": "d:\\cordova\\cordova-android\\node_modules\\cordova-common",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
"author": {
"name": "Jeremy Ashkenas",
"email": "jeremy@documentcloud.org"

6
node_modules/unorm/package.json generated vendored
View File

@@ -10,7 +10,7 @@
"spec": ">=1.3.3 <2.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\cordova-common"
"/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common"
]
],
"_from": "unorm@>=1.3.3 <2.0.0",
@@ -36,11 +36,11 @@
"_requiredBy": [
"/cordova-common"
],
"_resolved": "https://registry.npmjs.org/unorm/-/unorm-1.4.1.tgz",
"_resolved": "http://registry.npmjs.org/unorm/-/unorm-1.4.1.tgz",
"_shasum": "364200d5f13646ca8bcd44490271335614792300",
"_shrinkwrap": null,
"_spec": "unorm@^1.3.3",
"_where": "d:\\cordova\\cordova-android\\node_modules\\cordova-common",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
"author": {
"name": "Bjarke Walling",
"email": "bwp@bwp.dk"

View File

@@ -10,7 +10,7 @@
"spec": "1.0.2",
"type": "version"
},
"d:\\cordova\\cordova-android\\node_modules\\plist"
"/Users/steveng/repo/cordova/cordova-android/node_modules/plist"
]
],
"_from": "util-deprecate@1.0.2",
@@ -37,11 +37,11 @@
"_requiredBy": [
"/plist"
],
"_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"_resolved": "http://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf",
"_shrinkwrap": null,
"_spec": "util-deprecate@1.0.2",
"_where": "d:\\cordova\\cordova-android\\node_modules\\plist",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/plist",
"author": {
"name": "Nathan Rajlich",
"email": "nathan@tootallnate.net",

6
node_modules/wrappy/package.json generated vendored
View File

@@ -10,7 +10,7 @@
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\inflight"
"/Users/steveng/repo/cordova/cordova-android/node_modules/inflight"
]
],
"_from": "wrappy@>=1.0.0 <2.0.0",
@@ -42,11 +42,11 @@
"/inflight",
"/once"
],
"_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"_resolved": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f",
"_shrinkwrap": null,
"_spec": "wrappy@1",
"_where": "d:\\cordova\\cordova-android\\node_modules\\inflight",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/inflight",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",

View File

@@ -10,7 +10,7 @@
"spec": "4.0.0",
"type": "version"
},
"d:\\cordova\\cordova-android\\node_modules\\plist"
"/Users/steveng/repo/cordova/cordova-android/node_modules/plist"
]
],
"_from": "xmlbuilder@4.0.0",
@@ -36,11 +36,11 @@
"_requiredBy": [
"/plist"
],
"_resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.0.0.tgz",
"_resolved": "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.0.0.tgz",
"_shasum": "98b8f651ca30aa624036f127d11cc66dc7b907a3",
"_shrinkwrap": null,
"_spec": "xmlbuilder@4.0.0",
"_where": "d:\\cordova\\cordova-android\\node_modules\\plist",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/plist",
"author": {
"name": "Ozgur Ozcitak",
"email": "oozcitak@gmail.com"

6
node_modules/xmldom/package.json generated vendored
View File

@@ -10,7 +10,7 @@
"spec": ">=0.1.0 <0.2.0",
"type": "range"
},
"d:\\cordova\\cordova-android\\node_modules\\plist"
"/Users/steveng/repo/cordova/cordova-android/node_modules/plist"
]
],
"_from": "xmldom@>=0.1.0 <0.2.0",
@@ -37,11 +37,11 @@
"_requiredBy": [
"/plist"
],
"_resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.22.tgz",
"_resolved": "http://registry.npmjs.org/xmldom/-/xmldom-0.1.22.tgz",
"_shasum": "10de4e5e964981f03c8cc72fadc08d14b6c3aa26",
"_shrinkwrap": null,
"_spec": "xmldom@0.1.x",
"_where": "d:\\cordova\\cordova-android\\node_modules\\plist",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/plist",
"author": {
"name": "jindw",
"email": "jindw@xidea.org",

View File

@@ -1,6 +1,6 @@
{
"name": "cordova-android",
"version": "5.2.1",
"version": "5.2.2",
"description": "cordova-android release",
"bin": {
"create": "bin/create"
@@ -24,7 +24,7 @@
"author": "Apache Software Foundation",
"license": "Apache-2.0",
"dependencies": {
"cordova-common": "^1.3.0",
"cordova-common": "^1.4.0",
"elementtree": "^0.1.6",
"nopt": "^3.0.1",
"properties-parser": "^0.2.3",

View File

@@ -25,7 +25,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.android.tools.build:gradle:2.1.2'
}
}