diff --git a/bin/templates/cordova/lib/plugin-build.gradle b/bin/templates/cordova/lib/plugin-build.gradle
index d1c63365..bf8c59ac 100644
--- a/bin/templates/cordova/lib/plugin-build.gradle
+++ b/bin/templates/cordova/lib/plugin-build.gradle
@@ -20,8 +20,10 @@
buildscript {
repositories {
- mavenCentral()
jcenter()
+ maven {
+ url "https://maven.google.com"
+ }
}
// Switch the Android Gradle plugin version requirement depending on the
diff --git a/bin/templates/project/build.gradle b/bin/templates/project/build.gradle
index d5a8500e..6b28c096 100644
--- a/bin/templates/project/build.gradle
+++ b/bin/templates/project/build.gradle
@@ -21,6 +21,9 @@
buildscript {
repositories {
jcenter()
+ maven {
+ url "https://maven.google.com"
+ }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
@@ -33,6 +36,9 @@ buildscript {
allprojects {
repositories {
jcenter()
+ maven {
+ url "https://maven.google.com"
+ }
}
//This replaces project.properties
diff --git a/framework/build.gradle b/framework/build.gradle
index 331f9e22..9e4517b2 100644
--- a/framework/build.gradle
+++ b/framework/build.gradle
@@ -24,8 +24,10 @@ ext {
buildscript {
repositories {
- mavenCentral()
jcenter()
+ maven {
+ url "https://maven.google.com"
+ }
}
dependencies {
diff --git a/node_modules/abbrev/package.json b/node_modules/abbrev/package.json
index f7e5da39..e60d0211 100644
--- a/node_modules/abbrev/package.json
+++ b/node_modules/abbrev/package.json
@@ -77,7 +77,8 @@
],
"name": "abbrev",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "# abbrev-js\n\nJust like [ruby's Abbrev](http://apidock.com/ruby/Abbrev).\n\nUsage:\n\n var abbrev = require(\"abbrev\");\n abbrev(\"foo\", \"fool\", \"folding\", \"flop\");\n \n // returns:\n { fl: 'flop'\n , flo: 'flop'\n , flop: 'flop'\n , fol: 'folding'\n , fold: 'folding'\n , foldi: 'folding'\n , foldin: 'folding'\n , folding: 'folding'\n , foo: 'foo'\n , fool: 'fool'\n }\n\nThis is handy for command-line scripts, or other cases where you want to be able to accept shorthands.\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/isaacs/abbrev-js.git"
diff --git a/node_modules/ansi/package.json b/node_modules/ansi/package.json
index d1369498..06adf892 100644
--- a/node_modules/ansi/package.json
+++ b/node_modules/ansi/package.json
@@ -83,7 +83,8 @@
],
"name": "ansi",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "ansi.js\n=========\n### Advanced ANSI formatting tool for Node.js\n\n`ansi.js` is a module for Node.js that provides an easy-to-use API for\nwriting ANSI escape codes to `Stream` instances. ANSI escape codes are used to do\nfancy things in a terminal window, like render text in colors, delete characters,\nlines, the entire window, or hide and show the cursor, and lots more!\n\n#### Features:\n\n * 256 color support for the terminal!\n * Make a beep sound from your terminal!\n * Works with *any* writable `Stream` instance.\n * Allows you to move the cursor anywhere on the terminal window.\n * Allows you to delete existing contents from the terminal window.\n * Allows you to hide and show the cursor.\n * Converts CSS color codes and RGB values into ANSI escape codes.\n * Low-level; you are in control of when escape codes are used, it's not abstracted.\n\n\nInstallation\n------------\n\nInstall with `npm`:\n\n``` bash\n$ npm install ansi\n```\n\n\nExample\n-------\n\n``` js\nvar ansi = require('ansi')\n , cursor = ansi(process.stdout)\n\n// You can chain your calls forever:\ncursor\n .red() // Set font color to red\n .bg.grey() // Set background color to grey\n .write('Hello World!') // Write 'Hello World!' to stdout\n .bg.reset() // Reset the bgcolor before writing the trailing \\n,\n // to avoid Terminal glitches\n .write('\\n') // And a final \\n to wrap things up\n\n// Rendering modes are persistent:\ncursor.hex('#660000').bold().underline()\n\n// You can use the regular logging functions, text will be green:\nconsole.log('This is blood red, bold text')\n\n// To reset just the foreground color:\ncursor.fg.reset()\n\nconsole.log('This will still be bold')\n\n// to go to a location (x,y) on the console\n// note: 1-indexed, not 0-indexed:\ncursor.goto(10, 5).write('Five down, ten over')\n\n// to clear the current line:\ncursor.horizontalAbsolute(0).eraseLine().write('Starting again')\n\n// to go to a different column on the current line:\ncursor.horizontalAbsolute(5).write('column five')\n\n// Clean up after yourself!\ncursor.reset()\n```\n\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/TooTallNate/ansi.js.git"
diff --git a/node_modules/balanced-match/index.js b/node_modules/balanced-match/index.js
index e8d85870..1685a762 100644
--- a/node_modules/balanced-match/index.js
+++ b/node_modules/balanced-match/index.js
@@ -1,3 +1,4 @@
+'use strict';
module.exports = balanced;
function balanced(a, b, str) {
if (a instanceof RegExp) a = maybeMatch(a, str);
diff --git a/node_modules/balanced-match/package.json b/node_modules/balanced-match/package.json
index 11da31f2..65047208 100644
--- a/node_modules/balanced-match/package.json
+++ b/node_modules/balanced-match/package.json
@@ -2,48 +2,48 @@
"_args": [
[
{
- "raw": "balanced-match@^0.4.1",
+ "raw": "balanced-match@^1.0.0",
"scope": null,
"escapedName": "balanced-match",
"name": "balanced-match",
- "rawSpec": "^0.4.1",
- "spec": ">=0.4.1 <0.5.0",
+ "rawSpec": "^1.0.0",
+ "spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"/Users/steveng/repo/cordova/cordova-android/node_modules/brace-expansion"
]
],
- "_from": "balanced-match@>=0.4.1 <0.5.0",
- "_id": "balanced-match@0.4.2",
+ "_from": "balanced-match@>=1.0.0 <2.0.0",
+ "_id": "balanced-match@1.0.0",
"_inCache": true,
"_location": "/balanced-match",
- "_nodeVersion": "4.4.7",
+ "_nodeVersion": "7.8.0",
"_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/balanced-match-0.4.2.tgz_1468834991581_0.6590619895141572"
+ "host": "s3://npm-registry-packages",
+ "tmp": "tmp/balanced-match-1.0.0.tgz_1497251909645_0.8755026108119637"
},
"_npmUser": {
"name": "juliangruber",
"email": "julian@juliangruber.com"
},
- "_npmVersion": "2.15.8",
+ "_npmVersion": "4.2.0",
"_phantomChildren": {},
"_requested": {
- "raw": "balanced-match@^0.4.1",
+ "raw": "balanced-match@^1.0.0",
"scope": null,
"escapedName": "balanced-match",
"name": "balanced-match",
- "rawSpec": "^0.4.1",
- "spec": ">=0.4.1 <0.5.0",
+ "rawSpec": "^1.0.0",
+ "spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/brace-expansion"
],
- "_resolved": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz",
- "_shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838",
+ "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+ "_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767",
"_shrinkwrap": null,
- "_spec": "balanced-match@^0.4.1",
+ "_spec": "balanced-match@^1.0.0",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/brace-expansion",
"author": {
"name": "Julian Gruber",
@@ -56,14 +56,15 @@
"dependencies": {},
"description": "Match balanced character pairs, like \"{\" and \"}\"",
"devDependencies": {
+ "matcha": "^0.7.0",
"tape": "^4.6.0"
},
"directories": {},
"dist": {
- "shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838",
- "tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz"
+ "shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767",
+ "tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz"
},
- "gitHead": "57c2ea29d89a2844ae3bdcc637c6e2cbb73725e2",
+ "gitHead": "d701a549a7653a874eebce7eca25d3577dc868ac",
"homepage": "https://github.com/juliangruber/balanced-match",
"keywords": [
"match",
@@ -82,12 +83,14 @@
],
"name": "balanced-match",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "# balanced-match\n\nMatch balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well!\n\n[](http://travis-ci.org/juliangruber/balanced-match)\n[](https://www.npmjs.org/package/balanced-match)\n\n[](https://ci.testling.com/juliangruber/balanced-match)\n\n## Example\n\nGet the first matching pair of braces:\n\n```js\nvar balanced = require('balanced-match');\n\nconsole.log(balanced('{', '}', 'pre{in{nested}}post'));\nconsole.log(balanced('{', '}', 'pre{first}between{second}post'));\nconsole.log(balanced(/\\s+\\{\\s+/, /\\s+\\}\\s+/, 'pre { in{nest} } post'));\n```\n\nThe matches are:\n\n```bash\n$ node example.js\n{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }\n{ start: 3,\n end: 9,\n pre: 'pre',\n body: 'first',\n post: 'between{second}post' }\n{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }\n```\n\n## API\n\n### var m = balanced(a, b, str)\n\nFor the first non-nested matching pair of `a` and `b` in `str`, return an\nobject with those keys:\n\n* **start** the index of the first match of `a`\n* **end** the index of the matching `b`\n* **pre** the preamble, `a` and `b` not included\n* **body** the match, `a` and `b` not included\n* **post** the postscript, `a` and `b` not included\n\nIf there's no match, `undefined` will be returned.\n\nIf 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', '}']`.\n\n### var r = balanced.range(a, b, str)\n\nFor the first non-nested matching pair of `a` and `b` in `str`, return an\narray with indexes: `[ , ]`.\n\nIf there's no match, `undefined` will be returned.\n\nIf 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]`.\n\n## Installation\n\nWith [npm](https://npmjs.org) do:\n\n```bash\nnpm install balanced-match\n```\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/juliangruber/balanced-match.git"
},
"scripts": {
+ "bench": "make bench",
"test": "make test"
},
"testling": {
@@ -106,5 +109,5 @@
"android-browser/4.2..latest"
]
},
- "version": "0.4.2"
+ "version": "1.0.0"
}
diff --git a/node_modules/base64-js/package.json b/node_modules/base64-js/package.json
index 8d2a77fd..93ed651e 100644
--- a/node_modules/base64-js/package.json
+++ b/node_modules/base64-js/package.json
@@ -36,7 +36,7 @@
"_requiredBy": [
"/plist"
],
- "_resolved": "http://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz",
+ "_resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz",
"_shasum": "1101e9544f4a76b1bc3b26d452ca96d7a35e7978",
"_shrinkwrap": null,
"_spec": "base64-js@0.0.8",
@@ -62,7 +62,7 @@
"node": ">= 0.4"
},
"gitHead": "b4a8a5fa9b0caeddb5ad94dd1108253d8f2a315f",
- "homepage": "https://github.com/beatgammit/base64-js",
+ "homepage": "https://github.com/beatgammit/base64-js#readme",
"license": "MIT",
"main": "lib/b64.js",
"maintainers": [
@@ -77,7 +77,8 @@
],
"name": "base64-js",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "base64-js\n=========\n\n`base64-js` does basic base64 encoding/decoding in pure JS.\n\n[](http://travis-ci.org/beatgammit/base64-js)\n\n[](https://ci.testling.com/beatgammit/base64-js)\n\nMany browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data.\n\nSometimes encoding/decoding binary data in the browser is useful, and that is what this module does.\n\n## install\n\nWith [npm](https://npmjs.org) do:\n\n`npm install base64-js`\n\n## methods\n\n`var base64 = require('base64-js')`\n\n`base64` has two exposed functions, `toByteArray` and `fromByteArray`, which both take a single argument.\n\n* `toByteArray` - Takes a base64 string and returns a byte array\n* `fromByteArray` - Takes a byte array and returns a base64 string\n\n## license\n\nMIT",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/beatgammit/base64-js.git"
diff --git a/node_modules/big-integer/BigInteger.d.ts b/node_modules/big-integer/BigInteger.d.ts
new file mode 100644
index 00000000..3cd4c0e3
--- /dev/null
+++ b/node_modules/big-integer/BigInteger.d.ts
@@ -0,0 +1,2364 @@
+/**
+ * Type definitions for BigInteger.js
+ * Definitions by: Tommy Frazier
+ */
+export = bigInt;
+export as namespace bigInt;
+
+declare var bigInt: bigInt.BigIntegerStatic;
+
+declare namespace bigInt {
+ type BigNumber = number | string | BigInteger;
+
+ interface BigIntegerStatic {
+ /**
+ * Equivalent to bigInt(0).
+ */
+ (): BigInteger;
+
+ /**
+ * Parse a Javascript number into a bigInt.
+ */
+ (number: number): BigInteger;
+
+ /**
+ * Parse a string into a bigInt.
+ */
+ (string: string, base?: BigNumber): BigInteger;
+
+ /**
+ * no-op.
+ */
+ (bigInt: BigInteger): BigInteger;
+
+ /**
+ * Constructs a bigInt from an array of digits in specified base.
+ * The optional isNegative flag will make the number negative.
+ */
+ fromArray: (digits: BigNumber[], base?: BigNumber, isNegative?: boolean) => BigInteger;
+
+ /**
+ * Finds the greatest common denominator of a and b.
+ */
+ gcd: (a: BigNumber, b: BigNumber) => BigInteger;
+
+
+ /**
+ * Returns true if x is a BigInteger, false otherwise.
+ */
+ isInstance: (x: any) => boolean;
+
+ /**
+ * Finds the least common multiple of a and b.
+ */
+ lcm: (a: BigNumber, b: BigNumber) => BigInteger;
+
+ /**
+ * Returns the largest of a and b.
+ */
+ max: (a: BigNumber, b: BigNumber) => BigInteger;
+
+ /**
+ * Returns the smallest of a and b.
+ */
+ min: (a: BigNumber, b: BigNumber) => BigInteger;
+
+ /**
+ * Equivalent to bigInt(-1).
+ */
+ minusOne: BigInteger;
+
+ /**
+ * Equivalent to bigInt(1).
+ */
+ one: BigInteger;
+
+ /**
+ * Returns a random number between min and max.
+ */
+ randBetween: (min: BigNumber, max: BigNumber) => BigInteger;
+
+ /**
+ * Equivalent to bigInt(0).
+ */
+ zero: BigInteger;
+ }
+
+ interface BigInteger {
+ /**
+ * Returns the absolute value of a bigInt.
+ */
+ abs(): BigInteger;
+
+ /**
+ * Performs addition.
+ */
+ add(number: BigNumber): BigInteger;
+
+ /**
+ * Performs the bitwise AND operation.
+ */
+ and(number: BigNumber): BigInteger;
+
+ /**
+ * Performs a comparison between two numbers. If the numbers are equal, it returns 0.
+ * If the first number is greater, it returns 1. If the first number is lesser, it returns -1.
+ */
+ compare(number: BigNumber): number;
+
+ /**
+ * Performs a comparison between the absolute value of two numbers.
+ */
+ compareAbs(number: BigNumber): number;
+
+ /**
+ * Alias for the compare method.
+ */
+ compareTo(number: BigNumber): number;
+
+ /**
+ * Performs integer division, disregarding the remainder.
+ */
+ divide(number: BigNumber): BigInteger;
+
+ /**
+ * Performs division and returns an object with two properties: quotient and remainder.
+ * The sign of the remainder will match the sign of the dividend.
+ */
+ divmod(number: BigNumber): {quotient: BigInteger, remainder: BigInteger};
+
+ /**
+ * Alias for the equals method.
+ */
+ eq(number: BigNumber): boolean;
+
+ /**
+ * Checks if two numbers are equal.
+ */
+ equals(number: BigNumber): boolean;
+
+ /**
+ * Alias for the greaterOrEquals method.
+ */
+ geq(number: BigNumber): boolean;
+
+ /**
+ * Checks if the first number is greater than the second.
+ */
+ greater(number: BigNumber): boolean;
+
+ /**
+ * Checks if the first number is greater than or equal to the second.
+ */
+ greaterOrEquals(number: BigNumber): boolean;
+
+ /**
+ * Alias for the greater method.
+ */
+ gt(number: BigNumber): boolean;
+
+ /**
+ * Returns true if the first number is divisible by the second number, false otherwise.
+ */
+ isDivisibleBy(number: BigNumber): boolean;
+
+ /**
+ * Returns true if the number is even, false otherwise.
+ */
+ isEven(): boolean;
+
+ /**
+ * Returns true if the number is negative, false otherwise.
+ * Returns false for 0 and true for -0.
+ */
+ isNegative(): boolean;
+
+ /**
+ * Returns true if the number is odd, false otherwise.
+ */
+ isOdd(): boolean;
+
+ /**
+ * Return true if the number is positive, false otherwise.
+ * Returns true for 0 and false for -0.
+ */
+ isPositive(): boolean;
+
+ /**
+ * Returns true if the number is prime, false otherwise.
+ */
+ isPrime(): boolean;
+
+ /**
+ * Returns true if the number is very likely to be prime, false otherwise.
+ */
+ isProbablePrime(iterations?: number): boolean;
+
+ /**
+ * Returns true if the number is 1 or -1, false otherwise.
+ */
+ isUnit(): boolean;
+
+ /**
+ * Return true if the number is 0 or -0, false otherwise.
+ */
+ isZero(): boolean;
+
+ /**
+ * Alias for the lesserOrEquals method.
+ */
+ leq(number: BigNumber): boolean;
+
+ /**
+ * Checks if the first number is lesser than the second.
+ */
+ lesser(number: BigNumber): boolean;
+
+ /**
+ * Checks if the first number is less than or equal to the second.
+ */
+ lesserOrEquals(number: BigNumber): boolean;
+
+ /**
+ * Alias for the lesser method.
+ */
+ lt(number: BigNumber): boolean;
+
+ /**
+ * Alias for the subtract method.
+ */
+ minus(number: BigNumber): BigInteger;
+
+ /**
+ * Performs division and returns the remainder, disregarding the quotient.
+ * The sign of the remainder will match the sign of the dividend.
+ */
+ mod(number: BigNumber): BigInteger;
+
+ /**
+ * Finds the multiplicative inverse of the number modulo mod.
+ */
+ modInv(number: BigNumber): BigInteger;
+
+ /**
+ * Takes the number to the power exp modulo mod.
+ */
+ modPow(exp: BigNumber, mod: BigNumber): BigInteger;
+
+ /**
+ * Performs multiplication.
+ */
+ multiply(number: BigNumber): BigInteger;
+
+ /**
+ * Reverses the sign of the number.
+ */
+ negate(): BigInteger;
+
+ /**
+ * Alias for the notEquals method.
+ */
+ neq(number: BigNumber): boolean;
+
+ /**
+ * Adds one to the number.
+ */
+ next(): BigInteger;
+
+ /**
+ * Performs the bitwise NOT operation.
+ */
+ not(): BigInteger;
+
+ /**
+ * Checks if two numbers are not equal.
+ */
+ notEquals(number: BigNumber): boolean;
+
+ /**
+ * Performs the bitwise OR operation.
+ */
+ or(number: BigNumber): BigInteger;
+
+ /**
+ * Alias for the divide method.
+ */
+ over(number: BigNumber): BigInteger;
+
+ /**
+ * Alias for the add method.
+ */
+ plus(number: BigNumber): BigInteger;
+
+ /**
+ * Performs exponentiation. If the exponent is less than 0, pow returns 0.
+ * bigInt.zero.pow(0) returns 1.
+ */
+ pow(number: BigNumber): BigInteger;
+
+ /**
+ * Subtracts one from the number.
+ */
+ prev(): BigInteger;
+
+ /**
+ * Alias for the mod method.
+ */
+ remainder(number: BigNumber): BigInteger;
+
+ /**
+ * Shifts the number left by n places in its binary representation.
+ * If a negative number is provided, it will shift right.
+ *
+ * Throws an error if number is outside of the range [-9007199254740992, 9007199254740992].
+ */
+ shiftLeft(number: BigNumber): BigInteger;
+
+ /**
+ * Shifts the number right by n places in its binary representation.
+ * If a negative number is provided, it will shift left.
+ *
+ * Throws an error if number is outside of the range [-9007199254740992, 9007199254740992].
+ */
+ shiftRight(number: BigNumber): BigInteger;
+
+ /**
+ * Squares the number.
+ */
+ square(): BigInteger;
+
+ /**
+ * Performs subtraction.
+ */
+ subtract(number: BigNumber): BigInteger;
+
+ /**
+ * Alias for the multiply method.
+ */
+ times(number: BigNumber): BigInteger;
+
+ /**
+ * Converts a bigInt into a native Javascript number. Loses precision for numbers outside the range.
+ */
+ toJSNumber(): number;
+
+ /**
+ * Converts a bigInt to a string.
+ */
+ toString(radix?: number): string;
+
+ /**
+ * Converts a bigInt to a native Javascript number. This override allows you to use native
+ * arithmetic operators without explicit conversion.
+ */
+ valueOf(): number;
+
+ /**
+ * Performs the bitwise XOR operation.
+ */
+ xor(number: BigNumber): BigInteger;
+ }
+
+ // Array constant accessors
+ interface BigIntegerStatic {
+ '-999': BigInteger;
+ '-998': BigInteger;
+ '-997': BigInteger;
+ '-996': BigInteger;
+ '-995': BigInteger;
+ '-994': BigInteger;
+ '-993': BigInteger;
+ '-992': BigInteger;
+ '-991': BigInteger;
+ '-990': BigInteger;
+ '-989': BigInteger;
+ '-988': BigInteger;
+ '-987': BigInteger;
+ '-986': BigInteger;
+ '-985': BigInteger;
+ '-984': BigInteger;
+ '-983': BigInteger;
+ '-982': BigInteger;
+ '-981': BigInteger;
+ '-980': BigInteger;
+ '-979': BigInteger;
+ '-978': BigInteger;
+ '-977': BigInteger;
+ '-976': BigInteger;
+ '-975': BigInteger;
+ '-974': BigInteger;
+ '-973': BigInteger;
+ '-972': BigInteger;
+ '-971': BigInteger;
+ '-970': BigInteger;
+ '-969': BigInteger;
+ '-968': BigInteger;
+ '-967': BigInteger;
+ '-966': BigInteger;
+ '-965': BigInteger;
+ '-964': BigInteger;
+ '-963': BigInteger;
+ '-962': BigInteger;
+ '-961': BigInteger;
+ '-960': BigInteger;
+ '-959': BigInteger;
+ '-958': BigInteger;
+ '-957': BigInteger;
+ '-956': BigInteger;
+ '-955': BigInteger;
+ '-954': BigInteger;
+ '-953': BigInteger;
+ '-952': BigInteger;
+ '-951': BigInteger;
+ '-950': BigInteger;
+ '-949': BigInteger;
+ '-948': BigInteger;
+ '-947': BigInteger;
+ '-946': BigInteger;
+ '-945': BigInteger;
+ '-944': BigInteger;
+ '-943': BigInteger;
+ '-942': BigInteger;
+ '-941': BigInteger;
+ '-940': BigInteger;
+ '-939': BigInteger;
+ '-938': BigInteger;
+ '-937': BigInteger;
+ '-936': BigInteger;
+ '-935': BigInteger;
+ '-934': BigInteger;
+ '-933': BigInteger;
+ '-932': BigInteger;
+ '-931': BigInteger;
+ '-930': BigInteger;
+ '-929': BigInteger;
+ '-928': BigInteger;
+ '-927': BigInteger;
+ '-926': BigInteger;
+ '-925': BigInteger;
+ '-924': BigInteger;
+ '-923': BigInteger;
+ '-922': BigInteger;
+ '-921': BigInteger;
+ '-920': BigInteger;
+ '-919': BigInteger;
+ '-918': BigInteger;
+ '-917': BigInteger;
+ '-916': BigInteger;
+ '-915': BigInteger;
+ '-914': BigInteger;
+ '-913': BigInteger;
+ '-912': BigInteger;
+ '-911': BigInteger;
+ '-910': BigInteger;
+ '-909': BigInteger;
+ '-908': BigInteger;
+ '-907': BigInteger;
+ '-906': BigInteger;
+ '-905': BigInteger;
+ '-904': BigInteger;
+ '-903': BigInteger;
+ '-902': BigInteger;
+ '-901': BigInteger;
+ '-900': BigInteger;
+ '-899': BigInteger;
+ '-898': BigInteger;
+ '-897': BigInteger;
+ '-896': BigInteger;
+ '-895': BigInteger;
+ '-894': BigInteger;
+ '-893': BigInteger;
+ '-892': BigInteger;
+ '-891': BigInteger;
+ '-890': BigInteger;
+ '-889': BigInteger;
+ '-888': BigInteger;
+ '-887': BigInteger;
+ '-886': BigInteger;
+ '-885': BigInteger;
+ '-884': BigInteger;
+ '-883': BigInteger;
+ '-882': BigInteger;
+ '-881': BigInteger;
+ '-880': BigInteger;
+ '-879': BigInteger;
+ '-878': BigInteger;
+ '-877': BigInteger;
+ '-876': BigInteger;
+ '-875': BigInteger;
+ '-874': BigInteger;
+ '-873': BigInteger;
+ '-872': BigInteger;
+ '-871': BigInteger;
+ '-870': BigInteger;
+ '-869': BigInteger;
+ '-868': BigInteger;
+ '-867': BigInteger;
+ '-866': BigInteger;
+ '-865': BigInteger;
+ '-864': BigInteger;
+ '-863': BigInteger;
+ '-862': BigInteger;
+ '-861': BigInteger;
+ '-860': BigInteger;
+ '-859': BigInteger;
+ '-858': BigInteger;
+ '-857': BigInteger;
+ '-856': BigInteger;
+ '-855': BigInteger;
+ '-854': BigInteger;
+ '-853': BigInteger;
+ '-852': BigInteger;
+ '-851': BigInteger;
+ '-850': BigInteger;
+ '-849': BigInteger;
+ '-848': BigInteger;
+ '-847': BigInteger;
+ '-846': BigInteger;
+ '-845': BigInteger;
+ '-844': BigInteger;
+ '-843': BigInteger;
+ '-842': BigInteger;
+ '-841': BigInteger;
+ '-840': BigInteger;
+ '-839': BigInteger;
+ '-838': BigInteger;
+ '-837': BigInteger;
+ '-836': BigInteger;
+ '-835': BigInteger;
+ '-834': BigInteger;
+ '-833': BigInteger;
+ '-832': BigInteger;
+ '-831': BigInteger;
+ '-830': BigInteger;
+ '-829': BigInteger;
+ '-828': BigInteger;
+ '-827': BigInteger;
+ '-826': BigInteger;
+ '-825': BigInteger;
+ '-824': BigInteger;
+ '-823': BigInteger;
+ '-822': BigInteger;
+ '-821': BigInteger;
+ '-820': BigInteger;
+ '-819': BigInteger;
+ '-818': BigInteger;
+ '-817': BigInteger;
+ '-816': BigInteger;
+ '-815': BigInteger;
+ '-814': BigInteger;
+ '-813': BigInteger;
+ '-812': BigInteger;
+ '-811': BigInteger;
+ '-810': BigInteger;
+ '-809': BigInteger;
+ '-808': BigInteger;
+ '-807': BigInteger;
+ '-806': BigInteger;
+ '-805': BigInteger;
+ '-804': BigInteger;
+ '-803': BigInteger;
+ '-802': BigInteger;
+ '-801': BigInteger;
+ '-800': BigInteger;
+ '-799': BigInteger;
+ '-798': BigInteger;
+ '-797': BigInteger;
+ '-796': BigInteger;
+ '-795': BigInteger;
+ '-794': BigInteger;
+ '-793': BigInteger;
+ '-792': BigInteger;
+ '-791': BigInteger;
+ '-790': BigInteger;
+ '-789': BigInteger;
+ '-788': BigInteger;
+ '-787': BigInteger;
+ '-786': BigInteger;
+ '-785': BigInteger;
+ '-784': BigInteger;
+ '-783': BigInteger;
+ '-782': BigInteger;
+ '-781': BigInteger;
+ '-780': BigInteger;
+ '-779': BigInteger;
+ '-778': BigInteger;
+ '-777': BigInteger;
+ '-776': BigInteger;
+ '-775': BigInteger;
+ '-774': BigInteger;
+ '-773': BigInteger;
+ '-772': BigInteger;
+ '-771': BigInteger;
+ '-770': BigInteger;
+ '-769': BigInteger;
+ '-768': BigInteger;
+ '-767': BigInteger;
+ '-766': BigInteger;
+ '-765': BigInteger;
+ '-764': BigInteger;
+ '-763': BigInteger;
+ '-762': BigInteger;
+ '-761': BigInteger;
+ '-760': BigInteger;
+ '-759': BigInteger;
+ '-758': BigInteger;
+ '-757': BigInteger;
+ '-756': BigInteger;
+ '-755': BigInteger;
+ '-754': BigInteger;
+ '-753': BigInteger;
+ '-752': BigInteger;
+ '-751': BigInteger;
+ '-750': BigInteger;
+ '-749': BigInteger;
+ '-748': BigInteger;
+ '-747': BigInteger;
+ '-746': BigInteger;
+ '-745': BigInteger;
+ '-744': BigInteger;
+ '-743': BigInteger;
+ '-742': BigInteger;
+ '-741': BigInteger;
+ '-740': BigInteger;
+ '-739': BigInteger;
+ '-738': BigInteger;
+ '-737': BigInteger;
+ '-736': BigInteger;
+ '-735': BigInteger;
+ '-734': BigInteger;
+ '-733': BigInteger;
+ '-732': BigInteger;
+ '-731': BigInteger;
+ '-730': BigInteger;
+ '-729': BigInteger;
+ '-728': BigInteger;
+ '-727': BigInteger;
+ '-726': BigInteger;
+ '-725': BigInteger;
+ '-724': BigInteger;
+ '-723': BigInteger;
+ '-722': BigInteger;
+ '-721': BigInteger;
+ '-720': BigInteger;
+ '-719': BigInteger;
+ '-718': BigInteger;
+ '-717': BigInteger;
+ '-716': BigInteger;
+ '-715': BigInteger;
+ '-714': BigInteger;
+ '-713': BigInteger;
+ '-712': BigInteger;
+ '-711': BigInteger;
+ '-710': BigInteger;
+ '-709': BigInteger;
+ '-708': BigInteger;
+ '-707': BigInteger;
+ '-706': BigInteger;
+ '-705': BigInteger;
+ '-704': BigInteger;
+ '-703': BigInteger;
+ '-702': BigInteger;
+ '-701': BigInteger;
+ '-700': BigInteger;
+ '-699': BigInteger;
+ '-698': BigInteger;
+ '-697': BigInteger;
+ '-696': BigInteger;
+ '-695': BigInteger;
+ '-694': BigInteger;
+ '-693': BigInteger;
+ '-692': BigInteger;
+ '-691': BigInteger;
+ '-690': BigInteger;
+ '-689': BigInteger;
+ '-688': BigInteger;
+ '-687': BigInteger;
+ '-686': BigInteger;
+ '-685': BigInteger;
+ '-684': BigInteger;
+ '-683': BigInteger;
+ '-682': BigInteger;
+ '-681': BigInteger;
+ '-680': BigInteger;
+ '-679': BigInteger;
+ '-678': BigInteger;
+ '-677': BigInteger;
+ '-676': BigInteger;
+ '-675': BigInteger;
+ '-674': BigInteger;
+ '-673': BigInteger;
+ '-672': BigInteger;
+ '-671': BigInteger;
+ '-670': BigInteger;
+ '-669': BigInteger;
+ '-668': BigInteger;
+ '-667': BigInteger;
+ '-666': BigInteger;
+ '-665': BigInteger;
+ '-664': BigInteger;
+ '-663': BigInteger;
+ '-662': BigInteger;
+ '-661': BigInteger;
+ '-660': BigInteger;
+ '-659': BigInteger;
+ '-658': BigInteger;
+ '-657': BigInteger;
+ '-656': BigInteger;
+ '-655': BigInteger;
+ '-654': BigInteger;
+ '-653': BigInteger;
+ '-652': BigInteger;
+ '-651': BigInteger;
+ '-650': BigInteger;
+ '-649': BigInteger;
+ '-648': BigInteger;
+ '-647': BigInteger;
+ '-646': BigInteger;
+ '-645': BigInteger;
+ '-644': BigInteger;
+ '-643': BigInteger;
+ '-642': BigInteger;
+ '-641': BigInteger;
+ '-640': BigInteger;
+ '-639': BigInteger;
+ '-638': BigInteger;
+ '-637': BigInteger;
+ '-636': BigInteger;
+ '-635': BigInteger;
+ '-634': BigInteger;
+ '-633': BigInteger;
+ '-632': BigInteger;
+ '-631': BigInteger;
+ '-630': BigInteger;
+ '-629': BigInteger;
+ '-628': BigInteger;
+ '-627': BigInteger;
+ '-626': BigInteger;
+ '-625': BigInteger;
+ '-624': BigInteger;
+ '-623': BigInteger;
+ '-622': BigInteger;
+ '-621': BigInteger;
+ '-620': BigInteger;
+ '-619': BigInteger;
+ '-618': BigInteger;
+ '-617': BigInteger;
+ '-616': BigInteger;
+ '-615': BigInteger;
+ '-614': BigInteger;
+ '-613': BigInteger;
+ '-612': BigInteger;
+ '-611': BigInteger;
+ '-610': BigInteger;
+ '-609': BigInteger;
+ '-608': BigInteger;
+ '-607': BigInteger;
+ '-606': BigInteger;
+ '-605': BigInteger;
+ '-604': BigInteger;
+ '-603': BigInteger;
+ '-602': BigInteger;
+ '-601': BigInteger;
+ '-600': BigInteger;
+ '-599': BigInteger;
+ '-598': BigInteger;
+ '-597': BigInteger;
+ '-596': BigInteger;
+ '-595': BigInteger;
+ '-594': BigInteger;
+ '-593': BigInteger;
+ '-592': BigInteger;
+ '-591': BigInteger;
+ '-590': BigInteger;
+ '-589': BigInteger;
+ '-588': BigInteger;
+ '-587': BigInteger;
+ '-586': BigInteger;
+ '-585': BigInteger;
+ '-584': BigInteger;
+ '-583': BigInteger;
+ '-582': BigInteger;
+ '-581': BigInteger;
+ '-580': BigInteger;
+ '-579': BigInteger;
+ '-578': BigInteger;
+ '-577': BigInteger;
+ '-576': BigInteger;
+ '-575': BigInteger;
+ '-574': BigInteger;
+ '-573': BigInteger;
+ '-572': BigInteger;
+ '-571': BigInteger;
+ '-570': BigInteger;
+ '-569': BigInteger;
+ '-568': BigInteger;
+ '-567': BigInteger;
+ '-566': BigInteger;
+ '-565': BigInteger;
+ '-564': BigInteger;
+ '-563': BigInteger;
+ '-562': BigInteger;
+ '-561': BigInteger;
+ '-560': BigInteger;
+ '-559': BigInteger;
+ '-558': BigInteger;
+ '-557': BigInteger;
+ '-556': BigInteger;
+ '-555': BigInteger;
+ '-554': BigInteger;
+ '-553': BigInteger;
+ '-552': BigInteger;
+ '-551': BigInteger;
+ '-550': BigInteger;
+ '-549': BigInteger;
+ '-548': BigInteger;
+ '-547': BigInteger;
+ '-546': BigInteger;
+ '-545': BigInteger;
+ '-544': BigInteger;
+ '-543': BigInteger;
+ '-542': BigInteger;
+ '-541': BigInteger;
+ '-540': BigInteger;
+ '-539': BigInteger;
+ '-538': BigInteger;
+ '-537': BigInteger;
+ '-536': BigInteger;
+ '-535': BigInteger;
+ '-534': BigInteger;
+ '-533': BigInteger;
+ '-532': BigInteger;
+ '-531': BigInteger;
+ '-530': BigInteger;
+ '-529': BigInteger;
+ '-528': BigInteger;
+ '-527': BigInteger;
+ '-526': BigInteger;
+ '-525': BigInteger;
+ '-524': BigInteger;
+ '-523': BigInteger;
+ '-522': BigInteger;
+ '-521': BigInteger;
+ '-520': BigInteger;
+ '-519': BigInteger;
+ '-518': BigInteger;
+ '-517': BigInteger;
+ '-516': BigInteger;
+ '-515': BigInteger;
+ '-514': BigInteger;
+ '-513': BigInteger;
+ '-512': BigInteger;
+ '-511': BigInteger;
+ '-510': BigInteger;
+ '-509': BigInteger;
+ '-508': BigInteger;
+ '-507': BigInteger;
+ '-506': BigInteger;
+ '-505': BigInteger;
+ '-504': BigInteger;
+ '-503': BigInteger;
+ '-502': BigInteger;
+ '-501': BigInteger;
+ '-500': BigInteger;
+ '-499': BigInteger;
+ '-498': BigInteger;
+ '-497': BigInteger;
+ '-496': BigInteger;
+ '-495': BigInteger;
+ '-494': BigInteger;
+ '-493': BigInteger;
+ '-492': BigInteger;
+ '-491': BigInteger;
+ '-490': BigInteger;
+ '-489': BigInteger;
+ '-488': BigInteger;
+ '-487': BigInteger;
+ '-486': BigInteger;
+ '-485': BigInteger;
+ '-484': BigInteger;
+ '-483': BigInteger;
+ '-482': BigInteger;
+ '-481': BigInteger;
+ '-480': BigInteger;
+ '-479': BigInteger;
+ '-478': BigInteger;
+ '-477': BigInteger;
+ '-476': BigInteger;
+ '-475': BigInteger;
+ '-474': BigInteger;
+ '-473': BigInteger;
+ '-472': BigInteger;
+ '-471': BigInteger;
+ '-470': BigInteger;
+ '-469': BigInteger;
+ '-468': BigInteger;
+ '-467': BigInteger;
+ '-466': BigInteger;
+ '-465': BigInteger;
+ '-464': BigInteger;
+ '-463': BigInteger;
+ '-462': BigInteger;
+ '-461': BigInteger;
+ '-460': BigInteger;
+ '-459': BigInteger;
+ '-458': BigInteger;
+ '-457': BigInteger;
+ '-456': BigInteger;
+ '-455': BigInteger;
+ '-454': BigInteger;
+ '-453': BigInteger;
+ '-452': BigInteger;
+ '-451': BigInteger;
+ '-450': BigInteger;
+ '-449': BigInteger;
+ '-448': BigInteger;
+ '-447': BigInteger;
+ '-446': BigInteger;
+ '-445': BigInteger;
+ '-444': BigInteger;
+ '-443': BigInteger;
+ '-442': BigInteger;
+ '-441': BigInteger;
+ '-440': BigInteger;
+ '-439': BigInteger;
+ '-438': BigInteger;
+ '-437': BigInteger;
+ '-436': BigInteger;
+ '-435': BigInteger;
+ '-434': BigInteger;
+ '-433': BigInteger;
+ '-432': BigInteger;
+ '-431': BigInteger;
+ '-430': BigInteger;
+ '-429': BigInteger;
+ '-428': BigInteger;
+ '-427': BigInteger;
+ '-426': BigInteger;
+ '-425': BigInteger;
+ '-424': BigInteger;
+ '-423': BigInteger;
+ '-422': BigInteger;
+ '-421': BigInteger;
+ '-420': BigInteger;
+ '-419': BigInteger;
+ '-418': BigInteger;
+ '-417': BigInteger;
+ '-416': BigInteger;
+ '-415': BigInteger;
+ '-414': BigInteger;
+ '-413': BigInteger;
+ '-412': BigInteger;
+ '-411': BigInteger;
+ '-410': BigInteger;
+ '-409': BigInteger;
+ '-408': BigInteger;
+ '-407': BigInteger;
+ '-406': BigInteger;
+ '-405': BigInteger;
+ '-404': BigInteger;
+ '-403': BigInteger;
+ '-402': BigInteger;
+ '-401': BigInteger;
+ '-400': BigInteger;
+ '-399': BigInteger;
+ '-398': BigInteger;
+ '-397': BigInteger;
+ '-396': BigInteger;
+ '-395': BigInteger;
+ '-394': BigInteger;
+ '-393': BigInteger;
+ '-392': BigInteger;
+ '-391': BigInteger;
+ '-390': BigInteger;
+ '-389': BigInteger;
+ '-388': BigInteger;
+ '-387': BigInteger;
+ '-386': BigInteger;
+ '-385': BigInteger;
+ '-384': BigInteger;
+ '-383': BigInteger;
+ '-382': BigInteger;
+ '-381': BigInteger;
+ '-380': BigInteger;
+ '-379': BigInteger;
+ '-378': BigInteger;
+ '-377': BigInteger;
+ '-376': BigInteger;
+ '-375': BigInteger;
+ '-374': BigInteger;
+ '-373': BigInteger;
+ '-372': BigInteger;
+ '-371': BigInteger;
+ '-370': BigInteger;
+ '-369': BigInteger;
+ '-368': BigInteger;
+ '-367': BigInteger;
+ '-366': BigInteger;
+ '-365': BigInteger;
+ '-364': BigInteger;
+ '-363': BigInteger;
+ '-362': BigInteger;
+ '-361': BigInteger;
+ '-360': BigInteger;
+ '-359': BigInteger;
+ '-358': BigInteger;
+ '-357': BigInteger;
+ '-356': BigInteger;
+ '-355': BigInteger;
+ '-354': BigInteger;
+ '-353': BigInteger;
+ '-352': BigInteger;
+ '-351': BigInteger;
+ '-350': BigInteger;
+ '-349': BigInteger;
+ '-348': BigInteger;
+ '-347': BigInteger;
+ '-346': BigInteger;
+ '-345': BigInteger;
+ '-344': BigInteger;
+ '-343': BigInteger;
+ '-342': BigInteger;
+ '-341': BigInteger;
+ '-340': BigInteger;
+ '-339': BigInteger;
+ '-338': BigInteger;
+ '-337': BigInteger;
+ '-336': BigInteger;
+ '-335': BigInteger;
+ '-334': BigInteger;
+ '-333': BigInteger;
+ '-332': BigInteger;
+ '-331': BigInteger;
+ '-330': BigInteger;
+ '-329': BigInteger;
+ '-328': BigInteger;
+ '-327': BigInteger;
+ '-326': BigInteger;
+ '-325': BigInteger;
+ '-324': BigInteger;
+ '-323': BigInteger;
+ '-322': BigInteger;
+ '-321': BigInteger;
+ '-320': BigInteger;
+ '-319': BigInteger;
+ '-318': BigInteger;
+ '-317': BigInteger;
+ '-316': BigInteger;
+ '-315': BigInteger;
+ '-314': BigInteger;
+ '-313': BigInteger;
+ '-312': BigInteger;
+ '-311': BigInteger;
+ '-310': BigInteger;
+ '-309': BigInteger;
+ '-308': BigInteger;
+ '-307': BigInteger;
+ '-306': BigInteger;
+ '-305': BigInteger;
+ '-304': BigInteger;
+ '-303': BigInteger;
+ '-302': BigInteger;
+ '-301': BigInteger;
+ '-300': BigInteger;
+ '-299': BigInteger;
+ '-298': BigInteger;
+ '-297': BigInteger;
+ '-296': BigInteger;
+ '-295': BigInteger;
+ '-294': BigInteger;
+ '-293': BigInteger;
+ '-292': BigInteger;
+ '-291': BigInteger;
+ '-290': BigInteger;
+ '-289': BigInteger;
+ '-288': BigInteger;
+ '-287': BigInteger;
+ '-286': BigInteger;
+ '-285': BigInteger;
+ '-284': BigInteger;
+ '-283': BigInteger;
+ '-282': BigInteger;
+ '-281': BigInteger;
+ '-280': BigInteger;
+ '-279': BigInteger;
+ '-278': BigInteger;
+ '-277': BigInteger;
+ '-276': BigInteger;
+ '-275': BigInteger;
+ '-274': BigInteger;
+ '-273': BigInteger;
+ '-272': BigInteger;
+ '-271': BigInteger;
+ '-270': BigInteger;
+ '-269': BigInteger;
+ '-268': BigInteger;
+ '-267': BigInteger;
+ '-266': BigInteger;
+ '-265': BigInteger;
+ '-264': BigInteger;
+ '-263': BigInteger;
+ '-262': BigInteger;
+ '-261': BigInteger;
+ '-260': BigInteger;
+ '-259': BigInteger;
+ '-258': BigInteger;
+ '-257': BigInteger;
+ '-256': BigInteger;
+ '-255': BigInteger;
+ '-254': BigInteger;
+ '-253': BigInteger;
+ '-252': BigInteger;
+ '-251': BigInteger;
+ '-250': BigInteger;
+ '-249': BigInteger;
+ '-248': BigInteger;
+ '-247': BigInteger;
+ '-246': BigInteger;
+ '-245': BigInteger;
+ '-244': BigInteger;
+ '-243': BigInteger;
+ '-242': BigInteger;
+ '-241': BigInteger;
+ '-240': BigInteger;
+ '-239': BigInteger;
+ '-238': BigInteger;
+ '-237': BigInteger;
+ '-236': BigInteger;
+ '-235': BigInteger;
+ '-234': BigInteger;
+ '-233': BigInteger;
+ '-232': BigInteger;
+ '-231': BigInteger;
+ '-230': BigInteger;
+ '-229': BigInteger;
+ '-228': BigInteger;
+ '-227': BigInteger;
+ '-226': BigInteger;
+ '-225': BigInteger;
+ '-224': BigInteger;
+ '-223': BigInteger;
+ '-222': BigInteger;
+ '-221': BigInteger;
+ '-220': BigInteger;
+ '-219': BigInteger;
+ '-218': BigInteger;
+ '-217': BigInteger;
+ '-216': BigInteger;
+ '-215': BigInteger;
+ '-214': BigInteger;
+ '-213': BigInteger;
+ '-212': BigInteger;
+ '-211': BigInteger;
+ '-210': BigInteger;
+ '-209': BigInteger;
+ '-208': BigInteger;
+ '-207': BigInteger;
+ '-206': BigInteger;
+ '-205': BigInteger;
+ '-204': BigInteger;
+ '-203': BigInteger;
+ '-202': BigInteger;
+ '-201': BigInteger;
+ '-200': BigInteger;
+ '-199': BigInteger;
+ '-198': BigInteger;
+ '-197': BigInteger;
+ '-196': BigInteger;
+ '-195': BigInteger;
+ '-194': BigInteger;
+ '-193': BigInteger;
+ '-192': BigInteger;
+ '-191': BigInteger;
+ '-190': BigInteger;
+ '-189': BigInteger;
+ '-188': BigInteger;
+ '-187': BigInteger;
+ '-186': BigInteger;
+ '-185': BigInteger;
+ '-184': BigInteger;
+ '-183': BigInteger;
+ '-182': BigInteger;
+ '-181': BigInteger;
+ '-180': BigInteger;
+ '-179': BigInteger;
+ '-178': BigInteger;
+ '-177': BigInteger;
+ '-176': BigInteger;
+ '-175': BigInteger;
+ '-174': BigInteger;
+ '-173': BigInteger;
+ '-172': BigInteger;
+ '-171': BigInteger;
+ '-170': BigInteger;
+ '-169': BigInteger;
+ '-168': BigInteger;
+ '-167': BigInteger;
+ '-166': BigInteger;
+ '-165': BigInteger;
+ '-164': BigInteger;
+ '-163': BigInteger;
+ '-162': BigInteger;
+ '-161': BigInteger;
+ '-160': BigInteger;
+ '-159': BigInteger;
+ '-158': BigInteger;
+ '-157': BigInteger;
+ '-156': BigInteger;
+ '-155': BigInteger;
+ '-154': BigInteger;
+ '-153': BigInteger;
+ '-152': BigInteger;
+ '-151': BigInteger;
+ '-150': BigInteger;
+ '-149': BigInteger;
+ '-148': BigInteger;
+ '-147': BigInteger;
+ '-146': BigInteger;
+ '-145': BigInteger;
+ '-144': BigInteger;
+ '-143': BigInteger;
+ '-142': BigInteger;
+ '-141': BigInteger;
+ '-140': BigInteger;
+ '-139': BigInteger;
+ '-138': BigInteger;
+ '-137': BigInteger;
+ '-136': BigInteger;
+ '-135': BigInteger;
+ '-134': BigInteger;
+ '-133': BigInteger;
+ '-132': BigInteger;
+ '-131': BigInteger;
+ '-130': BigInteger;
+ '-129': BigInteger;
+ '-128': BigInteger;
+ '-127': BigInteger;
+ '-126': BigInteger;
+ '-125': BigInteger;
+ '-124': BigInteger;
+ '-123': BigInteger;
+ '-122': BigInteger;
+ '-121': BigInteger;
+ '-120': BigInteger;
+ '-119': BigInteger;
+ '-118': BigInteger;
+ '-117': BigInteger;
+ '-116': BigInteger;
+ '-115': BigInteger;
+ '-114': BigInteger;
+ '-113': BigInteger;
+ '-112': BigInteger;
+ '-111': BigInteger;
+ '-110': BigInteger;
+ '-109': BigInteger;
+ '-108': BigInteger;
+ '-107': BigInteger;
+ '-106': BigInteger;
+ '-105': BigInteger;
+ '-104': BigInteger;
+ '-103': BigInteger;
+ '-102': BigInteger;
+ '-101': BigInteger;
+ '-100': BigInteger;
+ '-99': BigInteger;
+ '-98': BigInteger;
+ '-97': BigInteger;
+ '-96': BigInteger;
+ '-95': BigInteger;
+ '-94': BigInteger;
+ '-93': BigInteger;
+ '-92': BigInteger;
+ '-91': BigInteger;
+ '-90': BigInteger;
+ '-89': BigInteger;
+ '-88': BigInteger;
+ '-87': BigInteger;
+ '-86': BigInteger;
+ '-85': BigInteger;
+ '-84': BigInteger;
+ '-83': BigInteger;
+ '-82': BigInteger;
+ '-81': BigInteger;
+ '-80': BigInteger;
+ '-79': BigInteger;
+ '-78': BigInteger;
+ '-77': BigInteger;
+ '-76': BigInteger;
+ '-75': BigInteger;
+ '-74': BigInteger;
+ '-73': BigInteger;
+ '-72': BigInteger;
+ '-71': BigInteger;
+ '-70': BigInteger;
+ '-69': BigInteger;
+ '-68': BigInteger;
+ '-67': BigInteger;
+ '-66': BigInteger;
+ '-65': BigInteger;
+ '-64': BigInteger;
+ '-63': BigInteger;
+ '-62': BigInteger;
+ '-61': BigInteger;
+ '-60': BigInteger;
+ '-59': BigInteger;
+ '-58': BigInteger;
+ '-57': BigInteger;
+ '-56': BigInteger;
+ '-55': BigInteger;
+ '-54': BigInteger;
+ '-53': BigInteger;
+ '-52': BigInteger;
+ '-51': BigInteger;
+ '-50': BigInteger;
+ '-49': BigInteger;
+ '-48': BigInteger;
+ '-47': BigInteger;
+ '-46': BigInteger;
+ '-45': BigInteger;
+ '-44': BigInteger;
+ '-43': BigInteger;
+ '-42': BigInteger;
+ '-41': BigInteger;
+ '-40': BigInteger;
+ '-39': BigInteger;
+ '-38': BigInteger;
+ '-37': BigInteger;
+ '-36': BigInteger;
+ '-35': BigInteger;
+ '-34': BigInteger;
+ '-33': BigInteger;
+ '-32': BigInteger;
+ '-31': BigInteger;
+ '-30': BigInteger;
+ '-29': BigInteger;
+ '-28': BigInteger;
+ '-27': BigInteger;
+ '-26': BigInteger;
+ '-25': BigInteger;
+ '-24': BigInteger;
+ '-23': BigInteger;
+ '-22': BigInteger;
+ '-21': BigInteger;
+ '-20': BigInteger;
+ '-19': BigInteger;
+ '-18': BigInteger;
+ '-17': BigInteger;
+ '-16': BigInteger;
+ '-15': BigInteger;
+ '-14': BigInteger;
+ '-13': BigInteger;
+ '-12': BigInteger;
+ '-11': BigInteger;
+ '-10': BigInteger;
+ '-9': BigInteger;
+ '-8': BigInteger;
+ '-7': BigInteger;
+ '-6': BigInteger;
+ '-5': BigInteger;
+ '-4': BigInteger;
+ '-3': BigInteger;
+ '-2': BigInteger;
+ '-1': BigInteger;
+ '0': BigInteger;
+ '1': BigInteger;
+ '2': BigInteger;
+ '3': BigInteger;
+ '4': BigInteger;
+ '5': BigInteger;
+ '6': BigInteger;
+ '7': BigInteger;
+ '8': BigInteger;
+ '9': BigInteger;
+ '10': BigInteger;
+ '11': BigInteger;
+ '12': BigInteger;
+ '13': BigInteger;
+ '14': BigInteger;
+ '15': BigInteger;
+ '16': BigInteger;
+ '17': BigInteger;
+ '18': BigInteger;
+ '19': BigInteger;
+ '20': BigInteger;
+ '21': BigInteger;
+ '22': BigInteger;
+ '23': BigInteger;
+ '24': BigInteger;
+ '25': BigInteger;
+ '26': BigInteger;
+ '27': BigInteger;
+ '28': BigInteger;
+ '29': BigInteger;
+ '30': BigInteger;
+ '31': BigInteger;
+ '32': BigInteger;
+ '33': BigInteger;
+ '34': BigInteger;
+ '35': BigInteger;
+ '36': BigInteger;
+ '37': BigInteger;
+ '38': BigInteger;
+ '39': BigInteger;
+ '40': BigInteger;
+ '41': BigInteger;
+ '42': BigInteger;
+ '43': BigInteger;
+ '44': BigInteger;
+ '45': BigInteger;
+ '46': BigInteger;
+ '47': BigInteger;
+ '48': BigInteger;
+ '49': BigInteger;
+ '50': BigInteger;
+ '51': BigInteger;
+ '52': BigInteger;
+ '53': BigInteger;
+ '54': BigInteger;
+ '55': BigInteger;
+ '56': BigInteger;
+ '57': BigInteger;
+ '58': BigInteger;
+ '59': BigInteger;
+ '60': BigInteger;
+ '61': BigInteger;
+ '62': BigInteger;
+ '63': BigInteger;
+ '64': BigInteger;
+ '65': BigInteger;
+ '66': BigInteger;
+ '67': BigInteger;
+ '68': BigInteger;
+ '69': BigInteger;
+ '70': BigInteger;
+ '71': BigInteger;
+ '72': BigInteger;
+ '73': BigInteger;
+ '74': BigInteger;
+ '75': BigInteger;
+ '76': BigInteger;
+ '77': BigInteger;
+ '78': BigInteger;
+ '79': BigInteger;
+ '80': BigInteger;
+ '81': BigInteger;
+ '82': BigInteger;
+ '83': BigInteger;
+ '84': BigInteger;
+ '85': BigInteger;
+ '86': BigInteger;
+ '87': BigInteger;
+ '88': BigInteger;
+ '89': BigInteger;
+ '90': BigInteger;
+ '91': BigInteger;
+ '92': BigInteger;
+ '93': BigInteger;
+ '94': BigInteger;
+ '95': BigInteger;
+ '96': BigInteger;
+ '97': BigInteger;
+ '98': BigInteger;
+ '99': BigInteger;
+ '100': BigInteger;
+ '101': BigInteger;
+ '102': BigInteger;
+ '103': BigInteger;
+ '104': BigInteger;
+ '105': BigInteger;
+ '106': BigInteger;
+ '107': BigInteger;
+ '108': BigInteger;
+ '109': BigInteger;
+ '110': BigInteger;
+ '111': BigInteger;
+ '112': BigInteger;
+ '113': BigInteger;
+ '114': BigInteger;
+ '115': BigInteger;
+ '116': BigInteger;
+ '117': BigInteger;
+ '118': BigInteger;
+ '119': BigInteger;
+ '120': BigInteger;
+ '121': BigInteger;
+ '122': BigInteger;
+ '123': BigInteger;
+ '124': BigInteger;
+ '125': BigInteger;
+ '126': BigInteger;
+ '127': BigInteger;
+ '128': BigInteger;
+ '129': BigInteger;
+ '130': BigInteger;
+ '131': BigInteger;
+ '132': BigInteger;
+ '133': BigInteger;
+ '134': BigInteger;
+ '135': BigInteger;
+ '136': BigInteger;
+ '137': BigInteger;
+ '138': BigInteger;
+ '139': BigInteger;
+ '140': BigInteger;
+ '141': BigInteger;
+ '142': BigInteger;
+ '143': BigInteger;
+ '144': BigInteger;
+ '145': BigInteger;
+ '146': BigInteger;
+ '147': BigInteger;
+ '148': BigInteger;
+ '149': BigInteger;
+ '150': BigInteger;
+ '151': BigInteger;
+ '152': BigInteger;
+ '153': BigInteger;
+ '154': BigInteger;
+ '155': BigInteger;
+ '156': BigInteger;
+ '157': BigInteger;
+ '158': BigInteger;
+ '159': BigInteger;
+ '160': BigInteger;
+ '161': BigInteger;
+ '162': BigInteger;
+ '163': BigInteger;
+ '164': BigInteger;
+ '165': BigInteger;
+ '166': BigInteger;
+ '167': BigInteger;
+ '168': BigInteger;
+ '169': BigInteger;
+ '170': BigInteger;
+ '171': BigInteger;
+ '172': BigInteger;
+ '173': BigInteger;
+ '174': BigInteger;
+ '175': BigInteger;
+ '176': BigInteger;
+ '177': BigInteger;
+ '178': BigInteger;
+ '179': BigInteger;
+ '180': BigInteger;
+ '181': BigInteger;
+ '182': BigInteger;
+ '183': BigInteger;
+ '184': BigInteger;
+ '185': BigInteger;
+ '186': BigInteger;
+ '187': BigInteger;
+ '188': BigInteger;
+ '189': BigInteger;
+ '190': BigInteger;
+ '191': BigInteger;
+ '192': BigInteger;
+ '193': BigInteger;
+ '194': BigInteger;
+ '195': BigInteger;
+ '196': BigInteger;
+ '197': BigInteger;
+ '198': BigInteger;
+ '199': BigInteger;
+ '200': BigInteger;
+ '201': BigInteger;
+ '202': BigInteger;
+ '203': BigInteger;
+ '204': BigInteger;
+ '205': BigInteger;
+ '206': BigInteger;
+ '207': BigInteger;
+ '208': BigInteger;
+ '209': BigInteger;
+ '210': BigInteger;
+ '211': BigInteger;
+ '212': BigInteger;
+ '213': BigInteger;
+ '214': BigInteger;
+ '215': BigInteger;
+ '216': BigInteger;
+ '217': BigInteger;
+ '218': BigInteger;
+ '219': BigInteger;
+ '220': BigInteger;
+ '221': BigInteger;
+ '222': BigInteger;
+ '223': BigInteger;
+ '224': BigInteger;
+ '225': BigInteger;
+ '226': BigInteger;
+ '227': BigInteger;
+ '228': BigInteger;
+ '229': BigInteger;
+ '230': BigInteger;
+ '231': BigInteger;
+ '232': BigInteger;
+ '233': BigInteger;
+ '234': BigInteger;
+ '235': BigInteger;
+ '236': BigInteger;
+ '237': BigInteger;
+ '238': BigInteger;
+ '239': BigInteger;
+ '240': BigInteger;
+ '241': BigInteger;
+ '242': BigInteger;
+ '243': BigInteger;
+ '244': BigInteger;
+ '245': BigInteger;
+ '246': BigInteger;
+ '247': BigInteger;
+ '248': BigInteger;
+ '249': BigInteger;
+ '250': BigInteger;
+ '251': BigInteger;
+ '252': BigInteger;
+ '253': BigInteger;
+ '254': BigInteger;
+ '255': BigInteger;
+ '256': BigInteger;
+ '257': BigInteger;
+ '258': BigInteger;
+ '259': BigInteger;
+ '260': BigInteger;
+ '261': BigInteger;
+ '262': BigInteger;
+ '263': BigInteger;
+ '264': BigInteger;
+ '265': BigInteger;
+ '266': BigInteger;
+ '267': BigInteger;
+ '268': BigInteger;
+ '269': BigInteger;
+ '270': BigInteger;
+ '271': BigInteger;
+ '272': BigInteger;
+ '273': BigInteger;
+ '274': BigInteger;
+ '275': BigInteger;
+ '276': BigInteger;
+ '277': BigInteger;
+ '278': BigInteger;
+ '279': BigInteger;
+ '280': BigInteger;
+ '281': BigInteger;
+ '282': BigInteger;
+ '283': BigInteger;
+ '284': BigInteger;
+ '285': BigInteger;
+ '286': BigInteger;
+ '287': BigInteger;
+ '288': BigInteger;
+ '289': BigInteger;
+ '290': BigInteger;
+ '291': BigInteger;
+ '292': BigInteger;
+ '293': BigInteger;
+ '294': BigInteger;
+ '295': BigInteger;
+ '296': BigInteger;
+ '297': BigInteger;
+ '298': BigInteger;
+ '299': BigInteger;
+ '300': BigInteger;
+ '301': BigInteger;
+ '302': BigInteger;
+ '303': BigInteger;
+ '304': BigInteger;
+ '305': BigInteger;
+ '306': BigInteger;
+ '307': BigInteger;
+ '308': BigInteger;
+ '309': BigInteger;
+ '310': BigInteger;
+ '311': BigInteger;
+ '312': BigInteger;
+ '313': BigInteger;
+ '314': BigInteger;
+ '315': BigInteger;
+ '316': BigInteger;
+ '317': BigInteger;
+ '318': BigInteger;
+ '319': BigInteger;
+ '320': BigInteger;
+ '321': BigInteger;
+ '322': BigInteger;
+ '323': BigInteger;
+ '324': BigInteger;
+ '325': BigInteger;
+ '326': BigInteger;
+ '327': BigInteger;
+ '328': BigInteger;
+ '329': BigInteger;
+ '330': BigInteger;
+ '331': BigInteger;
+ '332': BigInteger;
+ '333': BigInteger;
+ '334': BigInteger;
+ '335': BigInteger;
+ '336': BigInteger;
+ '337': BigInteger;
+ '338': BigInteger;
+ '339': BigInteger;
+ '340': BigInteger;
+ '341': BigInteger;
+ '342': BigInteger;
+ '343': BigInteger;
+ '344': BigInteger;
+ '345': BigInteger;
+ '346': BigInteger;
+ '347': BigInteger;
+ '348': BigInteger;
+ '349': BigInteger;
+ '350': BigInteger;
+ '351': BigInteger;
+ '352': BigInteger;
+ '353': BigInteger;
+ '354': BigInteger;
+ '355': BigInteger;
+ '356': BigInteger;
+ '357': BigInteger;
+ '358': BigInteger;
+ '359': BigInteger;
+ '360': BigInteger;
+ '361': BigInteger;
+ '362': BigInteger;
+ '363': BigInteger;
+ '364': BigInteger;
+ '365': BigInteger;
+ '366': BigInteger;
+ '367': BigInteger;
+ '368': BigInteger;
+ '369': BigInteger;
+ '370': BigInteger;
+ '371': BigInteger;
+ '372': BigInteger;
+ '373': BigInteger;
+ '374': BigInteger;
+ '375': BigInteger;
+ '376': BigInteger;
+ '377': BigInteger;
+ '378': BigInteger;
+ '379': BigInteger;
+ '380': BigInteger;
+ '381': BigInteger;
+ '382': BigInteger;
+ '383': BigInteger;
+ '384': BigInteger;
+ '385': BigInteger;
+ '386': BigInteger;
+ '387': BigInteger;
+ '388': BigInteger;
+ '389': BigInteger;
+ '390': BigInteger;
+ '391': BigInteger;
+ '392': BigInteger;
+ '393': BigInteger;
+ '394': BigInteger;
+ '395': BigInteger;
+ '396': BigInteger;
+ '397': BigInteger;
+ '398': BigInteger;
+ '399': BigInteger;
+ '400': BigInteger;
+ '401': BigInteger;
+ '402': BigInteger;
+ '403': BigInteger;
+ '404': BigInteger;
+ '405': BigInteger;
+ '406': BigInteger;
+ '407': BigInteger;
+ '408': BigInteger;
+ '409': BigInteger;
+ '410': BigInteger;
+ '411': BigInteger;
+ '412': BigInteger;
+ '413': BigInteger;
+ '414': BigInteger;
+ '415': BigInteger;
+ '416': BigInteger;
+ '417': BigInteger;
+ '418': BigInteger;
+ '419': BigInteger;
+ '420': BigInteger;
+ '421': BigInteger;
+ '422': BigInteger;
+ '423': BigInteger;
+ '424': BigInteger;
+ '425': BigInteger;
+ '426': BigInteger;
+ '427': BigInteger;
+ '428': BigInteger;
+ '429': BigInteger;
+ '430': BigInteger;
+ '431': BigInteger;
+ '432': BigInteger;
+ '433': BigInteger;
+ '434': BigInteger;
+ '435': BigInteger;
+ '436': BigInteger;
+ '437': BigInteger;
+ '438': BigInteger;
+ '439': BigInteger;
+ '440': BigInteger;
+ '441': BigInteger;
+ '442': BigInteger;
+ '443': BigInteger;
+ '444': BigInteger;
+ '445': BigInteger;
+ '446': BigInteger;
+ '447': BigInteger;
+ '448': BigInteger;
+ '449': BigInteger;
+ '450': BigInteger;
+ '451': BigInteger;
+ '452': BigInteger;
+ '453': BigInteger;
+ '454': BigInteger;
+ '455': BigInteger;
+ '456': BigInteger;
+ '457': BigInteger;
+ '458': BigInteger;
+ '459': BigInteger;
+ '460': BigInteger;
+ '461': BigInteger;
+ '462': BigInteger;
+ '463': BigInteger;
+ '464': BigInteger;
+ '465': BigInteger;
+ '466': BigInteger;
+ '467': BigInteger;
+ '468': BigInteger;
+ '469': BigInteger;
+ '470': BigInteger;
+ '471': BigInteger;
+ '472': BigInteger;
+ '473': BigInteger;
+ '474': BigInteger;
+ '475': BigInteger;
+ '476': BigInteger;
+ '477': BigInteger;
+ '478': BigInteger;
+ '479': BigInteger;
+ '480': BigInteger;
+ '481': BigInteger;
+ '482': BigInteger;
+ '483': BigInteger;
+ '484': BigInteger;
+ '485': BigInteger;
+ '486': BigInteger;
+ '487': BigInteger;
+ '488': BigInteger;
+ '489': BigInteger;
+ '490': BigInteger;
+ '491': BigInteger;
+ '492': BigInteger;
+ '493': BigInteger;
+ '494': BigInteger;
+ '495': BigInteger;
+ '496': BigInteger;
+ '497': BigInteger;
+ '498': BigInteger;
+ '499': BigInteger;
+ '500': BigInteger;
+ '501': BigInteger;
+ '502': BigInteger;
+ '503': BigInteger;
+ '504': BigInteger;
+ '505': BigInteger;
+ '506': BigInteger;
+ '507': BigInteger;
+ '508': BigInteger;
+ '509': BigInteger;
+ '510': BigInteger;
+ '511': BigInteger;
+ '512': BigInteger;
+ '513': BigInteger;
+ '514': BigInteger;
+ '515': BigInteger;
+ '516': BigInteger;
+ '517': BigInteger;
+ '518': BigInteger;
+ '519': BigInteger;
+ '520': BigInteger;
+ '521': BigInteger;
+ '522': BigInteger;
+ '523': BigInteger;
+ '524': BigInteger;
+ '525': BigInteger;
+ '526': BigInteger;
+ '527': BigInteger;
+ '528': BigInteger;
+ '529': BigInteger;
+ '530': BigInteger;
+ '531': BigInteger;
+ '532': BigInteger;
+ '533': BigInteger;
+ '534': BigInteger;
+ '535': BigInteger;
+ '536': BigInteger;
+ '537': BigInteger;
+ '538': BigInteger;
+ '539': BigInteger;
+ '540': BigInteger;
+ '541': BigInteger;
+ '542': BigInteger;
+ '543': BigInteger;
+ '544': BigInteger;
+ '545': BigInteger;
+ '546': BigInteger;
+ '547': BigInteger;
+ '548': BigInteger;
+ '549': BigInteger;
+ '550': BigInteger;
+ '551': BigInteger;
+ '552': BigInteger;
+ '553': BigInteger;
+ '554': BigInteger;
+ '555': BigInteger;
+ '556': BigInteger;
+ '557': BigInteger;
+ '558': BigInteger;
+ '559': BigInteger;
+ '560': BigInteger;
+ '561': BigInteger;
+ '562': BigInteger;
+ '563': BigInteger;
+ '564': BigInteger;
+ '565': BigInteger;
+ '566': BigInteger;
+ '567': BigInteger;
+ '568': BigInteger;
+ '569': BigInteger;
+ '570': BigInteger;
+ '571': BigInteger;
+ '572': BigInteger;
+ '573': BigInteger;
+ '574': BigInteger;
+ '575': BigInteger;
+ '576': BigInteger;
+ '577': BigInteger;
+ '578': BigInteger;
+ '579': BigInteger;
+ '580': BigInteger;
+ '581': BigInteger;
+ '582': BigInteger;
+ '583': BigInteger;
+ '584': BigInteger;
+ '585': BigInteger;
+ '586': BigInteger;
+ '587': BigInteger;
+ '588': BigInteger;
+ '589': BigInteger;
+ '590': BigInteger;
+ '591': BigInteger;
+ '592': BigInteger;
+ '593': BigInteger;
+ '594': BigInteger;
+ '595': BigInteger;
+ '596': BigInteger;
+ '597': BigInteger;
+ '598': BigInteger;
+ '599': BigInteger;
+ '600': BigInteger;
+ '601': BigInteger;
+ '602': BigInteger;
+ '603': BigInteger;
+ '604': BigInteger;
+ '605': BigInteger;
+ '606': BigInteger;
+ '607': BigInteger;
+ '608': BigInteger;
+ '609': BigInteger;
+ '610': BigInteger;
+ '611': BigInteger;
+ '612': BigInteger;
+ '613': BigInteger;
+ '614': BigInteger;
+ '615': BigInteger;
+ '616': BigInteger;
+ '617': BigInteger;
+ '618': BigInteger;
+ '619': BigInteger;
+ '620': BigInteger;
+ '621': BigInteger;
+ '622': BigInteger;
+ '623': BigInteger;
+ '624': BigInteger;
+ '625': BigInteger;
+ '626': BigInteger;
+ '627': BigInteger;
+ '628': BigInteger;
+ '629': BigInteger;
+ '630': BigInteger;
+ '631': BigInteger;
+ '632': BigInteger;
+ '633': BigInteger;
+ '634': BigInteger;
+ '635': BigInteger;
+ '636': BigInteger;
+ '637': BigInteger;
+ '638': BigInteger;
+ '639': BigInteger;
+ '640': BigInteger;
+ '641': BigInteger;
+ '642': BigInteger;
+ '643': BigInteger;
+ '644': BigInteger;
+ '645': BigInteger;
+ '646': BigInteger;
+ '647': BigInteger;
+ '648': BigInteger;
+ '649': BigInteger;
+ '650': BigInteger;
+ '651': BigInteger;
+ '652': BigInteger;
+ '653': BigInteger;
+ '654': BigInteger;
+ '655': BigInteger;
+ '656': BigInteger;
+ '657': BigInteger;
+ '658': BigInteger;
+ '659': BigInteger;
+ '660': BigInteger;
+ '661': BigInteger;
+ '662': BigInteger;
+ '663': BigInteger;
+ '664': BigInteger;
+ '665': BigInteger;
+ '666': BigInteger;
+ '667': BigInteger;
+ '668': BigInteger;
+ '669': BigInteger;
+ '670': BigInteger;
+ '671': BigInteger;
+ '672': BigInteger;
+ '673': BigInteger;
+ '674': BigInteger;
+ '675': BigInteger;
+ '676': BigInteger;
+ '677': BigInteger;
+ '678': BigInteger;
+ '679': BigInteger;
+ '680': BigInteger;
+ '681': BigInteger;
+ '682': BigInteger;
+ '683': BigInteger;
+ '684': BigInteger;
+ '685': BigInteger;
+ '686': BigInteger;
+ '687': BigInteger;
+ '688': BigInteger;
+ '689': BigInteger;
+ '690': BigInteger;
+ '691': BigInteger;
+ '692': BigInteger;
+ '693': BigInteger;
+ '694': BigInteger;
+ '695': BigInteger;
+ '696': BigInteger;
+ '697': BigInteger;
+ '698': BigInteger;
+ '699': BigInteger;
+ '700': BigInteger;
+ '701': BigInteger;
+ '702': BigInteger;
+ '703': BigInteger;
+ '704': BigInteger;
+ '705': BigInteger;
+ '706': BigInteger;
+ '707': BigInteger;
+ '708': BigInteger;
+ '709': BigInteger;
+ '710': BigInteger;
+ '711': BigInteger;
+ '712': BigInteger;
+ '713': BigInteger;
+ '714': BigInteger;
+ '715': BigInteger;
+ '716': BigInteger;
+ '717': BigInteger;
+ '718': BigInteger;
+ '719': BigInteger;
+ '720': BigInteger;
+ '721': BigInteger;
+ '722': BigInteger;
+ '723': BigInteger;
+ '724': BigInteger;
+ '725': BigInteger;
+ '726': BigInteger;
+ '727': BigInteger;
+ '728': BigInteger;
+ '729': BigInteger;
+ '730': BigInteger;
+ '731': BigInteger;
+ '732': BigInteger;
+ '733': BigInteger;
+ '734': BigInteger;
+ '735': BigInteger;
+ '736': BigInteger;
+ '737': BigInteger;
+ '738': BigInteger;
+ '739': BigInteger;
+ '740': BigInteger;
+ '741': BigInteger;
+ '742': BigInteger;
+ '743': BigInteger;
+ '744': BigInteger;
+ '745': BigInteger;
+ '746': BigInteger;
+ '747': BigInteger;
+ '748': BigInteger;
+ '749': BigInteger;
+ '750': BigInteger;
+ '751': BigInteger;
+ '752': BigInteger;
+ '753': BigInteger;
+ '754': BigInteger;
+ '755': BigInteger;
+ '756': BigInteger;
+ '757': BigInteger;
+ '758': BigInteger;
+ '759': BigInteger;
+ '760': BigInteger;
+ '761': BigInteger;
+ '762': BigInteger;
+ '763': BigInteger;
+ '764': BigInteger;
+ '765': BigInteger;
+ '766': BigInteger;
+ '767': BigInteger;
+ '768': BigInteger;
+ '769': BigInteger;
+ '770': BigInteger;
+ '771': BigInteger;
+ '772': BigInteger;
+ '773': BigInteger;
+ '774': BigInteger;
+ '775': BigInteger;
+ '776': BigInteger;
+ '777': BigInteger;
+ '778': BigInteger;
+ '779': BigInteger;
+ '780': BigInteger;
+ '781': BigInteger;
+ '782': BigInteger;
+ '783': BigInteger;
+ '784': BigInteger;
+ '785': BigInteger;
+ '786': BigInteger;
+ '787': BigInteger;
+ '788': BigInteger;
+ '789': BigInteger;
+ '790': BigInteger;
+ '791': BigInteger;
+ '792': BigInteger;
+ '793': BigInteger;
+ '794': BigInteger;
+ '795': BigInteger;
+ '796': BigInteger;
+ '797': BigInteger;
+ '798': BigInteger;
+ '799': BigInteger;
+ '800': BigInteger;
+ '801': BigInteger;
+ '802': BigInteger;
+ '803': BigInteger;
+ '804': BigInteger;
+ '805': BigInteger;
+ '806': BigInteger;
+ '807': BigInteger;
+ '808': BigInteger;
+ '809': BigInteger;
+ '810': BigInteger;
+ '811': BigInteger;
+ '812': BigInteger;
+ '813': BigInteger;
+ '814': BigInteger;
+ '815': BigInteger;
+ '816': BigInteger;
+ '817': BigInteger;
+ '818': BigInteger;
+ '819': BigInteger;
+ '820': BigInteger;
+ '821': BigInteger;
+ '822': BigInteger;
+ '823': BigInteger;
+ '824': BigInteger;
+ '825': BigInteger;
+ '826': BigInteger;
+ '827': BigInteger;
+ '828': BigInteger;
+ '829': BigInteger;
+ '830': BigInteger;
+ '831': BigInteger;
+ '832': BigInteger;
+ '833': BigInteger;
+ '834': BigInteger;
+ '835': BigInteger;
+ '836': BigInteger;
+ '837': BigInteger;
+ '838': BigInteger;
+ '839': BigInteger;
+ '840': BigInteger;
+ '841': BigInteger;
+ '842': BigInteger;
+ '843': BigInteger;
+ '844': BigInteger;
+ '845': BigInteger;
+ '846': BigInteger;
+ '847': BigInteger;
+ '848': BigInteger;
+ '849': BigInteger;
+ '850': BigInteger;
+ '851': BigInteger;
+ '852': BigInteger;
+ '853': BigInteger;
+ '854': BigInteger;
+ '855': BigInteger;
+ '856': BigInteger;
+ '857': BigInteger;
+ '858': BigInteger;
+ '859': BigInteger;
+ '860': BigInteger;
+ '861': BigInteger;
+ '862': BigInteger;
+ '863': BigInteger;
+ '864': BigInteger;
+ '865': BigInteger;
+ '866': BigInteger;
+ '867': BigInteger;
+ '868': BigInteger;
+ '869': BigInteger;
+ '870': BigInteger;
+ '871': BigInteger;
+ '872': BigInteger;
+ '873': BigInteger;
+ '874': BigInteger;
+ '875': BigInteger;
+ '876': BigInteger;
+ '877': BigInteger;
+ '878': BigInteger;
+ '879': BigInteger;
+ '880': BigInteger;
+ '881': BigInteger;
+ '882': BigInteger;
+ '883': BigInteger;
+ '884': BigInteger;
+ '885': BigInteger;
+ '886': BigInteger;
+ '887': BigInteger;
+ '888': BigInteger;
+ '889': BigInteger;
+ '890': BigInteger;
+ '891': BigInteger;
+ '892': BigInteger;
+ '893': BigInteger;
+ '894': BigInteger;
+ '895': BigInteger;
+ '896': BigInteger;
+ '897': BigInteger;
+ '898': BigInteger;
+ '899': BigInteger;
+ '900': BigInteger;
+ '901': BigInteger;
+ '902': BigInteger;
+ '903': BigInteger;
+ '904': BigInteger;
+ '905': BigInteger;
+ '906': BigInteger;
+ '907': BigInteger;
+ '908': BigInteger;
+ '909': BigInteger;
+ '910': BigInteger;
+ '911': BigInteger;
+ '912': BigInteger;
+ '913': BigInteger;
+ '914': BigInteger;
+ '915': BigInteger;
+ '916': BigInteger;
+ '917': BigInteger;
+ '918': BigInteger;
+ '919': BigInteger;
+ '920': BigInteger;
+ '921': BigInteger;
+ '922': BigInteger;
+ '923': BigInteger;
+ '924': BigInteger;
+ '925': BigInteger;
+ '926': BigInteger;
+ '927': BigInteger;
+ '928': BigInteger;
+ '929': BigInteger;
+ '930': BigInteger;
+ '931': BigInteger;
+ '932': BigInteger;
+ '933': BigInteger;
+ '934': BigInteger;
+ '935': BigInteger;
+ '936': BigInteger;
+ '937': BigInteger;
+ '938': BigInteger;
+ '939': BigInteger;
+ '940': BigInteger;
+ '941': BigInteger;
+ '942': BigInteger;
+ '943': BigInteger;
+ '944': BigInteger;
+ '945': BigInteger;
+ '946': BigInteger;
+ '947': BigInteger;
+ '948': BigInteger;
+ '949': BigInteger;
+ '950': BigInteger;
+ '951': BigInteger;
+ '952': BigInteger;
+ '953': BigInteger;
+ '954': BigInteger;
+ '955': BigInteger;
+ '956': BigInteger;
+ '957': BigInteger;
+ '958': BigInteger;
+ '959': BigInteger;
+ '960': BigInteger;
+ '961': BigInteger;
+ '962': BigInteger;
+ '963': BigInteger;
+ '964': BigInteger;
+ '965': BigInteger;
+ '966': BigInteger;
+ '967': BigInteger;
+ '968': BigInteger;
+ '969': BigInteger;
+ '970': BigInteger;
+ '971': BigInteger;
+ '972': BigInteger;
+ '973': BigInteger;
+ '974': BigInteger;
+ '975': BigInteger;
+ '976': BigInteger;
+ '977': BigInteger;
+ '978': BigInteger;
+ '979': BigInteger;
+ '980': BigInteger;
+ '981': BigInteger;
+ '982': BigInteger;
+ '983': BigInteger;
+ '984': BigInteger;
+ '985': BigInteger;
+ '986': BigInteger;
+ '987': BigInteger;
+ '988': BigInteger;
+ '989': BigInteger;
+ '990': BigInteger;
+ '991': BigInteger;
+ '992': BigInteger;
+ '993': BigInteger;
+ '994': BigInteger;
+ '995': BigInteger;
+ '996': BigInteger;
+ '997': BigInteger;
+ '998': BigInteger;
+ '999': BigInteger;
+ }
+}
diff --git a/node_modules/big-integer/BigInteger.js b/node_modules/big-integer/BigInteger.js
index 9e5cee8a..56e3792b 100644
--- a/node_modules/big-integer/BigInteger.js
+++ b/node_modules/big-integer/BigInteger.js
@@ -1038,14 +1038,31 @@ var bigInt = (function (undefined) {
}
var parseBase = function (text, base) {
var length = text.length;
+ var i;
+ var absBase = Math.abs(base);
+ for(var i = 0; i < length; i++) {
+ var c = text[i].toLowerCase();
+ if(c === "-") continue;
+ if(/[a-z0-9]/.test(c)) {
+ if(/[0-9]/.test(c) && +c >= absBase) {
+ if(c === "1" && absBase === 1) continue;
+ throw new Error(c + " is not a valid digit in base " + base + ".");
+ } else if(c.charCodeAt(0) - 87 >= absBase) {
+ throw new Error(c + " is not a valid digit in base " + base + ".");
+ }
+ }
+ }
if (2 <= base && base <= 36) {
if (length <= LOG_MAX_INT / Math.log(base)) {
+ var result = parseInt(text, base);
+ if(isNaN(result)) {
+ throw new Error(c + " is not a valid digit in base " + base + ".");
+ }
return new SmallInteger(parseInt(text, base));
}
}
base = parseValue(base);
var digits = [];
- var i;
var isNegative = text[0] === "-";
for (i = isNegative ? 1 : 0; i < text.length; i++) {
var c = text[i].toLowerCase(),
@@ -1227,7 +1244,7 @@ if (typeof module !== "undefined" && module.hasOwnProperty("exports")) {
}
//amd check
-if ( typeof define === "function" && define.amd ) {
+if ( typeof define === "function" && define.amd ) {
define( "big-integer", [], function() {
return bigInt;
});
diff --git a/node_modules/big-integer/BigInteger.min.js b/node_modules/big-integer/BigInteger.min.js
index 83d73206..8ee9a894 100644
--- a/node_modules/big-integer/BigInteger.min.js
+++ b/node_modules/big-integer/BigInteger.min.js
@@ -1 +1 @@
-var bigInt=function(undefined){"use strict";var BASE=1e7,LOG_BASE=7,MAX_INT=9007199254740992,MAX_INT_ARR=smallToArray(MAX_INT),LOG_MAX_INT=Math.log(MAX_INT);function Integer(v,radix){if(typeof v==="undefined")return Integer[0];if(typeof radix!=="undefined")return+radix===10?parseValue(v):parseBase(v,radix);return parseValue(v)}function BigInteger(value,sign){this.value=value;this.sign=sign;this.isSmall=false}BigInteger.prototype=Object.create(Integer.prototype);function SmallInteger(value){this.value=value;this.sign=value<0;this.isSmall=true}SmallInteger.prototype=Object.create(Integer.prototype);function isPrecise(n){return-MAX_INT0)return Math.floor(n);return Math.ceil(n)}function add(a,b){var l_a=a.length,l_b=b.length,r=new Array(l_a),carry=0,base=BASE,sum,i;for(i=0;i=base?1:0;r[i]=sum-carry*base}while(i0)r.push(carry);return r}function addAny(a,b){if(a.length>=b.length)return add(a,b);return add(b,a)}function addSmall(a,carry){var l=a.length,r=new Array(l),base=BASE,sum,i;for(i=0;i0){r[i++]=carry%base;carry=Math.floor(carry/base)}return r}BigInteger.prototype.add=function(v){var n=parseValue(v);if(this.sign!==n.sign){return this.subtract(n.negate())}var a=this.value,b=n.value;if(n.isSmall){return new BigInteger(addSmall(a,Math.abs(b)),this.sign)}return new BigInteger(addAny(a,b),this.sign)};BigInteger.prototype.plus=BigInteger.prototype.add;SmallInteger.prototype.add=function(v){var n=parseValue(v);var a=this.value;if(a<0!==n.sign){return this.subtract(n.negate())}var b=n.value;if(n.isSmall){if(isPrecise(a+b))return new SmallInteger(a+b);b=smallToArray(Math.abs(b))}return new BigInteger(addSmall(b,Math.abs(a)),a<0)};SmallInteger.prototype.plus=SmallInteger.prototype.add;function subtract(a,b){var a_l=a.length,b_l=b.length,r=new Array(a_l),borrow=0,base=BASE,i,difference;for(i=0;i=0){value=subtract(a,b)}else{value=subtract(b,a);sign=!sign}value=arrayToSmall(value);if(typeof value==="number"){if(sign)value=-value;return new SmallInteger(value)}return new BigInteger(value,sign)}function subtractSmall(a,b,sign){var l=a.length,r=new Array(l),carry=-b,base=BASE,i,difference;for(i=0;i=0)};SmallInteger.prototype.minus=SmallInteger.prototype.subtract;BigInteger.prototype.negate=function(){return new BigInteger(this.value,!this.sign)};SmallInteger.prototype.negate=function(){var sign=this.sign;var small=new SmallInteger(-this.value);small.sign=!sign;return small};BigInteger.prototype.abs=function(){return new BigInteger(this.value,false)};SmallInteger.prototype.abs=function(){return new SmallInteger(Math.abs(this.value))};function multiplyLong(a,b){var a_l=a.length,b_l=b.length,l=a_l+b_l,r=createArray(l),base=BASE,product,carry,i,a_i,b_j;for(i=0;i0){r[i++]=carry%base;carry=Math.floor(carry/base)}return r}function shiftLeft(x,n){var r=[];while(n-->0)r.push(0);return r.concat(x)}function multiplyKaratsuba(x,y){var n=Math.max(x.length,y.length);if(n<=30)return multiplyLong(x,y);n=Math.ceil(n/2);var b=x.slice(n),a=x.slice(0,n),d=y.slice(n),c=y.slice(0,n);var ac=multiplyKaratsuba(a,c),bd=multiplyKaratsuba(b,d),abcd=multiplyKaratsuba(addAny(a,b),addAny(c,d));var product=addAny(addAny(ac,shiftLeft(subtract(subtract(abcd,ac),bd),n)),shiftLeft(bd,2*n));trim(product);return product}function useKaratsuba(l1,l2){return-.012*l1-.012*l2+15e-6*l1*l2>0}BigInteger.prototype.multiply=function(v){var n=parseValue(v),a=this.value,b=n.value,sign=this.sign!==n.sign,abs;if(n.isSmall){if(b===0)return Integer[0];if(b===1)return this;if(b===-1)return this.negate();abs=Math.abs(b);if(abs=0;shift--){quotientDigit=base-1;if(remainder[shift+b_l]!==divisorMostSignificantDigit){quotientDigit=Math.floor((remainder[shift+b_l]*base+remainder[shift+b_l-1])/divisorMostSignificantDigit)}carry=0;borrow=0;l=divisor.length;for(i=0;ib_l){highx=(highx+1)*base}guess=Math.ceil(highx/highy);do{check=multiplySmall(b,guess);if(compareAbs(check,part)<=0)break;guess--}while(guess);result.push(guess);part=subtract(part,check)}result.reverse();return[arrayToSmall(result),arrayToSmall(part)]}function divModSmall(value,lambda){var length=value.length,quotient=createArray(length),base=BASE,i,q,remainder,divisor;remainder=0;for(i=length-1;i>=0;--i){divisor=remainder*base+value[i];q=truncate(divisor/lambda);remainder=divisor-q*lambda;quotient[i]=q|0}return[quotient,remainder|0]}function divModAny(self,v){var value,n=parseValue(v);var a=self.value,b=n.value;var quotient;if(b===0)throw new Error("Cannot divide by zero");if(self.isSmall){if(n.isSmall){return[new SmallInteger(truncate(a/b)),new SmallInteger(a%b)]}return[Integer[0],self]}if(n.isSmall){if(b===1)return[self,Integer[0]];if(b==-1)return[self.negate(),Integer[0]];var abs=Math.abs(b);if(absb.length?1:-1}for(var i=a.length-1;i>=0;i--){if(a[i]!==b[i])return a[i]>b[i]?1:-1}return 0}BigInteger.prototype.compareAbs=function(v){var n=parseValue(v),a=this.value,b=n.value;if(n.isSmall)return 1;return compareAbs(a,b)};SmallInteger.prototype.compareAbs=function(v){var n=parseValue(v),a=Math.abs(this.value),b=n.value;if(n.isSmall){b=Math.abs(b);return a===b?0:a>b?1:-1}return-1};BigInteger.prototype.compare=function(v){if(v===Infinity){return-1}if(v===-Infinity){return 1}var n=parseValue(v),a=this.value,b=n.value;if(this.sign!==n.sign){return n.sign?1:-1}if(n.isSmall){return this.sign?-1:1}return compareAbs(a,b)*(this.sign?-1:1)};BigInteger.prototype.compareTo=BigInteger.prototype.compare;SmallInteger.prototype.compare=function(v){if(v===Infinity){return-1}if(v===-Infinity){return 1}var n=parseValue(v),a=this.value,b=n.value;if(n.isSmall){return a==b?0:a>b?1:-1}if(a<0!==n.sign){return a<0?-1:1}return a<0?1:-1};SmallInteger.prototype.compareTo=SmallInteger.prototype.compare;BigInteger.prototype.equals=function(v){return this.compare(v)===0};SmallInteger.prototype.eq=SmallInteger.prototype.equals=BigInteger.prototype.eq=BigInteger.prototype.equals;BigInteger.prototype.notEquals=function(v){return this.compare(v)!==0};SmallInteger.prototype.neq=SmallInteger.prototype.notEquals=BigInteger.prototype.neq=BigInteger.prototype.notEquals;BigInteger.prototype.greater=function(v){return this.compare(v)>0};SmallInteger.prototype.gt=SmallInteger.prototype.greater=BigInteger.prototype.gt=BigInteger.prototype.greater;BigInteger.prototype.lesser=function(v){return this.compare(v)<0};SmallInteger.prototype.lt=SmallInteger.prototype.lesser=BigInteger.prototype.lt=BigInteger.prototype.lesser;BigInteger.prototype.greaterOrEquals=function(v){return this.compare(v)>=0};SmallInteger.prototype.geq=SmallInteger.prototype.greaterOrEquals=BigInteger.prototype.geq=BigInteger.prototype.greaterOrEquals;BigInteger.prototype.lesserOrEquals=function(v){return this.compare(v)<=0};SmallInteger.prototype.leq=SmallInteger.prototype.lesserOrEquals=BigInteger.prototype.leq=BigInteger.prototype.lesserOrEquals;BigInteger.prototype.isEven=function(){return(this.value[0]&1)===0};SmallInteger.prototype.isEven=function(){return(this.value&1)===0};BigInteger.prototype.isOdd=function(){return(this.value[0]&1)===1};SmallInteger.prototype.isOdd=function(){return(this.value&1)===1};BigInteger.prototype.isPositive=function(){return!this.sign};SmallInteger.prototype.isPositive=function(){return this.value>0};BigInteger.prototype.isNegative=function(){return this.sign};SmallInteger.prototype.isNegative=function(){return this.value<0};BigInteger.prototype.isUnit=function(){return false};SmallInteger.prototype.isUnit=function(){return Math.abs(this.value)===1};BigInteger.prototype.isZero=function(){return false};SmallInteger.prototype.isZero=function(){return this.value===0};BigInteger.prototype.isDivisibleBy=function(v){var n=parseValue(v);var value=n.value;if(value===0)return false;if(value===1)return true;if(value===2)return this.isEven();return this.mod(n).equals(Integer[0])};SmallInteger.prototype.isDivisibleBy=BigInteger.prototype.isDivisibleBy;function isBasicPrime(v){var n=v.abs();if(n.isUnit())return false;if(n.equals(2)||n.equals(3)||n.equals(5))return true;if(n.isEven()||n.isDivisibleBy(3)||n.isDivisibleBy(5))return false;if(n.lesser(25))return true}BigInteger.prototype.isPrime=function(){var isPrime=isBasicPrime(this);if(isPrime!==undefined)return isPrime;var n=this.abs(),nPrev=n.prev();var a=[2,3,5,7,11,13,17,19],b=nPrev,d,t,i,x;while(b.isEven())b=b.divide(2);for(i=0;i-MAX_INT)return new SmallInteger(value-1);return new BigInteger(MAX_INT_ARR,true)};var powersOfTwo=[1];while(powersOfTwo[powersOfTwo.length-1]<=BASE)powersOfTwo.push(2*powersOfTwo[powersOfTwo.length-1]);var powers2Length=powersOfTwo.length,highestPower2=powersOfTwo[powers2Length-1];function shift_isSmall(n){return(typeof n==="number"||typeof n==="string")&&+Math.abs(n)<=BASE||n instanceof BigInteger&&n.value.length<=1}BigInteger.prototype.shiftLeft=function(n){if(!shift_isSmall(n)){throw new Error(String(n)+" is too large for shifting.")}n=+n;if(n<0)return this.shiftRight(-n);var result=this;while(n>=powers2Length){result=result.multiply(highestPower2);n-=powers2Length-1}return result.multiply(powersOfTwo[n])};SmallInteger.prototype.shiftLeft=BigInteger.prototype.shiftLeft;BigInteger.prototype.shiftRight=function(n){var remQuo;if(!shift_isSmall(n)){throw new Error(String(n)+" is too large for shifting.")}n=+n;if(n<0)return this.shiftLeft(-n);var result=this;while(n>=powers2Length){if(result.isZero())return result;remQuo=divModAny(result,highestPower2);result=remQuo[1].isNegative()?remQuo[0].prev():remQuo[0];n-=powers2Length-1}remQuo=divModAny(result,powersOfTwo[n]);return remQuo[1].isNegative()?remQuo[0].prev():remQuo[0]};SmallInteger.prototype.shiftRight=BigInteger.prototype.shiftRight;function bitwise(x,y,fn){y=parseValue(y);var xSign=x.isNegative(),ySign=y.isNegative();var xRem=xSign?x.not():x,yRem=ySign?y.not():y;var xBits=[],yBits=[];var xStop=false,yStop=false;while(!xStop||!yStop){if(xRem.isZero()){xStop=true;xBits.push(xSign?1:0)}else if(xSign)xBits.push(xRem.isEven()?1:0);else xBits.push(xRem.isEven()?0:1);if(yRem.isZero()){yStop=true;yBits.push(ySign?1:0)}else if(ySign)yBits.push(yRem.isEven()?1:0);else yBits.push(yRem.isEven()?0:1);xRem=xRem.over(2);yRem=yRem.over(2)}var result=[];for(var i=0;i=0;i--){var top=restricted?range.value[i]:BASE;var digit=truncate(Math.random()*top);result.unshift(digit);if(digit");digits.push(parseValue(text.slice(start+1,i)))}else throw new Error(c+" is not a valid character")}return parseBaseFromArray(digits,base,isNegative)};function parseBaseFromArray(digits,base,isNegative){var val=Integer[0],pow=Integer[1],i;for(i=digits.length-1;i>=0;i--){val=val.add(digits[i].times(pow));pow=pow.times(base)}return isNegative?val.negate():val}function stringify(digit){var v=digit.value;if(typeof v==="number")v=[v];if(v.length===1&&v[0]<=35){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(v[0])}return"<"+v+">"}function toBase(n,base){base=bigInt(base);if(base.isZero()){if(n.isZero())return"0";throw new Error("Cannot convert nonzero numbers to base 0.")}if(base.equals(-1)){if(n.isZero())return"0";if(n.isNegative())return new Array(1-n).join("10");return"1"+new Array(+n).join("01")}var minusSign="";if(n.isNegative()&&base.isPositive()){minusSign="-";n=n.abs()}if(base.equals(1)){if(n.isZero())return"0";return minusSign+new Array(+n+1).join(1)}var out=[];var left=n,divmod;while(left.isNegative()||left.compareAbs(base)>=0){divmod=left.divmod(base);left=divmod.quotient;var digit=divmod.remainder;if(digit.isNegative()){digit=base.minus(digit).abs();left=left.next()}out.push(stringify(digit))}out.push(stringify(left));return minusSign+out.reverse().join("")}BigInteger.prototype.toString=function(radix){if(radix===undefined)radix=10;if(radix!==10)return toBase(this,radix);var v=this.value,l=v.length,str=String(v[--l]),zeros="0000000",digit;while(--l>=0){digit=String(v[l]);str+=zeros.slice(digit.length)+digit}var sign=this.sign?"-":"";return sign+str};SmallInteger.prototype.toString=function(radix){if(radix===undefined)radix=10;if(radix!=10)return toBase(this,radix);return String(this.value)};BigInteger.prototype.valueOf=function(){return+this.toString()};BigInteger.prototype.toJSNumber=BigInteger.prototype.valueOf;SmallInteger.prototype.valueOf=function(){return this.value};SmallInteger.prototype.toJSNumber=SmallInteger.prototype.valueOf;function parseStringValue(v){if(isPrecise(+v)){var x=+v;if(x===truncate(x))return new SmallInteger(x);throw"Invalid integer: "+v}var sign=v[0]==="-";if(sign)v=v.slice(1);var split=v.split(/e/i);if(split.length>2)throw new Error("Invalid integer: "+split.join("e"));if(split.length===2){var exp=split[1];if(exp[0]==="+")exp=exp.slice(1);exp=+exp;if(exp!==truncate(exp)||!isPrecise(exp))throw new Error("Invalid integer: "+exp+" is not a valid exponent.");var text=split[0];var decimalPlace=text.indexOf(".");if(decimalPlace>=0){exp-=text.length-decimalPlace-1;text=text.slice(0,decimalPlace)+text.slice(decimalPlace+1)}if(exp<0)throw new Error("Cannot include negative exponent part for integers");text+=new Array(exp+1).join("0");v=text}var isValid=/^([0-9][0-9]*)$/.test(v);if(!isValid)throw new Error("Invalid integer: "+v);var r=[],max=v.length,l=LOG_BASE,min=max-l;while(max>0){r.push(+v.slice(min,max));min-=l;if(min<0)min=0;max-=l}trim(r);return new BigInteger(r,sign)}function parseNumberValue(v){if(isPrecise(v)){if(v!==truncate(v))throw new Error(v+" is not an integer.");return new SmallInteger(v)}return parseStringValue(v.toString())}function parseValue(v){if(typeof v==="number"){return parseNumberValue(v)}if(typeof v==="string"){return parseStringValue(v)}return v}for(var i=0;i<1e3;i++){Integer[i]=new SmallInteger(i);if(i>0)Integer[-i]=new SmallInteger(-i)}Integer.one=Integer[1];Integer.zero=Integer[0];Integer.minusOne=Integer[-1];Integer.max=max;Integer.min=min;Integer.gcd=gcd;Integer.lcm=lcm;Integer.isInstance=function(x){return x instanceof BigInteger||x instanceof SmallInteger};Integer.randBetween=randBetween;Integer.fromArray=function(digits,base,isNegative){return parseBaseFromArray(digits.map(parseValue),parseValue(base||10),isNegative)};return Integer}();if(typeof module!=="undefined"&&module.hasOwnProperty("exports")){module.exports=bigInt}
\ No newline at end of file
+var bigInt=function(undefined){"use strict";var BASE=1e7,LOG_BASE=7,MAX_INT=9007199254740992,MAX_INT_ARR=smallToArray(MAX_INT),LOG_MAX_INT=Math.log(MAX_INT);function Integer(v,radix){if(typeof v==="undefined")return Integer[0];if(typeof radix!=="undefined")return+radix===10?parseValue(v):parseBase(v,radix);return parseValue(v)}function BigInteger(value,sign){this.value=value;this.sign=sign;this.isSmall=false}BigInteger.prototype=Object.create(Integer.prototype);function SmallInteger(value){this.value=value;this.sign=value<0;this.isSmall=true}SmallInteger.prototype=Object.create(Integer.prototype);function isPrecise(n){return-MAX_INT0)return Math.floor(n);return Math.ceil(n)}function add(a,b){var l_a=a.length,l_b=b.length,r=new Array(l_a),carry=0,base=BASE,sum,i;for(i=0;i=base?1:0;r[i]=sum-carry*base}while(i0)r.push(carry);return r}function addAny(a,b){if(a.length>=b.length)return add(a,b);return add(b,a)}function addSmall(a,carry){var l=a.length,r=new Array(l),base=BASE,sum,i;for(i=0;i0){r[i++]=carry%base;carry=Math.floor(carry/base)}return r}BigInteger.prototype.add=function(v){var n=parseValue(v);if(this.sign!==n.sign){return this.subtract(n.negate())}var a=this.value,b=n.value;if(n.isSmall){return new BigInteger(addSmall(a,Math.abs(b)),this.sign)}return new BigInteger(addAny(a,b),this.sign)};BigInteger.prototype.plus=BigInteger.prototype.add;SmallInteger.prototype.add=function(v){var n=parseValue(v);var a=this.value;if(a<0!==n.sign){return this.subtract(n.negate())}var b=n.value;if(n.isSmall){if(isPrecise(a+b))return new SmallInteger(a+b);b=smallToArray(Math.abs(b))}return new BigInteger(addSmall(b,Math.abs(a)),a<0)};SmallInteger.prototype.plus=SmallInteger.prototype.add;function subtract(a,b){var a_l=a.length,b_l=b.length,r=new Array(a_l),borrow=0,base=BASE,i,difference;for(i=0;i=0){value=subtract(a,b)}else{value=subtract(b,a);sign=!sign}value=arrayToSmall(value);if(typeof value==="number"){if(sign)value=-value;return new SmallInteger(value)}return new BigInteger(value,sign)}function subtractSmall(a,b,sign){var l=a.length,r=new Array(l),carry=-b,base=BASE,i,difference;for(i=0;i=0)};SmallInteger.prototype.minus=SmallInteger.prototype.subtract;BigInteger.prototype.negate=function(){return new BigInteger(this.value,!this.sign)};SmallInteger.prototype.negate=function(){var sign=this.sign;var small=new SmallInteger(-this.value);small.sign=!sign;return small};BigInteger.prototype.abs=function(){return new BigInteger(this.value,false)};SmallInteger.prototype.abs=function(){return new SmallInteger(Math.abs(this.value))};function multiplyLong(a,b){var a_l=a.length,b_l=b.length,l=a_l+b_l,r=createArray(l),base=BASE,product,carry,i,a_i,b_j;for(i=0;i0){r[i++]=carry%base;carry=Math.floor(carry/base)}return r}function shiftLeft(x,n){var r=[];while(n-- >0)r.push(0);return r.concat(x)}function multiplyKaratsuba(x,y){var n=Math.max(x.length,y.length);if(n<=30)return multiplyLong(x,y);n=Math.ceil(n/2);var b=x.slice(n),a=x.slice(0,n),d=y.slice(n),c=y.slice(0,n);var ac=multiplyKaratsuba(a,c),bd=multiplyKaratsuba(b,d),abcd=multiplyKaratsuba(addAny(a,b),addAny(c,d));var product=addAny(addAny(ac,shiftLeft(subtract(subtract(abcd,ac),bd),n)),shiftLeft(bd,2*n));trim(product);return product}function useKaratsuba(l1,l2){return-.012*l1-.012*l2+15e-6*l1*l2>0}BigInteger.prototype.multiply=function(v){var n=parseValue(v),a=this.value,b=n.value,sign=this.sign!==n.sign,abs;if(n.isSmall){if(b===0)return Integer[0];if(b===1)return this;if(b===-1)return this.negate();abs=Math.abs(b);if(abs=0;shift--){quotientDigit=base-1;if(remainder[shift+b_l]!==divisorMostSignificantDigit){quotientDigit=Math.floor((remainder[shift+b_l]*base+remainder[shift+b_l-1])/divisorMostSignificantDigit)}carry=0;borrow=0;l=divisor.length;for(i=0;ib_l){highx=(highx+1)*base}guess=Math.ceil(highx/highy);do{check=multiplySmall(b,guess);if(compareAbs(check,part)<=0)break;guess--}while(guess);result.push(guess);part=subtract(part,check)}result.reverse();return[arrayToSmall(result),arrayToSmall(part)]}function divModSmall(value,lambda){var length=value.length,quotient=createArray(length),base=BASE,i,q,remainder,divisor;remainder=0;for(i=length-1;i>=0;--i){divisor=remainder*base+value[i];q=truncate(divisor/lambda);remainder=divisor-q*lambda;quotient[i]=q|0}return[quotient,remainder|0]}function divModAny(self,v){var value,n=parseValue(v);var a=self.value,b=n.value;var quotient;if(b===0)throw new Error("Cannot divide by zero");if(self.isSmall){if(n.isSmall){return[new SmallInteger(truncate(a/b)),new SmallInteger(a%b)]}return[Integer[0],self]}if(n.isSmall){if(b===1)return[self,Integer[0]];if(b==-1)return[self.negate(),Integer[0]];var abs=Math.abs(b);if(absb.length?1:-1}for(var i=a.length-1;i>=0;i--){if(a[i]!==b[i])return a[i]>b[i]?1:-1}return 0}BigInteger.prototype.compareAbs=function(v){var n=parseValue(v),a=this.value,b=n.value;if(n.isSmall)return 1;return compareAbs(a,b)};SmallInteger.prototype.compareAbs=function(v){var n=parseValue(v),a=Math.abs(this.value),b=n.value;if(n.isSmall){b=Math.abs(b);return a===b?0:a>b?1:-1}return-1};BigInteger.prototype.compare=function(v){if(v===Infinity){return-1}if(v===-Infinity){return 1}var n=parseValue(v),a=this.value,b=n.value;if(this.sign!==n.sign){return n.sign?1:-1}if(n.isSmall){return this.sign?-1:1}return compareAbs(a,b)*(this.sign?-1:1)};BigInteger.prototype.compareTo=BigInteger.prototype.compare;SmallInteger.prototype.compare=function(v){if(v===Infinity){return-1}if(v===-Infinity){return 1}var n=parseValue(v),a=this.value,b=n.value;if(n.isSmall){return a==b?0:a>b?1:-1}if(a<0!==n.sign){return a<0?-1:1}return a<0?1:-1};SmallInteger.prototype.compareTo=SmallInteger.prototype.compare;BigInteger.prototype.equals=function(v){return this.compare(v)===0};SmallInteger.prototype.eq=SmallInteger.prototype.equals=BigInteger.prototype.eq=BigInteger.prototype.equals;BigInteger.prototype.notEquals=function(v){return this.compare(v)!==0};SmallInteger.prototype.neq=SmallInteger.prototype.notEquals=BigInteger.prototype.neq=BigInteger.prototype.notEquals;BigInteger.prototype.greater=function(v){return this.compare(v)>0};SmallInteger.prototype.gt=SmallInteger.prototype.greater=BigInteger.prototype.gt=BigInteger.prototype.greater;BigInteger.prototype.lesser=function(v){return this.compare(v)<0};SmallInteger.prototype.lt=SmallInteger.prototype.lesser=BigInteger.prototype.lt=BigInteger.prototype.lesser;BigInteger.prototype.greaterOrEquals=function(v){return this.compare(v)>=0};SmallInteger.prototype.geq=SmallInteger.prototype.greaterOrEquals=BigInteger.prototype.geq=BigInteger.prototype.greaterOrEquals;BigInteger.prototype.lesserOrEquals=function(v){return this.compare(v)<=0};SmallInteger.prototype.leq=SmallInteger.prototype.lesserOrEquals=BigInteger.prototype.leq=BigInteger.prototype.lesserOrEquals;BigInteger.prototype.isEven=function(){return(this.value[0]&1)===0};SmallInteger.prototype.isEven=function(){return(this.value&1)===0};BigInteger.prototype.isOdd=function(){return(this.value[0]&1)===1};SmallInteger.prototype.isOdd=function(){return(this.value&1)===1};BigInteger.prototype.isPositive=function(){return!this.sign};SmallInteger.prototype.isPositive=function(){return this.value>0};BigInteger.prototype.isNegative=function(){return this.sign};SmallInteger.prototype.isNegative=function(){return this.value<0};BigInteger.prototype.isUnit=function(){return false};SmallInteger.prototype.isUnit=function(){return Math.abs(this.value)===1};BigInteger.prototype.isZero=function(){return false};SmallInteger.prototype.isZero=function(){return this.value===0};BigInteger.prototype.isDivisibleBy=function(v){var n=parseValue(v);var value=n.value;if(value===0)return false;if(value===1)return true;if(value===2)return this.isEven();return this.mod(n).equals(Integer[0])};SmallInteger.prototype.isDivisibleBy=BigInteger.prototype.isDivisibleBy;function isBasicPrime(v){var n=v.abs();if(n.isUnit())return false;if(n.equals(2)||n.equals(3)||n.equals(5))return true;if(n.isEven()||n.isDivisibleBy(3)||n.isDivisibleBy(5))return false;if(n.lesser(25))return true}BigInteger.prototype.isPrime=function(){var isPrime=isBasicPrime(this);if(isPrime!==undefined)return isPrime;var n=this.abs(),nPrev=n.prev();var a=[2,3,5,7,11,13,17,19],b=nPrev,d,t,i,x;while(b.isEven())b=b.divide(2);for(i=0;i-MAX_INT)return new SmallInteger(value-1);return new BigInteger(MAX_INT_ARR,true)};var powersOfTwo=[1];while(powersOfTwo[powersOfTwo.length-1]<=BASE)powersOfTwo.push(2*powersOfTwo[powersOfTwo.length-1]);var powers2Length=powersOfTwo.length,highestPower2=powersOfTwo[powers2Length-1];function shift_isSmall(n){return(typeof n==="number"||typeof n==="string")&&+Math.abs(n)<=BASE||n instanceof BigInteger&&n.value.length<=1}BigInteger.prototype.shiftLeft=function(n){if(!shift_isSmall(n)){throw new Error(String(n)+" is too large for shifting.")}n=+n;if(n<0)return this.shiftRight(-n);var result=this;while(n>=powers2Length){result=result.multiply(highestPower2);n-=powers2Length-1}return result.multiply(powersOfTwo[n])};SmallInteger.prototype.shiftLeft=BigInteger.prototype.shiftLeft;BigInteger.prototype.shiftRight=function(n){var remQuo;if(!shift_isSmall(n)){throw new Error(String(n)+" is too large for shifting.")}n=+n;if(n<0)return this.shiftLeft(-n);var result=this;while(n>=powers2Length){if(result.isZero())return result;remQuo=divModAny(result,highestPower2);result=remQuo[1].isNegative()?remQuo[0].prev():remQuo[0];n-=powers2Length-1}remQuo=divModAny(result,powersOfTwo[n]);return remQuo[1].isNegative()?remQuo[0].prev():remQuo[0]};SmallInteger.prototype.shiftRight=BigInteger.prototype.shiftRight;function bitwise(x,y,fn){y=parseValue(y);var xSign=x.isNegative(),ySign=y.isNegative();var xRem=xSign?x.not():x,yRem=ySign?y.not():y;var xBits=[],yBits=[];var xStop=false,yStop=false;while(!xStop||!yStop){if(xRem.isZero()){xStop=true;xBits.push(xSign?1:0)}else if(xSign)xBits.push(xRem.isEven()?1:0);else xBits.push(xRem.isEven()?0:1);if(yRem.isZero()){yStop=true;yBits.push(ySign?1:0)}else if(ySign)yBits.push(yRem.isEven()?1:0);else yBits.push(yRem.isEven()?0:1);xRem=xRem.over(2);yRem=yRem.over(2)}var result=[];for(var i=0;i=0;i--){var top=restricted?range.value[i]:BASE;var digit=truncate(Math.random()*top);result.unshift(digit);if(digit=absBase){if(c==="1"&&absBase===1)continue;throw new Error(c+" is not a valid digit in base "+base+".")}else if(c.charCodeAt(0)-87>=absBase){throw new Error(c+" is not a valid digit in base "+base+".")}}}if(2<=base&&base<=36){if(length<=LOG_MAX_INT/Math.log(base)){var result=parseInt(text,base);if(isNaN(result)){throw new Error(c+" is not a valid digit in base "+base+".")}return new SmallInteger(parseInt(text,base))}}base=parseValue(base);var digits=[];var isNegative=text[0]==="-";for(i=isNegative?1:0;i");digits.push(parseValue(text.slice(start+1,i)))}else throw new Error(c+" is not a valid character")}return parseBaseFromArray(digits,base,isNegative)};function parseBaseFromArray(digits,base,isNegative){var val=Integer[0],pow=Integer[1],i;for(i=digits.length-1;i>=0;i--){val=val.add(digits[i].times(pow));pow=pow.times(base)}return isNegative?val.negate():val}function stringify(digit){var v=digit.value;if(typeof v==="number")v=[v];if(v.length===1&&v[0]<=35){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(v[0])}return"<"+v+">"}function toBase(n,base){base=bigInt(base);if(base.isZero()){if(n.isZero())return"0";throw new Error("Cannot convert nonzero numbers to base 0.")}if(base.equals(-1)){if(n.isZero())return"0";if(n.isNegative())return new Array(1-n).join("10");return"1"+new Array(+n).join("01")}var minusSign="";if(n.isNegative()&&base.isPositive()){minusSign="-";n=n.abs()}if(base.equals(1)){if(n.isZero())return"0";return minusSign+new Array(+n+1).join(1)}var out=[];var left=n,divmod;while(left.isNegative()||left.compareAbs(base)>=0){divmod=left.divmod(base);left=divmod.quotient;var digit=divmod.remainder;if(digit.isNegative()){digit=base.minus(digit).abs();left=left.next()}out.push(stringify(digit))}out.push(stringify(left));return minusSign+out.reverse().join("")}BigInteger.prototype.toString=function(radix){if(radix===undefined)radix=10;if(radix!==10)return toBase(this,radix);var v=this.value,l=v.length,str=String(v[--l]),zeros="0000000",digit;while(--l>=0){digit=String(v[l]);str+=zeros.slice(digit.length)+digit}var sign=this.sign?"-":"";return sign+str};SmallInteger.prototype.toString=function(radix){if(radix===undefined)radix=10;if(radix!=10)return toBase(this,radix);return String(this.value)};BigInteger.prototype.valueOf=function(){return+this.toString()};BigInteger.prototype.toJSNumber=BigInteger.prototype.valueOf;SmallInteger.prototype.valueOf=function(){return this.value};SmallInteger.prototype.toJSNumber=SmallInteger.prototype.valueOf;function parseStringValue(v){if(isPrecise(+v)){var x=+v;if(x===truncate(x))return new SmallInteger(x);throw"Invalid integer: "+v}var sign=v[0]==="-";if(sign)v=v.slice(1);var split=v.split(/e/i);if(split.length>2)throw new Error("Invalid integer: "+split.join("e"));if(split.length===2){var exp=split[1];if(exp[0]==="+")exp=exp.slice(1);exp=+exp;if(exp!==truncate(exp)||!isPrecise(exp))throw new Error("Invalid integer: "+exp+" is not a valid exponent.");var text=split[0];var decimalPlace=text.indexOf(".");if(decimalPlace>=0){exp-=text.length-decimalPlace-1;text=text.slice(0,decimalPlace)+text.slice(decimalPlace+1)}if(exp<0)throw new Error("Cannot include negative exponent part for integers");text+=new Array(exp+1).join("0");v=text}var isValid=/^([0-9][0-9]*)$/.test(v);if(!isValid)throw new Error("Invalid integer: "+v);var r=[],max=v.length,l=LOG_BASE,min=max-l;while(max>0){r.push(+v.slice(min,max));min-=l;if(min<0)min=0;max-=l}trim(r);return new BigInteger(r,sign)}function parseNumberValue(v){if(isPrecise(v)){if(v!==truncate(v))throw new Error(v+" is not an integer.");return new SmallInteger(v)}return parseStringValue(v.toString())}function parseValue(v){if(typeof v==="number"){return parseNumberValue(v)}if(typeof v==="string"){return parseStringValue(v)}return v}for(var i=0;i<1e3;i++){Integer[i]=new SmallInteger(i);if(i>0)Integer[-i]=new SmallInteger(-i)}Integer.one=Integer[1];Integer.zero=Integer[0];Integer.minusOne=Integer[-1];Integer.max=max;Integer.min=min;Integer.gcd=gcd;Integer.lcm=lcm;Integer.isInstance=function(x){return x instanceof BigInteger||x instanceof SmallInteger};Integer.randBetween=randBetween;Integer.fromArray=function(digits,base,isNegative){return parseBaseFromArray(digits.map(parseValue),parseValue(base||10),isNegative)};return Integer}();if(typeof module!=="undefined"&&module.hasOwnProperty("exports")){module.exports=bigInt}if(typeof define==="function"&&define.amd){define("big-integer",[],function(){return bigInt})}
\ No newline at end of file
diff --git a/node_modules/big-integer/README.md b/node_modules/big-integer/README.md
index b8a0e6d6..5824f7ef 100644
--- a/node_modules/big-integer/README.md
+++ b/node_modules/big-integer/README.md
@@ -211,7 +211,7 @@ Returns `true` if the number is prime, `false` otherwise.
#### `isProbablePrime([iterations])`
-Returns `true` if the number is very likely to be positive, `false` otherwise.
+Returns `true` if the number is very likely to be prime, `false` otherwise.
Argument is optional and determines the amount of iterations of the test (default: `5`). The more iterations, the lower chance of getting a false positive.
This uses the [Fermat primality test](https://en.wikipedia.org/wiki/Fermat_primality_test).
@@ -517,4 +517,4 @@ There are performance benchmarks that can be viewed from the `benchmarks/index.h
## License
-This project is public domain. For more details, read about the [Unlicense](http://unlicense.org/).
\ No newline at end of file
+This project is public domain. For more details, read about the [Unlicense](http://unlicense.org/).
diff --git a/node_modules/big-integer/bower.json b/node_modules/big-integer/bower.json
index c7c7291c..22dc58f5 100644
--- a/node_modules/big-integer/bower.json
+++ b/node_modules/big-integer/bower.json
@@ -24,7 +24,6 @@
"bower_components",
"test",
"coverage",
- "spec",
"tests"
]
}
diff --git a/node_modules/big-integer/package.json b/node_modules/big-integer/package.json
index 97488275..2b626bdf 100644
--- a/node_modules/big-integer/package.json
+++ b/node_modules/big-integer/package.json
@@ -14,13 +14,13 @@
]
],
"_from": "big-integer@>=1.6.7 <2.0.0",
- "_id": "big-integer@1.6.22",
+ "_id": "big-integer@1.6.24",
"_inCache": true,
"_location": "/big-integer",
- "_nodeVersion": "6.9.4",
+ "_nodeVersion": "6.10.3",
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/big-integer-1.6.22.tgz_1493091323169_0.5048394540790468"
+ "host": "s3://npm-registry-packages",
+ "tmp": "tmp/big-integer-1.6.24.tgz_1503027511676_0.881959781749174"
},
"_npmUser": {
"name": "peterolson",
@@ -40,8 +40,8 @@
"_requiredBy": [
"/bplist-parser"
],
- "_resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.22.tgz",
- "_shasum": "487c95fce886022ea48ff5f19e388932df46dd2e",
+ "_resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.24.tgz",
+ "_shasum": "1ed84d018ac3c1c72b307e7f7d94008e8ee20311",
"_shrinkwrap": null,
"_spec": "big-integer@^1.6.7",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/bplist-parser",
@@ -57,24 +57,28 @@
"dependencies": {},
"description": "An arbitrary length integer library for Javascript",
"devDependencies": {
+ "@types/lodash": "^4.14.64",
+ "@types/node": "^7.0.22",
"coveralls": "^2.11.4",
"jasmine": "2.1.x",
"jasmine-core": "^2.3.4",
"karma": "^0.13.3",
"karma-coverage": "^0.4.2",
"karma-jasmine": "^0.3.6",
- "karma-phantomjs-launcher": "~0.1",
+ "karma-phantomjs-launcher": "^1.0.4",
+ "lodash": "^4.17.4",
+ "typescript": "^2.3.3",
"uglifyjs": "^2.4.10"
},
"directories": {},
"dist": {
- "shasum": "487c95fce886022ea48ff5f19e388932df46dd2e",
- "tarball": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.22.tgz"
+ "shasum": "1ed84d018ac3c1c72b307e7f7d94008e8ee20311",
+ "tarball": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.24.tgz"
},
"engines": {
"node": ">=0.6"
},
- "gitHead": "40483b881b4380931e5af6f2f8a161b6caa71690",
+ "gitHead": "8ac5ef5b7c4abce8e943776fa2f18d3d41697988",
"homepage": "https://github.com/peterolson/BigInteger.js#readme",
"keywords": [
"math",
@@ -97,14 +101,16 @@
],
"name": "big-integer",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "# BigInteger.js [![Build Status][travis-img]][travis-url] [![Coverage Status][coveralls-img]][coveralls-url] [![Monthly Downloads][downloads-img]][downloads-url]\r\n\r\n[travis-url]: https://travis-ci.org/peterolson/BigInteger.js\r\n[travis-img]: https://travis-ci.org/peterolson/BigInteger.js.svg?branch=master\r\n[coveralls-url]: https://coveralls.io/github/peterolson/BigInteger.js?branch=master\r\n[coveralls-img]: https://coveralls.io/repos/peterolson/BigInteger.js/badge.svg?branch=master&service=github\r\n[downloads-url]: https://www.npmjs.com/package/big-integer\r\n[downloads-img]: https://img.shields.io/npm/dm/big-integer.svg\r\n\r\n**BigInteger.js** is an arbitrary-length integer library for Javascript, allowing arithmetic operations on integers of unlimited size, notwithstanding memory and time limitations.\r\n\r\n## Installation\r\n\r\nIf you are using a browser, you can download [BigInteger.js from GitHub](http://peterolson.github.com/BigInteger.js/BigInteger.min.js) or just hotlink to it:\r\n\r\n\t\r\n\r\nIf you are using node, you can install BigInteger with [npm](https://npmjs.org/).\r\n\r\n npm install big-integer\r\n\r\nThen you can include it in your code:\r\n\r\n\tvar bigInt = require(\"big-integer\");\r\n\r\n\r\n## Usage\r\n### `bigInt(number, [base])`\r\n\r\nYou can create a bigInt by calling the `bigInt` function. You can pass in\r\n\r\n - a string, which it will parse as an bigInt and throw an `\"Invalid integer\"` error if the parsing fails.\r\n - a Javascript number, which it will parse as an bigInt and throw an `\"Invalid integer\"` error if the parsing fails.\r\n - another bigInt.\r\n - nothing, and it will return `bigInt.zero`.\r\n\r\n If you provide a second parameter, then it will parse `number` as a number in base `base`. Note that `base` can be any bigInt (even negative or zero). The letters \"a-z\" and \"A-Z\" will be interpreted as the numbers 10 to 35. Higher digits can be specified in angle brackets (`<` and `>`).\r\n\r\nExamples:\r\n\r\n var zero = bigInt();\r\n var ninetyThree = bigInt(93);\r\n\tvar largeNumber = bigInt(\"75643564363473453456342378564387956906736546456235345\");\r\n\tvar googol = bigInt(\"1e100\");\r\n\tvar bigNumber = bigInt(largeNumber);\r\n\t \r\n\tvar maximumByte = bigInt(\"FF\", 16);\r\n\tvar fiftyFiveGoogol = bigInt(\"<55>0\", googol);\r\n\r\nNote that Javascript numbers larger than `9007199254740992` and smaller than `-9007199254740992` are not precisely represented numbers and will not produce exact results. If you are dealing with numbers outside that range, it is better to pass in strings.\r\n\r\n### Method Chaining\r\n\r\nNote that bigInt operations return bigInts, which allows you to chain methods, for example:\r\n\r\n var salary = bigInt(dollarsPerHour).times(hoursWorked).plus(randomBonuses)\r\n\r\n### Constants\r\n\r\nThere are three named constants already stored that you do not have to construct with the `bigInt` function yourself:\r\n\r\n - `bigInt.one`, equivalent to `bigInt(1)`\r\n - `bigInt.zero`, equivalent to `bigInt(0)`\r\n - `bigInt.minusOne`, equivalent to `bigInt(-1)`\r\n \r\nThe numbers from -999 to 999 are also already prestored and can be accessed using `bigInt[index]`, for example:\r\n\r\n - `bigInt[-999]`, equivalent to `bigInt(-999)`\r\n - `bigInt[256]`, equivalent to `bigInt(256)`\r\n\r\n### Methods\r\n\r\n#### `abs()`\r\n\r\nReturns the absolute value of a bigInt.\r\n\r\n - `bigInt(-45).abs()` => `45`\r\n - `bigInt(45).abs()` => `45`\r\n\r\n#### `add(number)`\r\n\r\nPerforms addition.\r\n\r\n - `bigInt(5).add(7)` => `12`\r\n \r\n[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Addition)\r\n\r\n#### `and(number)`\r\n\r\nPerforms the bitwise AND operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement).\r\n\r\n - `bigInt(6).and(3)` => `2`\r\n - `bigInt(6).and(-3)` => `4`\r\n\r\n#### `compare(number)`\r\n\r\nPerforms a comparison between two numbers. If the numbers are equal, it returns `0`. If the first number is greater, it returns `1`. If the first number is lesser, it returns `-1`.\r\n\r\n - `bigInt(5).compare(5)` => `0`\r\n - `bigInt(5).compare(4)` => `1`\r\n - `bigInt(4).compare(5)` => `-1`\r\n\r\n#### `compareAbs(number)`\r\n\r\nPerforms a comparison between the absolute value of two numbers.\r\n\r\n - `bigInt(5).compareAbs(-5)` => `0`\r\n - `bigInt(5).compareAbs(4)` => `1`\r\n - `bigInt(4).compareAbs(-5)` => `-1`\r\n\r\n#### `compareTo(number)`\r\n\r\nAlias for the `compare` method.\r\n\r\n#### `divide(number)`\r\n\r\nPerforms integer division, disregarding the remainder.\r\n\r\n - `bigInt(59).divide(5)` => `11`\r\n \r\n[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division)\r\n\r\n#### `divmod(number)`\r\n\r\nPerforms division and returns an object with two properties: `quotient` and `remainder`. The sign of the remainder will match the sign of the dividend.\r\n\r\n - `bigInt(59).divmod(5)` => `{quotient: bigInt(11), remainder: bigInt(4) }`\r\n - `bigInt(-5).divmod(2)` => `{quotient: bigInt(-2), remainder: bigInt(-1) }`\r\n \r\n[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division)\r\n\r\n#### `eq(number)`\r\n\r\nAlias for the `equals` method.\r\n\r\n#### `equals(number)`\r\n\r\nChecks if two numbers are equal.\r\n\r\n - `bigInt(5).equals(5)` => `true`\r\n - `bigInt(4).equals(7)` => `false`\r\n\r\n#### `geq(number)`\r\n\r\nAlias for the `greaterOrEquals` method.\r\n\r\n\r\n#### `greater(number)`\r\n\r\nChecks if the first number is greater than the second.\r\n\r\n - `bigInt(5).greater(6)` => `false`\r\n - `bigInt(5).greater(5)` => `false`\r\n - `bigInt(5).greater(4)` => `true`\r\n\r\n#### `greaterOrEquals(number)`\r\n\r\nChecks if the first number is greater than or equal to the second.\r\n\r\n - `bigInt(5).greaterOrEquals(6)` => `false`\r\n - `bigInt(5).greaterOrEquals(5)` => `true`\r\n - `bigInt(5).greaterOrEquals(4)` => `true`\r\n\r\n#### `gt(number)`\r\n\r\nAlias for the `greater` method.\r\n\r\n#### `isDivisibleBy(number)`\r\n\r\nReturns `true` if the first number is divisible by the second number, `false` otherwise.\r\n\r\n - `bigInt(999).isDivisibleBy(333)` => `true`\r\n - `bigInt(99).isDivisibleBy(5)` => `false`\r\n\r\n#### `isEven()`\r\n\r\nReturns `true` if the number is even, `false` otherwise.\r\n\r\n - `bigInt(6).isEven()` => `true`\r\n - `bigInt(3).isEven()` => `false`\r\n\r\n#### `isNegative()`\r\n\r\nReturns `true` if the number is negative, `false` otherwise.\r\nReturns `false` for `0` and `-0`.\r\n\r\n - `bigInt(-23).isNegative()` => `true`\r\n - `bigInt(50).isNegative()` => `false`\r\n\r\n#### `isOdd()`\r\n\r\nReturns `true` if the number is odd, `false` otherwise.\r\n\r\n - `bigInt(13).isOdd()` => `true`\r\n - `bigInt(40).isOdd()` => `false`\r\n\r\n#### `isPositive()`\r\n\r\nReturn `true` if the number is positive, `false` otherwise.\r\nReturns `false` for `0` and `-0`.\r\n\r\n - `bigInt(54).isPositive()` => `true`\r\n - `bigInt(-1).isPositive()` => `false`\r\n\r\n#### `isPrime()`\r\n\r\nReturns `true` if the number is prime, `false` otherwise.\r\n\r\n - `bigInt(5).isPrime()` => `true`\r\n - `bigInt(6).isPrime()` => `false`\r\n\r\n#### `isProbablePrime([iterations])`\r\n\r\nReturns `true` if the number is very likely to be prime, `false` otherwise.\r\nArgument is optional and determines the amount of iterations of the test (default: `5`). The more iterations, the lower chance of getting a false positive.\r\nThis uses the [Fermat primality test](https://en.wikipedia.org/wiki/Fermat_primality_test).\r\n\r\n - `bigInt(5).isProbablePrime()` => `true`\r\n - `bigInt(49).isProbablePrime()` => `false`\r\n - `bigInt(1729).isProbablePrime(50)` => `false`\r\n \r\nNote that this function is not deterministic, since it relies on random sampling of factors, so the result for some numbers is not always the same. [Carmichael numbers](https://en.wikipedia.org/wiki/Carmichael_number) are particularly prone to give unreliable results.\r\n\r\nFor example, `bigInt(1729).isProbablePrime()` returns `false` about 76% of the time and `true` about 24% of the time. The correct result is `false`.\r\n\r\n#### `isUnit()`\r\n\r\nReturns `true` if the number is `1` or `-1`, `false` otherwise.\r\n\r\n - `bigInt.one.isUnit()` => `true`\r\n - `bigInt.minusOne.isUnit()` => `true`\r\n - `bigInt(5).isUnit()` => `false`\r\n\r\n#### `isZero()`\r\n\r\nReturn `true` if the number is `0` or `-0`, `false` otherwise.\r\n\r\n - `bigInt.zero.isZero()` => `true`\r\n - `bigInt(\"-0\").isZero()` => `true`\r\n - `bigInt(50).isZero()` => `false`\r\n\r\n#### `leq(number)`\r\n\r\nAlias for the `lesserOrEquals` method.\r\n\r\n#### `lesser(number)`\r\n\r\nChecks if the first number is lesser than the second.\r\n\r\n - `bigInt(5).lesser(6)` => `true`\r\n - `bigInt(5).lesser(5)` => `false`\r\n - `bigInt(5).lesser(4)` => `false`\r\n\r\n#### `lesserOrEquals(number)`\r\n\r\nChecks if the first number is less than or equal to the second.\r\n\r\n - `bigInt(5).lesserOrEquals(6)` => `true`\r\n - `bigInt(5).lesserOrEquals(5)` => `true`\r\n - `bigInt(5).lesserOrEquals(4)` => `false`\r\n\r\n#### `lt(number)`\r\n\r\nAlias for the `lesser` method.\r\n\r\n#### `minus(number)`\r\n\r\nAlias for the `subtract` method.\r\n\r\n - `bigInt(3).minus(5)` => `-2`\r\n \r\n[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Subtraction)\r\n\r\n#### `mod(number)`\r\n\r\nPerforms division and returns the remainder, disregarding the quotient. The sign of the remainder will match the sign of the dividend.\r\n\r\n - `bigInt(59).mod(5)` => `4`\r\n - `bigInt(-5).mod(2)` => `-1`\r\n \r\n[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division)\r\n\r\n#### `modInv(mod)`\r\n\r\nFinds the [multiplicative inverse](https://en.wikipedia.org/wiki/Modular_multiplicative_inverse) of the number modulo `mod`.\r\n\r\n - `bigInt(3).modInv(11)` => `4`\r\n - `bigInt(42).modInv(2017)` => `1969`\r\n\r\n#### `modPow(exp, mod)`\r\n\r\nTakes the number to the power `exp` modulo `mod`.\r\n\r\n - `bigInt(10).modPow(3, 30)` => `10`\r\n\r\n#### `multiply(number)`\r\n\r\nPerforms multiplication.\r\n\r\n - `bigInt(111).multiply(111)` => `12321`\r\n\r\n[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Multiplication)\r\n\r\n#### `neq(number)`\r\n\r\nAlias for the `notEquals` method.\r\n\r\n#### `next()`\r\n\r\nAdds one to the number.\r\n\r\n - `bigInt(6).next()` => `7`\r\n\r\n#### `not()`\r\n\r\nPerforms the bitwise NOT operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement).\r\n\r\n - `bigInt(10).not()` => `-11`\r\n - `bigInt(0).not()` => `-1`\r\n\r\n#### `notEquals(number)`\r\n\r\nChecks if two numbers are not equal.\r\n\r\n - `bigInt(5).notEquals(5)` => `false`\r\n - `bigInt(4).notEquals(7)` => `true`\r\n\r\n#### `or(number)`\r\n\r\nPerforms the bitwise OR operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement).\r\n\r\n - `bigInt(13).or(10)` => `15`\r\n - `bigInt(13).or(-8)` => `-3`\r\n\r\n#### `over(number)`\r\n\r\nAlias for the `divide` method.\r\n\r\n - `bigInt(59).over(5)` => `11`\r\n \r\n[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division)\r\n\r\n#### `plus(number)`\r\n\r\nAlias for the `add` method.\r\n\r\n - `bigInt(5).plus(7)` => `12`\r\n \r\n[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Addition)\r\n\r\n#### `pow(number)`\r\n\r\nPerforms exponentiation. If the exponent is less than `0`, `pow` returns `0`. `bigInt.zero.pow(0)` returns `1`.\r\n\r\n - `bigInt(16).pow(16)` => `18446744073709551616`\r\n\r\n[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Exponentiation)\r\n\r\n#### `prev(number)`\r\n\r\nSubtracts one from the number.\r\n\r\n - `bigInt(6).prev()` => `5`\r\n\r\n#### `remainder(number)`\r\n\r\nAlias for the `mod` method.\r\n\r\n[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division)\r\n\r\n#### `shiftLeft(n)`\r\n\r\nShifts the number left by `n` places in its binary representation. If a negative number is provided, it will shift right. Throws an error if `n` is outside of the range `[-9007199254740992, 9007199254740992]`.\r\n\r\n - `bigInt(8).shiftLeft(2)` => `32`\r\n - `bigInt(8).shiftLeft(-2)` => `2`\r\n\r\n#### `shiftRight(n)`\r\n\r\nShifts the number right by `n` places in its binary representation. If a negative number is provided, it will shift left. Throws an error if `n` is outside of the range `[-9007199254740992, 9007199254740992]`.\r\n\r\n - `bigInt(8).shiftRight(2)` => `2`\r\n - `bigInt(8).shiftRight(-2)` => `32`\r\n\r\n#### `square()`\r\n\r\nSquares the number\r\n\r\n - `bigInt(3).square()` => `9`\r\n \r\n[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Squaring)\r\n\r\n#### `subtract(number)`\r\n\r\nPerforms subtraction.\r\n\r\n - `bigInt(3).subtract(5)` => `-2`\r\n \r\n[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Subtraction)\r\n\r\n#### `times(number)`\r\n\r\nAlias for the `multiply` method.\r\n\r\n - `bigInt(111).times(111)` => `12321`\r\n \r\n[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Multiplication)\r\n\r\n#### `toJSNumber()`\r\n\r\nConverts a bigInt into a native Javascript number. Loses precision for numbers outside the range `[-9007199254740992, 9007199254740992]`.\r\n\r\n - `bigInt(\"18446744073709551616\").toJSNumber()` => `18446744073709552000`\r\n\r\n#### `xor(number)`\r\n\r\nPerforms the bitwise XOR operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement).\r\n\r\n - `bigInt(12).xor(5)` => `9`\r\n - `bigInt(12).xor(-5)` => `-9`\r\n \r\n### Static Methods\r\n\r\n#### `fromArray(digits, base = 10, isNegative?)`\r\n\r\nConstructs a bigInt from an array of digits in base `base`. The optional `isNegative` flag will make the number negative.\r\n\r\n - `bigInt.fromArray([1, 2, 3, 4, 5], 10)` => `12345`\r\n - `bigInt.fromArray([1, 0, 0], 2, true)` => `-4`\r\n\r\n#### `gcd(a, b)`\r\n\r\nFinds the greatest common denominator of `a` and `b`.\r\n\r\n - `bigInt.gcd(42,56)` => `14`\r\n\r\n#### `isInstance(x)`\r\n\r\nReturns `true` if `x` is a BigInteger, `false` otherwise.\r\n\r\n - `bigInt.isInstance(bigInt(14))` => `true`\r\n - `bigInt.isInstance(14)` => `false`\r\n \r\n#### `lcm(a,b)`\r\n\r\nFinds the least common multiple of `a` and `b`.\r\n \r\n - `bigInt.lcm(21, 6)` => `42`\r\n \r\n#### `max(a,b)`\r\n\r\nReturns the largest of `a` and `b`.\r\n\r\n - `bigInt.max(77, 432)` => `432`\r\n\r\n#### `min(a,b)`\r\n\r\nReturns the smallest of `a` and `b`.\r\n\r\n - `bigInt.min(77, 432)` => `77`\r\n\r\n#### `randBetween(min, max)`\r\n\r\nReturns a random number between `min` and `max`.\r\n\r\n - `bigInt.randBetween(\"-1e100\", \"1e100\")` => (for example) `8494907165436643479673097939554427056789510374838494147955756275846226209006506706784609314471378745`\r\n\r\n\r\n### Override Methods\r\n\r\n#### `toString(radix = 10)`\r\n\r\nConverts a bigInt to a string. There is an optional radix parameter (which defaults to 10) that converts the number to the given radix. Digits in the range `10-35` will use the letters `a-z`.\r\n\r\n - `bigInt(\"1e9\").toString()` => `\"1000000000\"`\r\n - `bigInt(\"1e9\").toString(16)` => `\"3b9aca00\"`\r\n\r\n**Note that arithmetical operators will trigger the `valueOf` function rather than the `toString` function.** When converting a bigInteger to a string, you should use the `toString` method or the `String` function instead of adding the empty string.\r\n\r\n - `bigInt(\"999999999999999999\").toString()` => `\"999999999999999999\"`\r\n - `String(bigInt(\"999999999999999999\"))` => `\"999999999999999999\"`\r\n - `bigInt(\"999999999999999999\") + \"\"` => `1000000000000000000`\r\n\r\nBases larger than 36 are supported. If a digit is greater than or equal to 36, it will be enclosed in angle brackets.\r\n\r\n - `bigInt(567890).toString(100)` => `\"<56><78><90>\"`\r\n\r\nNegative bases are also supported.\r\n\r\n - `bigInt(12345).toString(-10)` => `\"28465\"`\r\n\r\nBase 1 and base -1 are also supported.\r\n\r\n - `bigInt(-15).toString(1)` => `\"-111111111111111\"`\r\n - `bigInt(-15).toString(-1)` => `\"101010101010101010101010101010\"`\r\n\r\nBase 0 is only allowed for the number zero.\r\n\r\n - `bigInt(0).toString(0)` => `0`\r\n - `bigInt(1).toString(0)` => `Error: Cannot convert nonzero numbers to base 0.`\r\n \r\n[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#toString)\r\n \r\n#### `valueOf()`\r\n\r\nConverts a bigInt to a native Javascript number. This override allows you to use native arithmetic operators without explicit conversion:\r\n\r\n - `bigInt(\"100\") + bigInt(\"200\") === 300; //true`\r\n\r\n## Contributors\r\n\r\nTo contribute, just fork the project, make some changes, and submit a pull request. Please verify that the unit tests pass before submitting.\r\n\r\nThe unit tests are contained in the `spec/spec.js` file. You can run them locally by opening the `spec/SpecRunner.html` or file or running `npm test`. You can also [run the tests online from GitHub](http://peterolson.github.io/BigInteger.js/spec/SpecRunner.html).\r\n\r\nThere are performance benchmarks that can be viewed from the `benchmarks/index.html` page. You can [run them online from GitHub](http://peterolson.github.io/BigInteger.js/benchmark/).\r\n\r\n## License\r\n\r\nThis project is public domain. For more details, read about the [Unlicense](http://unlicense.org/).\r\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/peterolson/BigInteger.js.git"
},
"scripts": {
"minify": "uglifyjs BigInteger.js -o BigInteger.min.js",
- "test": "karma start my.conf.js"
+ "test": "tsc && node_modules/.bin/karma start my.conf.js && node spec/tsDefinitions.js"
},
- "version": "1.6.22"
+ "typings": "./BigInteger.d.ts",
+ "version": "1.6.24"
}
diff --git a/node_modules/big-integer/tsconfig.json b/node_modules/big-integer/tsconfig.json
new file mode 100644
index 00000000..62636e8e
--- /dev/null
+++ b/node_modules/big-integer/tsconfig.json
@@ -0,0 +1,25 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "lib": [
+ "es6"
+ ],
+ "noImplicitAny": true,
+ "noImplicitThis": true,
+ "strictNullChecks": false,
+ "baseUrl": "./",
+ "moduleResolution": "node",
+ "allowJs": true,
+ "typeRoots": [
+ "./"
+ ],
+ "types": [
+ "node"
+ ],
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "BigInteger.d.ts",
+ "spec/tsDefinitions.ts"
+ ]
+}
\ No newline at end of file
diff --git a/node_modules/bplist-parser/package.json b/node_modules/bplist-parser/package.json
index 3b567db6..e0bc4245 100644
--- a/node_modules/bplist-parser/package.json
+++ b/node_modules/bplist-parser/package.json
@@ -77,7 +77,8 @@
],
"name": "bplist-parser",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "bplist-parser\n=============\n\nBinary Mac OS X Plist (property list) parser.\n\n## Installation\n\n```bash\n$ npm install bplist-parser\n```\n\n## Quick Examples\n\n```javascript\nvar bplist = require('bplist-parser');\n\nbplist.parseFile('myPlist.bplist', function(err, obj) {\n if (err) throw err;\n\n console.log(JSON.stringify(obj));\n});\n```\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2012 Near Infinity Corporation\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/nearinfinity/node-bplist-parser.git"
diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json
index 7324b7d5..f803589b 100644
--- a/node_modules/brace-expansion/package.json
+++ b/node_modules/brace-expansion/package.json
@@ -2,25 +2,25 @@
"_args": [
[
{
- "raw": "brace-expansion@^1.0.0",
+ "raw": "brace-expansion@^1.1.7",
"scope": null,
"escapedName": "brace-expansion",
"name": "brace-expansion",
- "rawSpec": "^1.0.0",
- "spec": ">=1.0.0 <2.0.0",
+ "rawSpec": "^1.1.7",
+ "spec": ">=1.1.7 <2.0.0",
"type": "range"
},
"/Users/steveng/repo/cordova/cordova-android/node_modules/minimatch"
]
],
- "_from": "brace-expansion@>=1.0.0 <2.0.0",
- "_id": "brace-expansion@1.1.7",
+ "_from": "brace-expansion@>=1.1.7 <2.0.0",
+ "_id": "brace-expansion@1.1.8",
"_inCache": true,
"_location": "/brace-expansion",
"_nodeVersion": "7.8.0",
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/brace-expansion-1.1.7.tgz_1491552830231_0.7213963181711733"
+ "host": "s3://npm-registry-packages",
+ "tmp": "tmp/brace-expansion-1.1.8.tgz_1497251980593_0.6575565172825009"
},
"_npmUser": {
"name": "juliangruber",
@@ -29,21 +29,21 @@
"_npmVersion": "4.2.0",
"_phantomChildren": {},
"_requested": {
- "raw": "brace-expansion@^1.0.0",
+ "raw": "brace-expansion@^1.1.7",
"scope": null,
"escapedName": "brace-expansion",
"name": "brace-expansion",
- "rawSpec": "^1.0.0",
- "spec": ">=1.0.0 <2.0.0",
+ "rawSpec": "^1.1.7",
+ "spec": ">=1.1.7 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/minimatch"
],
- "_resolved": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz",
- "_shasum": "3effc3c50e000531fb720eaff80f0ae8ef23cf59",
+ "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
+ "_shasum": "c07b211c7c952ec1f8efd51a77ef0d1d3990a292",
"_shrinkwrap": null,
- "_spec": "brace-expansion@^1.0.0",
+ "_spec": "brace-expansion@^1.1.7",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/minimatch",
"author": {
"name": "Julian Gruber",
@@ -54,7 +54,7 @@
"url": "https://github.com/juliangruber/brace-expansion/issues"
},
"dependencies": {
- "balanced-match": "^0.4.1",
+ "balanced-match": "^1.0.0",
"concat-map": "0.0.1"
},
"description": "Brace expansion as known from sh/bash",
@@ -64,10 +64,10 @@
},
"directories": {},
"dist": {
- "shasum": "3effc3c50e000531fb720eaff80f0ae8ef23cf59",
- "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz"
+ "shasum": "c07b211c7c952ec1f8efd51a77ef0d1d3990a292",
+ "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz"
},
- "gitHead": "892512024872ca7680554be90f6e8ce065053372",
+ "gitHead": "8f59e68bd5c915a0d624e8e39354e1ccf672edf6",
"homepage": "https://github.com/juliangruber/brace-expansion",
"keywords": [],
"license": "MIT",
@@ -84,7 +84,8 @@
],
"name": "brace-expansion",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "# brace-expansion\n\n[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), \nas known from sh/bash, in JavaScript.\n\n[](http://travis-ci.org/juliangruber/brace-expansion)\n[](https://www.npmjs.org/package/brace-expansion)\n[](https://greenkeeper.io/)\n\n[](https://ci.testling.com/juliangruber/brace-expansion)\n\n## Example\n\n```js\nvar expand = require('brace-expansion');\n\nexpand('file-{a,b,c}.jpg')\n// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']\n\nexpand('-v{,,}')\n// => ['-v', '-v', '-v']\n\nexpand('file{0..2}.jpg')\n// => ['file0.jpg', 'file1.jpg', 'file2.jpg']\n\nexpand('file-{a..c}.jpg')\n// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']\n\nexpand('file{2..0}.jpg')\n// => ['file2.jpg', 'file1.jpg', 'file0.jpg']\n\nexpand('file{0..4..2}.jpg')\n// => ['file0.jpg', 'file2.jpg', 'file4.jpg']\n\nexpand('file-{a..e..2}.jpg')\n// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']\n\nexpand('file{00..10..5}.jpg')\n// => ['file00.jpg', 'file05.jpg', 'file10.jpg']\n\nexpand('{{A..C},{a..c}}')\n// => ['A', 'B', 'C', 'a', 'b', 'c']\n\nexpand('ppp{,config,oe{,conf}}')\n// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']\n```\n\n## API\n\n```js\nvar expand = require('brace-expansion');\n```\n\n### var expanded = expand(str)\n\nReturn an array of all possible and valid expansions of `str`. If none are\nfound, `[str]` is returned.\n\nValid expansions are:\n\n```js\n/^(.*,)+(.+)?$/\n// {a,b,...}\n```\n\nA comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.\n\n```js\n/^-?\\d+\\.\\.-?\\d+(\\.\\.-?\\d+)?$/\n// {x..y[..incr]}\n```\n\nA numeric sequence from `x` to `y` inclusive, with optional increment.\nIf `x` or `y` start with a leading `0`, all the numbers will be padded\nto have equal length. Negative numbers and backwards iteration work too.\n\n```js\n/^-?\\d+\\.\\.-?\\d+(\\.\\.-?\\d+)?$/\n// {x..y[..incr]}\n```\n\nAn alphabetic sequence from `x` to `y` inclusive, with optional increment.\n`x` and `y` must be exactly one character, and if given, `incr` must be a\nnumber.\n\nFor compatibility reasons, the string `${` is not eligible for brace expansion.\n\n## Installation\n\nWith [npm](https://npmjs.org) do:\n\n```bash\nnpm install brace-expansion\n```\n\n## Contributors\n\n- [Julian Gruber](https://github.com/juliangruber)\n- [Isaac Z. Schlueter](https://github.com/isaacs)\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/juliangruber/brace-expansion.git"
@@ -110,5 +111,5 @@
"android-browser/4.2..latest"
]
},
- "version": "1.1.7"
+ "version": "1.1.8"
}
diff --git a/node_modules/concat-map/package.json b/node_modules/concat-map/package.json
index 9bdd311f..bfbfe3f7 100644
--- a/node_modules/concat-map/package.json
+++ b/node_modules/concat-map/package.json
@@ -61,7 +61,7 @@
"shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
"tarball": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
},
- "homepage": "https://github.com/substack/node-concat-map",
+ "homepage": "https://github.com/substack/node-concat-map#readme",
"keywords": [
"concat",
"concatMap",
@@ -79,7 +79,8 @@
],
"name": "concat-map",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "concat-map\n==========\n\nConcatenative mapdashery.\n\n[](http://ci.testling.com/substack/node-concat-map)\n\n[](http://travis-ci.org/substack/node-concat-map)\n\nexample\n=======\n\n``` js\nvar concatMap = require('concat-map');\nvar xs = [ 1, 2, 3, 4, 5, 6 ];\nvar ys = concatMap(xs, function (x) {\n return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];\n});\nconsole.dir(ys);\n```\n\n***\n\n```\n[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]\n```\n\nmethods\n=======\n\n``` js\nvar concatMap = require('concat-map')\n```\n\nconcatMap(xs, fn)\n-----------------\n\nReturn an array of concatenated elements by calling `fn(x, i)` for each element\n`x` and each index `i` in the array `xs`.\n\nWhen `fn(x, i)` returns an array, its result will be concatenated with the\nresult array. If `fn(x, i)` returns anything else, that value will be pushed\nonto the end of the result array.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install concat-map\n```\n\nlicense\n=======\n\nMIT\n\nnotes\n=====\n\nThis module was written while sitting high above the ground in a tree.\n",
+ "readmeFilename": "README.markdown",
"repository": {
"type": "git",
"url": "git://github.com/substack/node-concat-map.git"
diff --git a/node_modules/cordova-common/.eslintignore b/node_modules/cordova-common/.eslintignore
new file mode 100644
index 00000000..161d0c6d
--- /dev/null
+++ b/node_modules/cordova-common/.eslintignore
@@ -0,0 +1 @@
+spec/fixtures/*
\ No newline at end of file
diff --git a/node_modules/cordova-common/.eslintrc.yml b/node_modules/cordova-common/.eslintrc.yml
new file mode 100644
index 00000000..7701c82a
--- /dev/null
+++ b/node_modules/cordova-common/.eslintrc.yml
@@ -0,0 +1,11 @@
+root: true
+extends: semistandard
+rules:
+ indent:
+ - error
+ - 4
+ camelcase: off
+ padded-blocks: off
+ operator-linebreak: off
+ no-throw-literal: off
+
\ No newline at end of file
diff --git a/node_modules/cordova-common/.jshintignore b/node_modules/cordova-common/.jshintignore
deleted file mode 100644
index d606f61b..00000000
--- a/node_modules/cordova-common/.jshintignore
+++ /dev/null
@@ -1 +0,0 @@
-spec/fixtures/*
diff --git a/node_modules/cordova-common/.ratignore b/node_modules/cordova-common/.ratignore
index d9f5e52e..f1074164 100644
--- a/node_modules/cordova-common/.ratignore
+++ b/node_modules/cordova-common/.ratignore
@@ -1,3 +1,4 @@
fixtures
coverage
jasmine.json
+appveyor.yml
diff --git a/node_modules/cordova-common/.travis.yml b/node_modules/cordova-common/.travis.yml
new file mode 100644
index 00000000..459273a6
--- /dev/null
+++ b/node_modules/cordova-common/.travis.yml
@@ -0,0 +1,15 @@
+language: node_js
+sudo: false
+git:
+ depth: 10
+node_js:
+ - "4"
+ - "6"
+install:
+ - npm install
+ - npm install -g codecov
+script:
+ - npm test
+ - npm run cover
+after_script:
+ - codecov
diff --git a/node_modules/cordova-common/README.md b/node_modules/cordova-common/README.md
index c5dcfd5c..5659c57f 100644
--- a/node_modules/cordova-common/README.md
+++ b/node_modules/cordova-common/README.md
@@ -19,6 +19,10 @@
#
-->
+[](https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-common/branch/master)
+[](https://travis-ci.org/apache/cordova-common)
+[](https://nodei.co/npm/cordova-common/)
+
# cordova-common
Expoeses shared functionality used by [cordova-lib](https://github.com/apache/cordova-lib/) and Cordova platforms.
## Exposed APIs
diff --git a/node_modules/cordova-common/RELEASENOTES.md b/node_modules/cordova-common/RELEASENOTES.md
index ffd02487..5dc4460b 100644
--- a/node_modules/cordova-common/RELEASENOTES.md
+++ b/node_modules/cordova-common/RELEASENOTES.md
@@ -20,6 +20,21 @@
-->
# Cordova-common Release Notes
+### 2.1.0 (August 30, 2017)
+* [CB-13145](https://issues.apache.org/jira/browse/CB-13145) added variable replacing to `framework` tag
+* [CB-13211](https://issues.apache.org/jira/browse/CB-13211) Add `allows-arbitrary-loads-for-media` attribute parsing for `getAccesses`
+* [CB-11968](https://issues.apache.org/jira/browse/CB-11968) Added support for `` in `config.xml`
+* [CB-12895](https://issues.apache.org/jira/browse/CB-12895) set up `eslint` and removed `jshint`
+* [CB-12785](https://issues.apache.org/jira/browse/CB-12785) added `.gitignore`, `travis`, and `appveyor` support
+* [CB-12250](https://issues.apache.org/jira/browse/CB-12250) & [CB-12409](https://issues.apache.org/jira/browse/CB-12409) *iOS*: Fix bug with escaping properties from `plist` file
+* [CB-12762](https://issues.apache.org/jira/browse/CB-12762) updated `common`, `fetch`, and `serve` `pkgJson` to point `pkgJson` repo items to github mirrors
+* [CB-12766](https://issues.apache.org/jira/browse/CB-12766) Consistently write `JSON` with 2 spaces indentation
+
+### 2.0.3 (May 02, 2017)
+* [CB-8978](https://issues.apache.org/jira/browse/CB-8978) Add option to get `resource-file` from `root`
+* [CB-11908](https://issues.apache.org/jira/browse/CB-11908) Add tests for `edit-config` in `config.xml`
+* [CB-12665](https://issues.apache.org/jira/browse/CB-12665) removed `enginestrict` since it is deprecated
+
### 2.0.2 (Apr 14, 2017)
* [CB-11233](https://issues.apache.org/jira/browse/CB-11233) - Support installing frameworks into 'Embedded Binaries' section of the Xcode project
* [CB-10438](https://issues.apache.org/jira/browse/CB-10438) - Install correct dependency version. Removed shell.remove, added pkg.json to dependency tests 1-3, and updated install.js (.replace) to fix tests in uninstall.spec.js and update to workw with jasmine 2.0
diff --git a/node_modules/cordova-common/appveyor.yml b/node_modules/cordova-common/appveyor.yml
new file mode 100644
index 00000000..94714f2b
--- /dev/null
+++ b/node_modules/cordova-common/appveyor.yml
@@ -0,0 +1,18 @@
+# appveyor file
+# http://www.appveyor.com/docs/appveyor-yml
+
+environment:
+ matrix:
+ - nodejs_version: "4"
+ - nodejs_version: "6"
+
+install:
+ - ps: Install-Product node $env:nodejs_version
+ - npm install
+
+build: off
+
+test_script:
+ - node --version
+ - npm --version
+ - npm test
diff --git a/node_modules/cordova-common/package.json b/node_modules/cordova-common/package.json
index fa5a41d1..d7fb135e 100644
--- a/node_modules/cordova-common/package.json
+++ b/node_modules/cordova-common/package.json
@@ -2,48 +2,48 @@
"_args": [
[
{
- "raw": "cordova-common@^2.0.1",
+ "raw": "cordova-common@^2.1.0",
"scope": null,
"escapedName": "cordova-common",
"name": "cordova-common",
- "rawSpec": "^2.0.1",
- "spec": ">=2.0.1 <3.0.0",
+ "rawSpec": "^2.1.0",
+ "spec": ">=2.1.0 <3.0.0",
"type": "range"
},
"/Users/steveng/repo/cordova/cordova-android"
]
],
- "_from": "cordova-common@>=2.0.1 <3.0.0",
- "_id": "cordova-common@2.0.2",
+ "_from": "cordova-common@>=2.1.0 <3.0.0",
+ "_id": "cordova-common@2.1.0",
"_inCache": true,
"_location": "/cordova-common",
- "_nodeVersion": "4.7.3",
+ "_nodeVersion": "6.6.0",
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/cordova-common-2.0.2.tgz_1492453798445_0.6290795875247568"
+ "host": "s3://npm-registry-packages",
+ "tmp": "tmp/cordova-common-2.1.0.tgz_1504306462859_0.04064799007028341"
},
"_npmUser": {
- "name": "shazron",
- "email": "shazron@gmail.com"
+ "name": "audreyso",
+ "email": "audreyeso@gmail.com"
},
- "_npmVersion": "2.15.11",
+ "_npmVersion": "4.6.1",
"_phantomChildren": {},
"_requested": {
- "raw": "cordova-common@^2.0.1",
+ "raw": "cordova-common@^2.1.0",
"scope": null,
"escapedName": "cordova-common",
"name": "cordova-common",
- "rawSpec": "^2.0.1",
- "spec": ">=2.0.1 <3.0.0",
+ "rawSpec": "^2.1.0",
+ "spec": ">=2.1.0 <3.0.0",
"type": "range"
},
"_requiredBy": [
"/"
],
- "_resolved": "http://registry.npmjs.org/cordova-common/-/cordova-common-2.0.2.tgz",
- "_shasum": "57467976b8afd5e0bd0a13111b66a420441601cb",
+ "_resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-2.1.0.tgz",
+ "_shasum": "bb357ee1b9825031ed9db3c56b592efe973d1640",
"_shrinkwrap": null,
- "_spec": "cordova-common@^2.0.1",
+ "_spec": "cordova-common@^2.1.0",
"_where": "/Users/steveng/repo/cordova/cordova-android",
"author": {
"name": "Apache Software Foundation"
@@ -57,7 +57,7 @@
"ansi": "^0.3.1",
"bplist-parser": "^0.1.0",
"cordova-registry-mapper": "^1.1.8",
- "elementtree": "^0.1.6",
+ "elementtree": "0.1.6",
"glob": "^5.0.13",
"minimatch": "^3.0.0",
"osenv": "^0.1.3",
@@ -70,65 +70,80 @@
},
"description": "Apache Cordova tools and platforms shared routines",
"devDependencies": {
+ "eslint": "^4.0.0",
+ "eslint-config-semistandard": "^11.0.0",
+ "eslint-config-standard": "^10.2.1",
+ "eslint-plugin-import": "^2.3.0",
+ "eslint-plugin-node": "^5.0.0",
+ "eslint-plugin-promise": "^3.5.0",
+ "eslint-plugin-standard": "^3.0.1",
"istanbul": "^0.4.5",
"jasmine": "^2.5.2",
- "jshint": "^2.8.0",
"promise-matchers": "^0.9.6",
"rewire": "^2.5.1"
},
"directories": {},
"dist": {
- "shasum": "57467976b8afd5e0bd0a13111b66a420441601cb",
- "tarball": "https://registry.npmjs.org/cordova-common/-/cordova-common-2.0.2.tgz"
+ "shasum": "bb357ee1b9825031ed9db3c56b592efe973d1640",
+ "tarball": "https://registry.npmjs.org/cordova-common/-/cordova-common-2.1.0.tgz"
},
- "engineStrict": true,
"engines": {
"node": ">=4.0.0"
},
+ "homepage": "https://github.com/apache/cordova-lib#readme",
"license": "Apache-2.0",
"main": "cordova-common.js",
"maintainers": [
{
- "name": "bowserj",
- "email": "bowserj@apache.org"
+ "name": "audreyso",
+ "email": "audreyeso@gmail.com"
+ },
+ {
+ "name": "apachebuilds",
+ "email": "root@apache.org"
},
{
"name": "filmaj",
"email": "maj.fil@gmail.com"
},
{
- "name": "kotikov.vladimir",
- "email": "kotikov.vladimir@gmail.com"
- },
- {
- "name": "purplecabbage",
- "email": "purplecabbage@gmail.com"
+ "name": "timbarham",
+ "email": "npmjs@barhams.info"
},
{
"name": "shazron",
"email": "shazron@gmail.com"
},
+ {
+ "name": "bowserj",
+ "email": "bowserj@apache.org"
+ },
+ {
+ "name": "purplecabbage",
+ "email": "purplecabbage@gmail.com"
+ },
{
"name": "stevegill",
"email": "stevengill97@gmail.com"
},
{
- "name": "timbarham",
- "email": "npmjs@barhams.info"
+ "name": "kotikov.vladimir",
+ "email": "kotikov.vladimir@gmail.com"
}
],
"name": "cordova-common",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "\n\n[](https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-common/branch/master)\n[](https://travis-ci.org/apache/cordova-common)\n[](https://nodei.co/npm/cordova-common/)\n\n# cordova-common\nExpoeses shared functionality used by [cordova-lib](https://github.com/apache/cordova-lib/) and Cordova platforms.\n## Exposed APIs\n\n### `events`\n \nRepresents special instance of NodeJS EventEmitter which is intended to be used to post events to cordova-lib and cordova-cli\n\nUsage:\n```js\nvar events = require('cordova-common').events;\nevents.emit('warn', 'Some warning message')\n```\n\nThere are the following events supported by cordova-cli: `verbose`, `log`, `info`, `warn`, `error`.\n\n### `CordovaError`\n\nAn error class used by Cordova to throw cordova-specific errors. The CordovaError class is inherited from Error, so CordovaError instances is also valid Error instances (`instanceof` check succeeds).\n\nUsage:\n\n```js\nvar CordovaError = require('cordova-common').CordovaError;\nthrow new CordovaError('Some error message', SOME_ERR_CODE);\n```\n\nSee [CordovaError](src/CordovaError/CordovaError.js) for supported error codes.\n\n### `ConfigParser`\n\nExposes functionality to deal with cordova project `config.xml` files. For ConfigParser API reference check [ConfigParser Readme](src/ConfigParser/README.md).\n\nUsage:\n```js\nvar ConfigParser = require('cordova-common').ConfigParser;\nvar appConfig = new ConfigParser('path/to/cordova-app/config.xml');\nconsole.log(appconfig.name() + ':' + appConfig.version());\n```\n\n### `PluginInfoProvider` and `PluginInfo`\n\n`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.\n\nUsage:\n```js\nvar PluginInfo: require('cordova-common').PluginInfo;\nvar PluginInfoProvider: require('cordova-common').PluginInfoProvider;\n\n// The following instances are equal\nvar plugin1 = new PluginInfo('path/to/plugin_directory');\nvar plugin2 = new PluginInfoProvider().get('path/to/plugin_directory');\n\nconsole.log('The plugin ' + plugin1.id + ' has version ' + plugin1.version)\n```\n\n### `ActionStack`\n\nUtility 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.\n\nUsage:\n```js\nvar ActionStack = require('cordova-common').ActionStack;\nvar stack = new ActionStack()\n\nvar action1 = stack.createAction(task1, [], task1_reverter, []);\nvar action2 = stack.createAction(task2, [], task2_reverter, []);\n\nstack.push(action1);\nstack.push(action2);\n\nstack.process()\n.then(function() {\n // all actions succeded\n})\n.catch(function(error){\n // One of actions failed with error\n})\n```\n\n### `superspawn`\n\nModule for spawning child processes with some advanced logic.\n\nUsage:\n```js\nvar superspawn = require('cordova-common').superspawn;\nsuperspawn.spawn('adb', ['devices'])\n.progress(function(data){\n if (data.stderr)\n console.error('\"adb devices\" raised an error: ' + data.stderr);\n})\n.then(function(devices){\n // Do something...\n})\n```\n\n### `xmlHelpers`\n\nA set of utility methods for dealing with xml files.\n\nUsage:\n```js\nvar xml = require('cordova-common').xmlHelpers;\n\nvar xmlDoc1 = xml.parseElementtreeSync('some/xml/file');\nvar xmlDoc2 = xml.parseElementtreeSync('another/xml/file');\n\nxml.mergeXml(doc1, doc2); // doc2 now contains all the nodes from doc1\n```\n\n### Other APIs\n\nThe APIs listed below are also exposed but are intended to be only used internally by cordova plugin installation routines.\n\n```\nPlatformJson\nConfigChanges\nConfigKeeper\nConfigFile\nmungeUtil\n```\n\n## Setup\n* Clone this repository onto your local machine\n `git clone https://git-wip-us.apache.org/repos/asf/cordova-lib.git`\n* In terminal, navigate to the inner cordova-common directory\n `cd cordova-lib/cordova-common`\n* Install dependencies and npm-link\n `npm install && npm link`\n* Navigate to cordova-lib directory and link cordova-common\n `cd ../cordova-lib && npm link cordova-common && npm install`\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
- "url": "git://git-wip-us.apache.org/repos/asf/cordova-common.git"
+ "url": "git+https://github.com/apache/cordova-lib.git"
},
"scripts": {
"cover": "istanbul cover --root src --print detail jasmine",
- "jasmine": "jasmine --captureExceptions --color",
- "jshint": "jshint src && jshint spec",
- "test": "npm run jshint && npm run jasmine"
+ "eslint": "eslint src && eslint spec",
+ "jasmine": "jasmine JASMINE_CONFIG_PATH=spec/support/jasmine.json",
+ "test": "npm run eslint && npm run jasmine"
},
- "version": "2.0.2"
+ "version": "2.1.0"
}
diff --git a/node_modules/cordova-common/src/.jshintrc b/node_modules/cordova-common/src/.jshintrc
deleted file mode 100644
index 89a121cf..00000000
--- a/node_modules/cordova-common/src/.jshintrc
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "node": true
- , "bitwise": true
- , "undef": true
- , "trailing": true
- , "quotmark": true
- , "indent": 4
- , "unused": "vars"
- , "latedef": "nofunc"
-}
diff --git a/node_modules/cordova-common/src/ActionStack.js b/node_modules/cordova-common/src/ActionStack.js
index 5ef6f848..6983c5c5 100644
--- a/node_modules/cordova-common/src/ActionStack.js
+++ b/node_modules/cordova-common/src/ActionStack.js
@@ -19,32 +19,32 @@
/* jshint quotmark:false */
-var events = require('./events'),
- Q = require('q');
+var events = require('./events');
+var Q = require('q');
-function ActionStack() {
+function ActionStack () {
this.stack = [];
this.completed = [];
}
ActionStack.prototype = {
- createAction:function(handler, action_params, reverter, revert_params) {
+ createAction: function (handler, action_params, reverter, revert_params) {
return {
- handler:{
- run:handler,
- params:action_params
+ handler: {
+ run: handler,
+ params: action_params
},
- reverter:{
- run:reverter,
- params:revert_params
+ reverter: {
+ run: reverter,
+ params: revert_params
}
};
},
- push:function(tx) {
+ push: function (tx) {
this.stack.push(tx);
},
// Returns a promise.
- process:function(platform) {
+ process: function (platform) {
events.emit('verbose', 'Beginning processing of action stack for ' + platform + ' project...');
while (this.stack.length) {
@@ -54,19 +54,19 @@ ActionStack.prototype = {
try {
handler.apply(null, action_params);
- } catch(e) {
+ } catch (e) {
events.emit('warn', 'Error during processing of action! Attempting to revert...');
this.stack.unshift(action);
var issue = 'Uh oh!\n';
// revert completed tasks
- while(this.completed.length) {
+ while (this.completed.length) {
var undo = this.completed.shift();
var revert = undo.reverter.run;
var revert_params = undo.reverter.params;
try {
revert.apply(null, revert_params);
- } catch(err) {
+ } catch (err) {
events.emit('warn', 'Error during reversion of action! We probably really messed up your project now, sorry! D:');
issue += 'A reversion action failed: ' + err.message + '\n';
}
diff --git a/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js b/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js
index 4a58132b..e0af8a99 100644
--- a/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js
+++ b/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js
@@ -15,7 +15,7 @@
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-*/
+*/
/*
* This module deals with shared configuration / dependency "stuff". That is:
@@ -29,19 +29,17 @@
* reference counts.
*/
-/* jshint sub:true */
-
-var path = require('path'),
- et = require('elementtree'),
- ConfigKeeper = require('./ConfigKeeper'),
- CordovaLogger = require('../CordovaLogger');
+var path = require('path');
+var et = require('elementtree');
+var ConfigKeeper = require('./ConfigKeeper');
+var CordovaLogger = require('../CordovaLogger');
var mungeutil = require('./munge-util');
var xml_helpers = require('../util/xml-helpers');
exports.PlatformMunger = PlatformMunger;
-exports.process = function(plugins_dir, project_dir, platform, platformJson, pluginInfoProvider) {
+exports.process = function (plugins_dir, project_dir, platform, platformJson, pluginInfoProvider) {
var munger = new PlatformMunger(platform, project_dir, platformJson, pluginInfoProvider);
munger.process(plugins_dir);
munger.save_all();
@@ -53,7 +51,7 @@ exports.process = function(plugins_dir, project_dir, platform, platformJson, plu
* Can deal with config file of a single project.
* Parsed config files are cached in a ConfigKeeper object.
******************************************************************************/
-function PlatformMunger(platform, project_dir, platformJson, pluginInfoProvider) {
+function PlatformMunger (platform, project_dir, platformJson, pluginInfoProvider) {
this.platform = platform;
this.project_dir = project_dir;
this.config_keeper = new ConfigKeeper(project_dir);
@@ -63,7 +61,7 @@ function PlatformMunger(platform, project_dir, platformJson, pluginInfoProvider)
// Write out all unsaved files.
PlatformMunger.prototype.save_all = PlatformMunger_save_all;
-function PlatformMunger_save_all() {
+function PlatformMunger_save_all () {
this.config_keeper.save_all();
this.platformJson.save();
}
@@ -71,7 +69,7 @@ function PlatformMunger_save_all() {
// Apply a munge object to a single config file.
// The remove parameter tells whether to add the change or remove it.
PlatformMunger.prototype.apply_file_munge = PlatformMunger_apply_file_munge;
-function PlatformMunger_apply_file_munge(file, munge, remove) {
+function PlatformMunger_apply_file_munge (file, munge, remove) {
var self = this;
for (var selector in munge.parents) {
@@ -86,16 +84,15 @@ function PlatformMunger_apply_file_munge(file, munge, remove) {
}
}
-
PlatformMunger.prototype.remove_plugin_changes = remove_plugin_changes;
-function remove_plugin_changes(pluginInfo, is_top_level) {
+function remove_plugin_changes (pluginInfo, is_top_level) {
var self = this;
var platform_config = self.platformJson.root;
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) {
+ if (pluginInfo.getEditConfigs) {
edit_config_changes = pluginInfo.getEditConfigs(self.platform);
}
@@ -114,14 +111,13 @@ function remove_plugin_changes(pluginInfo, is_top_level) {
return self;
}
-
PlatformMunger.prototype.add_plugin_changes = add_plugin_changes;
-function add_plugin_changes(pluginInfo, plugin_vars, is_top_level, should_increment, plugin_force) {
+function add_plugin_changes (pluginInfo, plugin_vars, is_top_level, should_increment, plugin_force) {
var self = this;
var platform_config = self.platformJson.root;
var edit_config_changes = null;
- if(pluginInfo.getEditConfigs) {
+ if (pluginInfo.getEditConfigs) {
edit_config_changes = pluginInfo.getEditConfigs(self.platform);
}
@@ -130,8 +126,7 @@ function add_plugin_changes(pluginInfo, plugin_vars, is_top_level, should_increm
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 {
+ } else {
var isConflictingInfo = is_conflicting(edit_config_changes, platform_config.config_munge, self, plugin_force);
if (isConflictingInfo.conflictWithConfigxml) {
@@ -149,13 +144,11 @@ function add_plugin_changes(pluginInfo, plugin_vars, is_top_level, should_increm
// force add new munges
config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes);
- }
- else if(isConflictingInfo.conflictFound) {
+ } else if (isConflictingInfo.conflictFound) {
throw new Error('There was a conflict trying to modify attributes with 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 {
+ } else {
// no conflicts, will handle edit-config
config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes);
}
@@ -168,27 +161,32 @@ function add_plugin_changes(pluginInfo, plugin_vars, is_top_level, should_increm
return self;
}
-
// Handle edit-config changes from config.xml
PlatformMunger.prototype.add_config_changes = add_config_changes;
-function add_config_changes(config, should_increment) {
+function add_config_changes (config, should_increment) {
var self = this;
var platform_config = self.platformJson.root;
var config_munge;
- var edit_config_changes = null;
- if(config.getEditConfigs) {
- edit_config_changes = config.getEditConfigs(self.platform);
+ var changes = [];
+
+ if (config.getEditConfigs) {
+ var edit_config_changes = config.getEditConfigs(self.platform);
+ if (edit_config_changes) {
+ changes = changes.concat(edit_config_changes);
+ }
}
- if (!edit_config_changes || edit_config_changes.length === 0) {
- // There are no edit-config changes to add, return here
- return self;
+ if (config.getConfigFiles) {
+ var config_files_changes = config.getConfigFiles(self.platform);
+ if (config_files_changes) {
+ changes = changes.concat(config_files_changes);
+ }
}
- else {
- var isConflictingInfo = is_conflicting(edit_config_changes, platform_config.config_munge, self, true /*always force overwrite other edit-config*/);
- if(isConflictingInfo.conflictFound) {
+ if (changes && changes.length > 0) {
+ var isConflictingInfo = is_conflicting(changes, platform_config.config_munge, self, true /* always force overwrite other edit-config */);
+ if (isConflictingInfo.conflictFound) {
var conflict_munge;
var conflict_file;
@@ -209,17 +207,17 @@ function add_config_changes(config, should_increment) {
}
}
}
- // Add config.xml edit-config munges
- config_munge = self.generate_config_xml_munge(config, edit_config_changes, 'config.xml');
}
+ // Add config.xml edit-config and config-file munges
+ config_munge = self.generate_config_xml_munge(config, changes, 'config.xml');
self = munge_helper(should_increment, self, platform_config, config_munge);
// Move to installed/dependent_plugins
return self;
}
-function munge_helper(should_increment, self, platform_config, config_munge) {
+function munge_helper (should_increment, self, platform_config, config_munge) {
// global munge looks at all changes to config files
// TODO: The should_increment param is only used by cordova-cli and is going away soon.
@@ -241,11 +239,10 @@ function munge_helper(should_increment, self, platform_config, config_munge) {
return self;
}
-
// Load the global munge from platform json and apply all of it.
// Used by cordova prepare to re-generate some config file from platform
// defaults and the global munge.
-PlatformMunger.prototype.reapply_global_munge = reapply_global_munge ;
+PlatformMunger.prototype.reapply_global_munge = reapply_global_munge;
function reapply_global_munge () {
var self = this;
@@ -261,58 +258,56 @@ function reapply_global_munge () {
// generate_plugin_config_munge
// Generate the munge object from config.xml
PlatformMunger.prototype.generate_config_xml_munge = generate_config_xml_munge;
-function generate_config_xml_munge(config, edit_config_changes, type) {
-
+function generate_config_xml_munge (config, config_changes, type) {
var munge = { files: {} };
- var changes = edit_config_changes;
var id;
- if(!changes) {
+ if (!config_changes) {
return munge;
}
if (type === 'config.xml') {
id = type;
- }
- else {
+ } else {
id = config.id;
}
- changes.forEach(function(change) {
- change.xmls.forEach(function(xml) {
+ config_changes.forEach(function (change) {
+ change.xmls.forEach(function (xml) {
// 1. stringify each xml
- var stringified = (new et.ElementTree(xml)).write({xml_declaration:false});
+ var stringified = (new et.ElementTree(xml)).write({xml_declaration: false});
// 2. add into munge
if (change.mode) {
mungeutil.deep_add(munge, change.file, change.target, { xml: stringified, count: 1, mode: change.mode, id: id });
+ } else {
+ mungeutil.deep_add(munge, change.target, change.parent, { xml: stringified, count: 1, after: change.after });
}
});
});
return 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, edit_config_changes) {
+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) {
+ if (edit_config_changes) {
Array.prototype.push.apply(changes, edit_config_changes);
}
- changes.forEach(function(change) {
- change.xmls.forEach(function(xml) {
+ changes.forEach(function (change) {
+ change.xmls.forEach(function (xml) {
// 1. stringify each xml
- var stringified = (new et.ElementTree(xml)).write({xml_declaration:false});
+ var stringified = (new et.ElementTree(xml)).write({xml_declaration: false});
// interp vars
if (vars) {
- Object.keys(vars).forEach(function(key) {
+ Object.keys(vars).forEach(function (key) {
var regExp = new RegExp('\\$' + key, 'g');
stringified = stringified.replace(regExp, vars[key]);
});
@@ -322,8 +317,7 @@ function generate_plugin_config_munge(pluginInfo, vars, edit_config_changes) {
if (change.mode !== 'remove') {
mungeutil.deep_add(munge, change.file, change.target, { xml: stringified, count: 1, mode: change.mode, plugin: pluginInfo.id });
}
- }
- else {
+ } else {
mungeutil.deep_add(munge, change.target, change.parent, { xml: stringified, count: 1, after: change.after });
}
});
@@ -331,7 +325,7 @@ function generate_plugin_config_munge(pluginInfo, vars, edit_config_changes) {
return munge;
}
-function is_conflicting(editchanges, config_munge, self, force) {
+function is_conflicting (editchanges, config_munge, self, force) {
var files = config_munge.files;
var conflictFound = false;
var conflictWithConfigxml = false;
@@ -340,7 +334,7 @@ function is_conflicting(editchanges, config_munge, self, force) {
var conflictingParent;
var conflictingPlugin;
- editchanges.forEach(function(editchange) {
+ editchanges.forEach(function (editchange) {
if (files[editchange.file]) {
var parents = files[editchange.file].parents;
var target = parents[editchange.target];
@@ -361,8 +355,7 @@ function is_conflicting(editchanges, config_munge, self, force) {
}
}
}
- }
- else {
+ } else {
conflictingParent = editchange.target;
}
@@ -374,13 +367,11 @@ function is_conflicting(editchanges, config_munge, self, force) {
if (target[0].id === 'config.xml') {
// Keep track of config.xml/config.xml edit-config conflicts
mungeutil.deep_add(configxmlMunge, editchange.file, conflictingParent, target[0]);
- }
- else {
+ } else {
// Keep track of config.xml x plugin.xml edit-config conflicts
mungeutil.deep_add(conflictingMunge, editchange.file, conflictingParent, target[0]);
}
- }
- else {
+ } else {
if (target[0].id === 'config.xml') {
// plugin.xml cannot overwrite config.xml changes even if --force is used
conflictWithConfigxml = true;
@@ -390,36 +381,38 @@ function is_conflicting(editchanges, config_munge, self, force) {
if (force) {
// Need to find all conflicts when --force is used, track conflicting munges
mungeutil.deep_add(conflictingMunge, editchange.file, conflictingParent, target[0]);
- }
- else {
+ } else {
// plugin cannot overwrite other plugin changes without --force
conflictingPlugin = target[0].plugin;
- return;
+
}
}
}
}
});
- return {conflictFound: conflictFound, conflictingPlugin: conflictingPlugin, conflictingMunge: conflictingMunge,
- configxmlMunge: configxmlMunge, conflictWithConfigxml:conflictWithConfigxml};
+ return {conflictFound: conflictFound,
+ conflictingPlugin: conflictingPlugin,
+ conflictingMunge: conflictingMunge,
+ configxmlMunge: configxmlMunge,
+ conflictWithConfigxml: conflictWithConfigxml};
}
// Go over the prepare queue and apply the config munges for each plugin
// that has been (un)installed.
PlatformMunger.prototype.process = PlatformMunger_process;
-function PlatformMunger_process(plugins_dir) {
+function PlatformMunger_process (plugins_dir) {
var self = this;
var platform_config = self.platformJson.root;
// Uninstallation first
- platform_config.prepare_queue.uninstalled.forEach(function(u) {
+ platform_config.prepare_queue.uninstalled.forEach(function (u) {
var pluginInfo = self.pluginInfoProvider.get(path.join(plugins_dir, u.plugin));
self.remove_plugin_changes(pluginInfo, u.topLevel);
});
// Now handle installation
- platform_config.prepare_queue.installed.forEach(function(u) {
+ 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, u.force);
});
@@ -428,4 +421,4 @@ function PlatformMunger_process(plugins_dir) {
platform_config.prepare_queue.uninstalled = [];
platform_config.prepare_queue.installed = [];
}
-/**** END of PlatformMunger ****/
+/** ** END of PlatformMunger ****/
diff --git a/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js b/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js
index 4a580087..a4a73314 100644
--- a/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js
+++ b/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js
@@ -14,6 +14,8 @@
*
*/
+/* eslint no-control-regex: 0 */
+
var fs = require('fs');
var path = require('path');
@@ -42,7 +44,7 @@ addProperty(module, 'xml_helpers', '../util/xml-helpers', modules);
* TODO: Consider moving it out to a separate file and maybe partially with
* overrides in platform handlers.
******************************************************************************/
-function ConfigFile(project_dir, platform, file_tag) {
+function ConfigFile (project_dir, platform, file_tag) {
this.project_dir = project_dir;
this.platform = platform;
this.file_tag = file_tag;
@@ -53,13 +55,13 @@ function ConfigFile(project_dir, platform, file_tag) {
// ConfigFile.load()
ConfigFile.prototype.load = ConfigFile_load;
-function ConfigFile_load() {
+function ConfigFile_load () {
var self = this;
// config file may be in a place not exactly specified in the target
var filepath = self.filepath = resolveConfigFilePath(self.project_dir, self.platform, self.file_tag);
- if ( !filepath || !fs.existsSync(filepath) ) {
+ if (!filepath || !fs.existsSync(filepath)) {
self.exists = false;
return;
}
@@ -69,7 +71,7 @@ function ConfigFile_load() {
var ext = path.extname(filepath);
// Windows8 uses an appxmanifest, and wp8 will likely use
// the same in a future release
- if (ext == '.xml' || ext == '.appxmanifest') {
+ if (ext === '.xml' || ext === '.appxmanifest') {
self.type = 'xml';
self.data = modules.xml_helpers.parseElementtreeSync(filepath);
} else {
@@ -80,12 +82,12 @@ function ConfigFile_load() {
// Do we still need to support binary plist?
// If yes, use plist.parseStringSync() and read the file once.
self.data = isBinaryPlist(filepath) ?
- modules.bplist.parseBuffer(fs.readFileSync(filepath)) :
- modules.plist.parse(fs.readFileSync(filepath, 'utf8'));
+ modules.bplist.parseBuffer(fs.readFileSync(filepath)) :
+ modules.plist.parse(fs.readFileSync(filepath, 'utf8'));
}
}
-ConfigFile.prototype.save = function ConfigFile_save() {
+ConfigFile.prototype.save = function ConfigFile_save () {
var self = this;
if (self.type === 'xml') {
fs.writeFileSync(self.filepath, self.data.write({indent: 4}), 'utf-8');
@@ -97,54 +99,54 @@ ConfigFile.prototype.save = function ConfigFile_save() {
self.is_changed = false;
};
-ConfigFile.prototype.graft_child = function ConfigFile_graft_child(selector, xml_child) {
+ConfigFile.prototype.graft_child = function ConfigFile_graft_child (selector, xml_child) {
var self = this;
var filepath = self.filepath;
var result;
if (self.type === 'xml') {
var xml_to_graft = [modules.et.XML(xml_child.xml)];
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;
- case 'remove':
- result= true;
- break;
- default:
- result = modules.xml_helpers.graftXML(self.data, xml_to_graft, selector, xml_child.after);
+ 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;
+ case 'remove':
+ result = modules.xml_helpers.pruneXMLRemove(self.data, selector, xml_to_graft);
+ break;
+ default:
+ result = modules.xml_helpers.graftXML(self.data, xml_to_graft, selector, xml_child.after);
}
- if ( !result) {
+ if (!result) {
throw new Error('Unable to graft xml at selector "' + selector + '" from "' + filepath + '" during config install');
}
} else {
// plist file
result = modules.plist_helpers.graftPLIST(self.data, xml_child.xml, selector);
- if ( !result ) {
+ if (!result) {
throw new Error('Unable to graft plist "' + filepath + '" during config install');
}
}
self.is_changed = true;
};
-ConfigFile.prototype.prune_child = function ConfigFile_prune_child(selector, xml_child) {
+ConfigFile.prototype.prune_child = function ConfigFile_prune_child (selector, xml_child) {
var self = this;
var filepath = self.filepath;
var result;
if (self.type === 'xml') {
var xml_to_graft = [modules.et.XML(xml_child.xml)];
switch (xml_child.mode) {
- case 'merge':
- case 'overwrite':
- result = modules.xml_helpers.pruneXMLRestore(self.data, selector, xml_child);
- break;
- case 'remove':
- result = modules.xml_helpers.prunXMLRemove(self.data, selector, xml_to_graft);
- break;
- default:
- result = modules.xml_helpers.pruneXML(self.data, xml_to_graft, selector);
+ case 'merge':
+ case 'overwrite':
+ result = modules.xml_helpers.pruneXMLRestore(self.data, selector, xml_child);
+ break;
+ case 'remove':
+ result = modules.xml_helpers.pruneXMLRemove(self.data, selector, xml_to_graft);
+ break;
+ default:
+ result = modules.xml_helpers.pruneXML(self.data, xml_to_graft, selector);
}
} else {
// plist file
@@ -160,7 +162,7 @@ ConfigFile.prototype.prune_child = function ConfigFile_prune_child(selector, xml
// Some config-file target attributes are not qualified with a full leading directory, or contain wildcards.
// Resolve to a real path in this function.
// TODO: getIOSProjectname is slow because of glob, try to avoid calling it several times per project.
-function resolveConfigFilePath(project_dir, platform, file) {
+function resolveConfigFilePath (project_dir, platform, file) {
var filepath = path.join(project_dir, file);
var matches;
@@ -170,10 +172,10 @@ function resolveConfigFilePath(project_dir, platform, file) {
if (matches.length) filepath = matches[0];
// [CB-5989] multiple Info.plist files may exist. default to $PROJECT_NAME-Info.plist
- if(matches.length > 1 && file.indexOf('-Info.plist')>-1){
- var plistName = getIOSProjectname(project_dir)+'-Info.plist';
- for (var i=0; i < matches.length; i++) {
- if(matches[i].indexOf(plistName) > -1){
+ if (matches.length > 1 && file.indexOf('-Info.plist') > -1) {
+ var plistName = getIOSProjectname(project_dir) + '-Info.plist';
+ for (var i = 0; i < matches.length; i++) {
+ if (matches[i].indexOf(plistName) > -1) {
filepath = matches[i];
break;
}
@@ -184,13 +186,13 @@ function resolveConfigFilePath(project_dir, platform, file) {
// special-case config.xml target that is just "config.xml". This should be resolved to the real location of the file.
// TODO: move the logic that contains the locations of config.xml from cordova CLI into plugman.
- if (file == 'config.xml') {
- if (platform == 'ubuntu') {
+ if (file === 'config.xml') {
+ if (platform === 'ubuntu') {
filepath = path.join(project_dir, 'config.xml');
- } else if (platform == 'ios') {
+ } else if (platform === 'ios') {
var iospath = getIOSProjectname(project_dir);
- filepath = path.join(project_dir,iospath, 'config.xml');
- } else if (platform == 'android') {
+ filepath = path.join(project_dir, iospath, 'config.xml');
+ } else if (platform === 'android') {
filepath = path.join(project_dir, 'res', 'xml', 'config.xml');
} else {
matches = modules.glob.sync(path.join(project_dir, '**', 'config.xml'));
@@ -201,8 +203,8 @@ function resolveConfigFilePath(project_dir, platform, file) {
// XXX this checks for android studio projects
// only if none of the options above are satisfied does this get called
- if(platform === 'android' && !fs.existsSync(filepath)) {
- filepath = path.join(project_dir, 'app', 'src', 'main', 'res', 'xml', 'config.xml');
+ if (platform === 'android' && !fs.existsSync(filepath)) {
+ filepath = path.join(project_dir, 'app', 'src', 'main', 'res', 'xml', 'config.xml');
}
// None of the special cases matched, returning project_dir/file.
@@ -211,11 +213,11 @@ function resolveConfigFilePath(project_dir, platform, file) {
// Find out the real name of an iOS project
// TODO: glob is slow, need a better way or caching, or avoid using more than once.
-function getIOSProjectname(project_dir) {
+function getIOSProjectname (project_dir) {
var matches = modules.glob.sync(path.join(project_dir, '*.xcodeproj'));
var iospath;
if (matches.length === 1) {
- iospath = path.basename(matches[0],'.xcodeproj');
+ iospath = path.basename(matches[0], '.xcodeproj');
} else {
var msg;
if (matches.length === 0) {
@@ -229,7 +231,7 @@ function getIOSProjectname(project_dir) {
}
// determine if a plist file is binary
-function isBinaryPlist(filename) {
+function isBinaryPlist (filename) {
// I wish there was a synchronous way to read only the first 6 bytes of a
// file. This is wasteful :/
var buf = '' + fs.readFileSync(filename, 'utf8');
diff --git a/node_modules/cordova-common/src/ConfigChanges/ConfigKeeper.js b/node_modules/cordova-common/src/ConfigChanges/ConfigKeeper.js
index 894e9220..0ef04350 100644
--- a/node_modules/cordova-common/src/ConfigChanges/ConfigKeeper.js
+++ b/node_modules/cordova-common/src/ConfigChanges/ConfigKeeper.js
@@ -28,18 +28,18 @@ var ConfigFile = require('./ConfigFile');
* project_dir/platform/file
* where file is the name used for the file in config munges.
******************************************************************************/
-function ConfigKeeper(project_dir, plugins_dir) {
+function ConfigKeeper (project_dir, plugins_dir) {
this.project_dir = project_dir;
this.plugins_dir = plugins_dir;
this._cached = {};
}
-ConfigKeeper.prototype.get = function ConfigKeeper_get(project_dir, platform, file) {
+ConfigKeeper.prototype.get = function ConfigKeeper_get (project_dir, platform, file) {
var self = this;
// This fixes a bug with older plugins - when specifying config xml instead of res/xml/config.xml
// https://issues.apache.org/jira/browse/CB-6414
- if(file == 'config.xml' && platform == 'android'){
+ if (file === 'config.xml' && platform === 'android') {
file = 'res/xml/config.xml';
}
var fake_path = path.join(project_dir, platform, file);
@@ -53,8 +53,7 @@ ConfigKeeper.prototype.get = function ConfigKeeper_get(project_dir, platform, fi
return config_file;
};
-
-ConfigKeeper.prototype.save_all = function ConfigKeeper_save_all() {
+ConfigKeeper.prototype.save_all = function ConfigKeeper_save_all () {
var self = this;
Object.keys(self._cached).forEach(function (fake_path) {
var config_file = self._cached[fake_path];
diff --git a/node_modules/cordova-common/src/ConfigChanges/munge-util.js b/node_modules/cordova-common/src/ConfigChanges/munge-util.js
index 0149bab7..62648d8d 100644
--- a/node_modules/cordova-common/src/ConfigChanges/munge-util.js
+++ b/node_modules/cordova-common/src/ConfigChanges/munge-util.js
@@ -19,14 +19,14 @@ var _ = require('underscore');
// add the count of [key1][key2]...[keyN] to obj
// return true if it didn't exist before
-exports.deep_add = function deep_add(obj, keys /* or key1, key2 .... */ ) {
- if ( !Array.isArray(keys) ) {
+exports.deep_add = function deep_add (obj, keys /* or key1, key2 .... */) {
+ if (!Array.isArray(keys)) {
keys = Array.prototype.slice.call(arguments, 1);
}
- return exports.process_munge(obj, true/*createParents*/, function (parentArray, k) {
- var found = _.find(parentArray, function(element) {
- return element.xml == k.xml;
+ return exports.process_munge(obj, true/* createParents */, function (parentArray, k) {
+ var found = _.find(parentArray, function (element) {
+ return element.xml === k.xml;
});
if (found) {
found.after = found.after || k.after;
@@ -40,16 +40,16 @@ exports.deep_add = function deep_add(obj, keys /* or key1, key2 .... */ ) {
// decrement the count of [key1][key2]...[keyN] from obj and remove if it reaches 0
// return true if it was removed or not found
-exports.deep_remove = function deep_remove(obj, keys /* or key1, key2 .... */ ) {
- if ( !Array.isArray(keys) ) {
+exports.deep_remove = function deep_remove (obj, keys /* or key1, key2 .... */) {
+ if (!Array.isArray(keys)) {
keys = Array.prototype.slice.call(arguments, 1);
}
- var result = exports.process_munge(obj, false/*createParents*/, function (parentArray, k) {
+ var result = exports.process_munge(obj, false/* createParents */, function (parentArray, k) {
var index = -1;
var found = _.find(parentArray, function (element) {
index++;
- return element.xml == k.xml;
+ return element.xml === k.xml;
});
if (found) {
if (parentArray[index].oldAttrib) {
@@ -58,8 +58,7 @@ exports.deep_remove = function deep_remove(obj, keys /* or key1, key2 .... */ )
found.count -= k.count;
if (found.count > 0) {
return false;
- }
- else {
+ } else {
parentArray.splice(index, 1);
}
}
@@ -71,14 +70,14 @@ exports.deep_remove = function deep_remove(obj, keys /* or key1, key2 .... */ )
// search for [key1][key2]...[keyN]
// return the object or undefined if not found
-exports.deep_find = function deep_find(obj, keys /* or key1, key2 .... */ ) {
- if ( !Array.isArray(keys) ) {
+exports.deep_find = function deep_find (obj, keys /* or key1, key2 .... */) {
+ if (!Array.isArray(keys)) {
keys = Array.prototype.slice.call(arguments, 1);
}
- return exports.process_munge(obj, false/*createParents?*/, function (parentArray, k) {
+ return exports.process_munge(obj, false/* createParents? */, function (parentArray, k) {
return _.find(parentArray, function (element) {
- return element.xml == (k.xml || k);
+ return element.xml === (k.xml || k);
});
}, keys);
};
@@ -87,20 +86,20 @@ exports.deep_find = function deep_find(obj, keys /* or key1, key2 .... */ ) {
// When createParents is true, add the file and parent items they are missing
// When createParents is false, stop and return undefined if the file and/or parent items are missing
-exports.process_munge = function process_munge(obj, createParents, func, keys /* or key1, key2 .... */ ) {
- if ( !Array.isArray(keys) ) {
+exports.process_munge = function process_munge (obj, createParents, func, keys /* or key1, key2 .... */) {
+ if (!Array.isArray(keys)) {
keys = Array.prototype.slice.call(arguments, 1);
}
var k = keys[0];
- if (keys.length == 1) {
+ if (keys.length === 1) {
return func(obj, k);
- } else if (keys.length == 2) {
+ } else if (keys.length === 2) {
if (!obj.parents[k] && !createParents) {
return undefined;
}
obj.parents[k] = obj.parents[k] || [];
return exports.process_munge(obj.parents[k], createParents, func, keys.slice(1));
- } else if (keys.length == 3){
+ } else if (keys.length === 3) {
if (!obj.files[k] && !createParents) {
return undefined;
}
@@ -115,7 +114,7 @@ exports.process_munge = function process_munge(obj, createParents, func, keys /*
// base[file][selector][child] += munge[file][selector][child]
// Returns a munge object containing values that exist in munge
// but not in base.
-exports.increment_munge = function increment_munge(base, munge) {
+exports.increment_munge = function increment_munge (base, munge) {
var diff = { files: {} };
for (var file in munge.files) {
@@ -138,7 +137,7 @@ exports.increment_munge = function increment_munge(base, munge) {
// base[file][selector][child] -= munge[file][selector][child]
// nodes that reached zero value are removed from base and added to the returned munge
// object.
-exports.decrement_munge = function decrement_munge(base, munge) {
+exports.decrement_munge = function decrement_munge (base, munge) {
var zeroed = { files: {} };
for (var file in munge.files) {
@@ -158,6 +157,6 @@ exports.decrement_munge = function decrement_munge(base, munge) {
};
// For better readability where used
-exports.clone_munge = function clone_munge(munge) {
+exports.clone_munge = function clone_munge (munge) {
return exports.increment_munge({}, munge);
};
diff --git a/node_modules/cordova-common/src/ConfigParser/ConfigParser.js b/node_modules/cordova-common/src/ConfigParser/ConfigParser.js
index cd718ded..9c3943e4 100644
--- a/node_modules/cordova-common/src/ConfigParser/ConfigParser.js
+++ b/node_modules/cordova-common/src/ConfigParser/ConfigParser.js
@@ -17,24 +17,21 @@
under the License.
*/
-/* jshint sub:true */
-
-var et = require('elementtree'),
- xml= require('../util/xml-helpers'),
- CordovaError = require('../CordovaError/CordovaError'),
- fs = require('fs'),
- events = require('../events');
-
+var et = require('elementtree');
+var xml = require('../util/xml-helpers');
+var CordovaError = require('../CordovaError/CordovaError');
+var fs = require('fs');
+var events = require('../events');
/** Wraps a config.xml file */
-function ConfigParser(path) {
+function ConfigParser (path) {
this.path = path;
try {
this.doc = xml.parseElementtreeSync(path);
this.cdvNamespacePrefix = getCordovaNamespacePrefix(this.doc);
et.register_namespace(this.cdvNamespacePrefix, 'http://cordova.apache.org/ns/1.0');
} catch (e) {
- console.error('Parsing '+path+' failed');
+ console.error('Parsing ' + path + ' failed');
throw e;
}
var r = this.doc.getroot();
@@ -43,11 +40,11 @@ function ConfigParser(path) {
}
}
-function getNodeTextSafe(el) {
+function getNodeTextSafe (el) {
return el && el.text && el.text.trim();
}
-function findOrCreate(doc, name) {
+function findOrCreate (doc, name) {
var ret = doc.find(name);
if (!ret) {
ret = new et.Element(name);
@@ -56,12 +53,12 @@ function findOrCreate(doc, name) {
return ret;
}
-function getCordovaNamespacePrefix(doc){
+function getCordovaNamespacePrefix (doc) {
var rootAtribs = Object.getOwnPropertyNames(doc.getroot().attrib);
var prefix = 'cdv';
- for (var j = 0; j < rootAtribs.length; j++ ) {
- if(rootAtribs[j].indexOf('xmlns:') === 0 &&
- doc.getroot().attrib[rootAtribs[j]] === 'http://cordova.apache.org/ns/1.0'){
+ for (var j = 0; j < rootAtribs.length; j++) {
+ if (rootAtribs[j].indexOf('xmlns:') === 0 &&
+ doc.getroot().attrib[rootAtribs[j]] === 'http://cordova.apache.org/ns/1.0') {
var strings = rootAtribs[j].split(':');
prefix = strings[1];
break;
@@ -76,7 +73,7 @@ function getCordovaNamespacePrefix(doc){
* @param {Array} elems An array of ElementTree nodes
* @return {String}
*/
-function findElementAttributeValue(attributeName, elems) {
+function findElementAttributeValue (attributeName, elems) {
elems = Array.isArray(elems) ? elems : [ elems ];
@@ -86,69 +83,69 @@ function findElementAttributeValue(attributeName, elems) {
return filteredElems.attrib.value;
}).pop();
- return value ? value : '';
+ return value || '';
}
ConfigParser.prototype = {
- getAttribute: function(attr) {
+ getAttribute: function (attr) {
return this.doc.getroot().attrib[attr];
},
- packageName: function(id) {
+ packageName: function (id) {
return this.getAttribute('id');
},
- setPackageName: function(id) {
+ setPackageName: function (id) {
this.doc.getroot().attrib['id'] = id;
},
- android_packageName: function() {
+ android_packageName: function () {
return this.getAttribute('android-packageName');
},
- android_activityName: function() {
+ android_activityName: function () {
return this.getAttribute('android-activityName');
},
- ios_CFBundleIdentifier: function() {
+ ios_CFBundleIdentifier: function () {
return this.getAttribute('ios-CFBundleIdentifier');
},
- name: function() {
+ name: function () {
return getNodeTextSafe(this.doc.find('name'));
},
- setName: function(name) {
+ setName: function (name) {
var el = findOrCreate(this.doc, 'name');
el.text = name;
},
- shortName: function() {
+ shortName: function () {
return this.doc.find('name').attrib['short'] || this.name();
},
- setShortName: function(shortname) {
+ setShortName: function (shortname) {
var el = findOrCreate(this.doc, 'name');
if (!el.text) {
el.text = shortname;
}
el.attrib['short'] = shortname;
},
- description: function() {
+ description: function () {
return getNodeTextSafe(this.doc.find('description'));
},
- setDescription: function(text) {
+ setDescription: function (text) {
var el = findOrCreate(this.doc, 'description');
el.text = text;
},
- version: function() {
+ version: function () {
return this.getAttribute('version');
},
- windows_packageVersion: function() {
+ windows_packageVersion: function () {
return this.getAttribute('windows-packageVersion');
},
- android_versionCode: function() {
+ android_versionCode: function () {
return this.getAttribute('android-versionCode');
},
- ios_CFBundleVersion: function() {
+ ios_CFBundleVersion: function () {
return this.getAttribute('ios-CFBundleVersion');
},
- setVersion: function(value) {
+ setVersion: function (value) {
this.doc.getroot().attrib['version'] = value;
},
- author: function() {
+ author: function () {
return getNodeTextSafe(this.doc.find('author'));
},
getGlobalPreference: function (name) {
@@ -166,7 +163,7 @@ ConfigParser.prototype = {
getPlatformPreference: function (name, platform) {
return findElementAttributeValue(name, this.doc.findall('platform[@name=\'' + platform + '\']/preference'));
},
- getPreference: function(name, platform) {
+ getPreference: function (name, platform) {
var platformPreference = '';
@@ -174,7 +171,7 @@ ConfigParser.prototype = {
platformPreference = this.getPlatformPreference(name, platform);
}
- return platformPreference ? platformPreference : this.getGlobalPreference(name);
+ return platformPreference || this.getGlobalPreference(name);
},
/**
@@ -184,11 +181,11 @@ ConfigParser.prototype = {
* "icon" and "splash" currently supported.
* @return {Array} Resources for the platform specified.
*/
- getStaticResources: function(platform, resourceName) {
- var ret = [],
- staticResources = [];
+ getStaticResources: function (platform, resourceName) {
+ var ret = [];
+ var staticResources = [];
if (platform) { // platform specific icons
- this.doc.findall('platform[@name=\'' + platform + '\']/' + resourceName).forEach(function(elt){
+ this.doc.findall('platform[@name=\'' + platform + '\']/' + resourceName).forEach(function (elt) {
elt.platform = platform; // mark as platform specific resource
staticResources.push(elt);
});
@@ -201,7 +198,7 @@ ConfigParser.prototype = {
var res = {};
res.src = elt.attrib.src;
res.target = elt.attrib.target || undefined;
- res.density = elt.attrib['density'] || elt.attrib[that.cdvNamespacePrefix+':density'] || elt.attrib['gap:density'];
+ res.density = elt.attrib['density'] || elt.attrib[that.cdvNamespacePrefix + ':density'] || elt.attrib['gap:density'];
res.platform = elt.platform || null; // null means icon represents default icon (shared between platforms)
res.width = +elt.attrib.width || undefined;
res.height = +elt.attrib.height || undefined;
@@ -219,13 +216,13 @@ ConfigParser.prototype = {
* @param {number} height Height of resource.
* @return {Resource} Resource object or null if not found.
*/
- ret.getBySize = function(width, height) {
- return ret.filter(function(res) {
+ ret.getBySize = function (width, height) {
+ return ret.filter(function (res) {
if (!res.width && !res.height) {
return false;
}
- return ((!res.width || (width == res.width)) &&
- (!res.height || (height == res.height)));
+ return ((!res.width || (width === res.width)) &&
+ (!res.height || (height === res.height)));
})[0] || null;
};
@@ -234,14 +231,14 @@ ConfigParser.prototype = {
* @param {string} density Density of resource.
* @return {Resource} Resource object or null if not found.
*/
- ret.getByDensity = function(density) {
- return ret.filter(function(res) {
- return res.density == density;
+ ret.getByDensity = function (density) {
+ return ret.filter(function (res) {
+ return res.density === density;
})[0] || null;
};
/** Returns default icons */
- ret.getDefault = function() {
+ ret.getDefault = function () {
return ret.defaultResource;
};
@@ -253,7 +250,7 @@ ConfigParser.prototype = {
* @param {string} platform Platform name
* @return {Resource[]} Array of icon objects.
*/
- getIcons: function(platform) {
+ getIcons: function (platform) {
return this.getStaticResources(platform, 'icon');
},
@@ -262,20 +259,22 @@ ConfigParser.prototype = {
* @param {string} platform Platform name
* @return {Resource[]} Array of Splash objects.
*/
- getSplashScreens: function(platform) {
+ getSplashScreens: function (platform) {
return this.getStaticResources(platform, 'splash');
},
/**
* Returns all resource-files for a specific platform.
* @param {string} platform Platform name
+ * @param {boolean} includeGlobal Whether to return resource-files at the
+ * root level.
* @return {Resource[]} Array of resource file objects.
*/
- getFileResources: function(platform) {
+ getFileResources: function (platform, includeGlobal) {
var fileResources = [];
if (platform) { // platform specific resources
- fileResources = this.doc.findall('platform[@name=\'' + platform + '\']/resource-file').map(function(tag) {
+ fileResources = this.doc.findall('platform[@name=\'' + platform + '\']/resource-file').map(function (tag) {
return {
platform: platform,
src: tag.attrib.src,
@@ -287,6 +286,19 @@ ConfigParser.prototype = {
});
}
+ if (includeGlobal) {
+ this.doc.findall('resource-file').forEach(function (tag) {
+ fileResources.push({
+ platform: platform || null,
+ src: tag.attrib.src,
+ target: tag.attrib.target,
+ versions: tag.attrib.versions,
+ deviceTarget: tag.attrib['device-target'],
+ arch: tag.attrib.arch
+ });
+ });
+ }
+
return fileResources;
},
@@ -296,23 +308,23 @@ ConfigParser.prototype = {
* @param {Array} platforms Platforms to look for scripts into (root scripts will be included as well).
* @return {Array} Script elements.
*/
- getHookScripts: function(hook, platforms) {
+ getHookScripts: function (hook, platforms) {
var self = this;
var scriptElements = self.doc.findall('./hook');
- if(platforms) {
+ if (platforms) {
platforms.forEach(function (platform) {
scriptElements = scriptElements.concat(self.doc.findall('./platform[@name="' + platform + '"]/hook'));
});
}
- function filterScriptByHookType(el) {
+ function filterScriptByHookType (el) {
return el.attrib.src && el.attrib.type && el.attrib.type.toLowerCase() === hook;
}
return scriptElements.filter(filterScriptByHookType);
},
- /**
+ /**
* Returns a list of plugin (IDs).
*
* This function also returns any plugin's that
@@ -321,13 +333,13 @@ ConfigParser.prototype = {
*/
getPluginIdList: function () {
var plugins = this.doc.findall('plugin');
- var result = plugins.map(function(plugin){
+ var result = plugins.map(function (plugin) {
return plugin.attrib.name;
});
var features = this.doc.findall('feature');
- features.forEach(function(element ){
+ features.forEach(function (element) {
var idTag = element.find('./param[@name="id"]');
- if(idTag){
+ if (idTag) {
result.push(idTag.attrib.value);
}
});
@@ -356,9 +368,9 @@ ConfigParser.prototype = {
// support arbitrary object as variables source
if (variables && typeof variables === 'object' && !Array.isArray(variables)) {
variables = Object.keys(variables)
- .map(function (variableName) {
- return {name: variableName, value: variables[variableName]};
- });
+ .map(function (variableName) {
+ return {name: variableName, value: variables[variableName]};
+ });
}
if (variables) {
@@ -378,15 +390,15 @@ ConfigParser.prototype = {
* @param {String} id
* @returns {object} plugin including any variables
*/
- getPlugin: function(id){
- if(!id){
+ getPlugin: function (id) {
+ if (!id) {
return undefined;
}
var pluginElement = this.doc.find('./plugin/[@name="' + id + '"]');
- if (null === pluginElement) {
- var legacyFeature = this.doc.find('./feature/param[@name="id"][@value="' + id + '"]/..');
- if(legacyFeature){
- events.emit('log', 'Found deprecated feature entry for ' + id +' in config.xml.');
+ if (pluginElement === null) {
+ var legacyFeature = this.doc.find('./feature/param[@name="id"][@value="' + id + '"]/..');
+ if (legacyFeature) {
+ events.emit('log', 'Found deprecated feature entry for ' + id + ' in config.xml.');
return featureToPlugin(legacyFeature);
}
return undefined;
@@ -397,10 +409,10 @@ ConfigParser.prototype = {
plugin.spec = pluginElement.attrib.spec || pluginElement.attrib.src || pluginElement.attrib.version;
plugin.variables = {};
var variableElements = pluginElement.findall('variable');
- variableElements.forEach(function(varElement){
+ variableElements.forEach(function (varElement) {
var name = varElement.attrib.name;
var value = varElement.attrib.value;
- if(name){
+ if (name) {
plugin.variables[name] = value;
}
});
@@ -415,8 +427,8 @@ ConfigParser.prototype = {
* @function
* @param id name of the plugin
*/
- removePlugin: function(id){
- if(id){
+ removePlugin: function (id) {
+ if (id) {
var plugins = this.doc.findall('./plugin/[@name="' + id + '"]')
.concat(this.doc.findall('./feature/param[@name="id"][@value="' + id + '"]/..'));
var children = this.doc.getroot().getchildren();
@@ -430,7 +442,7 @@ ConfigParser.prototype = {
},
// Add any element to the root
- addElement: function(name, attributes) {
+ addElement: function (name, attributes) {
var el = et.Element(name);
for (var a in attributes) {
el.attrib[a] = attributes[a];
@@ -443,11 +455,11 @@ ConfigParser.prototype = {
* @param {String} name the engine name
* @param {String} spec engine source location or version (optional)
*/
- addEngine: function(name, spec){
- if(!name) return;
+ addEngine: function (name, spec) {
+ if (!name) return;
var el = et.Element('engine');
el.attrib.name = name;
- if(spec){
+ if (spec) {
el.attrib.spec = spec;
}
this.doc.getroot().append(el);
@@ -456,52 +468,54 @@ ConfigParser.prototype = {
* Removes all the engines with given name
* @param {String} name the engine name.
*/
- removeEngine: function(name){
- var engines = this.doc.findall('./engine/[@name="' +name+'"]');
- for(var i=0; i < engines.length; i++){
+ removeEngine: function (name) {
+ var engines = this.doc.findall('./engine/[@name="' + name + '"]');
+ for (var i = 0; i < engines.length; i++) {
var children = this.doc.getroot().getchildren();
var idx = children.indexOf(engines[i]);
- if(idx > -1){
- children.splice(idx,1);
+ if (idx > -1) {
+ children.splice(idx, 1);
}
}
},
- getEngines: function(){
+ getEngines: function () {
var engines = this.doc.findall('./engine');
- return engines.map(function(engine){
+ return engines.map(function (engine) {
var spec = engine.attrib.spec || engine.attrib.version;
return {
'name': engine.attrib.name,
- 'spec': spec ? spec : null
+ 'spec': spec || null
};
});
},
/* Get all the access tags */
- getAccesses: function() {
+ getAccesses: function () {
var accesses = this.doc.findall('./access');
- return accesses.map(function(access){
+ return accesses.map(function (access) {
var minimum_tls_version = access.attrib['minimum-tls-version']; /* String */
var requires_forward_secrecy = access.attrib['requires-forward-secrecy']; /* Boolean */
var requires_certificate_transparency = access.attrib['requires-certificate-transparency']; /* Boolean */
var allows_arbitrary_loads_in_web_content = access.attrib['allows-arbitrary-loads-in-web-content']; /* Boolean */
- var allows_arbitrary_loads_in_media = access.attrib['allows-arbitrary-loads-in-media']; /* Boolean */
+ var allows_arbitrary_loads_in_media = access.attrib['allows-arbitrary-loads-in-media']; /* Boolean (DEPRECATED) */
+ var allows_arbitrary_loads_for_media = access.attrib['allows-arbitrary-loads-for-media']; /* Boolean */
var allows_local_networking = access.attrib['allows-local-networking']; /* Boolean */
-
+
return {
'origin': access.attrib.origin,
'minimum_tls_version': minimum_tls_version,
- 'requires_forward_secrecy' : requires_forward_secrecy,
- 'requires_certificate_transparency' : requires_certificate_transparency,
- 'allows_arbitrary_loads_in_web_content' : allows_arbitrary_loads_in_web_content,
- 'allows_arbitrary_loads_in_media' : allows_arbitrary_loads_in_media,
- 'allows_local_networking' : allows_local_networking
+ 'requires_forward_secrecy': requires_forward_secrecy,
+ 'requires_certificate_transparency': requires_certificate_transparency,
+ 'allows_arbitrary_loads_in_web_content': allows_arbitrary_loads_in_web_content,
+ 'allows_arbitrary_loads_in_media': allows_arbitrary_loads_in_media,
+ 'allows_arbitrary_loads_for_media': allows_arbitrary_loads_for_media,
+ 'allows_local_networking': allows_local_networking
};
});
},
/* Get all the allow-navigation tags */
- getAllowNavigations: function() {
+ getAllowNavigations: function () {
var allow_navigations = this.doc.findall('./allow-navigation');
- return allow_navigations.map(function(allow_navigation){
+ return allow_navigations.map(function (allow_navigation) {
var minimum_tls_version = allow_navigation.attrib['minimum-tls-version']; /* String */
var requires_forward_secrecy = allow_navigation.attrib['requires-forward-secrecy']; /* Boolean */
var requires_certificate_transparency = allow_navigation.attrib['requires-certificate-transparency']; /* Boolean */
@@ -509,45 +523,68 @@ ConfigParser.prototype = {
return {
'href': allow_navigation.attrib.href,
'minimum_tls_version': minimum_tls_version,
- 'requires_forward_secrecy' : requires_forward_secrecy,
- 'requires_certificate_transparency' : requires_certificate_transparency
+ 'requires_forward_secrecy': requires_forward_secrecy,
+ 'requires_certificate_transparency': requires_certificate_transparency
};
});
},
/* Get all the allow-intent tags */
- getAllowIntents: function() {
+ getAllowIntents: function () {
var allow_intents = this.doc.findall('./allow-intent');
- return allow_intents.map(function(allow_intent){
+ return allow_intents.map(function (allow_intent) {
return {
'href': allow_intent.attrib.href
};
});
},
/* Get all edit-config tags */
- getEditConfigs: function(platform) {
+ getEditConfigs: function (platform) {
var platform_tag = this.doc.find('./platform[@name="' + platform + '"]');
var platform_edit_configs = platform_tag ? platform_tag.findall('edit-config') : [];
var edit_configs = this.doc.findall('edit-config').concat(platform_edit_configs);
- return edit_configs.map(function(tag) {
+ return edit_configs.map(function (tag) {
var editConfig =
{
- file : tag.attrib['file'],
- target : tag.attrib['target'],
- mode : tag.attrib['mode'],
- id : 'config.xml',
- xmls : tag.getchildren()
+ file: tag.attrib['file'],
+ target: tag.attrib['target'],
+ mode: tag.attrib['mode'],
+ id: 'config.xml',
+ xmls: tag.getchildren()
};
return editConfig;
});
},
- write:function() {
+
+ /* Get all config-file tags */
+ getConfigFiles: function (platform) {
+ var platform_tag = this.doc.find('./platform[@name="' + platform + '"]');
+ var platform_config_files = platform_tag ? platform_tag.findall('config-file') : [];
+
+ var config_files = this.doc.findall('config-file').concat(platform_config_files);
+
+ return config_files.map(function (tag) {
+ var configFile =
+ {
+ target: tag.attrib['target'],
+ parent: tag.attrib['parent'],
+ after: tag.attrib['after'],
+ xmls: tag.getchildren(),
+ // To support demuxing via versions
+ versions: tag.attrib['versions'],
+ deviceTarget: tag.attrib['device-target']
+ };
+ return configFile;
+ });
+ },
+
+ write: function () {
fs.writeFileSync(this.path, this.doc.write({indent: 4}), 'utf-8');
}
};
-function featureToPlugin(featureElement) {
+function featureToPlugin (featureElement) {
var plugin = {};
plugin.variables = [];
var pluginVersion,
diff --git a/node_modules/cordova-common/src/CordovaCheck.js b/node_modules/cordova-common/src/CordovaCheck.js
index 46e733f9..28f629d3 100644
--- a/node_modules/cordova-common/src/CordovaCheck.js
+++ b/node_modules/cordova-common/src/CordovaCheck.js
@@ -17,10 +17,10 @@
under the License.
*/
-var fs = require('fs'),
- path = require('path');
+var fs = require('fs');
+var path = require('path');
-function isRootDir(dir) {
+function isRootDir (dir) {
if (fs.existsSync(path.join(dir, 'www'))) {
if (fs.existsSync(path.join(dir, 'config.xml'))) {
// For sure is.
@@ -41,12 +41,12 @@ function isRootDir(dir) {
// 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) {
+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') {
+ if (pwd && pwd !== cwd && pwd !== 'undefined') {
return isCordova(pwd) || isCordova(cwd);
}
return isCordova(cwd);
@@ -62,7 +62,7 @@ function isCordova(dir) {
}
var parentDir = path.normalize(path.join(dir, '..'));
// Detect fs root.
- if (parentDir == dir) {
+ if (parentDir === dir) {
return bestReturnValueSoFar;
}
dir = parentDir;
@@ -72,5 +72,5 @@ function isCordova(dir) {
}
module.exports = {
- findProjectRoot : isCordova
+ findProjectRoot: isCordova
};
diff --git a/node_modules/cordova-common/src/CordovaError/CordovaError.js b/node_modules/cordova-common/src/CordovaError/CordovaError.js
index 72624480..24de6af1 100644
--- a/node_modules/cordova-common/src/CordovaError/CordovaError.js
+++ b/node_modules/cordova-common/src/CordovaError/CordovaError.js
@@ -17,7 +17,7 @@
under the License.
*/
-/* jshint proto:true */
+/* eslint no-proto: 0 */
var EOL = require('os').EOL;
@@ -30,7 +30,7 @@ var EOL = require('os').EOL;
* @param {CordovaExternalToolErrorContext} [context] External tool error context object
* @constructor
*/
-function CordovaError(message, code, context) {
+function CordovaError (message, code, context) {
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
this.message = message;
@@ -47,10 +47,10 @@ CordovaError.EXTERNAL_TOOL_ERROR = 1;
* Translates instance's error code number into error code name, e.g. 0 -> UNKNOWN_ERROR
* @returns {string} Error code string name
*/
-CordovaError.prototype.getErrorCodeName = function() {
- for(var key in CordovaError) {
- if(CordovaError.hasOwnProperty(key)) {
- if(CordovaError[key] === this.code) {
+CordovaError.prototype.getErrorCodeName = function () {
+ for (var key in CordovaError) {
+ if (CordovaError.hasOwnProperty(key)) {
+ if (CordovaError[key] === this.code) {
return key;
}
}
@@ -63,16 +63,17 @@ CordovaError.prototype.getErrorCodeName = function() {
* details including information about error code name and context
* @return {String} Stringified error representation
*/
-CordovaError.prototype.toString = function(isVerbose) {
- var message = '', codePrefix = '';
+CordovaError.prototype.toString = function (isVerbose) {
+ var message = '';
+ var codePrefix = '';
- if(this.code !== CordovaError.UNKNOWN_ERROR) {
+ if (this.code !== CordovaError.UNKNOWN_ERROR) {
codePrefix = 'code: ' + this.code + (isVerbose ? (' (' + this.getErrorCodeName() + ')') : '') + ' ';
}
- if(this.code === CordovaError.EXTERNAL_TOOL_ERROR) {
- if(typeof this.context !== 'undefined') {
- if(isVerbose) {
+ if (this.code === CordovaError.EXTERNAL_TOOL_ERROR) {
+ if (typeof this.context !== 'undefined') {
+ if (isVerbose) {
message = codePrefix + EOL + this.context.toString(isVerbose) + '\n failed with an error: ' +
this.message + EOL + 'Stack trace: ' + this.stack;
} else {
diff --git a/node_modules/cordova-common/src/CordovaError/CordovaExternalToolErrorContext.js b/node_modules/cordova-common/src/CordovaError/CordovaExternalToolErrorContext.js
index ca9a4aae..30699b40 100644
--- a/node_modules/cordova-common/src/CordovaError/CordovaExternalToolErrorContext.js
+++ b/node_modules/cordova-common/src/CordovaError/CordovaExternalToolErrorContext.js
@@ -27,7 +27,7 @@ var path = require('path');
* @param {String} [cwd] Command working directory
* @constructor
*/
-function CordovaExternalToolErrorContext(cmd, args, cwd) {
+function CordovaExternalToolErrorContext (cmd, args, cwd) {
this.cmd = cmd;
// Helper field for readability
this.cmdShortName = path.basename(cmd);
@@ -35,8 +35,8 @@ function CordovaExternalToolErrorContext(cmd, args, cwd) {
this.cwd = cwd;
}
-CordovaExternalToolErrorContext.prototype.toString = function(isVerbose) {
- if(isVerbose) {
+CordovaExternalToolErrorContext.prototype.toString = function (isVerbose) {
+ if (isVerbose) {
return 'External tool \'' + this.cmdShortName + '\'' +
'\nCommand full path: ' + this.cmd + '\nCommand args: ' + this.args +
(typeof this.cwd !== 'undefined' ? '\nCommand cwd: ' + this.cwd : '');
diff --git a/node_modules/cordova-common/src/CordovaLogger.js b/node_modules/cordova-common/src/CordovaLogger.js
index 71bc7e8a..ea6e9cea 100644
--- a/node_modules/cordova-common/src/CordovaLogger.js
+++ b/node_modules/cordova-common/src/CordovaLogger.js
@@ -41,11 +41,11 @@ function CordovaLogger () {
this.stderrCursor = ansi(this.stderr);
this.addLevel('verbose', 1000, 'grey');
- this.addLevel('normal' , 2000);
- this.addLevel('warn' , 2000, 'yellow');
- this.addLevel('info' , 3000, 'blue');
- this.addLevel('error' , 5000, 'red');
- this.addLevel('results' , 10000);
+ this.addLevel('normal', 2000);
+ this.addLevel('warn', 2000, 'yellow');
+ this.addLevel('info', 3000, 'blue');
+ this.addLevel('error', 5000, 'red');
+ this.addLevel('results', 10000);
this.setLevel('normal');
}
@@ -82,9 +82,10 @@ CordovaLogger.RESULTS = 'results';
CordovaLogger.prototype.log = function (logLevel, message) {
// if there is no such logLevel defined, or provided level has
// less severity than active level, then just ignore this call and return
- if (!this.levels[logLevel] || this.levels[logLevel] < this.levels[this.logLevel])
+ if (!this.levels[logLevel] || this.levels[logLevel] < this.levels[this.logLevel]) {
// return instance to allow to chain calls
return this;
+ }
var isVerbose = this.logLevel === 'verbose';
var cursor = this.stdoutCursor;
@@ -179,8 +180,7 @@ CordovaLogger.prototype.adjustLevel = function (opts) {
*/
CordovaLogger.prototype.subscribe = function (eventEmitter) {
- if (!(eventEmitter instanceof EventEmitter))
- throw new Error('Subscribe method only accepts an EventEmitter instance as argument');
+ if (!(eventEmitter instanceof EventEmitter)) { throw new Error('Subscribe method only accepts an EventEmitter instance as argument'); }
eventEmitter.on('verbose', this.verbose)
.on('log', this.normal)
@@ -193,7 +193,7 @@ CordovaLogger.prototype.subscribe = function (eventEmitter) {
return this;
};
-function formatError(error, isVerbose) {
+function formatError (error, isVerbose) {
var message = '';
if (error instanceof CordovaError) {
diff --git a/node_modules/cordova-common/src/FileUpdater.js b/node_modules/cordova-common/src/FileUpdater.js
index 8b6876bf..c4eeb976 100644
--- a/node_modules/cordova-common/src/FileUpdater.js
+++ b/node_modules/cordova-common/src/FileUpdater.js
@@ -17,12 +17,12 @@
under the License.
*/
-"use strict";
+'use strict';
-var fs = require("fs");
-var path = require("path");
-var shell = require("shelljs");
-var minimatch = require("minimatch");
+var fs = require('fs');
+var path = require('path');
+var shell = require('shelljs');
+var minimatch = require('minimatch');
/**
* Logging callback used in the FileUpdater methods.
@@ -55,27 +55,27 @@ var minimatch = require("minimatch");
* @return {boolean} true if any changes were made, or false if the force flag is not set
* and everything was up to date
*/
-function updatePathWithStats(sourcePath, sourceStats, targetPath, targetStats, options, log) {
+function updatePathWithStats (sourcePath, sourceStats, targetPath, targetStats, options, log) {
var updated = false;
- var rootDir = (options && options.rootDir) || "";
+ var rootDir = (options && options.rootDir) || '';
var copyAll = (options && options.all) || false;
- var targetFullPath = path.join(rootDir || "", targetPath);
+ var targetFullPath = path.join(rootDir || '', targetPath);
if (sourceStats) {
- var sourceFullPath = path.join(rootDir || "", sourcePath);
+ var sourceFullPath = path.join(rootDir || '', sourcePath);
if (targetStats) {
// The target exists. But if the directory status doesn't match the source, delete it.
if (targetStats.isDirectory() && !sourceStats.isDirectory()) {
- log("rmdir " + targetPath + " (source is a file)");
- shell.rm("-rf", targetFullPath);
+ log('rmdir ' + targetPath + ' (source is a file)');
+ shell.rm('-rf', targetFullPath);
targetStats = null;
updated = true;
} else if (!targetStats.isDirectory() && sourceStats.isDirectory()) {
- log("delete " + targetPath + " (source is a directory)");
- shell.rm("-f", targetFullPath);
+ log('delete ' + targetPath + ' (source is a directory)');
+ shell.rm('-f', targetFullPath);
targetStats = null;
updated = true;
}
@@ -84,21 +84,21 @@ function updatePathWithStats(sourcePath, sourceStats, targetPath, targetStats, o
if (!targetStats) {
if (sourceStats.isDirectory()) {
// The target directory does not exist, so it should be created.
- log("mkdir " + targetPath);
- shell.mkdir("-p", targetFullPath);
+ log('mkdir ' + targetPath);
+ shell.mkdir('-p', targetFullPath);
updated = true;
} else if (sourceStats.isFile()) {
// The target file does not exist, so it should be copied from the source.
- log("copy " + sourcePath + " " + targetPath + (copyAll ? "" : " (new file)"));
- shell.cp("-f", sourceFullPath, targetFullPath);
+ log('copy ' + sourcePath + ' ' + targetPath + (copyAll ? '' : ' (new file)'));
+ shell.cp('-f', sourceFullPath, targetFullPath);
updated = true;
}
} else if (sourceStats.isFile() && targetStats.isFile()) {
// The source and target paths both exist and are files.
if (copyAll) {
// The caller specified all files should be copied.
- log("copy " + sourcePath + " " + targetPath);
- shell.cp("-f", sourceFullPath, targetFullPath);
+ log('copy ' + sourcePath + ' ' + targetPath);
+ shell.cp('-f', sourceFullPath, targetFullPath);
updated = true;
} else {
// Copy if the source has been modified since it was copied to the target, or if
@@ -107,8 +107,8 @@ function updatePathWithStats(sourcePath, sourceStats, targetPath, targetStats, o
// for timestamps lacking sub-second precision in some filesystems.
if (sourceStats.mtime.getTime() >= targetStats.mtime.getTime() ||
sourceStats.size !== targetStats.size) {
- log("copy " + sourcePath + " " + targetPath + " (updated file)");
- shell.cp("-f", sourceFullPath, targetFullPath);
+ log('copy ' + sourcePath + ' ' + targetPath + ' (updated file)');
+ shell.cp('-f', sourceFullPath, targetFullPath);
updated = true;
}
}
@@ -116,11 +116,11 @@ function updatePathWithStats(sourcePath, sourceStats, targetPath, targetStats, o
} else if (targetStats) {
// The target exists but the source is null, so the target should be deleted.
if (targetStats.isDirectory()) {
- log("rmdir " + targetPath + (copyAll ? "" : " (no source)"));
- shell.rm("-rf", targetFullPath);
+ log('rmdir ' + targetPath + (copyAll ? '' : ' (no source)'));
+ shell.rm('-rf', targetFullPath);
} else {
- log("delete " + targetPath + (copyAll ? "" : " (no source)"));
- shell.rm("-f", targetFullPath);
+ log('delete ' + targetPath + (copyAll ? '' : ' (no source)'));
+ shell.rm('-f', targetFullPath);
}
updated = true;
}
@@ -132,8 +132,8 @@ function updatePathWithStats(sourcePath, sourceStats, targetPath, targetStats, o
* Helper for updatePath and updatePaths functions. Queries stats for source and target
* and ensures target directory exists before copying a file.
*/
-function updatePathInternal(sourcePath, targetPath, options, log) {
- var rootDir = (options && options.rootDir) || "";
+function updatePathInternal (sourcePath, targetPath, options, log) {
+ var rootDir = (options && options.rootDir) || '';
var targetFullPath = path.join(rootDir, targetPath);
var targetStats = fs.existsSync(targetFullPath) ? fs.statSync(targetFullPath) : null;
var sourceStats = null;
@@ -142,7 +142,7 @@ function updatePathInternal(sourcePath, targetPath, options, log) {
// A non-null source path was specified. It should exist.
var sourceFullPath = path.join(rootDir, sourcePath);
if (!fs.existsSync(sourceFullPath)) {
- throw new Error("Source path does not exist: " + sourcePath);
+ throw new Error('Source path does not exist: ' + sourcePath);
}
sourceStats = fs.statSync(sourceFullPath);
@@ -150,7 +150,7 @@ function updatePathInternal(sourcePath, targetPath, options, log) {
// Create the target's parent directory if it doesn't exist.
var parentDir = path.dirname(targetFullPath);
if (!fs.existsSync(parentDir)) {
- shell.mkdir("-p", parentDir);
+ shell.mkdir('-p', parentDir);
}
}
@@ -177,16 +177,16 @@ function updatePathInternal(sourcePath, targetPath, options, log) {
* @return {boolean} true if any changes were made, or false if the force flag is not set
* and everything was up to date
*/
-function updatePath(sourcePath, targetPath, options, log) {
- if (sourcePath !== null && typeof sourcePath !== "string") {
- throw new Error("A source path (or null) is required.");
+function updatePath (sourcePath, targetPath, options, log) {
+ if (sourcePath !== null && typeof sourcePath !== 'string') {
+ throw new Error('A source path (or null) is required.');
}
- if (!targetPath || typeof targetPath !== "string") {
- throw new Error("A target path is required.");
+ if (!targetPath || typeof targetPath !== 'string') {
+ throw new Error('A target path is required.');
}
- log = log || function(message) { };
+ log = log || function (message) { };
return updatePathInternal(sourcePath, targetPath, options, log);
}
@@ -208,12 +208,12 @@ function updatePath(sourcePath, targetPath, options, log) {
* @return {boolean} true if any changes were made, or false if the force flag is not set
* and everything was up to date
*/
-function updatePaths(pathMap, options, log) {
- if (!pathMap || typeof pathMap !== "object" || Array.isArray(pathMap)) {
- throw new Error("An object mapping from target paths to source paths is required.");
+function updatePaths (pathMap, options, log) {
+ if (!pathMap || typeof pathMap !== 'object' || Array.isArray(pathMap)) {
+ throw new Error('An object mapping from target paths to source paths is required.');
}
- log = log || function(message) { };
+ log = log || function (message) { };
var updated = false;
@@ -255,44 +255,44 @@ function updatePaths(pathMap, options, log) {
* @return {boolean} true if any changes were made, or false if the force flag is not set
* and everything was up to date
*/
-function mergeAndUpdateDir(sourceDirs, targetDir, options, log) {
- if (sourceDirs && typeof sourceDirs === "string") {
+function mergeAndUpdateDir (sourceDirs, targetDir, options, log) {
+ if (sourceDirs && typeof sourceDirs === 'string') {
sourceDirs = [ sourceDirs ];
} else if (!Array.isArray(sourceDirs)) {
- throw new Error("A source directory path or array of paths is required.");
+ throw new Error('A source directory path or array of paths is required.');
}
- if (!targetDir || typeof targetDir !== "string") {
- throw new Error("A target directory path is required.");
+ if (!targetDir || typeof targetDir !== 'string') {
+ throw new Error('A target directory path is required.');
}
- log = log || function(message) { };
+ log = log || function (message) { };
- var rootDir = (options && options.rootDir) || "";
+ var rootDir = (options && options.rootDir) || '';
- var include = (options && options.include) || [ "**" ];
- if (typeof include === "string") {
+ var include = (options && options.include) || [ '**' ];
+ if (typeof include === 'string') {
include = [ include ];
} else if (!Array.isArray(include)) {
- throw new Error("Include parameter must be a glob string or array of glob strings.");
+ throw new Error('Include parameter must be a glob string or array of glob strings.');
}
var exclude = (options && options.exclude) || [];
- if (typeof exclude === "string") {
+ if (typeof exclude === 'string') {
exclude = [ exclude ];
} else if (!Array.isArray(exclude)) {
- throw new Error("Exclude parameter must be a glob string or array of glob strings.");
+ throw new Error('Exclude parameter must be a glob string or array of glob strings.');
}
// Scan the files in each of the source directories.
var sourceMaps = sourceDirs.map(function (sourceDir) {
- return path.join(rootDir, sourceDir);
- }).map(function (sourcePath) {
- if (!fs.existsSync(sourcePath)) {
- throw new Error("Source directory does not exist: " + sourcePath);
- }
- return mapDirectory(rootDir, path.relative(rootDir, sourcePath), include, exclude);
- });
+ return path.join(rootDir, sourceDir);
+ }).map(function (sourcePath) {
+ if (!fs.existsSync(sourcePath)) {
+ throw new Error('Source directory does not exist: ' + sourcePath);
+ }
+ return mapDirectory(rootDir, path.relative(rootDir, sourcePath), include, exclude);
+ });
// Scan the files in the target directory, if it exists.
var targetMap = {};
@@ -323,18 +323,18 @@ function mergeAndUpdateDir(sourceDirs, targetDir, options, log) {
/**
* Creates a dictionary map of all files and directories under a path.
*/
-function mapDirectory(rootDir, subDir, include, exclude) {
- var dirMap = { "": { subDir: subDir, stats: fs.statSync(path.join(rootDir, subDir)) } };
- mapSubdirectory(rootDir, subDir, "", include, exclude, dirMap);
+function mapDirectory (rootDir, subDir, include, exclude) {
+ var dirMap = { '': { subDir: subDir, stats: fs.statSync(path.join(rootDir, subDir)) } };
+ mapSubdirectory(rootDir, subDir, '', include, exclude, dirMap);
return dirMap;
- function mapSubdirectory(rootDir, subDir, relativeDir, include, exclude, dirMap) {
+ function mapSubdirectory (rootDir, subDir, relativeDir, include, exclude, dirMap) {
var itemMapped = false;
var items = fs.readdirSync(path.join(rootDir, subDir, relativeDir));
- items.forEach(function(item) {
+ items.forEach(function (item) {
var relativePath = path.join(relativeDir, item);
- if(!matchGlobArray(relativePath, exclude)) {
+ if (!matchGlobArray(relativePath, exclude)) {
// Stats obtained here (required at least to know where to recurse in directories)
// are saved for later, where the modified times may also be used. This minimizes
// the number of file I/O operations performed.
@@ -361,9 +361,9 @@ function mapDirectory(rootDir, subDir, include, exclude) {
return itemMapped;
}
- function matchGlobArray(path, globs) {
- return globs.some(function(elem) {
- return minimatch(path, elem, {dot:true});
+ function matchGlobArray (path, globs) {
+ return globs.some(function (elem) {
+ return minimatch(path, elem, {dot: true});
});
}
}
@@ -372,13 +372,13 @@ function mapDirectory(rootDir, subDir, include, exclude) {
* Merges together multiple source maps and a target map into a single mapping from
* relative paths to objects with target and source paths and stats.
*/
-function mergePathMaps(sourceMaps, targetMap, targetDir) {
+function mergePathMaps (sourceMaps, targetMap, targetDir) {
// Merge multiple source maps together, along with target path info.
// Entries in later source maps override those in earlier source maps.
// Target stats will be filled in below for targets that exist.
var pathMap = {};
sourceMaps.forEach(function (sourceMap) {
- Object.keys(sourceMap).forEach(function(sourceSubPath){
+ Object.keys(sourceMap).forEach(function (sourceSubPath) {
var sourceEntry = sourceMap[sourceSubPath];
pathMap[sourceSubPath] = {
targetPath: path.join(targetDir, sourceSubPath),
@@ -391,7 +391,7 @@ function mergePathMaps(sourceMaps, targetMap, targetDir) {
// Fill in target stats for targets that exist, and create entries
// for targets that don't have any corresponding sources.
- Object.keys(targetMap).forEach(function(subPath){
+ Object.keys(targetMap).forEach(function (subPath) {
var entry = pathMap[subPath];
if (entry) {
entry.targetStats = targetMap[subPath].stats;
@@ -413,4 +413,3 @@ module.exports = {
updatePaths: updatePaths,
mergeAndUpdateDir: mergeAndUpdateDir
};
-
diff --git a/node_modules/cordova-common/src/PlatformJson.js b/node_modules/cordova-common/src/PlatformJson.js
index ab94b5fd..7eaf1a2c 100644
--- a/node_modules/cordova-common/src/PlatformJson.js
+++ b/node_modules/cordova-common/src/PlatformJson.js
@@ -13,7 +13,6 @@
* under the License.
*
*/
-/* jshint sub:true */
var fs = require('fs');
var path = require('path');
@@ -22,13 +21,13 @@ var mungeutil = require('./ConfigChanges/munge-util');
var pluginMappernto = require('cordova-registry-mapper').newToOld;
var pluginMapperotn = require('cordova-registry-mapper').oldToNew;
-function PlatformJson(filePath, platform, root) {
+function PlatformJson (filePath, platform, root) {
this.filePath = filePath;
this.platform = platform;
this.root = fix_munge(root || {});
}
-PlatformJson.load = function(plugins_dir, platform) {
+PlatformJson.load = function (plugins_dir, platform) {
var filePath = path.join(plugins_dir, platform + '.json');
var root = null;
if (fs.existsSync(filePath)) {
@@ -37,9 +36,9 @@ PlatformJson.load = function(plugins_dir, platform) {
return new PlatformJson(filePath, platform, root);
};
-PlatformJson.prototype.save = function() {
+PlatformJson.prototype.save = function () {
shelljs.mkdir('-p', path.dirname(this.filePath));
- fs.writeFileSync(this.filePath, JSON.stringify(this.root, null, 4), 'utf-8');
+ fs.writeFileSync(this.filePath, JSON.stringify(this.root, null, 2), 'utf-8');
};
/**
@@ -49,7 +48,7 @@ PlatformJson.prototype.save = function() {
* @param {String} pluginId A plugin id to check for.
* @return {Boolean} true if plugin installed as top-level, otherwise false.
*/
-PlatformJson.prototype.isPluginTopLevel = function(pluginId) {
+PlatformJson.prototype.isPluginTopLevel = function (pluginId) {
var installedPlugins = this.root.installed_plugins;
return installedPlugins[pluginId] ||
installedPlugins[pluginMappernto[pluginId]] ||
@@ -63,7 +62,7 @@ PlatformJson.prototype.isPluginTopLevel = function(pluginId) {
* @param {String} pluginId A plugin id to check for.
* @return {Boolean} true if plugin installed as a dependency, otherwise false.
*/
-PlatformJson.prototype.isPluginDependent = function(pluginId) {
+PlatformJson.prototype.isPluginDependent = function (pluginId) {
var dependentPlugins = this.root.dependent_plugins;
return dependentPlugins[pluginId] ||
dependentPlugins[pluginMappernto[pluginId]] ||
@@ -76,12 +75,12 @@ PlatformJson.prototype.isPluginDependent = function(pluginId) {
* @param {String} pluginId A plugin id to check for.
* @return {Boolean} true if plugin installed, otherwise false.
*/
-PlatformJson.prototype.isPluginInstalled = function(pluginId) {
+PlatformJson.prototype.isPluginInstalled = function (pluginId) {
return this.isPluginTopLevel(pluginId) ||
this.isPluginDependent(pluginId);
};
-PlatformJson.prototype.addPlugin = function(pluginId, variables, isTopLevel) {
+PlatformJson.prototype.addPlugin = function (pluginId, variables, isTopLevel) {
var pluginsList = isTopLevel ?
this.root.installed_plugins :
this.root.dependent_plugins;
@@ -107,13 +106,13 @@ PlatformJson.prototype.addPluginMetadata = function (pluginInfo) {
});
var modulesToInstall = pluginInfo.getJsModules(this.platform)
- .map(function (module) {
- return new ModuleMetadata(pluginInfo.id, module);
- })
- .filter(function (metadata) {
- // Filter out modules which are already added to metadata
- return installedPaths.indexOf(metadata.file) === -1;
- });
+ .map(function (module) {
+ return new ModuleMetadata(pluginInfo.id, module);
+ })
+ .filter(function (metadata) {
+ // Filter out modules which are already added to metadata
+ return installedPaths.indexOf(metadata.file) === -1;
+ });
this.root.modules = installedModules.concat(modulesToInstall);
@@ -123,7 +122,7 @@ PlatformJson.prototype.addPluginMetadata = function (pluginInfo) {
return this;
};
-PlatformJson.prototype.removePlugin = function(pluginId, isTopLevel) {
+PlatformJson.prototype.removePlugin = function (pluginId, isTopLevel) {
var pluginsList = isTopLevel ?
this.root.installed_plugins :
this.root.dependent_plugins;
@@ -144,16 +143,16 @@ PlatformJson.prototype.removePlugin = function(pluginId, isTopLevel) {
*/
PlatformJson.prototype.removePluginMetadata = function (pluginInfo) {
var modulesToRemove = pluginInfo.getJsModules(this.platform)
- .map(function (jsModule) {
- return ['plugins', pluginInfo.id, jsModule.src].join('/');
- });
+ .map(function (jsModule) {
+ return ['plugins', pluginInfo.id, jsModule.src].join('/');
+ });
var installedModules = this.root.modules || [];
this.root.modules = installedModules
- .filter(function (installedModule) {
- // Leave only those metadatas which 'file' is not in removed modules
- return (modulesToRemove.indexOf(installedModule.file) === -1);
- });
+ .filter(function (installedModule) {
+ // Leave only those metadatas which 'file' is not in removed modules
+ return (modulesToRemove.indexOf(installedModule.file) === -1);
+ });
if (this.root.plugin_metadata) {
delete this.root.plugin_metadata[pluginInfo.id];
@@ -162,12 +161,12 @@ PlatformJson.prototype.removePluginMetadata = function (pluginInfo) {
return this;
};
-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.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) {
- this.root.prepare_queue.uninstalled.push({'plugin':pluginId, 'id':pluginId, 'topLevel':is_top_level});
+PlatformJson.prototype.addUninstalledPluginToPrepareQueue = function (pluginId, is_top_level) {
+ this.root.prepare_queue.uninstalled.push({'plugin': pluginId, 'id': pluginId, 'topLevel': is_top_level});
};
/**
@@ -177,7 +176,7 @@ PlatformJson.prototype.addUninstalledPluginToPrepareQueue = function(pluginId, i
* @param {String} pluginId A plugin id to make top-level.
* @return {PlatformJson} PlatformJson instance.
*/
-PlatformJson.prototype.makeTopLevel = function(pluginId) {
+PlatformJson.prototype.makeTopLevel = function (pluginId) {
var plugin = this.root.dependent_plugins[pluginId];
if (plugin) {
delete this.root.dependent_plugins[pluginId];
@@ -195,10 +194,10 @@ PlatformJson.prototype.makeTopLevel = function(pluginId) {
PlatformJson.prototype.generateMetadata = function () {
return [
'cordova.define(\'cordova/plugin_list\', function(require, exports, module) {',
- 'module.exports = ' + JSON.stringify(this.root.modules, null, 4) + ';',
+ 'module.exports = ' + JSON.stringify(this.root.modules, null, 2) + ';',
'module.exports.metadata = ',
'// TOP OF METADATA',
- JSON.stringify(this.root.plugin_metadata, null, 4) + ';',
+ JSON.stringify(this.root.plugin_metadata, null, 2) + ';',
'// BOTTOM OF METADATA',
'});' // Close cordova.define.
].join('\n');
@@ -220,8 +219,8 @@ PlatformJson.prototype.generateAndSaveMetadata = function (destination) {
};
// convert a munge from the old format ([file][parent][xml] = count) to the current one
-function fix_munge(root) {
- root.prepare_queue = root.prepare_queue || {installed:[], uninstalled:[]};
+function fix_munge (root) {
+ root.prepare_queue = root.prepare_queue || {installed: [], uninstalled: []};
root.config_munge = root.config_munge || {files: {}};
root.installed_plugins = root.installed_plugins || {};
root.dependent_plugins = root.dependent_plugins || {};
@@ -260,15 +259,15 @@ function ModuleMetadata (pluginId, jsModule) {
if (!pluginId) throw new TypeError('pluginId argument must be a valid plugin id');
if (!jsModule.src && !jsModule.name) throw new TypeError('jsModule argument must contain src or/and name properties');
- this.id = pluginId + '.' + ( jsModule.name || jsModule.src.match(/([^\/]+)\.js/)[1] );
+ this.id = pluginId + '.' + (jsModule.name || jsModule.src.match(/([^\/]+)\.js/)[1]); /* eslint no-useless-escape: 0 */
this.file = ['plugins', pluginId, jsModule.src].join('/');
this.pluginId = pluginId;
if (jsModule.clobbers && jsModule.clobbers.length > 0) {
- this.clobbers = jsModule.clobbers.map(function(o) { return o.target; });
+ this.clobbers = jsModule.clobbers.map(function (o) { return o.target; });
}
if (jsModule.merges && jsModule.merges.length > 0) {
- this.merges = jsModule.merges.map(function(o) { return o.target; });
+ this.merges = jsModule.merges.map(function (o) { return o.target; });
}
if (jsModule.runs) {
this.runs = true;
diff --git a/node_modules/cordova-common/src/PluginInfo/PluginInfo.js b/node_modules/cordova-common/src/PluginInfo/PluginInfo.js
index 48174707..4d77cbc7 100644
--- a/node_modules/cordova-common/src/PluginInfo/PluginInfo.js
+++ b/node_modules/cordova-common/src/PluginInfo/PluginInfo.js
@@ -17,8 +17,6 @@
under the License.
*/
-/* jshint sub:true, laxcomma:true, laxbreak:true */
-
/*
A class for holidng the information currently stored in plugin.xml
It should also be able to answer questions like whether the plugin
@@ -27,14 +25,12 @@ is compatible with a given engine version.
TODO (kamrik): refactor this to not use sync functions and return promises.
*/
+var path = require('path');
+var fs = require('fs');
+var xml_helpers = require('../util/xml-helpers');
+var CordovaError = require('../CordovaError/CordovaError');
-var path = require('path')
- , fs = require('fs')
- , xml_helpers = require('../util/xml-helpers')
- , CordovaError = require('../CordovaError/CordovaError')
- ;
-
-function PluginInfo(dirname) {
+function PluginInfo (dirname) {
var self = this;
// METHODS
@@ -45,15 +41,15 @@ function PluginInfo(dirname) {
// Used to require a variable to be specified via --variable when installing the plugin.
// returns { key : default | null}
self.getPreferences = getPreferences;
- function getPreferences(platform) {
+ function getPreferences (platform) {
return _getTags(self._et, 'preference', platform, _parsePreference)
- .reduce(function (preferences, pref) {
- preferences[pref.preference] = pref.default;
- return preferences;
- }, {});
+ .reduce(function (preferences, pref) {
+ preferences[pref.preference] = pref.default;
+ return preferences;
+ }, {});
}
- function _parsePreference(prefTag) {
+ function _parsePreference (prefTag) {
var name = prefTag.attrib.name.toUpperCase();
var def = prefTag.attrib.default || null;
return {preference: name, default: def};
@@ -61,16 +57,16 @@ function PluginInfo(dirname) {
//
self.getAssets = getAssets;
- function getAssets(platform) {
+ function getAssets (platform) {
var assets = _getTags(self._et, 'asset', platform, _parseAsset);
return assets;
}
- function _parseAsset(tag) {
+ function _parseAsset (tag) {
var src = tag.attrib.src;
var target = tag.attrib.target;
- if ( !src || !target) {
+ if (!src || !target) {
var msg =
'Malformed tag. Both "src" and "target" attributes'
+ 'must be specified in\n'
@@ -87,7 +83,6 @@ function PluginInfo(dirname) {
return asset;
}
-
//
// Example:
//
self.getDependencies = getDependencies;
- function getDependencies(platform) {
+ function getDependencies (platform) {
var deps = _getTags(
- self._et,
- 'dependency',
- platform,
- _parseDependency
+ self._et,
+ 'dependency',
+ platform,
+ _parseDependency
);
return deps;
}
- function _parseDependency(tag) {
+ function _parseDependency (tag) {
var dep =
- { id : tag.attrib.id
- , version: tag.attrib.version || ''
- , url : tag.attrib.url || ''
- , subdir : tag.attrib.subdir || ''
- , commit : tag.attrib.commit
+ { id: tag.attrib.id,
+ version: tag.attrib.version || '',
+ url: tag.attrib.url || '',
+ subdir: tag.attrib.subdir || '',
+ commit: tag.attrib.commit
};
dep.git_ref = dep.commit;
- if ( !dep.id ) {
+ if (!dep.id) {
var msg =
' tag is missing id attribute in '
+ self.filepath
@@ -126,52 +121,51 @@ function PluginInfo(dirname) {
return dep;
}
-
// tag
self.getConfigFiles = getConfigFiles;
- function getConfigFiles(platform) {
+ function getConfigFiles (platform) {
var configFiles = _getTags(self._et, 'config-file', platform, _parseConfigFile);
return configFiles;
}
- function _parseConfigFile(tag) {
+ function _parseConfigFile (tag) {
var configFile =
- { target : tag.attrib['target']
- , parent : tag.attrib['parent']
- , after : tag.attrib['after']
- , xmls : tag.getchildren()
- // To support demuxing via versions
- , versions : tag.attrib['versions']
- , deviceTarget: tag.attrib['device-target']
+ { target: tag.attrib['target'],
+ parent: tag.attrib['parent'],
+ after: tag.attrib['after'],
+ xmls: tag.getchildren(),
+ // To support demuxing via versions
+ versions: tag.attrib['versions'],
+ deviceTarget: tag.attrib['device-target']
};
return configFile;
}
self.getEditConfigs = getEditConfigs;
- function getEditConfigs(platform) {
+ function getEditConfigs (platform) {
var editConfigs = _getTags(self._et, 'edit-config', platform, _parseEditConfigs);
return editConfigs;
}
- function _parseEditConfigs(tag) {
+ function _parseEditConfigs (tag) {
var editConfig =
- { file : tag.attrib['file']
- , target : tag.attrib['target']
- , mode : tag.attrib['mode']
- , xmls : tag.getchildren()
- };
+ { file: tag.attrib['file'],
+ target: tag.attrib['target'],
+ mode: tag.attrib['mode'],
+ xmls: tag.getchildren()
+ };
return editConfig;
}
// tags, both global and within a
// TODO (kamrik): Do we ever use under ? Example wanted.
self.getInfo = getInfo;
- function getInfo(platform) {
+ function getInfo (platform) {
var infos = _getTags(
- self._et,
- 'info',
- platform,
- function(elem) { return elem.text; }
+ self._et,
+ 'info',
+ platform,
+ function (elem) { return elem.text; }
);
// Filter out any undefined or empty strings.
infos = infos.filter(Boolean);
@@ -183,12 +177,12 @@ function PluginInfo(dirname) {
//
//
self.getSourceFiles = getSourceFiles;
- function getSourceFiles(platform) {
+ function getSourceFiles (platform) {
var sourceFiles = _getTagsInPlatform(self._et, 'source-file', platform, _parseSourceFile);
return sourceFiles;
}
- function _parseSourceFile(tag) {
+ function _parseSourceFile (tag) {
return {
itemType: 'source-file',
src: tag.attrib.src,
@@ -203,8 +197,8 @@ function PluginInfo(dirname) {
// Example:
//
self.getHeaderFiles = getHeaderFiles;
- function getHeaderFiles(platform) {
- var headerFiles = _getTagsInPlatform(self._et, 'header-file', platform, function(tag) {
+ function getHeaderFiles (platform) {
+ var headerFiles = _getTagsInPlatform(self._et, 'header-file', platform, function (tag) {
return {
itemType: 'header-file',
src: tag.attrib.src,
@@ -218,8 +212,8 @@ function PluginInfo(dirname) {
// Example:
//
self.getResourceFiles = getResourceFiles;
- function getResourceFiles(platform) {
- var resourceFiles = _getTagsInPlatform(self._et, 'resource-file', platform, function(tag) {
+ function getResourceFiles (platform) {
+ var resourceFiles = _getTagsInPlatform(self._et, 'resource-file', platform, function (tag) {
return {
itemType: 'resource-file',
src: tag.attrib.src,
@@ -237,8 +231,8 @@ function PluginInfo(dirname) {
// Example:
//
self.getLibFiles = getLibFiles;
- function getLibFiles(platform) {
- var libFiles = _getTagsInPlatform(self._et, 'lib-file', platform, function(tag) {
+ function getLibFiles (platform) {
+ var libFiles = _getTagsInPlatform(self._et, 'lib-file', platform, function (tag) {
return {
itemType: 'lib-file',
src: tag.attrib.src,
@@ -255,16 +249,16 @@ function PluginInfo(dirname) {
// Example:
//
self.getHookScripts = getHookScripts;
- function getHookScripts(hook, platforms) {
- var scriptElements = self._et.findall('./hook');
+ function getHookScripts (hook, platforms) {
+ var scriptElements = self._et.findall('./hook');
- if(platforms) {
+ if (platforms) {
platforms.forEach(function (platform) {
scriptElements = scriptElements.concat(self._et.findall('./platform[@name="' + platform + '"]/hook'));
});
}
- function filterScriptByHookType(el) {
+ function filterScriptByHookType (el) {
return el.attrib.src && el.attrib.type && el.attrib.type.toLowerCase() === hook;
}
@@ -272,26 +266,26 @@ function PluginInfo(dirname) {
}
self.getJsModules = getJsModules;
- function getJsModules(platform) {
+ function getJsModules (platform) {
var modules = _getTags(self._et, 'js-module', platform, _parseJsModule);
return modules;
}
- function _parseJsModule(tag) {
+ function _parseJsModule (tag) {
var ret = {
itemType: 'js-module',
name: tag.attrib.name,
src: tag.attrib.src,
- clobbers: tag.findall('clobbers').map(function(tag) { return { target: tag.attrib.target }; }),
- merges: tag.findall('merges').map(function(tag) { return { target: tag.attrib.target }; }),
+ clobbers: tag.findall('clobbers').map(function (tag) { return { target: tag.attrib.target }; }),
+ merges: tag.findall('merges').map(function (tag) { return { target: tag.attrib.target }; }),
runs: tag.findall('runs').length > 0
};
return ret;
}
- self.getEngines = function() {
- return self._et.findall('engines/engine').map(function(n) {
+ self.getEngines = function () {
+ return self._et.findall('engines/engine').map(function (n) {
return {
name: n.attrib.name,
version: n.attrib.version,
@@ -301,26 +295,40 @@ function PluginInfo(dirname) {
});
};
- self.getPlatforms = function() {
- return self._et.findall('platform').map(function(n) {
+ self.getPlatforms = function () {
+ return self._et.findall('platform').map(function (n) {
return { name: n.attrib.name };
});
};
- self.getPlatformsArray = function() {
- return self._et.findall('platform').map(function(n) {
+ self.getPlatformsArray = function () {
+ return self._et.findall('platform').map(function (n) {
return n.attrib.name;
});
};
- self.getFrameworks = function(platform) {
- return _getTags(self._et, 'framework', platform, function(el) {
+
+ self.getFrameworks = function (platform, options) {
+ return _getTags(self._et, 'framework', platform, function (el) {
+ var src = el.attrib.src;
+ if (options) {
+ var vars = options.cli_variables || {};
+ var regExp;
+ // Iterate over plugin variables.
+ // Replace them in framework src if they exist
+ Object.keys(vars).forEach(function (name) {
+ if (vars[name]) {
+ regExp = new RegExp('\\$' + name, 'g');
+ src = src.replace(regExp, vars[name]);
+ }
+ });
+ }
var ret = {
itemType: 'framework',
type: el.attrib.type,
parent: el.attrib.parent,
custom: isStrTrue(el.attrib.custom),
embed: isStrTrue(el.attrib.embed),
- src: el.attrib.src,
+ src: src,
spec: el.attrib.spec,
weak: isStrTrue(el.attrib.weak),
versions: el.attrib.versions,
@@ -334,22 +342,21 @@ function PluginInfo(dirname) {
};
self.getFilesAndFrameworks = getFilesAndFrameworks;
- function getFilesAndFrameworks(platform) {
+ function getFilesAndFrameworks (platform, options) {
// Please avoid changing the order of the calls below, files will be
// installed in this order.
var items = [].concat(
self.getSourceFiles(platform),
self.getHeaderFiles(platform),
self.getResourceFiles(platform),
- self.getFrameworks(platform),
+ self.getFrameworks(platform, options),
self.getLibFiles(platform)
);
return items;
}
- ///// End of PluginInfo methods /////
+ /// // End of PluginInfo methods /////
-
- ///// PluginInfo Constructor logic /////
+ /// // PluginInfo Constructor logic /////
self.filepath = path.join(dirname, 'plugin.xml');
if (!fs.existsSync(self.filepath)) {
throw new CordovaError('Cannot find plugin.xml for plugin "' + path.basename(dirname) + '". Please try adding it again.');
@@ -370,18 +377,18 @@ function PluginInfo(dirname) {
self.keywords = pelem.findtext('keywords');
self.info = pelem.findtext('info');
if (self.keywords) {
- self.keywords = self.keywords.split(',').map( function(s) { return s.trim(); } );
+ self.keywords = self.keywords.split(',').map(function (s) { return s.trim(); });
}
self.getKeywordsAndPlatforms = function () {
var ret = self.keywords || [];
return ret.concat('ecosystem:cordova').concat(addCordova(self.getPlatformsArray()));
};
-} // End of PluginInfo constructor.
+} // End of PluginInfo constructor.
// Helper function used to prefix every element of an array with cordova-
// Useful when we want to modify platforms to be cordova-platform
-function addCordova(someArray) {
- var newArray = someArray.map(function(element) {
+function addCordova (someArray) {
+ var newArray = someArray.map(function (element) {
return 'cordova-' + element;
});
return newArray;
@@ -391,37 +398,37 @@ function addCordova(someArray) {
// Get all elements of a given name. Both in root and in platform sections
// for the given platform. If transform is given and is a function, it is
// applied to each element.
-function _getTags(pelem, tag, platform, transform) {
+function _getTags (pelem, tag, platform, transform) {
var platformTag = pelem.find('./platform[@name="' + platform + '"]');
var tagsInRoot = pelem.findall(tag);
tagsInRoot = tagsInRoot || [];
var tagsInPlatform = platformTag ? platformTag.findall(tag) : [];
var tags = tagsInRoot.concat(tagsInPlatform);
- if ( typeof transform === 'function' ) {
+ if (typeof transform === 'function') {
tags = tags.map(transform);
}
return tags;
}
// Same as _getTags() but only looks inside a platform section.
-function _getTagsInPlatform(pelem, tag, platform, transform) {
+function _getTagsInPlatform (pelem, tag, platform, transform) {
var platformTag = pelem.find('./platform[@name="' + platform + '"]');
var tags = platformTag ? platformTag.findall(tag) : [];
- if ( typeof transform === 'function' ) {
+ if (typeof transform === 'function') {
tags = tags.map(transform);
}
return tags;
}
// Check if x is a string 'true'.
-function isStrTrue(x) {
- return String(x).toLowerCase() == 'true';
+function isStrTrue (x) {
+ return String(x).toLowerCase() === 'true';
}
module.exports = PluginInfo;
// Backwards compat:
PluginInfo.PluginInfo = PluginInfo;
-PluginInfo.loadPluginsDir = function(dir) {
+PluginInfo.loadPluginsDir = function (dir) {
var PluginInfoProvider = require('./PluginInfoProvider');
return new PluginInfoProvider().getAllWithinSearchPath(dir);
};
diff --git a/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js b/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js
index 62401191..5d3f329e 100644
--- a/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js
+++ b/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js
@@ -24,12 +24,12 @@ var path = require('path');
var PluginInfo = require('./PluginInfo');
var events = require('../events');
-function PluginInfoProvider() {
+function PluginInfoProvider () {
this._cache = {};
this._getAllCache = {};
}
-PluginInfoProvider.prototype.get = function(dirName) {
+PluginInfoProvider.prototype.get = function (dirName) {
var absPath = path.resolve(dirName);
if (!this._cache[absPath]) {
this._cache[absPath] = new PluginInfo(dirName);
@@ -39,7 +39,7 @@ PluginInfoProvider.prototype.get = function(dirName) {
// Normally you don't need to put() entries, but it's used
// when copying plugins, and in unit tests.
-PluginInfoProvider.prototype.put = function(pluginInfo) {
+PluginInfoProvider.prototype.put = function (pluginInfo) {
var absPath = path.resolve(pluginInfo.dir);
this._cache[absPath] = pluginInfo;
};
@@ -48,7 +48,7 @@ PluginInfoProvider.prototype.put = function(pluginInfo) {
// Given a dir containing multiple plugins, create a PluginInfo object for
// each of them and return as array.
// Should load them all in parallel and return a promise, but not yet.
-PluginInfoProvider.prototype.getAllWithinSearchPath = function(dirName) {
+PluginInfoProvider.prototype.getAllWithinSearchPath = function (dirName) {
var absPath = path.resolve(dirName);
if (!this._getAllCache[absPath]) {
this._getAllCache[absPath] = getAllHelper(absPath, this);
@@ -56,8 +56,8 @@ PluginInfoProvider.prototype.getAllWithinSearchPath = function(dirName) {
return this._getAllCache[absPath];
};
-function getAllHelper(absPath, provider) {
- if (!fs.existsSync(absPath)){
+function getAllHelper (absPath, provider) {
+ if (!fs.existsSync(absPath)) {
return [];
}
// If dir itself is a plugin, return it in an array with one element.
@@ -66,7 +66,7 @@ function getAllHelper(absPath, provider) {
}
var subdirs = fs.readdirSync(absPath);
var plugins = [];
- subdirs.forEach(function(subdir) {
+ subdirs.forEach(function (subdir) {
var d = path.join(absPath, subdir);
if (fs.existsSync(path.join(d, 'plugin.xml'))) {
try {
diff --git a/node_modules/cordova-common/src/PluginManager.js b/node_modules/cordova-common/src/PluginManager.js
index e8968f10..0097db45 100644
--- a/node_modules/cordova-common/src/PluginManager.js
+++ b/node_modules/cordova-common/src/PluginManager.js
@@ -36,7 +36,7 @@ var PluginInfoProvider = require('./PluginInfo/PluginInfoProvider');
* @param {Object} locations - Platform files and directories
* @param {IDEProject} ideProject The IDE project to add/remove plugin changes to/from
*/
-function PluginManager(platform, locations, ideProject) {
+function PluginManager (platform, locations, ideProject) {
this.platform = platform;
this.locations = locations;
this.project = ideProject;
@@ -45,7 +45,6 @@ function PluginManager(platform, locations, ideProject) {
this.munger = new PlatformMunger(platform, locations.root, platformJson, new PluginInfoProvider());
}
-
/**
* @constructs PluginManager
* A convenience shortcut to new PluginManager(...)
@@ -55,7 +54,7 @@ function PluginManager(platform, locations, ideProject) {
* @param {IDEProject} ideProject The IDE project to add/remove plugin changes to/from
* @returns new PluginManager instance
*/
-PluginManager.get = function(platform, locations, ideProject) {
+PluginManager.get = function (platform, locations, ideProject) {
return new PluginManager(platform, locations, ideProject);
};
@@ -82,11 +81,9 @@ module.exports = PluginManager;
* @returns {Promise} Returns a Q promise, either resolved in case of success, rejected otherwise.
*/
PluginManager.prototype.doOperation = function (operation, plugin, options) {
- if (operation !== PluginManager.INSTALL && operation !== PluginManager.UNINSTALL)
- return Q.reject(new CordovaError('The parameter is incorrect. The opeation must be either "add" or "remove"'));
+ if (operation !== PluginManager.INSTALL && operation !== PluginManager.UNINSTALL) { return Q.reject(new CordovaError('The parameter is incorrect. The opeation must be either "add" or "remove"')); }
- if (!plugin || plugin.constructor.name !== 'PluginInfo')
- return Q.reject(new CordovaError('The parameter is incorrect. The first parameter should be a PluginInfo instance'));
+ if (!plugin || plugin.constructor.name !== 'PluginInfo') { return Q.reject(new CordovaError('The parameter is incorrect. The first parameter should be a PluginInfo instance')); }
// Set default to empty object to play safe when accesing properties
options = options || {};
@@ -95,52 +92,52 @@ PluginManager.prototype.doOperation = function (operation, plugin, options) {
var actions = new ActionStack();
// gather all files need to be handled during operation ...
- plugin.getFilesAndFrameworks(this.platform)
+ plugin.getFilesAndFrameworks(this.platform, options)
.concat(plugin.getAssets(this.platform))
.concat(plugin.getJsModules(this.platform))
- // ... put them into stack ...
- .forEach(function(item) {
- var installer = self.project.getInstaller(item.itemType);
- var uninstaller = self.project.getUninstaller(item.itemType);
- var actionArgs = [item, plugin, self.project, options];
+ // ... put them into stack ...
+ .forEach(function (item) {
+ var installer = self.project.getInstaller(item.itemType);
+ var uninstaller = self.project.getUninstaller(item.itemType);
+ var actionArgs = [item, plugin, self.project, options];
- var action;
- if (operation === PluginManager.INSTALL) {
- action = actions.createAction.apply(actions, [installer, actionArgs, uninstaller, actionArgs]);
- } else /* op === PluginManager.UNINSTALL */{
- action = actions.createAction.apply(actions, [uninstaller, actionArgs, installer, actionArgs]);
- }
- actions.push(action);
- });
+ var action;
+ if (operation === PluginManager.INSTALL) {
+ action = actions.createAction.apply(actions, [installer, actionArgs, uninstaller, actionArgs]); /* eslint no-useless-call: 0 */
+ } else /* op === PluginManager.UNINSTALL */{
+ action = actions.createAction.apply(actions, [uninstaller, actionArgs, installer, actionArgs]); /* eslint no-useless-call: 0 */
+ }
+ actions.push(action);
+ });
// ... and run through the action stack
return actions.process(this.platform)
- .then(function () {
- if (self.project.write) {
- self.project.write();
- }
+ .then(function () {
+ if (self.project.write) {
+ self.project.write();
+ }
- 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, options.force);
- self.munger.platformJson.addPluginMetadata(plugin);
- } else {
- self.munger.remove_plugin_changes(plugin, /*is_top_level=*/true);
- self.munger.platformJson.removePluginMetadata(plugin);
- }
+ 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, options.force);
+ self.munger.platformJson.addPluginMetadata(plugin);
+ } else {
+ self.munger.remove_plugin_changes(plugin, /* is_top_level= */true);
+ self.munger.platformJson.removePluginMetadata(plugin);
+ }
- // Save everything (munge and plugin/modules metadata)
- self.munger.save_all();
+ // Save everything (munge and plugin/modules metadata)
+ self.munger.save_all();
- var metadata = self.munger.platformJson.generateMetadata();
- fs.writeFileSync(path.join(self.locations.www, 'cordova_plugins.js'), metadata, 'utf-8');
+ var metadata = self.munger.platformJson.generateMetadata();
+ fs.writeFileSync(path.join(self.locations.www, 'cordova_plugins.js'), metadata, 'utf-8');
- // CB-11022 save plugin metadata to both www and platform_www if options.usePlatformWww is specified
- if (options.usePlatformWww) {
- fs.writeFileSync(path.join(self.locations.platformWww, 'cordova_plugins.js'), metadata, 'utf-8');
- }
- });
+ // CB-11022 save plugin metadata to both www and platform_www if options.usePlatformWww is specified
+ if (options.usePlatformWww) {
+ fs.writeFileSync(path.join(self.locations.platformWww, 'cordova_plugins.js'), metadata, 'utf-8');
+ }
+ });
};
PluginManager.prototype.addPlugin = function (plugin, installOptions) {
diff --git a/node_modules/cordova-common/src/events.js b/node_modules/cordova-common/src/events.js
index 30804161..70386430 100644
--- a/node_modules/cordova-common/src/events.js
+++ b/node_modules/cordova-common/src/events.js
@@ -40,8 +40,7 @@ module.exports.forwardEventsTo = function (eventEmitter) {
return;
}
- if (!(eventEmitter instanceof EventEmitter))
- throw new Error('Cordova events can be redirected to another EventEmitter instance only');
+ if (!(eventEmitter instanceof EventEmitter)) { throw new Error('Cordova events can be redirected to another EventEmitter instance only'); }
// CB-10940 Skipping forwarding to self to avoid infinite recursion.
// This is the case when the modules are npm-linked.
diff --git a/node_modules/cordova-common/src/superspawn.js b/node_modules/cordova-common/src/superspawn.js
index 96ec09dc..424934e8 100644
--- a/node_modules/cordova-common/src/superspawn.js
+++ b/node_modules/cordova-common/src/superspawn.js
@@ -24,12 +24,12 @@ var _ = require('underscore');
var Q = require('q');
var shell = require('shelljs');
var events = require('./events');
-var iswin32 = process.platform == 'win32';
+var iswin32 = process.platform === 'win32';
// On Windows, spawn() for batch files requires absolute path & having the extension.
-function resolveWindowsExe(cmd) {
+function resolveWindowsExe (cmd) {
var winExtensions = ['.exe', '.bat', '.cmd', '.js', '.vbs'];
- function isValidExe(c) {
+ function isValidExe (c) {
return winExtensions.indexOf(path.extname(c)) !== -1 && fs.existsSync(c);
}
if (isValidExe(cmd)) {
@@ -37,7 +37,7 @@ function resolveWindowsExe(cmd) {
}
cmd = shell.which(cmd) || cmd;
if (!isValidExe(cmd)) {
- winExtensions.some(function(ext) {
+ winExtensions.some(function (ext) {
if (fs.existsSync(cmd + ext)) {
cmd = cmd + ext;
return true;
@@ -47,7 +47,7 @@ function resolveWindowsExe(cmd) {
return cmd;
}
-function maybeQuote(a) {
+function maybeQuote (a) {
if (/^[^"].*[ &].*[^"]/.test(a)) return '"' + a + '"';
return a;
}
@@ -85,7 +85,7 @@ function maybeQuote(a) {
* 'stderr': ...
* }
*/
-exports.spawn = function(cmd, args, opts) {
+exports.spawn = function (cmd, args, opts) {
args = args || [];
opts = opts || {};
var spawnOpts = {};
@@ -95,7 +95,7 @@ exports.spawn = function(cmd, args, opts) {
cmd = resolveWindowsExe(cmd);
// If we couldn't find the file, likely we'll end up failing,
// but for things like "del", cmd will do the trick.
- if (path.extname(cmd) != '.exe') {
+ if (path.extname(cmd) !== '.exe') {
var cmdArgs = '"' + [cmd].concat(args).map(maybeQuote).join(' ') + '"';
// We need to use /s to ensure that spaces are parsed properly with cmd spawned content
args = [['/s', '/c', cmdArgs].join(' ')];
@@ -137,7 +137,7 @@ exports.spawn = function(cmd, args, opts) {
if (child.stdout) {
child.stdout.setEncoding('utf8');
- child.stdout.on('data', function(data) {
+ child.stdout.on('data', function (data) {
capturedOut += data;
d.notify({'stdout': data});
});
@@ -145,7 +145,7 @@ exports.spawn = function(cmd, args, opts) {
if (child.stderr) {
child.stderr.setEncoding('utf8');
- child.stderr.on('data', function(data) {
+ child.stderr.on('data', function (data) {
capturedErr += data;
d.notify({'stderr': data});
});
@@ -153,10 +153,10 @@ exports.spawn = function(cmd, args, opts) {
child.on('close', whenDone);
child.on('error', whenDone);
- function whenDone(arg) {
+ function whenDone (arg) {
child.removeListener('close', whenDone);
child.removeListener('error', whenDone);
- var code = typeof arg == 'number' ? arg : arg && arg.code;
+ var code = typeof arg === 'number' ? arg : arg && arg.code;
events.emit('verbose', 'Command finished with error code ' + code + ': ' + cmd + ' ' + args);
if (code === 0) {
@@ -181,10 +181,9 @@ exports.spawn = function(cmd, args, opts) {
return d.promise;
};
-exports.maybeSpawn = function(cmd, args, opts) {
+exports.maybeSpawn = function (cmd, args, opts) {
if (fs.existsSync(cmd)) {
return exports.spawn(cmd, args, opts);
}
return Q(null);
};
-
diff --git a/node_modules/cordova-common/src/util/addProperty.js b/node_modules/cordova-common/src/util/addProperty.js
index 7dc4dc11..3e481749 100644
--- a/node_modules/cordova-common/src/util/addProperty.js
+++ b/node_modules/cordova-common/src/util/addProperty.js
@@ -17,8 +17,8 @@
under the License.
*/
-module.exports = function addProperty(module, property, modulePath, obj) {
-
+module.exports = function addProperty (module, property, modulePath, obj) {
+
obj = obj || module.exports;
// Add properties as getter to delay load the modules on first invocation
Object.defineProperty(obj, property, {
diff --git a/node_modules/cordova-common/src/util/plist-helpers.js b/node_modules/cordova-common/src/util/plist-helpers.js
index 38eb31b1..5ec4c1df 100644
--- a/node_modules/cordova-common/src/util/plist-helpers.js
+++ b/node_modules/cordova-common/src/util/plist-helpers.js
@@ -15,32 +15,32 @@
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-*/
+*/
+/* eslint no-useless-escape: 0 */
// contains PLIST utility functions
-var __ = require('underscore');
+var __ = require('underscore');
var plist = require('plist');
// adds node to doc at selector
module.exports.graftPLIST = graftPLIST;
-function graftPLIST(doc, xml, selector) {
- var obj = plist.parse(''+xml+'');
+function graftPLIST (doc, xml, selector) {
+ var obj = plist.parse('' + xml + '');
var node = doc[selector];
- if (node && Array.isArray(node) && Array.isArray(obj)){
+ if (node && Array.isArray(node) && Array.isArray(obj)) {
node = node.concat(obj);
- for (var i =0;i. If we have two dicts we merge them instead of
+ // plist uses objects for . If we have two dicts we merge them instead of
// overriding the old one. See CB-6472
- if (node && __.isObject(node) && __.isObject(obj) && !__.isDate(node) && !__.isDate(obj)){//arrays checked above
- __.extend(obj,node);
+ if (node && __.isObject(node) && __.isObject(obj) && !__.isDate(node) && !__.isDate(obj)) { // arrays checked above
+ __.extend(obj, node);
}
doc[selector] = obj;
}
@@ -50,15 +50,15 @@ function graftPLIST(doc, xml, selector) {
// removes node from doc at selector
module.exports.prunePLIST = prunePLIST;
-function prunePLIST(doc, xml, selector) {
- var obj = plist.parse(''+xml+'');
+function prunePLIST (doc, xml, selector) {
+ var obj = plist.parse('' + xml + '');
pruneOBJECT(doc, selector, obj);
return true;
}
-function pruneOBJECT(doc, selector, fragment) {
+function pruneOBJECT (doc, selector, fragment) {
if (Array.isArray(fragment) && Array.isArray(doc[selector])) {
var empty = true;
for (var i in fragment) {
@@ -66,13 +66,11 @@ function pruneOBJECT(doc, selector, fragment) {
empty = pruneOBJECT(doc[selector], j, fragment[i]) && empty;
}
}
- if (empty)
- {
+ if (empty) {
delete doc[selector];
return true;
}
- }
- else if (nodeEqual(doc[selector], fragment)) {
+ } else if (nodeEqual(doc[selector], fragment)) {
delete doc[selector];
return true;
}
@@ -80,14 +78,11 @@ function pruneOBJECT(doc, selector, fragment) {
return false;
}
-function nodeEqual(node1, node2) {
- if (typeof node1 != typeof node2)
- return false;
- else if (typeof node1 == 'string') {
- node2 = escapeRE(node2).replace(new RegExp('\\$[a-zA-Z0-9-_]+','gm'),'(.*?)');
+function nodeEqual (node1, node2) {
+ if (typeof node1 !== typeof node2) { return false; } else if (typeof node1 === 'string') {
+ node2 = escapeRE(node2).replace(/\\\$\S+/gm, '(.*?)');
return new RegExp('^' + node2 + '$').test(node1);
- }
- else {
+ } else {
for (var key in node2) {
if (!nodeEqual(node1[key], node2[key])) return false;
}
@@ -96,6 +91,6 @@ function nodeEqual(node1, node2) {
}
// escape string for use in regex
-function escapeRE(str) {
- return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '$&');
+function escapeRE (str) {
+ return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
}
diff --git a/node_modules/cordova-common/src/util/xml-helpers.js b/node_modules/cordova-common/src/util/xml-helpers.js
index b4b04906..e2c8fd36 100644
--- a/node_modules/cordova-common/src/util/xml-helpers.js
+++ b/node_modules/cordova-common/src/util/xml-helpers.js
@@ -15,32 +15,31 @@
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-*/
-
-/* jshint sub:true, laxcomma:true */
+*/
/**
* contains XML utility functions, some of which are specific to elementtree
*/
-var fs = require('fs')
- , path = require('path')
- , _ = require('underscore')
- , et = require('elementtree')
- ;
+var fs = require('fs');
+var path = require('path');
+var _ = require('underscore');
+var et = require('elementtree');
- var ROOT = /^\/([^\/]*)/,
- ABSOLUTE = /^\/([^\/]*)\/(.*)/;
+/* eslint-disable no-useless-escape */
+var ROOT = /^\/([^\/]*)/;
+var ABSOLUTE = /^\/([^\/]*)\/(.*)/;
+/* eslint-enable no-useless-escape */
module.exports = {
// compare two et.XML nodes, see if they match
// compares tagName, text, attributes and children (recursively)
- equalNodes: function(one, two) {
- if (one.tag != two.tag) {
+ equalNodes: function (one, two) {
+ if (one.tag !== two.tag) {
return false;
- } else if (one.text.trim() != two.text.trim()) {
+ } else if (one.text.trim() !== two.text.trim()) {
return false;
- } else if (one._children.length != two._children.length) {
+ } else if (one._children.length !== two._children.length) {
return false;
}
@@ -56,13 +55,13 @@ module.exports = {
},
// adds node to doc at selector, creating parent if it doesn't exist
- graftXML: function(doc, nodes, selector, after) {
+ graftXML: function (doc, nodes, selector, after) {
var parent = module.exports.resolveParent(doc, selector);
if (!parent) {
- //Try to create the parent recursively if necessary
+ // Try to create the parent recursively if necessary
try {
- var parentToCreate = et.XML('<' + path.basename(selector) + '>'),
- parentSelector = path.dirname(selector);
+ var parentToCreate = et.XML('<' + path.basename(selector) + '>');
+ var parentSelector = path.dirname(selector);
this.graftXML(doc, [parentToCreate], parentSelector);
} catch (e) {
@@ -78,7 +77,7 @@ module.exports = {
var children = parent.getchildren();
var insertIdx = after ? findInsertIdx(children, after) : children.length;
- //TODO: replace with parent.insert after the bug in ElementTree is fixed
+ // TODO: replace with parent.insert after the bug in ElementTree is fixed
parent.getchildren().splice(insertIdx, 0, node);
}
});
@@ -88,7 +87,7 @@ module.exports = {
// 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) {
+ graftXMLMerge: function (doc, nodes, selector, xml) {
var target = module.exports.resolveParent(doc, selector);
if (!target) return false;
@@ -107,7 +106,7 @@ module.exports = {
// 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) {
+ graftXMLOverwrite: function (doc, nodes, selector, xml) {
var target = module.exports.resolveParent(doc, selector);
if (!target) return false;
@@ -132,7 +131,7 @@ module.exports = {
},
// removes node from doc at selector
- pruneXML: function(doc, nodes, selector) {
+ pruneXML: function (doc, nodes, selector) {
var parent = module.exports.resolveParent(doc, selector);
if (!parent) return false;
@@ -149,7 +148,7 @@ module.exports = {
},
// restores attributes from doc at selector
- pruneXMLRestore: function(doc, selector, xml) {
+ pruneXMLRestore: function (doc, selector, xml) {
var target = module.exports.resolveParent(doc, selector);
if (!target) return false;
@@ -160,7 +159,7 @@ module.exports = {
return true;
},
- prunXMLRemove: function(doc, selector, nodes) {
+ pruneXMLRemove: function (doc, selector, nodes) {
var target = module.exports.resolveParent(doc, selector);
if (!target) return false;
@@ -177,11 +176,10 @@ module.exports = {
},
-
parseElementtreeSync: function (filename) {
var contents = fs.readFileSync(filename, 'utf-8');
- if(contents) {
- //Windows is the BOM. Skip the Byte Order Mark.
+ if (contents) {
+ // Windows is the BOM. Skip the Byte Order Mark.
contents = contents.substring(contents.indexOf('<'));
}
return new et.ElementTree(et.XML(contents));
@@ -194,7 +192,7 @@ module.exports = {
if (ROOT.test(selector)) {
tagName = selector.match(ROOT)[1];
// test for wildcard "any-tag" root selector
- if (tagName == '*' || tagName === doc._root.tag) {
+ if (tagName === '*' || tagName === doc._root.tag) {
parent = doc._root;
// could be an absolute path, but not selecting the root
@@ -212,11 +210,12 @@ module.exports = {
}
};
-function findChild(node, parent) {
- var matchingKids = parent.findall(node.tag)
- , i, j;
+function findChild (node, parent) {
+ var matchingKids = parent.findall(node.tag);
+ var i;
+ var j;
- for (i = 0, j = matchingKids.length ; i < j ; i++) {
+ for (i = 0, j = matchingKids.length; i < j; i++) {
if (module.exports.equalNodes(node, matchingKids[i])) {
return matchingKids[i];
}
@@ -224,13 +223,13 @@ function findChild(node, parent) {
return null;
}
-function uniqueChild(node, parent) {
- var matchingKids = parent.findall(node.tag)
- , i = 0;
+function uniqueChild (node, parent) {
+ var matchingKids = parent.findall(node.tag);
+ var i = 0;
if (matchingKids.length === 0) {
return true;
- } else {
+ } else {
for (i; i < matchingKids.length; i++) {
if (module.exports.equalNodes(node, matchingKids[i])) {
return false;
@@ -244,51 +243,51 @@ function uniqueChild(node, parent) {
// 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
// As, Bs, Cs. After will be equal to "C;B;A".
-function findInsertIdx(children, after) {
- var childrenTags = children.map(function(child) { return child.tag; });
+function findInsertIdx (children, after) {
+ var childrenTags = children.map(function (child) { return child.tag; });
var afters = after.split(';');
- var afterIndexes = afters.map(function(current) { return childrenTags.lastIndexOf(current); });
- var foundIndex = _.find(afterIndexes, function(index) { return index != -1; });
+ var afterIndexes = afters.map(function (current) { return childrenTags.lastIndexOf(current); });
+ var foundIndex = _.find(afterIndexes, function (index) { return index !== -1; });
- //add to the beginning if no matching nodes are found
- return typeof foundIndex === 'undefined' ? 0 : foundIndex+1;
+ // add to the beginning if no matching nodes are found
+ return typeof foundIndex === 'undefined' ? 0 : foundIndex + 1;
}
-var BLACKLIST = ['platform', 'feature','plugin','engine'];
+var BLACKLIST = ['platform', 'feature', 'plugin', 'engine'];
var SINGLETONS = ['content', 'author', 'name'];
-function mergeXml(src, dest, platform, clobber) {
+function mergeXml (src, dest, platform, clobber) {
// Do nothing for blacklisted tags.
- if (BLACKLIST.indexOf(src.tag) != -1) return;
+ if (BLACKLIST.indexOf(src.tag) !== -1) return;
- //Handle attributes
+ // Handle attributes
Object.getOwnPropertyNames(src.attrib).forEach(function (attribute) {
if (clobber || !dest.attrib[attribute]) {
dest.attrib[attribute] = src.attrib[attribute];
}
});
- //Handle text
+ // Handle text
if (src.text && (clobber || !dest.text)) {
dest.text = src.text;
}
- //Handle children
+ // Handle children
src.getchildren().forEach(mergeChild);
- //Handle platform
+ // Handle platform
if (platform) {
src.findall('platform[@name="' + platform + '"]').forEach(function (platformElement) {
platformElement.getchildren().forEach(mergeChild);
});
}
- //Handle duplicate preference tags (by name attribute)
+ // Handle duplicate preference tags (by name attribute)
removeDuplicatePreferences(dest);
function mergeChild (srcChild) {
- var srcTag = srcChild.tag,
- destChild = new et.Element(srcTag),
- foundChild,
- query = srcTag + '',
- shouldMerge = true;
+ var srcTag = srcChild.tag;
+ var destChild = new et.Element(srcTag);
+ var foundChild;
+ var query = srcTag + '';
+ var shouldMerge = true;
if (BLACKLIST.indexOf(srcTag) !== -1) return;
@@ -299,11 +298,11 @@ function mergeXml(src, dest, platform, clobber) {
dest.remove(destChild);
}
} else {
- //Check for an exact match and if you find one don't add
+ // 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);
- });
+ .filter(function (foundChild) {
+ return foundChild && textMatch(srcChild, foundChild) && attribMatch(srcChild, foundChild);
+ });
if (mergeCandidates.length > 0) {
destChild = mergeCandidates[0];
@@ -316,20 +315,20 @@ function mergeXml(src, dest, platform, clobber) {
dest.append(destChild);
}
- function removeDuplicatePreferences(xml) {
+ function removeDuplicatePreferences (xml) {
// reduce preference tags to a hashtable to remove dupes
- var prefHash = xml.findall('preference[@name][@value]').reduce(function(previousValue, currentValue) {
+ 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.findall('preference[@name][@value]').forEach(function (pref) {
xml.remove(pref);
});
// write new preferences
- Object.keys(prefHash).forEach(function(key, index) {
+ Object.keys(prefHash).forEach(function (key, index) {
var element = et.SubElement(xml, 'preference');
element.set('name', key);
element.set('value', this[key]);
@@ -340,24 +339,24 @@ function mergeXml(src, dest, platform, clobber) {
// Expose for testing.
module.exports.mergeXml = mergeXml;
-function textMatch(elm1, elm2) {
- var text1 = elm1.text ? elm1.text.replace(/\s+/, '') : '',
- text2 = elm2.text ? elm2.text.replace(/\s+/, '') : '';
+function textMatch (elm1, elm2) {
+ var text1 = elm1.text ? elm1.text.replace(/\s+/, '') : '';
+ var text2 = elm2.text ? elm2.text.replace(/\s+/, '') : '';
return (text1 === '' || text1 === text2);
}
-function attribMatch(one, two) {
+function attribMatch (one, two) {
var oneAttribKeys = Object.keys(one.attrib);
var twoAttribKeys = Object.keys(two.attrib);
- if (oneAttribKeys.length != twoAttribKeys.length) {
+ 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]) {
+ if (one.attrib[attribName] !== two.attrib[attribName]) {
return false;
}
}
diff --git a/node_modules/cordova-registry-mapper/package.json b/node_modules/cordova-registry-mapper/package.json
index e1b9437a..aa1da6a6 100644
--- a/node_modules/cordova-registry-mapper/package.json
+++ b/node_modules/cordova-registry-mapper/package.json
@@ -73,7 +73,8 @@
],
"name": "cordova-registry-mapper",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "[](https://travis-ci.org/stevengill/cordova-registry-mapper)\n\n#Cordova Registry Mapper\n\nThis module is used to map Cordova plugin ids to package names and vice versa.\n\nWhen Cordova users add plugins to their projects using ids\n(e.g. `cordova plugin add org.apache.cordova.device`),\nthis module will map that id to the corresponding package name so `cordova-lib` knows what to fetch from **npm**.\n\nThis module was created so the Apache Cordova project could migrate its plugins from\nthe [Cordova Registry](http://registry.cordova.io/)\nto [npm](https://registry.npmjs.com/)\ninstead of having to maintain a registry.\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/stevengill/cordova-registry-mapper.git"
diff --git a/node_modules/elementtree/package.json b/node_modules/elementtree/package.json
index e059c5f4..ffb3cc45 100644
--- a/node_modules/elementtree/package.json
+++ b/node_modules/elementtree/package.json
@@ -97,7 +97,8 @@
],
"name": "elementtree",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "node-elementtree\n====================\n\nnode-elementtree is a [Node.js](http://nodejs.org) XML parser and serializer based upon the [Python ElementTree v1.3](http://effbot.org/zone/element-index.htm) module.\n\nInstallation\n====================\n\n $ npm install elementtree\n \nUsing the library\n====================\n\nFor the usage refer to the Python ElementTree library documentation - [http://effbot.org/zone/element-index.htm#usage](http://effbot.org/zone/element-index.htm#usage).\n\nSupported XPath expressions in `find`, `findall` and `findtext` methods are listed on [http://effbot.org/zone/element-xpath.htm](http://effbot.org/zone/element-xpath.htm).\n\nExample 1 – Creating An XML Document\n====================\n\nThis example shows how to build a valid XML document that can be published to\nAtom Hopper. Atom Hopper is used internally as a bridge from products all the\nway to collecting revenue, called “Usage.” MaaS and other products send similar\nevents to it every time user performs an action on a resource\n(e.g. creates,updates or deletes). Below is an example of leveraging the API\nto create a new XML document.\n\n```javascript\nvar et = require('elementtree');\nvar XML = et.XML;\nvar ElementTree = et.ElementTree;\nvar element = et.Element;\nvar subElement = et.SubElement;\n\nvar date, root, tenantId, serviceName, eventType, usageId, dataCenter, region,\nchecks, resourceId, category, startTime, resourceName, etree, xml;\n\ndate = new Date();\n\nroot = element('entry');\nroot.set('xmlns', 'http://www.w3.org/2005/Atom');\n\ntenantId = subElement(root, 'TenantId');\ntenantId.text = '12345';\n\nserviceName = subElement(root, 'ServiceName');\nserviceName.text = 'MaaS';\n\nresourceId = subElement(root, 'ResourceID');\nresourceId.text = 'enAAAA';\n\nusageId = subElement(root, 'UsageID');\nusageId.text = '550e8400-e29b-41d4-a716-446655440000';\n\neventType = subElement(root, 'EventType');\neventType.text = 'create';\n\ncategory = subElement(root, 'category');\ncategory.set('term', 'monitoring.entity.create');\n\ndataCenter = subElement(root, 'DataCenter');\ndataCenter.text = 'global';\n\nregion = subElement(root, 'Region');\nregion.text = 'global';\n\nstartTime = subElement(root, 'StartTime');\nstartTime.text = date;\n\nresourceName = subElement(root, 'ResourceName');\nresourceName.text = 'entity';\n\netree = new ElementTree(root);\nxml = etree.write({'xml_declaration': false});\nconsole.log(xml);\n```\n\nAs you can see, both et.Element and et.SubElement are factory methods which\nreturn a new instance of Element and SubElement class, respectively.\nWhen you create a new element (tag) you can use set method to set an attribute.\nTo set the tag value, assign a value to the .text attribute.\n\nThis example would output a document that looks like this:\n\n```xml\n\n 12345\n MaaS\n enAAAA\n 550e8400-e29b-41d4-a716-446655440000\n create\n \n global\n global\n Sun Apr 29 2012 16:37:32 GMT-0700 (PDT)\n entity\n\n```\n\nExample 2 – Parsing An XML Document\n====================\n\nThis example shows how to parse an XML document and use simple XPath selectors.\nFor demonstration purposes, we will use the XML document located at\nhttps://gist.github.com/2554343.\n\nBehind the scenes, node-elementtree uses Isaac’s sax library for parsing XML,\nbut the library has a concept of “parsers,” which means it’s pretty simple to\nadd support for a different parser.\n\n```javascript\nvar fs = require('fs');\n\nvar et = require('elementtree');\n\nvar XML = et.XML;\nvar ElementTree = et.ElementTree;\nvar element = et.Element;\nvar subElement = et.SubElement;\n\nvar data, etree;\n\ndata = fs.readFileSync('document.xml').toString();\netree = et.parse(data);\n\nconsole.log(etree.findall('./entry/TenantId').length); // 2\nconsole.log(etree.findtext('./entry/ServiceName')); // MaaS\nconsole.log(etree.findall('./entry/category')[0].get('term')); // monitoring.entity.create\nconsole.log(etree.findall('*/category/[@term=\"monitoring.entity.update\"]').length); // 1\n```\n\nBuild status\n====================\n\n[](http://travis-ci.org/racker/node-elementtree)\n\n\nLicense\n====================\n\nnode-elementtree is distributed under the [Apache license](http://www.apache.org/licenses/LICENSE-2.0.html).\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/racker/node-elementtree.git"
diff --git a/node_modules/glob/package.json b/node_modules/glob/package.json
index 556d695f..79cfdb15 100644
--- a/node_modules/glob/package.json
+++ b/node_modules/glob/package.json
@@ -88,7 +88,8 @@
],
"name": "glob",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "[](https://travis-ci.org/isaacs/node-glob/) [](https://david-dm.org/isaacs/node-glob) [](https://david-dm.org/isaacs/node-glob#info=devDependencies) [](https://david-dm.org/isaacs/node-glob#info=optionalDependencies)\n\n# Glob\n\nMatch files using the patterns the shell uses, like stars and stuff.\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Glob Primer\n\n\"Globs\" are the patterns you type when you do stuff like `ls *.js` on\nthe command line, or put `build/*` in a `.gitignore` file.\n\nBefore parsing the path part patterns, braced sections are expanded\ninto a set. Braced sections start with `{` and end with `}`, with any\nnumber of comma-delimited sections within. Braced sections may contain\nslash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`.\n\nThe following characters have special magic meaning when used in a\npath portion:\n\n* `*` Matches 0 or more characters in a single path portion\n* `?` Matches 1 character\n* `[...]` Matches a range of characters, similar to a RegExp range.\n If the first character of the range is `!` or `^` then it matches\n any character not in the range.\n* `!(pattern|pattern|pattern)` Matches anything that does not match\n any of the patterns provided.\n* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the\n patterns provided.\n* `+(pattern|pattern|pattern)` Matches one or more occurrences of the\n patterns provided.\n* `*(a|b|c)` Matches zero or more occurrences of the patterns provided\n* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns\n provided\n* `**` If a \"globstar\" is alone in a path portion, then it matches\n zero or more directories and subdirectories searching for matches.\n It does not crawl symlinked directories.\n\n### Dots\n\nIf a file or directory path portion has a `.` as the first character,\nthen it will not match any glob pattern unless that pattern's\ncorresponding path part also has a `.` as its first character.\n\nFor example, the pattern `a/.*/c` would match the file at `a/.b/c`.\nHowever the pattern `a/*/c` would not, because `*` does not start with\na dot character.\n\nYou can make glob treat dots as normal characters by setting\n`dot:true` in the options.\n\n### Basename Matching\n\nIf you set `matchBase:true` in the options, and the pattern has no\nslashes in it, then it will seek for any file anywhere in the tree\nwith a matching basename. For example, `*.js` would match\n`test/simple/basic.js`.\n\n### Negation\n\nThe intent for negation would be for a pattern starting with `!` to\nmatch everything that *doesn't* match the supplied pattern. However,\nthe implementation is weird, and for the time being, this should be\navoided. The behavior is deprecated in version 5, and will be removed\nentirely in version 6.\n\n### Empty Sets\n\nIf no matching files are found, then an empty array is returned. This\ndiffers from the shell, where the pattern itself is returned. For\nexample:\n\n $ echo a*s*d*f\n a*s*d*f\n\nTo get the bash-style behavior, set the `nonull:true` in the options.\n\n### See Also:\n\n* `man sh`\n* `man bash` (Search for \"Pattern Matching\")\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob.hasMagic(pattern, [options])\n\nReturns `true` if there are any special characters in the pattern, and\n`false` otherwise.\n\nNote that the options affect the results. If `noext:true` is set in\nthe options object, then `+(a|b)` will not be considered a magic\npattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`\nthen that is considered magical, unless `nobrace:true` is set in the\noptions.\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options])\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instantiating the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n* `cache` Convenience object. Each field has the following possible\n values:\n * `false` - Path does not exist\n * `true` - Path exists\n * `'DIR'` - Path exists, and is not a directory\n * `'FILE'` - Path exists, and is a directory\n * `[file, entries, ...]` - Path exists, is a directory, and the\n array value is the results of `fs.readdir`\n* `statCache` Cache of `fs.stat` results, to prevent statting the same\n path multiple times.\n* `symlinks` A record of which paths are symbolic links, which is\n relevant in resolving `**` patterns.\n* `realpathCache` An optional object which is passed to `fs.realpath`\n to minimize unnecessary syscalls. It is stored on the instantiated\n Glob object, and may be re-used.\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `pause` Temporarily stop the search\n* `resume` Resume the search\n* `abort` Stop the search forever\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the Glob object, as well.\n\nIf you are running many `glob` operations, you can pass a Glob object\nas the `options` argument to a subsequent operation to shortcut some\n`stat` and `readdir` calls. At the very least, you may pass in shared\n`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that\nparallel glob operations will be sped up by sharing information about\nthe filesystem.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `dot` Include `.dot` files in normal matches and `globstar` matches.\n Note that an explicit dot in a portion of the pattern will always\n match dot files.\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence.\n* `silent` When an unusual error is encountered when attempting to\n read a directory, a warning will be printed to stderr. Set the\n `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered when attempting to\n read a directory, the process will just continue on in search of\n other matches. Set the `strict` option to raise an error in these\n cases.\n* `cache` See `cache` property above. Pass in a previously generated\n cache object to save some fs calls.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary\n to set this, you may pass the statCache from one glob() call to the\n options object of another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `symlinks` A cache of known symbolic links. You may pass in a\n previously generated `symlinks` object to save `lstat` calls when\n resolving `**` matches.\n* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set. Set this\n flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `debug` Set to enable debug logging in minimatch and glob.\n* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.\n* `noglobstar` Do not match `**` against multiple filenames. (Ie,\n treat it as a normal `*` instead.)\n* `noext` Do not match `+(a|b)` \"extglob\" patterns.\n* `nocase` Perform a case-insensitive match. Note: on\n case-insensitive filesystems, non-magic patterns will match by\n default, since `stat` and `readdir` will not raise errors.\n* `matchBase` Perform a basename-only match if the pattern does not\n contain any slash characters. That is, `*.js` would be treated as\n equivalent to `**/*.js`, matching all js files in all directories.\n* `nodir` Do not match directories, only files. (Note: to match\n *only* directories, simply put a `/` at the end of the pattern.)\n* `ignore` Add a pattern or an array of patterns to exclude matches.\n* `follow` Follow symlinked directories when expanding `**` patterns.\n Note that this can result in a lot of duplicate references in the\n presence of cyclic links.\n* `realpath` Set to true to call `fs.realpath` on all of the results.\n In the case of a symlink that cannot be resolved, the full absolute\n path to the matched entry is returned (though it will usually be a\n broken symlink)\n* `nonegate` Suppress deprecated `negate` behavior. (See below.)\n Default=true\n* `nocomment` Suppress deprecated `comment` behavior. (See below.)\n Default=true\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.3, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nNote that symlinked directories are not crawled as part of a `**`,\nthough their contents may match against subsequent portions of the\npattern. This prevents infinite loops and duplicates and the like.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n### Comments and Negation\n\n**Note**: In version 5 of this module, negation and comments are\n**disabled** by default. You can explicitly set `nonegate:false` or\n`nocomment:false` to re-enable them. They are going away entirely in\nversion 6.\n\nThe intent for negation would be for a pattern starting with `!` to\nmatch everything that *doesn't* match the supplied pattern. However,\nthe implementation is weird. It is better to use the `ignore` option\nto set a pattern or set of patterns to exclude from matches. If you\nwant the \"everything except *x*\" type of behavior, you can use `**` as\nthe main pattern, and set an `ignore` for the things to exclude.\n\nThe comments feature is added in minimatch, primarily to more easily\nsupport use cases like ignore files, where a `#` at the start of a\nline makes the pattern \"empty\". However, in the context of a\nstraightforward filesystem globber, \"comments\" don't make much sense.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expressions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the cache or statCache objects are reused between glob\ncalls.\n\nUsers are thus advised not to use a glob result as a guarantee of\nfilesystem state in the face of rapid changes. For the vast majority\nof operations, this is never a problem.\n\n## Contributing\n\nAny change to behavior (including bugfixes) must come with a test.\n\nPatches that fail tests or reduce performance will be rejected.\n\n```\n# to run tests\nnpm test\n\n# to re-generate test fixtures\nnpm run test-regen\n\n# to benchmark against bash/zsh\nnpm run bench\n\n# to profile javascript\nnpm run prof\n```\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
diff --git a/node_modules/inflight/package.json b/node_modules/inflight/package.json
index 4b7e9e03..d73d3c27 100644
--- a/node_modules/inflight/package.json
+++ b/node_modules/inflight/package.json
@@ -93,7 +93,8 @@
],
"name": "inflight",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "# inflight\n\nAdd callbacks to requests in flight to avoid async duplication\n\n## USAGE\n\n```javascript\nvar inflight = require('inflight')\n\n// some request that does some stuff\nfunction req(key, callback) {\n // key is any random string. like a url or filename or whatever.\n //\n // will return either a falsey value, indicating that the\n // request for this key is already in flight, or a new callback\n // which when called will call all callbacks passed to inflightk\n // with the same key\n callback = inflight(key, callback)\n\n // If we got a falsey value back, then there's already a req going\n if (!callback) return\n\n // this is where you'd fetch the url or whatever\n // callback is also once()-ified, so it can safely be assigned\n // to multiple events etc. First call wins.\n setTimeout(function() {\n callback(null, key)\n }, 100)\n}\n\n// only assigns a single setTimeout\n// when it dings, all cbs get called\nreq('foo', cb1)\nreq('foo', cb2)\nreq('foo', cb3)\nreq('foo', cb4)\n```\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/inflight.git"
diff --git a/node_modules/inherits/package.json b/node_modules/inherits/package.json
index d90363bb..e9e085a4 100644
--- a/node_modules/inherits/package.json
+++ b/node_modules/inherits/package.json
@@ -85,7 +85,8 @@
],
"name": "inherits",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "Browser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n superclass\n* new version overwrites current prototype while old one preserves any\n existing fields on it\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/inherits.git"
diff --git a/node_modules/lodash/package.json b/node_modules/lodash/package.json
index 6db3cf06..f68079e8 100644
--- a/node_modules/lodash/package.json
+++ b/node_modules/lodash/package.json
@@ -117,7 +117,8 @@
],
"name": "lodash",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "# lodash v3.10.1\n\nThe [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) exported as [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) modules.\n\nGenerated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):\n```bash\n$ lodash modularize modern exports=node -o ./\n$ lodash modern -d -o ./index.js\n```\n\n## Installation\n\nUsing npm:\n\n```bash\n$ {sudo -H} npm i -g npm\n$ npm i --save lodash\n```\n\nIn Node.js/io.js:\n\n```js\n// load the modern build\nvar _ = require('lodash');\n// or a method category\nvar array = require('lodash/array');\n// or a method (great for smaller builds with browserify/webpack)\nvar chunk = require('lodash/array/chunk');\n```\n\nSee the [package source](https://github.com/lodash/lodash/tree/3.10.1-npm) for more details.\n\n**Note:**
\nDon’t assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL.
\nInstall [n_](https://www.npmjs.com/package/n_) for a REPL that includes lodash by default.\n\n## Module formats\n\nlodash is also available in a variety of other builds & module formats.\n\n * npm packages for [modern](https://www.npmjs.com/package/lodash), [compatibility](https://www.npmjs.com/package/lodash-compat), & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) builds\n * AMD modules for [modern](https://github.com/lodash/lodash/tree/3.10.1-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.10.1-amd) builds\n * ES modules for the [modern](https://github.com/lodash/lodash/tree/3.10.1-es) build\n\n## Further Reading\n\n * [API Documentation](https://lodash.com/docs)\n * [Build Differences](https://github.com/lodash/lodash/wiki/Build-Differences)\n * [Changelog](https://github.com/lodash/lodash/wiki/Changelog)\n * [Roadmap](https://github.com/lodash/lodash/wiki/Roadmap)\n * [More Resources](https://github.com/lodash/lodash/wiki/Resources)\n\n## Features\n\n * ~100% [code coverage](https://coveralls.io/r/lodash)\n * Follows [semantic versioning](http://semver.org/) for releases\n * [Lazily evaluated](http://filimanjaro.com/blog/2014/introducing-lazy-evaluation/) chaining\n * [_(…)](https://lodash.com/docs#_) supports implicit chaining\n * [_.ary](https://lodash.com/docs#ary) & [_.rearg](https://lodash.com/docs#rearg) to change function argument limits & order\n * [_.at](https://lodash.com/docs#at) for cherry-picking collection values\n * [_.attempt](https://lodash.com/docs#attempt) to execute functions which may error without a try-catch\n * [_.before](https://lodash.com/docs#before) to complement [_.after](https://lodash.com/docs#after)\n * [_.bindKey](https://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods\n * [_.chunk](https://lodash.com/docs#chunk) for splitting an array into chunks of a given size\n * [_.clone](https://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects\n * [_.cloneDeep](https://lodash.com/docs#cloneDeep) for deep cloning arrays & objects\n * [_.curry](https://lodash.com/docs#curry) & [_.curryRight](https://lodash.com/docs#curryRight) for creating [curried](http://hughfdjackson.com/javascript/why-curry-helps/) functions\n * [_.debounce](https://lodash.com/docs#debounce) & [_.throttle](https://lodash.com/docs#throttle) are cancelable & accept options for more control\n * [_.defaultsDeep](https://lodash.com/docs#defaultsDeep) for recursively assigning default properties\n * [_.fill](https://lodash.com/docs#fill) to fill arrays with values\n * [_.findKey](https://lodash.com/docs#findKey) for finding keys\n * [_.flow](https://lodash.com/docs#flow) to complement [_.flowRight](https://lodash.com/docs#flowRight) (a.k.a `_.compose`)\n * [_.forEach](https://lodash.com/docs#forEach) supports exiting early\n * [_.forIn](https://lodash.com/docs#forIn) for iterating all enumerable properties\n * [_.forOwn](https://lodash.com/docs#forOwn) for iterating own properties\n * [_.get](https://lodash.com/docs#get) & [_.set](https://lodash.com/docs#set) for deep property getting & setting\n * [_.gt](https://lodash.com/docs#gt), [_.gte](https://lodash.com/docs#gte), [_.lt](https://lodash.com/docs#lt), & [_.lte](https://lodash.com/docs#lte) relational methods\n * [_.inRange](https://lodash.com/docs#inRange) for checking whether a number is within a given range\n * [_.isNative](https://lodash.com/docs#isNative) to check for native functions\n * [_.isPlainObject](https://lodash.com/docs#isPlainObject) & [_.toPlainObject](https://lodash.com/docs#toPlainObject) to check for & convert to `Object` objects\n * [_.isTypedArray](https://lodash.com/docs#isTypedArray) to check for typed arrays\n * [_.mapKeys](https://lodash.com/docs#mapKeys) for mapping keys to an object\n * [_.matches](https://lodash.com/docs#matches) supports deep object comparisons\n * [_.matchesProperty](https://lodash.com/docs#matchesProperty) to complement [_.matches](https://lodash.com/docs#matches) & [_.property](https://lodash.com/docs#property)\n * [_.merge](https://lodash.com/docs#merge) for a deep [_.extend](https://lodash.com/docs#extend)\n * [_.method](https://lodash.com/docs#method) & [_.methodOf](https://lodash.com/docs#methodOf) to create functions that invoke methods\n * [_.modArgs](https://lodash.com/docs#modArgs) for more advanced functional composition\n * [_.parseInt](https://lodash.com/docs#parseInt) for consistent cross-environment behavior\n * [_.pull](https://lodash.com/docs#pull), [_.pullAt](https://lodash.com/docs#pullAt), & [_.remove](https://lodash.com/docs#remove) for mutating arrays\n * [_.random](https://lodash.com/docs#random) supports returning floating-point numbers\n * [_.restParam](https://lodash.com/docs#restParam) & [_.spread](https://lodash.com/docs#spread) for applying rest parameters & spreading arguments to functions\n * [_.runInContext](https://lodash.com/docs#runInContext) for collisionless mixins & easier mocking\n * [_.slice](https://lodash.com/docs#slice) for creating subsets of array-like values\n * [_.sortByAll](https://lodash.com/docs#sortByAll) & [_.sortByOrder](https://lodash.com/docs#sortByOrder) for sorting by multiple properties & orders\n * [_.support](https://lodash.com/docs#support) for flagging environment features\n * [_.template](https://lodash.com/docs#template) supports [*“imports”*](https://lodash.com/docs#templateSettings-imports) options & [ES template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components)\n * [_.transform](https://lodash.com/docs#transform) as a powerful alternative to [_.reduce](https://lodash.com/docs#reduce) for transforming objects\n * [_.unzipWith](https://lodash.com/docs#unzipWith) & [_.zipWith](https://lodash.com/docs#zipWith) to specify how grouped values should be combined\n * [_.valuesIn](https://lodash.com/docs#valuesIn) for getting values of all enumerable properties\n * [_.xor](https://lodash.com/docs#xor) to complement [_.difference](https://lodash.com/docs#difference), [_.intersection](https://lodash.com/docs#intersection), & [_.union](https://lodash.com/docs#union)\n * [_.add](https://lodash.com/docs#add), [_.round](https://lodash.com/docs#round), [_.sum](https://lodash.com/docs#sum), &\n [more](https://lodash.com/docs \"_.ceil & _.floor\") math methods\n * [_.bind](https://lodash.com/docs#bind), [_.curry](https://lodash.com/docs#curry), [_.partial](https://lodash.com/docs#partial), &\n [more](https://lodash.com/docs \"_.bindKey, _.curryRight, _.partialRight\") support customizable argument placeholders\n * [_.capitalize](https://lodash.com/docs#capitalize), [_.trim](https://lodash.com/docs#trim), &\n [more](https://lodash.com/docs \"_.camelCase, _.deburr, _.endsWith, _.escapeRegExp, _.kebabCase, _.pad, _.padLeft, _.padRight, _.repeat, _.snakeCase, _.startCase, _.startsWith, _.trimLeft, _.trimRight, _.trunc, _.words\") string methods\n * [_.clone](https://lodash.com/docs#clone), [_.isEqual](https://lodash.com/docs#isEqual), &\n [more](https://lodash.com/docs \"_.assign, _.cloneDeep, _.merge\") accept customizer callbacks\n * [_.dropWhile](https://lodash.com/docs#dropWhile), [_.takeWhile](https://lodash.com/docs#takeWhile), &\n [more](https://lodash.com/docs \"_.drop, _.dropRight, _.dropRightWhile, _.take, _.takeRight, _.takeRightWhile\") to complement [_.first](https://lodash.com/docs#first), [_.initial](https://lodash.com/docs#initial), [_.last](https://lodash.com/docs#last), & [_.rest](https://lodash.com/docs#rest)\n * [_.findLast](https://lodash.com/docs#findLast), [_.findLastKey](https://lodash.com/docs#findLastKey), &\n [more](https://lodash.com/docs \"_.curryRight, _.dropRight, _.dropRightWhile, _.flowRight, _.forEachRight, _.forInRight, _.forOwnRight, _.padRight, partialRight, _.takeRight, _.trimRight, _.takeRightWhile\") right-associative methods\n * [_.includes](https://lodash.com/docs#includes), [_.toArray](https://lodash.com/docs#toArray), &\n [more](https://lodash.com/docs \"_.at, _.countBy, _.every, _.filter, _.find, _.findLast, _.findWhere, _.forEach, _.forEachRight, _.groupBy, _.indexBy, _.invoke, _.map, _.max, _.min, _.partition, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.sortByAll, _.sortByOrder, _.sum, _.where\") accept strings\n * [_#commit](https://lodash.com/docs#prototype-commit) & [_#plant](https://lodash.com/docs#prototype-plant) for working with chain sequences\n * [_#thru](https://lodash.com/docs#thru) to pass values thru a chain sequence\n\n## Support\n\nTested in Chrome 43-44, Firefox 38-39, IE 6-11, MS Edge, Safari 5-8, ChakraNode 0.12.2, io.js 2.5.0, Node.js 0.8.28, 0.10.40, & 0.12.7, PhantomJS 1.9.8, RingoJS 0.11, & Rhino 1.7.6.\nAutomated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing.\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/lodash/lodash.git"
diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json
index b2577352..de7334a5 100644
--- a/node_modules/minimatch/package.json
+++ b/node_modules/minimatch/package.json
@@ -14,19 +14,19 @@
]
],
"_from": "minimatch@>=3.0.0 <4.0.0",
- "_id": "minimatch@3.0.3",
+ "_id": "minimatch@3.0.4",
"_inCache": true,
"_location": "/minimatch",
- "_nodeVersion": "4.4.4",
+ "_nodeVersion": "8.0.0-pre",
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/minimatch-3.0.3.tgz_1470678322731_0.1892083385027945"
+ "host": "packages-18-east.internal.npmjs.com",
+ "tmp": "tmp/minimatch-3.0.4.tgz_1494180669024_0.22628829116001725"
},
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
},
- "_npmVersion": "3.10.6",
+ "_npmVersion": "5.0.0-beta.43",
"_phantomChildren": {},
"_requested": {
"raw": "minimatch@^3.0.0",
@@ -41,8 +41,8 @@
"/cordova-common",
"/glob"
],
- "_resolved": "http://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz",
- "_shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774",
+ "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "_shasum": "5166e286457f03306064be5497e8dbb0c3d32083",
"_shrinkwrap": null,
"_spec": "minimatch@^3.0.0",
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
@@ -55,17 +55,17 @@
"url": "https://github.com/isaacs/minimatch/issues"
},
"dependencies": {
- "brace-expansion": "^1.0.0"
+ "brace-expansion": "^1.1.7"
},
"description": "a glob matcher in javascript",
"devDependencies": {
- "standard": "^3.7.2",
- "tap": "^5.6.0"
+ "tap": "^10.3.2"
},
"directories": {},
"dist": {
- "shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774",
- "tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz"
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "shasum": "5166e286457f03306064be5497e8dbb0c3d32083",
+ "tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz"
},
"engines": {
"node": "*"
@@ -73,7 +73,7 @@
"files": [
"minimatch.js"
],
- "gitHead": "eed89491bd4a4e6bc463aac0dfb5c29ef0d1dc13",
+ "gitHead": "e46989a323d5f0aa4781eff5e2e6e7aafa223321",
"homepage": "https://github.com/isaacs/minimatch#readme",
"license": "ISC",
"main": "minimatch.js",
@@ -85,14 +85,17 @@
],
"name": "minimatch",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "# minimatch\n\nA minimal matching utility.\n\n[](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instantiating the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself if this option is set. When not set, an empty list\nis returned if there are no matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/minimatch.git"
},
"scripts": {
- "posttest": "standard minimatch.js test/*.js",
- "test": "tap test/*.js"
+ "postpublish": "git push origin --all; git push origin --tags",
+ "postversion": "npm publish",
+ "preversion": "npm test",
+ "test": "tap test/*.js --cov"
},
- "version": "3.0.3"
+ "version": "3.0.4"
}
diff --git a/node_modules/nopt/package.json b/node_modules/nopt/package.json
index 1b05aa1a..22ed6ec7 100644
--- a/node_modules/nopt/package.json
+++ b/node_modules/nopt/package.json
@@ -84,7 +84,8 @@
],
"name": "nopt",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "If you want to write an option parser, and have it be good, there are\ntwo ways to do it. The Right Way, and the Wrong Way.\n\nThe Wrong Way is to sit down and write an option parser. We've all done\nthat.\n\nThe Right Way is to write some complex configurable program with so many\noptions that you hit the limit of your frustration just trying to\nmanage them all, and defer it with duct-tape solutions until you see\nexactly to the core of the problem, and finally snap and write an\nawesome option parser.\n\nIf you want to write an option parser, don't write an option parser.\nWrite a package manager, or a source control system, or a service\nrestarter, or an operating system. You probably won't end up with a\ngood one of those, but if you don't give up, and you are relentless and\ndiligent enough in your procrastination, you may just end up with a very\nnice option parser.\n\n## USAGE\n\n // my-program.js\n var nopt = require(\"nopt\")\n , Stream = require(\"stream\").Stream\n , path = require(\"path\")\n , knownOpts = { \"foo\" : [String, null]\n , \"bar\" : [Stream, Number]\n , \"baz\" : path\n , \"bloo\" : [ \"big\", \"medium\", \"small\" ]\n , \"flag\" : Boolean\n , \"pick\" : Boolean\n , \"many1\" : [String, Array]\n , \"many2\" : [path]\n }\n , shortHands = { \"foofoo\" : [\"--foo\", \"Mr. Foo\"]\n , \"b7\" : [\"--bar\", \"7\"]\n , \"m\" : [\"--bloo\", \"medium\"]\n , \"p\" : [\"--pick\"]\n , \"f\" : [\"--flag\"]\n }\n // everything is optional.\n // knownOpts and shorthands default to {}\n // arg list defaults to process.argv\n // slice defaults to 2\n , parsed = nopt(knownOpts, shortHands, process.argv, 2)\n console.log(parsed)\n\nThis would give you support for any of the following:\n\n```bash\n$ node my-program.js --foo \"blerp\" --no-flag\n{ \"foo\" : \"blerp\", \"flag\" : false }\n\n$ node my-program.js ---bar 7 --foo \"Mr. Hand\" --flag\n{ bar: 7, foo: \"Mr. Hand\", flag: true }\n\n$ node my-program.js --foo \"blerp\" -f -----p\n{ foo: \"blerp\", flag: true, pick: true }\n\n$ node my-program.js -fp --foofoo\n{ foo: \"Mr. Foo\", flag: true, pick: true }\n\n$ node my-program.js --foofoo -- -fp # -- stops the flag parsing.\n{ foo: \"Mr. Foo\", argv: { remain: [\"-fp\"] } }\n\n$ node my-program.js --blatzk -fp # unknown opts are ok.\n{ blatzk: true, flag: true, pick: true }\n\n$ node my-program.js --blatzk=1000 -fp # but you need to use = if they have a value\n{ blatzk: 1000, flag: true, pick: true }\n\n$ node my-program.js --no-blatzk -fp # unless they start with \"no-\"\n{ blatzk: false, flag: true, pick: true }\n\n$ node my-program.js --baz b/a/z # known paths are resolved.\n{ baz: \"/Users/isaacs/b/a/z\" }\n\n# if Array is one of the types, then it can take many\n# values, and will always be an array. The other types provided\n# specify what types are allowed in the list.\n\n$ node my-program.js --many1 5 --many1 null --many1 foo\n{ many1: [\"5\", \"null\", \"foo\"] }\n\n$ node my-program.js --many2 foo --many2 bar\n{ many2: [\"/path/to/foo\", \"path/to/bar\"] }\n```\n\nRead the tests at the bottom of `lib/nopt.js` for more examples of\nwhat this puppy can do.\n\n## Types\n\nThe following types are supported, and defined on `nopt.typeDefs`\n\n* String: A normal string. No parsing is done.\n* path: A file system path. Gets resolved against cwd if not absolute.\n* url: A url. If it doesn't parse, it isn't accepted.\n* Number: Must be numeric.\n* Date: Must parse as a date. If it does, and `Date` is one of the options,\n then it will return a Date object, not a string.\n* Boolean: Must be either `true` or `false`. If an option is a boolean,\n then it does not need a value, and its presence will imply `true` as\n the value. To negate boolean flags, do `--no-whatever` or `--whatever\n false`\n* NaN: Means that the option is strictly not allowed. Any value will\n fail.\n* Stream: An object matching the \"Stream\" class in node. Valuable\n for use when validating programmatically. (npm uses this to let you\n supply any WriteStream on the `outfd` and `logfd` config options.)\n* Array: If `Array` is specified as one of the types, then the value\n will be parsed as a list of options. This means that multiple values\n can be specified, and that the value will always be an array.\n\nIf a type is an array of values not on this list, then those are\nconsidered valid values. For instance, in the example above, the\n`--bloo` option can only be one of `\"big\"`, `\"medium\"`, or `\"small\"`,\nand any other value will be rejected.\n\nWhen parsing unknown fields, `\"true\"`, `\"false\"`, and `\"null\"` will be\ninterpreted as their JavaScript equivalents.\n\nYou can also mix types and values, or multiple types, in a list. For\ninstance `{ blah: [Number, null] }` would allow a value to be set to\neither a Number or null. When types are ordered, this implies a\npreference, and the first type that can be used to properly interpret\nthe value will be used.\n\nTo define a new type, add it to `nopt.typeDefs`. Each item in that\nhash is an object with a `type` member and a `validate` method. The\n`type` member is an object that matches what goes in the type list. The\n`validate` method is a function that gets called with `validate(data,\nkey, val)`. Validate methods should assign `data[key]` to the valid\nvalue of `val` if it can be handled properly, or return boolean\n`false` if it cannot.\n\nYou can also call `nopt.clean(data, types, typeDefs)` to clean up a\nconfig object and remove its invalid properties.\n\n## Error Handling\n\nBy default, nopt outputs a warning to standard error when invalid values for\nknown options are found. You can change this behavior by assigning a method\nto `nopt.invalidHandler`. This method will be called with\nthe offending `nopt.invalidHandler(key, val, types)`.\n\nIf no `nopt.invalidHandler` is assigned, then it will console.error\nits whining. If it is assigned to boolean `false` then the warning is\nsuppressed.\n\n## Abbreviations\n\nYes, they are supported. If you define options like this:\n\n```javascript\n{ \"foolhardyelephants\" : Boolean\n, \"pileofmonkeys\" : Boolean }\n```\n\nThen this will work:\n\n```bash\nnode program.js --foolhar --pil\nnode program.js --no-f --pileofmon\n# etc.\n```\n\n## Shorthands\n\nShorthands are a hash of shorter option names to a snippet of args that\nthey expand to.\n\nIf multiple one-character shorthands are all combined, and the\ncombination does not unambiguously match any other option or shorthand,\nthen they will be broken up into their constituent parts. For example:\n\n```json\n{ \"s\" : [\"--loglevel\", \"silent\"]\n, \"g\" : \"--global\"\n, \"f\" : \"--force\"\n, \"p\" : \"--parseable\"\n, \"l\" : \"--long\"\n}\n```\n\n```bash\nnpm ls -sgflp\n# just like doing this:\nnpm ls --loglevel silent --global --force --long --parseable\n```\n\n## The Rest of the args\n\nThe config object returned by nopt is given a special member called\n`argv`, which is an object with the following fields:\n\n* `remain`: The remaining args after all the parsing has occurred.\n* `original`: The args as they originally appeared.\n* `cooked`: The args after flags and shorthands are expanded.\n\n## Slicing\n\nNode programs are called with more or less the exact argv as it appears\nin C land, after the v8 and node-specific options have been plucked off.\nAs such, `argv[0]` is always `node` and `argv[1]` is always the\nJavaScript program being run.\n\nThat's usually not very useful to you. So they're sliced off by\ndefault. If you want them, then you can pass in `0` as the last\nargument, or any other number that you'd like to slice off the start of\nthe list.\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/nopt.git"
diff --git a/node_modules/once/package.json b/node_modules/once/package.json
index 1106c2f7..3d4e8601 100644
--- a/node_modules/once/package.json
+++ b/node_modules/once/package.json
@@ -89,7 +89,8 @@
],
"name": "once",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "# once\n\nOnly call a function once.\n\n## usage\n\n```javascript\nvar once = require('once')\n\nfunction load (file, cb) {\n cb = once(cb)\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nOr add to the Function.prototype in a responsible way:\n\n```javascript\n// only has to be done once\nrequire('once').proto()\n\nfunction load (file, cb) {\n cb = cb.once()\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nIronically, the prototype feature makes this module twice as\ncomplicated as necessary.\n\nTo check whether you function has been called, use `fn.called`. Once the\nfunction is called for the first time the return value of the original\nfunction is saved in `fn.value` and subsequent calls will continue to\nreturn this value.\n\n```javascript\nvar once = require('once')\n\nfunction load (cb) {\n cb = once(cb)\n var stream = createStream()\n stream.once('data', cb)\n stream.once('end', function () {\n if (!cb.called) cb(new Error('not found'))\n })\n}\n```\n\n## `once.strict(func)`\n\nThrow an error if the function is called twice.\n\nSome functions are expected to be called only once. Using `once` for them would\npotentially hide logical errors.\n\nIn the example below, the `greet` function has to call the callback only once:\n\n```javascript\nfunction greet (name, cb) {\n // return is missing from the if statement\n // when no name is passed, the callback is called twice\n if (!name) cb('Hello anonymous')\n cb('Hello ' + name)\n}\n\nfunction log (msg) {\n console.log(msg)\n}\n\n// this will print 'Hello anonymous' but the logical error will be missed\ngreet(null, once(msg))\n\n// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time\ngreet(null, once.strict(msg))\n```\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/once.git"
diff --git a/node_modules/os-homedir/package.json b/node_modules/os-homedir/package.json
index f6146d54..0eb3a24c 100644
--- a/node_modules/os-homedir/package.json
+++ b/node_modules/os-homedir/package.json
@@ -97,7 +97,8 @@
],
"name": "os-homedir",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "# os-homedir [](https://travis-ci.org/sindresorhus/os-homedir)\n\n> Node.js 4 [`os.homedir()`](https://nodejs.org/api/os.html#os_os_homedir) [ponyfill](https://ponyfill.com)\n\n\n## Install\n\n```\n$ npm install --save os-homedir\n```\n\n\n## Usage\n\n```js\nconst osHomedir = require('os-homedir');\n\nconsole.log(osHomedir());\n//=> '/Users/sindresorhus'\n```\n\n\n## Related\n\n- [user-home](https://github.com/sindresorhus/user-home) - Same as this module but caches the result\n- [home-or-tmp](https://github.com/sindresorhus/home-or-tmp) - Get the user home directory with fallback to the system temp directory\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n",
+ "readmeFilename": "readme.md",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/os-homedir.git"
diff --git a/node_modules/os-tmpdir/package.json b/node_modules/os-tmpdir/package.json
index 7f814166..2edc83bf 100644
--- a/node_modules/os-tmpdir/package.json
+++ b/node_modules/os-tmpdir/package.json
@@ -97,7 +97,8 @@
],
"name": "os-tmpdir",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "# os-tmpdir [](https://travis-ci.org/sindresorhus/os-tmpdir)\n\n> Node.js [`os.tmpdir()`](https://nodejs.org/api/os.html#os_os_tmpdir) [ponyfill](https://ponyfill.com)\n\nUse this instead of `require('os').tmpdir()` to get a consistent behavior on different Node.js versions (even 0.8).\n\n\n## Install\n\n```\n$ npm install --save os-tmpdir\n```\n\n\n## Usage\n\n```js\nconst osTmpdir = require('os-tmpdir');\n\nosTmpdir();\n//=> '/var/folders/m3/5574nnhn0yj488ccryqr7tc80000gn/T'\n```\n\n\n## API\n\nSee the [`os.tmpdir()` docs](https://nodejs.org/api/os.html#os_os_tmpdir).\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n",
+ "readmeFilename": "readme.md",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/os-tmpdir.git"
diff --git a/node_modules/osenv/package.json b/node_modules/osenv/package.json
index 741ebcee..87c5e5ba 100644
--- a/node_modules/osenv/package.json
+++ b/node_modules/osenv/package.json
@@ -101,7 +101,8 @@
],
"name": "osenv",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "# osenv\n\nLook up environment settings specific to different operating systems.\n\n## Usage\n\n```javascript\nvar osenv = require('osenv')\nvar path = osenv.path()\nvar user = osenv.user()\n// etc.\n\n// Some things are not reliably in the env, and have a fallback command:\nvar h = osenv.hostname(function (er, hostname) {\n h = hostname\n})\n// This will still cause it to be memoized, so calling osenv.hostname()\n// is now an immediate operation.\n\n// You can always send a cb, which will get called in the nextTick\n// if it's been memoized, or wait for the fallback data if it wasn't\n// found in the environment.\nosenv.hostname(function (er, hostname) {\n if (er) console.error('error looking up hostname')\n else console.log('this machine calls itself %s', hostname)\n})\n```\n\n## osenv.hostname()\n\nThe machine name. Calls `hostname` if not found.\n\n## osenv.user()\n\nThe currently logged-in user. Calls `whoami` if not found.\n\n## osenv.prompt()\n\nEither PS1 on unix, or PROMPT on Windows.\n\n## osenv.tmpdir()\n\nThe place where temporary files should be created.\n\n## osenv.home()\n\nNo place like it.\n\n## osenv.path()\n\nAn array of the places that the operating system will search for\nexecutables.\n\n## osenv.editor() \n\nReturn the executable name of the editor program. This uses the EDITOR\nand VISUAL environment variables, and falls back to `vi` on Unix, or\n`notepad.exe` on Windows.\n\n## osenv.shell()\n\nThe SHELL on Unix, which Windows calls the ComSpec. Defaults to 'bash'\nor 'cmd'.\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/osenv.git"
diff --git a/node_modules/path-is-absolute/package.json b/node_modules/path-is-absolute/package.json
index ee5a71f7..c29aaf2f 100644
--- a/node_modules/path-is-absolute/package.json
+++ b/node_modules/path-is-absolute/package.json
@@ -99,7 +99,8 @@
],
"name": "path-is-absolute",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "# path-is-absolute [](https://travis-ci.org/sindresorhus/path-is-absolute)\n\n> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com)\n\n\n## Install\n\n```\n$ npm install --save path-is-absolute\n```\n\n\n## Usage\n\n```js\nconst pathIsAbsolute = require('path-is-absolute');\n\n// Running on Linux\npathIsAbsolute('/home/foo');\n//=> true\npathIsAbsolute('C:/Users/foo');\n//=> false\n\n// Running on Windows\npathIsAbsolute('C:/Users/foo');\n//=> true\npathIsAbsolute('/home/foo');\n//=> false\n\n// Running on any OS\npathIsAbsolute.posix('/home/foo');\n//=> true\npathIsAbsolute.posix('C:/Users/foo');\n//=> false\npathIsAbsolute.win32('C:/Users/foo');\n//=> true\npathIsAbsolute.win32('/home/foo');\n//=> false\n```\n\n\n## API\n\nSee the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path).\n\n### pathIsAbsolute(path)\n\n### pathIsAbsolute.posix(path)\n\nPOSIX specific version.\n\n### pathIsAbsolute.win32(path)\n\nWindows specific version.\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n",
+ "readmeFilename": "readme.md",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/path-is-absolute.git"
diff --git a/node_modules/plist/package.json b/node_modules/plist/package.json
index 1e02de39..4cecbbc4 100644
--- a/node_modules/plist/package.json
+++ b/node_modules/plist/package.json
@@ -113,7 +113,8 @@
],
"name": "plist",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "plist.js\n========\n### Mac OS X Plist parser/builder for Node.js and browsers\n\n[](https://saucelabs.com/u/plistjs)\n\n[](https://travis-ci.org/TooTallNate/plist.js)\n\nProvides facilities for reading and writing Mac OS X Plist (property list)\nfiles. These are often used in programming OS X and iOS applications, as\nwell as the iTunes configuration XML file.\n\nPlist files represent stored programming \"object\"s. They are very similar\nto JSON. A valid Plist file is representable as a native JavaScript Object\nand vice-versa.\n\n\n## Usage\n\n### Node.js\n\nInstall using `npm`:\n\n``` bash\n$ npm install --save plist\n```\n\nThen `require()` the _plist_ module in your file:\n\n``` js\nvar plist = require('plist');\n\n// now use the `parse()` and `build()` functions\nvar val = plist.parse('Hello World!');\nconsole.log(val); // \"Hello World!\"\n```\n\n\n### Browser\n\nInclude the `dist/plist.js` in a `\n\n```\n\n\n## API\n\n### Parsing\n\nParsing a plist from filename:\n\n``` javascript\nvar fs = require('fs');\nvar plist = require('plist');\n\nvar obj = plist.parse(fs.readFileSync('myPlist.plist', 'utf8'));\nconsole.log(JSON.stringify(obj));\n```\n\nParsing a plist from string payload:\n\n``` javascript\nvar plist = require('plist');\n\nvar obj = plist.parse('Hello World!');\nconsole.log(obj); // Hello World!\n```\n\n### Building\n\nGiven an existing JavaScript Object, you can turn it into an XML document\nthat complies with the plist DTD:\n\n``` javascript\nvar plist = require('plist');\n\nconsole.log(plist.build({ foo: 'bar' }));\n```\n\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2010-2014 Nathan Rajlich \n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/TooTallNate/node-plist.git"
diff --git a/node_modules/properties-parser/package.json b/node_modules/properties-parser/package.json
index 80840b55..c23164f9 100644
--- a/node_modules/properties-parser/package.json
+++ b/node_modules/properties-parser/package.json
@@ -54,7 +54,7 @@
"engines": {
"node": ">= 0.3.1"
},
- "homepage": "https://github.com/xavi-/node-properties-parser",
+ "homepage": "https://github.com/xavi-/node-properties-parser#readme",
"keywords": [
"parser",
".properties",
@@ -66,13 +66,15 @@
"main": "./index.js",
"maintainers": [
{
- "name": "xavi",
- "email": "xavi.rmz@gmail.com"
+ "name": "Xavi",
+ "email": "xavi.rmz@gmail.com",
+ "url": "http://xavi.co"
}
],
"name": "properties-parser",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "# node-properties-parser\n\nA parser for [.properties](http://en.wikipedia.org/wiki/.properties) files written in javascript. Properties files store key-value pairs. They are typically used for configuration and internationalization in Java applications as well as in Actionscript projects. Here's an example of the format:\n\n\t# You are reading the \".properties\" entry.\n\t! The exclamation mark can also mark text as comments.\n\twebsite = http://en.wikipedia.org/\n\tlanguage = English\n\t# The backslash below tells the application to continue reading\n\t# the value onto the next line.\n\tmessage = Welcome to \\\n\t Wikipedia!\n\t# Add spaces to the key\n\tkey\\ with\\ spaces = This is the value that could be looked up with the key \"key with spaces\".\n\t# Unicode\n\ttab : \\u0009\n*(taken from [Wikipedia](http://en.wikipedia.org/wiki/.properties#Format))*\n\nCurrently works with any version of node.js.\n\n## The API\n\n- `parse(text)`: Parses `text` into key-value pairs. Returns an object containing the key-value pairs.\n- `read(path[, callback])`: Opens the file specified by `path` and calls `parse` on its content. If the optional `callback` parameter is provided, the result is then passed to it as the second parameter. If an error occurs, the error object is passed to `callback` as the first parameter. If `callback` is not provided, the file specified by `path` is synchronously read and calls `parse` on its contents. The resulting object is immediately returned.\n- `createEditor([path[, callback]])`: If neither `path` or `callback` are provided an empty editor object is returned synchronously. If only `path` is provided, the file specified by `path` is synchronously read and parsed. An editor object with the results in then immediately returned. If both `path` and `callback` are provided, the file specified by `path` is read and parsed asynchronously. An editor object with the results are then passed to `callback` as the second parameters. If an error occurs, the error object is passed to `callback` as the first parameter.\n- `Editor`: The editor object is returned by `createEditor`. Has the following API:\n\t- `get(key)`: Returns the value currently associated with `key`.\n\t- `set(key, [value[, comment]])`: Associates `key` with `value`. An optional comment can be provided. If `value` is not specified or is `null`, then `key` is unset.\n\t- `unset(key)`: Unsets the specified `key`.\n\t- `save([path][, callback]])`: Writes the current contents of this editor object to a file specified by `path`. If `path` is not provided, then it'll be defaulted to the `path` value passed to `createEditor`. The `callback` parameter is called when the file has been written to disk.\n\t- `addHeadComment`: Added a comment to the head of the file.\n\t- `toString`: Returns the string representation of this properties editor object. This string will be written to a file if `save` is called.\n\n## Getting node-properties-parser\n\nThe easiest way to get node-properties-parser is with [npm](http://npmjs.org/):\n\n\tnpm install properties-parser\n\nAlternatively you can clone this git repository:\n\n\tgit://github.com/xavi-/node-properties-parser.git\n\n## Developed by\n* Xavi Ramirez\n\n## License\nThis project is released under [The MIT License](http://www.opensource.org/licenses/mit-license.php).",
+ "readmeFilename": "README.markdown",
"repository": {
"type": "git",
"url": "git+https://github.com/xavi-/node-properties-parser.git"
diff --git a/node_modules/q/package.json b/node_modules/q/package.json
index bbe89dc8..8f68f43c 100644
--- a/node_modules/q/package.json
+++ b/node_modules/q/package.json
@@ -137,7 +137,8 @@
}
}
},
- "readme": "ERROR: No README data found!",
+ "readme": "[](http://travis-ci.org/kriskowal/q)\n[](https://cdnjs.com/libraries/q.js)\n\n\n
\n\n\nIf a function cannot return a value or throw an exception without\nblocking, it can return a promise instead. A promise is an object\nthat represents the return value or the thrown exception that the\nfunction may eventually provide. A promise can also be used as a\nproxy for a [remote object][Q-Connection] to overcome latency.\n\n[Q-Connection]: https://github.com/kriskowal/q-connection\n\nOn the first pass, promises can mitigate the “[Pyramid of\nDoom][POD]”: the situation where code marches to the right faster\nthan it marches forward.\n\n[POD]: http://calculist.org/blog/2011/12/14/why-coroutines-wont-work-on-the-web/\n\n```javascript\nstep1(function (value1) {\n step2(value1, function(value2) {\n step3(value2, function(value3) {\n step4(value3, function(value4) {\n // Do something with value4\n });\n });\n });\n});\n```\n\nWith a promise library, you can flatten the pyramid.\n\n```javascript\nQ.fcall(promisedStep1)\n.then(promisedStep2)\n.then(promisedStep3)\n.then(promisedStep4)\n.then(function (value4) {\n // Do something with value4\n})\n.catch(function (error) {\n // Handle any error from all above steps\n})\n.done();\n```\n\nWith this approach, you also get implicit error propagation, just like `try`,\n`catch`, and `finally`. An error in `promisedStep1` will flow all the way to\nthe `catch` function, where it’s caught and handled. (Here `promisedStepN` is\na version of `stepN` that returns a promise.)\n\nThe callback approach is called an “inversion of control”.\nA function that accepts a callback instead of a return value\nis saying, “Don’t call me, I’ll call you.”. Promises\n[un-invert][IOC] the inversion, cleanly separating the input\narguments from control flow arguments. This simplifies the\nuse and creation of API’s, particularly variadic,\nrest and spread arguments.\n\n[IOC]: http://www.slideshare.net/domenicdenicola/callbacks-promises-and-coroutines-oh-my-the-evolution-of-asynchronicity-in-javascript\n\n\n## Getting Started\n\nThe Q module can be loaded as:\n\n- A ``