diff --git a/.travis.yml b/.travis.yml index f4734d14..94be6423 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,17 +2,25 @@ language: android sudo: false jdk: - oraclejdk8 +env: + global: + - ANDROID_TOOLS=${ANDROID_HOME}/tools before_install: - nvm install 6 + # ensure at least gradle 3.3 is in place. + - wget http://services.gradle.org/distributions/gradle-3.3-bin.zip + - unzip gradle-3.3-bin.zip + - export GRADLE_HOME=$PWD/gradle-3.3 + - export PATH=${GRADLE_HOME}/bin:${ANDROID_HOME}:${ANDROID_HOME}/emulator:${ANDROID_TOOLS}:${ANDROID_TOOLS}/bin:${ANDROID_HOME}/platform-tools:$PATH - node --version - gradle --version -install: - - npm install - - npm install -g codecov - echo y | android --silent update sdk --no-ui --all --filter platform-tools,tools,build-tools-26.0.0,android-26,android-25,extra-google-m2repository,extra-android-m2repository android: components: - tools +install: + - npm install + - npm install -g codecov script: - npm test - npm run cover diff --git a/RELEASENOTES.md b/RELEASENOTES.md index f35713b1..5707ac3c 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -20,6 +20,23 @@ --> ## Release Notes for Cordova (Android) ## +### 6.3.0 (Sep 25, 2017) +* [CB-6936](https://issues.apache.org/jira/browse/CB-6936) fix crash when calling methods on a destroyed webview +* [CB-12981](https://issues.apache.org/jira/browse/CB-12981) handle SDK 26.0.2 slightly different AVD list output for **Android** 8+ AVDs. Would cause "cannot read property replace of undefined" errors when trying to deploy an **Android** 8 emulator. +* Updated maven repo to include most recent lib versions +* [CB-13177](https://issues.apache.org/jira/browse/CB-13177) Updating to API Level 26 +* Revert [CB-12015](https://issues.apache.org/jira/browse/CB-12015) initial-scale values less than 1.0 are ignored on **Android** +* [CB-12730](https://issues.apache.org/jira/browse/CB-12730) The Cordova Compatibility Plugin is now integrated into cordova-android +* [CB-12453](https://issues.apache.org/jira/browse/CB-12453) Remove unnecessary double quotes from .bat files which are the causes of crash if project path contains spaces +* [CB-13031](https://issues.apache.org/jira/browse/CB-13031) Fix bug with case-sensitivity of **Android**-packageName +* [CB-10916](https://issues.apache.org/jira/browse/CB-10916) Support display name for **Android** +* [CB-12423](https://issues.apache.org/jira/browse/CB-12423) make explicit JDK 1.8 or greater is needed in the `README`, we require 1.8 for compilation, but do not have 1.8 Java features yet +* [CB-13006](https://issues.apache.org/jira/browse/CB-13006) removed create and update end-to-end tests, and instead added more unit test coverage. tweaked code coverage invocation so that we get coverage details on the create.js module. slight changes to the create.js module so that it is slightly easier to test. +* [CB-12950](https://issues.apache.org/jira/browse/CB-12950) lots of tweaks for end-to-end test runs, especially on CI: - rename npm tasks to reflect what they do (npm run unit-tests, npm run e2e-tests). main `npm test` runs linter, unit tests and e2e tests now. - locked jasmine down to ~2.6.0. - consolidate gitignores. - updated travis to run `npm test`. add **Android** sdk installation to appveyor ci run.align **Android** dpendencies across travis and appveyor. have appveyor install gradle. force gradle to version 3.4.1 in appveyor, as that seems to be the only version choco has. explicitly invoke sdkmanager to move license accepting process along. +* [CB-12605](https://issues.apache.org/jira/browse/CB-12605) In **Windows** get **Android** studio path from the registry +* [CB-12762](https://issues.apache.org/jira/browse/CB-12762) : pointed `package.json` repo items to github mirrors instead of apache repos site +* [CB-12617](https://issues.apache.org/jira/browse/CB-12617) : removed node0.x support for platforms and added engineStrict + ### 6.2.3 (May 2, 2017) * [CB-12640](https://issues.apache.org/jira/browse/CB-12640) better handling of unrecognized Android SDK commands on **Windows**. * [CB-12640](https://issues.apache.org/jira/browse/CB-12640) flipped avd parsing logic so that it always tries to use avdmanager to retrieve avds first, then falls back to android command if avdmanager cannot be found (and errors with ENOENT). updated tests - and added explicit tests to ensure to shell out to singular forms of sub-commands when executing `android` diff --git a/VERSION b/VERSION index 806c93a4..26c70f2f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.3.0-dev +6.4.0-dev diff --git a/appveyor.yml b/appveyor.yml index 086abd5f..907d0c43 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,11 +24,10 @@ install: # and appveyor interpret that as errors, and blows up. so, when piping in our "Y ENTER" # responses, we invoke cmd so we can redirect stderr to stdout, and tell it to --update itself. - ps: for($i=0;$i -lt 30;$i++) { $response += "y`n"}; $response | cmd /c 'C:\android\tools\bin\sdkmanager.bat 2>&1' --update - - cd test - - gradle :wrapper -b build.gradle - - cd .. - ps: Install-Product node $env:nodejs_version - npm install + # below is a workaround on using gradle installed via choco on appveyor + - set path=C:\ProgramData\chocolatey\lib\gradle\tools\gradle-3.4.1\bin;%path% build: off diff --git a/bin/templates/cordova/lib/builders/GradleBuilder.js b/bin/templates/cordova/lib/builders/GradleBuilder.js index 20fab2aa..41f75713 100644 --- a/bin/templates/cordova/lib/builders/GradleBuilder.js +++ b/bin/templates/cordova/lib/builders/GradleBuilder.js @@ -69,13 +69,13 @@ GradleBuilder.prototype.getArgs = function (cmd, opts) { * This returns a promise */ -GradleBuilder.prototype.runGradleWrapper = function (gradle_cmd) { +GradleBuilder.prototype.runGradleWrapper = function (gradle_cmd, gradle_file) { var gradlePath = path.join(this.root, 'gradlew'); - var wrapperGradle = path.join(this.root, 'wrapper.gradle'); + gradle_file = path.join(this.root, (gradle_file || 'wrapper.gradle')); if (fs.existsSync(gradlePath)) { // Literally do nothing, for some reason this works, while !fs.existsSync didn't on Windows } else { - return superspawn.spawn(gradle_cmd, ['-p', this.root, 'wrapper', '-b', wrapperGradle], { stdio: 'pipe' }) + return superspawn.spawn(gradle_cmd, ['-p', this.root, 'wrapper', '-b', gradle_file], { stdio: 'pipe' }) .progress(function (stdio) { suppressJavaOptionsInfo(stdio); }); diff --git a/bin/templates/cordova/lib/emulator.js b/bin/templates/cordova/lib/emulator.js index fbbe520a..6828176b 100644 --- a/bin/templates/cordova/lib/emulator.js +++ b/bin/templates/cordova/lib/emulator.js @@ -21,6 +21,7 @@ /* jshint sub:true */ +var android_versions = require('android-versions'); var retry = require('./retry'); var build = require('./build'); var path = require('path'); @@ -169,15 +170,29 @@ module.exports.list_images_using_android = function () { } */ module.exports.list_images = function () { - if (forgivingWhichSync('avdmanager')) { - return module.exports.list_images_using_avdmanager(); - } else if (forgivingWhichSync('android')) { - return module.exports.list_images_using_android(); - } else { - return Q().then(function () { - throw new CordovaError('Could not find either `android` or `avdmanager` on your $PATH! Are you sure the Android SDK is installed and available?'); + return Q.fcall(function () { + if (forgivingWhichSync('avdmanager')) { + return module.exports.list_images_using_avdmanager(); + } else if (forgivingWhichSync('android')) { + return module.exports.list_images_using_android(); + } else { + return Q().then(function () { + throw new CordovaError('Could not find either `android` or `avdmanager` on your $PATH! Are you sure the Android SDK is installed and available?'); + }); + } + }).then(function (avds) { + // In case we're missing the Android OS version string from the target description, add it. + return avds.map(function (avd) { + if (avd.target && avd.target.indexOf('Android API') > -1 && avd.target.indexOf('API level') < 0) { + var api_level = avd.target.match(/\d+/); + if (api_level) { + var level = android_versions.get(api_level); + avd.target = 'Android ' + level.semver + ' (API level ' + api_level + ')'; + } + } + return avd; }); - } + }); }; /** diff --git a/bin/templates/cordova/version b/bin/templates/cordova/version index 45dc0477..3b4df99a 100755 --- a/bin/templates/cordova/version +++ b/bin/templates/cordova/version @@ -20,7 +20,7 @@ */ // Coho updates this line: -var VERSION = "6.3.0-dev"; +var VERSION = "6.4.0-dev"; module.exports.version = VERSION; diff --git a/bin/templates/project/assets/www/cordova.js b/bin/templates/project/assets/www/cordova.js index dc1bf5ab..f71ab4d6 100644 --- a/bin/templates/project/assets/www/cordova.js +++ b/bin/templates/project/assets/www/cordova.js @@ -1,5 +1,6 @@ +/* eslint-disable */ // Platform: android -// 7ef9f9c03167a4dde4372d869472241b6816fee9 +// 74a4adc2d0fddb1e0cfb9be1961494ef0afc9893 /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -8,9 +9,9 @@ to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,2168 +19,2191 @@ specific language governing permissions and limitations under the License. */ +;(function() { +var PLATFORM_VERSION_BUILD_LABEL = '6.4.0-dev'; +// file: src/scripts/require.js + +/*jshint -W079 */ +/*jshint -W020 */ + +var require, + define; + (function () { - var PLATFORM_VERSION_BUILD_LABEL = '6.3.0-dev'; - // file: src/scripts/require.js - /* global prompt */ - /* global atob */ - /* eslint no-eval : 0 */ - /* eslint no-cond-assign : 0 */ - /* eslint valid-typeof : 0 */ + var modules = {}, + // Stack of moduleIds currently being built. + requireStack = [], + // Map of module ID -> index into requireStack of modules currently being built. + inProgressModules = {}, + SEPARATOR = "."; - var require; - var define; - (function () { - var modules = {}; - // Stack of moduleIds currently being built. - var requireStack = []; - // Map of module ID -> index into requireStack of modules currently being built. - var inProgressModules = {}; - var SEPARATOR = '.'; - function build (module) { - var factory = module.factory; - var localRequire = function (id) { + function build(module) { + var factory = module.factory, + localRequire = function (id) { var resultantId = id; - // Its a relative path, so lop off the last portion and add the id (minus "./") - if (id.charAt(0) === '.') { + //Its a relative path, so lop off the last portion and add the id (minus "./") + if (id.charAt(0) === ".") { resultantId = module.id.slice(0, module.id.lastIndexOf(SEPARATOR)) + SEPARATOR + id.slice(2); } return require(resultantId); }; - module.exports = {}; - delete module.factory; - factory(localRequire, module.exports, module); - return module.exports; - } - - require = function (id) { - if (!modules[id]) { - throw 'module ' + id + ' not found'; - } else if (id in inProgressModules) { - var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id; - throw 'Cycle in require graph: ' + cycle; - } - if (modules[id].factory) { - try { - inProgressModules[id] = requireStack.length; - requireStack.push(id); - return build(modules[id]); - } finally { - delete inProgressModules[id]; - requireStack.pop(); - } - } - return modules[id].exports; - }; - - define = function (id, factory) { - if (modules[id]) { - throw 'module ' + id + ' already defined'; - } - - modules[id] = { - id: id, - factory: factory - }; - }; - - define.remove = function (id) { - delete modules[id]; - }; - - define.moduleMap = modules; - })(); - - // Export for use in node - if (typeof module === 'object' && typeof require === 'function') { - module.exports.require = require; - module.exports.define = define; + module.exports = {}; + delete module.factory; + factory(localRequire, module.exports, module); + return module.exports; } - // file: src/cordova.js - define('cordova', function (require, exports, module) { - - // Workaround for Windows 10 in hosted environment case - // http://www.w3.org/html/wg/drafts/html/master/browsers.html#named-access-on-the-window-object - var HTMLElement; - if (window.cordova && !(window.cordova instanceof HTMLElement)) { - throw new Error('cordova already defined'); + require = function (id) { + if (!modules[id]) { + throw "module " + id + " not found"; + } else if (id in inProgressModules) { + var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id; + throw "Cycle in require graph: " + cycle; } - - var channel = require('cordova/channel'); - var platform = require('cordova/platform'); - - /** - * Intercept calls to addEventListener + removeEventListener and handle deviceready, - * resume, and pause events. - */ - var m_document_addEventListener = document.addEventListener; - var m_document_removeEventListener = document.removeEventListener; - var m_window_addEventListener = window.addEventListener; - var m_window_removeEventListener = window.removeEventListener; - - /** - * Houses custom event handlers to intercept on document + window event listeners. - */ - var documentEventHandlers = {}; - var windowEventHandlers = {}; - - document.addEventListener = function (evt, handler, capture) { - var e = evt.toLowerCase(); - if (typeof documentEventHandlers[e] !== 'undefined') { - documentEventHandlers[e].subscribe(handler); - } else { - m_document_addEventListener.call(document, evt, handler, capture); - } - }; - - window.addEventListener = function (evt, handler, capture) { - var e = evt.toLowerCase(); - if (typeof windowEventHandlers[e] !== 'undefined') { - windowEventHandlers[e].subscribe(handler); - } else { - m_window_addEventListener.call(window, evt, handler, capture); - } - }; - - document.removeEventListener = function (evt, handler, capture) { - var e = evt.toLowerCase(); - // If unsubscribing from an event that is handled by a plugin - if (typeof documentEventHandlers[e] !== 'undefined') { - documentEventHandlers[e].unsubscribe(handler); - } else { - m_document_removeEventListener.call(document, evt, handler, capture); - } - }; - - window.removeEventListener = function (evt, handler, capture) { - var e = evt.toLowerCase(); - // If unsubscribing from an event that is handled by a plugin - if (typeof windowEventHandlers[e] !== 'undefined') { - windowEventHandlers[e].unsubscribe(handler); - } else { - m_window_removeEventListener.call(window, evt, handler, capture); - } - }; - - function createEvent (type, data) { - var event = document.createEvent('Events'); - event.initEvent(type, false, false); - if (data) { - for (var i in data) { - if (data.hasOwnProperty(i)) { - event[i] = data[i]; - } - } - } - return event; - } - - var cordova = { - define: define, - require: require, - version: PLATFORM_VERSION_BUILD_LABEL, - platformVersion: PLATFORM_VERSION_BUILD_LABEL, - platformId: platform.id, - /** - * Methods to add/remove your own addEventListener hijacking on document + window. - */ - addWindowEventHandler: function (event) { - return (windowEventHandlers[event] = channel.create(event)); - }, - addStickyDocumentEventHandler: function (event) { - return (documentEventHandlers[event] = channel.createSticky(event)); - }, - addDocumentEventHandler: function (event) { - return (documentEventHandlers[event] = channel.create(event)); - }, - removeWindowEventHandler: function (event) { - delete windowEventHandlers[event]; - }, - removeDocumentEventHandler: function (event) { - delete documentEventHandlers[event]; - }, - /** - * Retrieve original event handlers that were replaced by Cordova - * - * @return object - */ - getOriginalHandlers: function () { - return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener}, - 'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}}; - }, - /** - * Method to fire event from native code - * bNoDetach is required for events which cause an exception which needs to be caught in native code - */ - fireDocumentEvent: function (type, data, bNoDetach) { - var evt = createEvent(type, data); - if (typeof documentEventHandlers[type] !== 'undefined') { - if (bNoDetach) { - documentEventHandlers[type].fire(evt); - } else { - setTimeout(function () { - // Fire deviceready on listeners that were registered before cordova.js was loaded. - if (type === 'deviceready') { - document.dispatchEvent(evt); - } - documentEventHandlers[type].fire(evt); - }, 0); - } - } else { - document.dispatchEvent(evt); - } - }, - fireWindowEvent: function (type, data) { - var evt = createEvent(type, data); - if (typeof windowEventHandlers[type] !== 'undefined') { - setTimeout(function () { - windowEventHandlers[type].fire(evt); - }, 0); - } else { - window.dispatchEvent(evt); - } - }, - - /** - * Plugin callback mechanism. - */ - // Randomize the starting callbackId to avoid collisions after refreshing or navigating. - // This way, it's very unlikely that any new callback would get the same callbackId as an old callback. - callbackId: Math.floor(Math.random() * 2000000000), - callbacks: {}, - callbackStatus: { - NO_RESULT: 0, - OK: 1, - CLASS_NOT_FOUND_EXCEPTION: 2, - ILLEGAL_ACCESS_EXCEPTION: 3, - INSTANTIATION_EXCEPTION: 4, - MALFORMED_URL_EXCEPTION: 5, - IO_EXCEPTION: 6, - INVALID_ACTION: 7, - JSON_EXCEPTION: 8, - ERROR: 9 - }, - - /** - * Called by native code when returning successful result from an action. - */ - callbackSuccess: function (callbackId, args) { - cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback); - }, - - /** - * Called by native code when returning error result from an action. - */ - callbackError: function (callbackId, args) { - // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative. - // Derive success from status. - cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback); - }, - - /** - * Called by native code when returning the result from an action. - */ - callbackFromNative: function (callbackId, isSuccess, status, args, keepCallback) { - try { - var callback = cordova.callbacks[callbackId]; - if (callback) { - if (isSuccess && status === cordova.callbackStatus.OK) { - callback.success && callback.success.apply(null, args); - } else if (!isSuccess) { - callback.fail && callback.fail.apply(null, args); - } - /* - else - Note, this case is intentionally not caught. - this can happen if isSuccess is true, but callbackStatus is NO_RESULT - which is used to remove a callback from the list without calling the callbacks - typically keepCallback is false in this case - */ - // Clear callback if not expecting any more results - if (!keepCallback) { - delete cordova.callbacks[callbackId]; - } - } - } catch (err) { - var msg = 'Error in ' + (isSuccess ? 'Success' : 'Error') + ' callbackId: ' + callbackId + ' : ' + err; - console && console.log && console.log(msg); - cordova.fireWindowEvent('cordovacallbackerror', { 'message': msg }); - throw err; - } - }, - addConstructor: function (func) { - channel.onCordovaReady.subscribe(function () { - try { - func(); - } catch (e) { - console.log('Failed to run constructor: ' + e); - } - }); - } - }; - - module.exports = cordova; - - }); - - // file: /Users/maj/src/cordova-android/cordova-js-src/android/nativeapiprovider.js - define('cordova/android/nativeapiprovider', function (require, exports, module) { - - /** - * Exports the ExposedJsApi.java object if available, otherwise exports the PromptBasedNativeApi. - */ - - var nativeApi = this._cordovaNative || require('cordova/android/promptbasednativeapi'); - var currentApi = nativeApi; - - module.exports = { - get: function () { return currentApi; }, - setPreferPrompt: function (value) { - currentApi = value ? require('cordova/android/promptbasednativeapi') : nativeApi; - }, - // Used only by tests. - set: function (value) { - currentApi = value; - } - }; - - }); - - // file: /Users/maj/src/cordova-android/cordova-js-src/android/promptbasednativeapi.js - define('cordova/android/promptbasednativeapi', function (require, exports, module) { - - /** - * Implements the API of ExposedJsApi.java, but uses prompt() to communicate. - * This is used pre-JellyBean, where addJavascriptInterface() is disabled. - */ - - module.exports = { - exec: function (bridgeSecret, service, action, callbackId, argsJson) { - return prompt(argsJson, 'gap:' + JSON.stringify([bridgeSecret, service, action, callbackId])); - }, - setNativeToJsBridgeMode: function (bridgeSecret, value) { - prompt(value, 'gap_bridge_mode:' + bridgeSecret); - }, - retrieveJsMessages: function (bridgeSecret, fromOnlineEvent) { - return prompt(+fromOnlineEvent, 'gap_poll:' + bridgeSecret); - } - }; - - }); - - // file: src/common/argscheck.js - define('cordova/argscheck', function (require, exports, module) { - - var utils = require('cordova/utils'); - - var moduleExports = module.exports; - - var typeMap = { - 'A': 'Array', - 'D': 'Date', - 'N': 'Number', - 'S': 'String', - 'F': 'Function', - 'O': 'Object' - }; - - function extractParamName (callee, argIndex) { - return (/.*?\((.*?)\)/).exec(callee)[1].split(', ')[argIndex]; - } - - function checkArgs (spec, functionName, args, opt_callee) { - if (!moduleExports.enableChecks) { - return; - } - var errMsg = null; - var typeName; - for (var i = 0; i < spec.length; ++i) { - var c = spec.charAt(i); - var cUpper = c.toUpperCase(); - var arg = args[i]; - // Asterix means allow anything. - if (c === '*') { - continue; - } - typeName = utils.typeName(arg); - if ((arg === null || arg === undefined) && c === cUpper) { - continue; - } - if (typeName !== typeMap[cUpper]) { - errMsg = 'Expected ' + typeMap[cUpper]; - break; - } - } - if (errMsg) { - errMsg += ', but got ' + typeName + '.'; - errMsg = 'Wrong type for parameter "' + extractParamName(opt_callee || args.callee, i) + '" of ' + functionName + ': ' + errMsg; - // Don't log when running unit tests. - if (typeof jasmine === 'undefined') { - console.error(errMsg); - } - throw TypeError(errMsg); - } - } - - function getValue (value, defaultValue) { - return value === undefined ? defaultValue : value; - } - - moduleExports.checkArgs = checkArgs; - moduleExports.getValue = getValue; - moduleExports.enableChecks = true; - - }); - - // file: src/common/base64.js - define('cordova/base64', function (require, exports, module) { - - var base64 = exports; - - base64.fromArrayBuffer = function (arrayBuffer) { - var array = new Uint8Array(arrayBuffer); - return uint8ToBase64(array); - }; - - base64.toArrayBuffer = function (str) { - var decodedStr = typeof atob !== 'undefined' ? atob(str) : Buffer.alloc(str, 'base64').toString('binary'); - var arrayBuffer = new ArrayBuffer(decodedStr.length); - var array = new Uint8Array(arrayBuffer); - for (var i = 0, len = decodedStr.length; i < len; i++) { - array[i] = decodedStr.charCodeAt(i); - } - return arrayBuffer; - }; - - // ------------------------------------------------------------------------------ - - /* This code is based on the performance tests at http://jsperf.com/b64tests - * This 12-bit-at-a-time algorithm was the best performing version on all - * platforms tested. - */ - - var b64_6bit = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - var b64_12bit; - - var b64_12bitTable = function () { - b64_12bit = []; - for (var i = 0; i < 64; i++) { - for (var j = 0; j < 64; j++) { - b64_12bit[i * 64 + j] = b64_6bit[i] + b64_6bit[j]; - } - } - b64_12bitTable = function () { return b64_12bit; }; - return b64_12bit; - }; - - function uint8ToBase64 (rawData) { - var numBytes = rawData.byteLength; - var output = ''; - var segment; - var table = b64_12bitTable(); - for (var i = 0; i < numBytes - 2; i += 3) { - segment = (rawData[i] << 16) + (rawData[i + 1] << 8) + rawData[i + 2]; - output += table[segment >> 12]; - output += table[segment & 0xfff]; - } - if (numBytes - i === 2) { - segment = (rawData[i] << 16) + (rawData[i + 1] << 8); - output += table[segment >> 12]; - output += b64_6bit[(segment & 0xfff) >> 6]; - output += '='; - } else if (numBytes - i === 1) { - segment = (rawData[i] << 16); - output += table[segment >> 12]; - output += '=='; - } - return output; - } - - }); - - // file: src/common/builder.js - define('cordova/builder', function (require, exports, module) { - - var utils = require('cordova/utils'); - - function each (objects, func, context) { - for (var prop in objects) { - if (objects.hasOwnProperty(prop)) { - func.apply(context, [objects[prop], prop]); - } - } - } - - function clobber (obj, key, value) { - exports.replaceHookForTesting(obj, key); - var needsProperty = false; + if (modules[id].factory) { try { - obj[key] = value; - } catch (e) { - needsProperty = true; - } - // Getters can only be overridden by getters. - if (needsProperty || obj[key] !== value) { - utils.defineGetter(obj, key, function () { - return value; - }); + inProgressModules[id] = requireStack.length; + requireStack.push(id); + return build(modules[id]); + } finally { + delete inProgressModules[id]; + requireStack.pop(); } } + return modules[id].exports; + }; - function assignOrWrapInDeprecateGetter (obj, key, value, message) { - if (message) { - utils.defineGetter(obj, key, function () { - console.log(message); - delete obj[key]; - clobber(obj, key, value); - return value; - }); + define = function (id, factory) { + if (modules[id]) { + throw "module " + id + " already defined"; + } + + modules[id] = { + id: id, + factory: factory + }; + }; + + define.remove = function (id) { + delete modules[id]; + }; + + define.moduleMap = modules; +})(); + +//Export for use in node +if (typeof module === "object" && typeof require === "function") { + module.exports.require = require; + module.exports.define = define; +} + +// file: src/cordova.js +define("cordova", function(require, exports, module) { + +// Workaround for Windows 10 in hosted environment case +// http://www.w3.org/html/wg/drafts/html/master/browsers.html#named-access-on-the-window-object +if (window.cordova && !(window.cordova instanceof HTMLElement)) { + throw new Error("cordova already defined"); +} + + +var channel = require('cordova/channel'); +var platform = require('cordova/platform'); + + +/** + * Intercept calls to addEventListener + removeEventListener and handle deviceready, + * resume, and pause events. + */ +var m_document_addEventListener = document.addEventListener; +var m_document_removeEventListener = document.removeEventListener; +var m_window_addEventListener = window.addEventListener; +var m_window_removeEventListener = window.removeEventListener; + +/** + * Houses custom event handlers to intercept on document + window event listeners. + */ +var documentEventHandlers = {}, + windowEventHandlers = {}; + +document.addEventListener = function(evt, handler, capture) { + var e = evt.toLowerCase(); + if (typeof documentEventHandlers[e] != 'undefined') { + documentEventHandlers[e].subscribe(handler); + } else { + m_document_addEventListener.call(document, evt, handler, capture); + } +}; + +window.addEventListener = function(evt, handler, capture) { + var e = evt.toLowerCase(); + if (typeof windowEventHandlers[e] != 'undefined') { + windowEventHandlers[e].subscribe(handler); + } else { + m_window_addEventListener.call(window, evt, handler, capture); + } +}; + +document.removeEventListener = function(evt, handler, capture) { + var e = evt.toLowerCase(); + // If unsubscribing from an event that is handled by a plugin + if (typeof documentEventHandlers[e] != "undefined") { + documentEventHandlers[e].unsubscribe(handler); + } else { + m_document_removeEventListener.call(document, evt, handler, capture); + } +}; + +window.removeEventListener = function(evt, handler, capture) { + var e = evt.toLowerCase(); + // If unsubscribing from an event that is handled by a plugin + if (typeof windowEventHandlers[e] != "undefined") { + windowEventHandlers[e].unsubscribe(handler); + } else { + m_window_removeEventListener.call(window, evt, handler, capture); + } +}; + +function createEvent(type, data) { + var event = document.createEvent('Events'); + event.initEvent(type, false, false); + if (data) { + for (var i in data) { + if (data.hasOwnProperty(i)) { + event[i] = data[i]; + } + } + } + return event; +} + + +var cordova = { + define:define, + require:require, + version:PLATFORM_VERSION_BUILD_LABEL, + platformVersion:PLATFORM_VERSION_BUILD_LABEL, + platformId:platform.id, + /** + * Methods to add/remove your own addEventListener hijacking on document + window. + */ + addWindowEventHandler:function(event) { + return (windowEventHandlers[event] = channel.create(event)); + }, + addStickyDocumentEventHandler:function(event) { + return (documentEventHandlers[event] = channel.createSticky(event)); + }, + addDocumentEventHandler:function(event) { + return (documentEventHandlers[event] = channel.create(event)); + }, + removeWindowEventHandler:function(event) { + delete windowEventHandlers[event]; + }, + removeDocumentEventHandler:function(event) { + delete documentEventHandlers[event]; + }, + /** + * Retrieve original event handlers that were replaced by Cordova + * + * @return object + */ + getOriginalHandlers: function() { + return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener}, + 'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}}; + }, + /** + * Method to fire event from native code + * bNoDetach is required for events which cause an exception which needs to be caught in native code + */ + fireDocumentEvent: function(type, data, bNoDetach) { + var evt = createEvent(type, data); + if (typeof documentEventHandlers[type] != 'undefined') { + if( bNoDetach ) { + documentEventHandlers[type].fire(evt); + } + else { + setTimeout(function() { + // Fire deviceready on listeners that were registered before cordova.js was loaded. + if (type == 'deviceready') { + document.dispatchEvent(evt); + } + documentEventHandlers[type].fire(evt); + }, 0); + } + } else { + document.dispatchEvent(evt); + } + }, + fireWindowEvent: function(type, data) { + var evt = createEvent(type,data); + if (typeof windowEventHandlers[type] != 'undefined') { + setTimeout(function() { + windowEventHandlers[type].fire(evt); + }, 0); + } else { + window.dispatchEvent(evt); + } + }, + + /** + * Plugin callback mechanism. + */ + // Randomize the starting callbackId to avoid collisions after refreshing or navigating. + // This way, it's very unlikely that any new callback would get the same callbackId as an old callback. + callbackId: Math.floor(Math.random() * 2000000000), + callbacks: {}, + callbackStatus: { + NO_RESULT: 0, + OK: 1, + CLASS_NOT_FOUND_EXCEPTION: 2, + ILLEGAL_ACCESS_EXCEPTION: 3, + INSTANTIATION_EXCEPTION: 4, + MALFORMED_URL_EXCEPTION: 5, + IO_EXCEPTION: 6, + INVALID_ACTION: 7, + JSON_EXCEPTION: 8, + ERROR: 9 + }, + + /** + * Called by native code when returning successful result from an action. + */ + callbackSuccess: function(callbackId, args) { + cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback); + }, + + /** + * Called by native code when returning error result from an action. + */ + callbackError: function(callbackId, args) { + // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative. + // Derive success from status. + cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback); + }, + + /** + * Called by native code when returning the result from an action. + */ + callbackFromNative: function(callbackId, isSuccess, status, args, keepCallback) { + try { + var callback = cordova.callbacks[callbackId]; + if (callback) { + if (isSuccess && status == cordova.callbackStatus.OK) { + callback.success && callback.success.apply(null, args); + } else if (!isSuccess) { + callback.fail && callback.fail.apply(null, args); + } + /* + else + Note, this case is intentionally not caught. + this can happen if isSuccess is true, but callbackStatus is NO_RESULT + which is used to remove a callback from the list without calling the callbacks + typically keepCallback is false in this case + */ + // Clear callback if not expecting any more results + if (!keepCallback) { + delete cordova.callbacks[callbackId]; + } + } + } + catch (err) { + var msg = "Error in " + (isSuccess ? "Success" : "Error") + " callbackId: " + callbackId + " : " + err; + console && console.log && console.log(msg); + cordova.fireWindowEvent("cordovacallbackerror", { 'message': msg }); + throw err; + } + }, + addConstructor: function(func) { + channel.onCordovaReady.subscribe(function() { + try { + func(); + } catch(e) { + console.log("Failed to run constructor: " + e); + } + }); + } +}; + + +module.exports = cordova; + +}); + +// file: /Users/jbowser/cordova/cordova-android/cordova-js-src/android/nativeapiprovider.js +define("cordova/android/nativeapiprovider", function(require, exports, module) { + +/** + * Exports the ExposedJsApi.java object if available, otherwise exports the PromptBasedNativeApi. + */ + +var nativeApi = this._cordovaNative || require('cordova/android/promptbasednativeapi'); +var currentApi = nativeApi; + +module.exports = { + get: function() { return currentApi; }, + setPreferPrompt: function(value) { + currentApi = value ? require('cordova/android/promptbasednativeapi') : nativeApi; + }, + // Used only by tests. + set: function(value) { + currentApi = value; + } +}; + +}); + +// file: /Users/jbowser/cordova/cordova-android/cordova-js-src/android/promptbasednativeapi.js +define("cordova/android/promptbasednativeapi", function(require, exports, module) { + +/** + * Implements the API of ExposedJsApi.java, but uses prompt() to communicate. + * This is used pre-JellyBean, where addJavascriptInterface() is disabled. + */ + +module.exports = { + exec: function(bridgeSecret, service, action, callbackId, argsJson) { + return prompt(argsJson, 'gap:'+JSON.stringify([bridgeSecret, service, action, callbackId])); + }, + setNativeToJsBridgeMode: function(bridgeSecret, value) { + prompt(value, 'gap_bridge_mode:' + bridgeSecret); + }, + retrieveJsMessages: function(bridgeSecret, fromOnlineEvent) { + return prompt(+fromOnlineEvent, 'gap_poll:' + bridgeSecret); + } +}; + +}); + +// file: src/common/argscheck.js +define("cordova/argscheck", function(require, exports, module) { + +var utils = require('cordova/utils'); + +var moduleExports = module.exports; + +var typeMap = { + 'A': 'Array', + 'D': 'Date', + 'N': 'Number', + 'S': 'String', + 'F': 'Function', + 'O': 'Object' +}; + +function extractParamName(callee, argIndex) { + return (/.*?\((.*?)\)/).exec(callee)[1].split(', ')[argIndex]; +} + +function checkArgs(spec, functionName, args, opt_callee) { + if (!moduleExports.enableChecks) { + return; + } + var errMsg = null; + var typeName; + for (var i = 0; i < spec.length; ++i) { + var c = spec.charAt(i), + cUpper = c.toUpperCase(), + arg = args[i]; + // Asterix means allow anything. + if (c == '*') { + continue; + } + typeName = utils.typeName(arg); + if ((arg === null || arg === undefined) && c == cUpper) { + continue; + } + if (typeName != typeMap[cUpper]) { + errMsg = 'Expected ' + typeMap[cUpper]; + break; + } + } + if (errMsg) { + errMsg += ', but got ' + typeName + '.'; + errMsg = 'Wrong type for parameter "' + extractParamName(opt_callee || args.callee, i) + '" of ' + functionName + ': ' + errMsg; + // Don't log when running unit tests. + if (typeof jasmine == 'undefined') { + console.error(errMsg); + } + throw TypeError(errMsg); + } +} + +function getValue(value, defaultValue) { + return value === undefined ? defaultValue : value; +} + +moduleExports.checkArgs = checkArgs; +moduleExports.getValue = getValue; +moduleExports.enableChecks = true; + + +}); + +// file: src/common/base64.js +define("cordova/base64", function(require, exports, module) { + +var base64 = exports; + +base64.fromArrayBuffer = function(arrayBuffer) { + var array = new Uint8Array(arrayBuffer); + return uint8ToBase64(array); +}; + +base64.toArrayBuffer = function(str) { + var decodedStr = typeof atob != 'undefined' ? atob(str) : new Buffer(str,'base64').toString('binary'); + var arrayBuffer = new ArrayBuffer(decodedStr.length); + var array = new Uint8Array(arrayBuffer); + for (var i=0, len=decodedStr.length; i < len; i++) { + array[i] = decodedStr.charCodeAt(i); + } + return arrayBuffer; +}; + +//------------------------------------------------------------------------------ + +/* This code is based on the performance tests at http://jsperf.com/b64tests + * This 12-bit-at-a-time algorithm was the best performing version on all + * platforms tested. + */ + +var b64_6bit = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +var b64_12bit; + +var b64_12bitTable = function() { + b64_12bit = []; + for (var i=0; i<64; i++) { + for (var j=0; j<64; j++) { + b64_12bit[i*64+j] = b64_6bit[i] + b64_6bit[j]; + } + } + b64_12bitTable = function() { return b64_12bit; }; + return b64_12bit; +}; + +function uint8ToBase64(rawData) { + var numBytes = rawData.byteLength; + var output=""; + var segment; + var table = b64_12bitTable(); + for (var i=0;i> 12]; + output += table[segment & 0xfff]; + } + if (numBytes - i == 2) { + segment = (rawData[i] << 16) + (rawData[i+1] << 8); + output += table[segment >> 12]; + output += b64_6bit[(segment & 0xfff) >> 6]; + output += '='; + } else if (numBytes - i == 1) { + segment = (rawData[i] << 16); + output += table[segment >> 12]; + output += '=='; + } + return output; +} + +}); + +// file: src/common/builder.js +define("cordova/builder", function(require, exports, module) { + +var utils = require('cordova/utils'); + +function each(objects, func, context) { + for (var prop in objects) { + if (objects.hasOwnProperty(prop)) { + func.apply(context, [objects[prop], prop]); + } + } +} + +function clobber(obj, key, value) { + exports.replaceHookForTesting(obj, key); + var needsProperty = false; + try { + obj[key] = value; + } catch (e) { + needsProperty = true; + } + // Getters can only be overridden by getters. + if (needsProperty || obj[key] !== value) { + utils.defineGetter(obj, key, function() { + return value; + }); + } +} + +function assignOrWrapInDeprecateGetter(obj, key, value, message) { + if (message) { + utils.defineGetter(obj, key, function() { + console.log(message); + delete obj[key]; + clobber(obj, key, value); + return value; + }); + } else { + clobber(obj, key, value); + } +} + +function include(parent, objects, clobber, merge) { + each(objects, function (obj, key) { + try { + var result = obj.path ? require(obj.path) : {}; + + if (clobber) { + // Clobber if it doesn't exist. + if (typeof parent[key] === 'undefined') { + assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated); + } else if (typeof obj.path !== 'undefined') { + // If merging, merge properties onto parent, otherwise, clobber. + if (merge) { + recursiveMerge(parent[key], result); + } else { + assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated); + } + } + result = parent[key]; } else { - clobber(obj, key, value); - } - } - - function include (parent, objects, clobber, merge) { - each(objects, function (obj, key) { - try { - var result = obj.path ? require(obj.path) : {}; - - if (clobber) { - // Clobber if it doesn't exist. - if (typeof parent[key] === 'undefined') { - assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated); - } else if (typeof obj.path !== 'undefined') { - // If merging, merge properties onto parent, otherwise, clobber. - if (merge) { - recursiveMerge(parent[key], result); - } else { - assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated); - } - } - result = parent[key]; - } else { - // Overwrite if not currently defined. - if (typeof parent[key] === 'undefined') { - assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated); - } else { - // Set result to what already exists, so we can build children into it if they exist. - result = parent[key]; - } - } - - if (obj.children) { - include(result, obj.children, clobber, merge); - } - } catch (e) { - utils.alert('Exception building Cordova JS globals: ' + e + ' for key "' + key + '"'); - } - }); - } - - /** - * Merge properties from one object onto another recursively. Properties from - * the src object will overwrite existing target property. - * - * @param target Object to merge properties into. - * @param src Object to merge properties from. - */ - function recursiveMerge (target, src) { - for (var prop in src) { - if (src.hasOwnProperty(prop)) { - if (target.prototype && target.prototype.constructor === target) { - // If the target object is a constructor override off prototype. - clobber(target.prototype, prop, src[prop]); - } else { - if (typeof src[prop] === 'object' && typeof target[prop] === 'object') { - recursiveMerge(target[prop], src[prop]); - } else { - clobber(target, prop, src[prop]); - } - } + // Overwrite if not currently defined. + if (typeof parent[key] == 'undefined') { + assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated); + } else { + // Set result to what already exists, so we can build children into it if they exist. + result = parent[key]; } } + + if (obj.children) { + include(result, obj.children, clobber, merge); + } + } catch(e) { + utils.alert('Exception building Cordova JS globals: ' + e + ' for key "' + key + '"'); } - - exports.buildIntoButDoNotClobber = function (objects, target) { - include(target, objects, false, false); - }; - exports.buildIntoAndClobber = function (objects, target) { - include(target, objects, true, false); - }; - exports.buildIntoAndMerge = function (objects, target) { - include(target, objects, true, true); - }; - exports.recursiveMerge = recursiveMerge; - exports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter; - exports.replaceHookForTesting = function () {}; - }); +} - // file: src/common/channel.js - define('cordova/channel', function (require, exports, module) { +/** + * Merge properties from one object onto another recursively. Properties from + * the src object will overwrite existing target property. + * + * @param target Object to merge properties into. + * @param src Object to merge properties from. + */ +function recursiveMerge(target, src) { + for (var prop in src) { + if (src.hasOwnProperty(prop)) { + if (target.prototype && target.prototype.constructor === target) { + // If the target object is a constructor override off prototype. + clobber(target.prototype, prop, src[prop]); + } else { + if (typeof src[prop] === 'object' && typeof target[prop] === 'object') { + recursiveMerge(target[prop], src[prop]); + } else { + clobber(target, prop, src[prop]); + } + } + } + } +} - var utils = require('cordova/utils'); - var nextGuid = 1; +exports.buildIntoButDoNotClobber = function(objects, target) { + include(target, objects, false, false); +}; +exports.buildIntoAndClobber = function(objects, target) { + include(target, objects, true, false); +}; +exports.buildIntoAndMerge = function(objects, target) { + include(target, objects, true, true); +}; +exports.recursiveMerge = recursiveMerge; +exports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter; +exports.replaceHookForTesting = function() {}; +}); + +// file: src/common/channel.js +define("cordova/channel", function(require, exports, module) { + +var utils = require('cordova/utils'), + nextGuid = 1; + +/** + * Custom pub-sub "channel" that can have functions subscribed to it + * This object is used to define and control firing of events for + * cordova initialization, as well as for custom events thereafter. + * + * The order of events during page load and Cordova startup is as follows: + * + * onDOMContentLoaded* Internal event that is received when the web page is loaded and parsed. + * onNativeReady* Internal event that indicates the Cordova native side is ready. + * onCordovaReady* Internal event fired when all Cordova JavaScript objects have been created. + * onDeviceReady* User event fired to indicate that Cordova is ready + * onResume User event fired to indicate a start/resume lifecycle event + * onPause User event fired to indicate a pause lifecycle event + * + * The events marked with an * are sticky. Once they have fired, they will stay in the fired state. + * All listeners that subscribe after the event is fired will be executed right away. + * + * The only Cordova events that user code should register for are: + * deviceready Cordova native code is initialized and Cordova APIs can be called from JavaScript + * pause App has moved to background + * resume App has returned to foreground + * + * Listeners can be registered as: + * document.addEventListener("deviceready", myDeviceReadyListener, false); + * document.addEventListener("resume", myResumeListener, false); + * document.addEventListener("pause", myPauseListener, false); + * + * The DOM lifecycle events should be used for saving and restoring state + * window.onload + * window.onunload + * + */ + +/** + * Channel + * @constructor + * @param type String the channel name + */ +var Channel = function(type, sticky) { + this.type = type; + // Map of guid -> function. + this.handlers = {}; + // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired. + this.state = sticky ? 1 : 0; + // Used in sticky mode to remember args passed to fire(). + this.fireArgs = null; + // Used by onHasSubscribersChange to know if there are any listeners. + this.numHandlers = 0; + // Function that is called when the first listener is subscribed, or when + // the last listener is unsubscribed. + this.onHasSubscribersChange = null; +}, + channel = { /** - * Custom pub-sub "channel" that can have functions subscribed to it - * This object is used to define and control firing of events for - * cordova initialization, as well as for custom events thereafter. - * - * The order of events during page load and Cordova startup is as follows: - * - * onDOMContentLoaded* Internal event that is received when the web page is loaded and parsed. - * onNativeReady* Internal event that indicates the Cordova native side is ready. - * onCordovaReady* Internal event fired when all Cordova JavaScript objects have been created. - * onDeviceReady* User event fired to indicate that Cordova is ready - * onResume User event fired to indicate a start/resume lifecycle event - * onPause User event fired to indicate a pause lifecycle event - * - * The events marked with an * are sticky. Once they have fired, they will stay in the fired state. - * All listeners that subscribe after the event is fired will be executed right away. - * - * The only Cordova events that user code should register for are: - * deviceready Cordova native code is initialized and Cordova APIs can be called from JavaScript - * pause App has moved to background - * resume App has returned to foreground - * - * Listeners can be registered as: - * document.addEventListener("deviceready", myDeviceReadyListener, false); - * document.addEventListener("resume", myResumeListener, false); - * document.addEventListener("pause", myPauseListener, false); - * - * The DOM lifecycle events should be used for saving and restoring state - * window.onload - * window.onunload - * + * Calls the provided function only after all of the channels specified + * have been fired. All channels must be sticky channels. */ - - /** - * Channel - * @constructor - * @param type String the channel name - */ - var Channel = function (type, sticky) { - this.type = type; - // Map of guid -> function. - this.handlers = {}; - // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired. - this.state = sticky ? 1 : 0; - // Used in sticky mode to remember args passed to fire(). - this.fireArgs = null; - // Used by onHasSubscribersChange to know if there are any listeners. - this.numHandlers = 0; - // Function that is called when the first listener is subscribed, or when - // the last listener is unsubscribed. - this.onHasSubscribersChange = null; - }; - var channel = { - /** - * Calls the provided function only after all of the channels specified - * have been fired. All channels must be sticky channels. - */ - join: function (h, c) { - var len = c.length; - var i = len; - var f = function () { + join: function(h, c) { + var len = c.length, + i = len, + f = function() { if (!(--i)) h(); }; - for (var j = 0; j < len; j++) { - if (c[j].state === 0) { - throw Error('Can only use join with sticky channels.'); - } - c[j].subscribe(f); - } - if (!len) h(); - }, - create: function (type) { - return (channel[type] = new Channel(type, false)); - }, - createSticky: function (type) { - return (channel[type] = new Channel(type, true)); - }, - - /** - * cordova Channels that must fire before "deviceready" is fired. - */ - deviceReadyChannelsArray: [], - deviceReadyChannelsMap: {}, - - /** - * Indicate that a feature needs to be initialized before it is ready to be used. - * This holds up Cordova's "deviceready" event until the feature has been initialized - * and Cordova.initComplete(feature) is called. - * - * @param feature {String} The unique feature name - */ - waitForInitialization: function (feature) { - if (feature) { - var c = channel[feature] || this.createSticky(feature); - this.deviceReadyChannelsMap[feature] = c; - this.deviceReadyChannelsArray.push(c); - } - }, - - /** - * Indicate that initialization code has completed and the feature is ready to be used. - * - * @param feature {String} The unique feature name - */ - initializationComplete: function (feature) { - var c = this.deviceReadyChannelsMap[feature]; - if (c) { - c.fire(); + for (var j=0; jNative bridge. - POLLING: 0, - // For LOAD_URL to be viable, it would need to have a work-around for - // the bug where the soft-keyboard gets dismissed when a message is sent. - LOAD_URL: 1, - // For the ONLINE_EVENT to be viable, it would need to intercept all event - // listeners (both through addEventListener and window.ononline) as well - // as set the navigator property itself. - ONLINE_EVENT: 2, - EVAL_BRIDGE: 3 - }; - var jsToNativeBridgeMode; // Set lazily. - var nativeToJsBridgeMode = nativeToJsModes.EVAL_BRIDGE; - var pollEnabled = false; - var bridgeSecret = -1; - - var messagesFromNative = []; - var isProcessing = false; - var resolvedPromise = typeof Promise === 'undefined' ? null : Promise.resolve(); - var nextTick = resolvedPromise ? function (fn) { resolvedPromise.then(fn); } : function (fn) { setTimeout(fn); }; - - function androidExec (success, fail, service, action, args) { - if (bridgeSecret < 0) { - // If we ever catch this firing, we'll need to queue up exec()s - // and fire them once we get a secret. For now, I don't think - // it's possible for exec() to be called since plugins are parsed but - // not run until until after onNativeReady. - throw new Error('exec() called without bridgeSecret'); + waitForInitialization: function(feature) { + if (feature) { + var c = channel[feature] || this.createSticky(feature); + this.deviceReadyChannelsMap[feature] = c; + this.deviceReadyChannelsArray.push(c); } - // Set default bridge modes if they have not already been set. - // By default, we use the failsafe, since addJavascriptInterface breaks too often - if (jsToNativeBridgeMode === undefined) { - androidExec.setJsToNativeBridgeMode(jsToNativeModes.JS_OBJECT); - } - - // If args is not provided, default to an empty array - args = args || []; - - // Process any ArrayBuffers in the args into a string. - for (var i = 0; i < args.length; i++) { - if (utils.typeName(args[i]) === 'ArrayBuffer') { - args[i] = base64.fromArrayBuffer(args[i]); - } - } - - var callbackId = service + cordova.callbackId++; - var argsJson = JSON.stringify(args); - if (success || fail) { - cordova.callbacks[callbackId] = {success: success, fail: fail}; - } - - var msgs = nativeApiProvider.get().exec(bridgeSecret, service, action, callbackId, argsJson); - // If argsJson was received by Java as null, try again with the PROMPT bridge mode. - // This happens in rare circumstances, such as when certain Unicode characters are passed over the bridge on a Galaxy S2. See CB-2666. - if (jsToNativeBridgeMode === jsToNativeModes.JS_OBJECT && msgs === '@Null arguments.') { - androidExec.setJsToNativeBridgeMode(jsToNativeModes.PROMPT); - androidExec(success, fail, service, action, args); - androidExec.setJsToNativeBridgeMode(jsToNativeModes.JS_OBJECT); - } else if (msgs) { - messagesFromNative.push(msgs); - // Always process async to avoid exceptions messing up stack. - nextTick(processMessages); - } - } - - androidExec.init = function () { - // CB-11828 - // This failsafe checks the version of Android and if it's Jellybean, it switches it to - // using the Online Event bridge for communicating from Native to JS - // - // It's ugly, but it's necessary. - var check = navigator.userAgent.toLowerCase().match(/android\s[0-9].[0-9]/); - var version_code = check && check[0].match(/4.[0-3].*/); - if (version_code !== null && nativeToJsBridgeMode === nativeToJsModes.EVAL_BRIDGE) { - nativeToJsBridgeMode = nativeToJsModes.ONLINE_EVENT; - } - - bridgeSecret = +prompt('', 'gap_init:' + nativeToJsBridgeMode); - channel.onNativeReady.fire(); - }; - - function pollOnceFromOnlineEvent () { - pollOnce(true); - } - - function pollOnce (opt_fromOnlineEvent) { - if (bridgeSecret < 0) { - // This can happen when the NativeToJsMessageQueue resets the online state on page transitions. - // We know there's nothing to retrieve, so no need to poll. - return; - } - var msgs = nativeApiProvider.get().retrieveJsMessages(bridgeSecret, !!opt_fromOnlineEvent); - if (msgs) { - messagesFromNative.push(msgs); - // Process sync since we know we're already top-of-stack. - processMessages(); - } - } - - function pollingTimerFunc () { - if (pollEnabled) { - pollOnce(); - setTimeout(pollingTimerFunc, 50); - } - } - - function hookOnlineApis () { - function proxyEvent (e) { - cordova.fireWindowEvent(e.type); - } - // The network module takes care of firing online and offline events. - // It currently fires them only on document though, so we bridge them - // to window here (while first listening for exec()-releated online/offline - // events). - window.addEventListener('online', pollOnceFromOnlineEvent, false); - window.addEventListener('offline', pollOnceFromOnlineEvent, false); - cordova.addWindowEventHandler('online'); - cordova.addWindowEventHandler('offline'); - document.addEventListener('online', proxyEvent, false); - document.addEventListener('offline', proxyEvent, false); - } - - hookOnlineApis(); - - androidExec.jsToNativeModes = jsToNativeModes; - androidExec.nativeToJsModes = nativeToJsModes; - - androidExec.setJsToNativeBridgeMode = function (mode) { - if (mode === jsToNativeModes.JS_OBJECT && !window._cordovaNative) { - mode = jsToNativeModes.PROMPT; - } - nativeApiProvider.setPreferPrompt(mode === jsToNativeModes.PROMPT); - jsToNativeBridgeMode = mode; - }; - - androidExec.setNativeToJsBridgeMode = function (mode) { - if (mode === nativeToJsBridgeMode) { - return; - } - if (nativeToJsBridgeMode === nativeToJsModes.POLLING) { - pollEnabled = false; - } - - nativeToJsBridgeMode = mode; - // Tell the native side to switch modes. - // Otherwise, it will be set by androidExec.init() - if (bridgeSecret >= 0) { - nativeApiProvider.get().setNativeToJsBridgeMode(bridgeSecret, mode); - } - - if (mode === nativeToJsModes.POLLING) { - pollEnabled = true; - setTimeout(pollingTimerFunc, 1); - } - }; - - function buildPayload (payload, message) { - var payloadKind = message.charAt(0); - if (payloadKind === 's') { - payload.push(message.slice(1)); - } else if (payloadKind === 't') { - payload.push(true); - } else if (payloadKind === 'f') { - payload.push(false); - } else if (payloadKind === 'N') { - payload.push(null); - } else if (payloadKind === 'n') { - payload.push(+message.slice(1)); - } else if (payloadKind === 'A') { - var data = message.slice(1); - payload.push(base64.toArrayBuffer(data)); - } else if (payloadKind === 'S') { - payload.push(window.atob(message.slice(1))); - } else if (payloadKind === 'M') { - var multipartMessages = message.slice(1); - while (multipartMessages !== '') { - var spaceIdx = multipartMessages.indexOf(' '); - var msgLen = +multipartMessages.slice(0, spaceIdx); - var multipartMessage = multipartMessages.substr(spaceIdx + 1, msgLen); - multipartMessages = multipartMessages.slice(spaceIdx + msgLen + 1); - buildPayload(payload, multipartMessage); - } - } else { - payload.push(JSON.parse(message)); - } - } - - // Processes a single message, as encoded by NativeToJsMessageQueue.java. - function processMessage (message) { - var firstChar = message.charAt(0); - if (firstChar === 'J') { - // This is deprecated on the .java side. It doesn't work with CSP enabled. - eval(message.slice(1)); - } else if (firstChar === 'S' || firstChar === 'F') { - var success = firstChar === 'S'; - var keepCallback = message.charAt(1) === '1'; - var spaceIdx = message.indexOf(' ', 2); - var status = +message.slice(2, spaceIdx); - var nextSpaceIdx = message.indexOf(' ', spaceIdx + 1); - var callbackId = message.slice(spaceIdx + 1, nextSpaceIdx); - var payloadMessage = message.slice(nextSpaceIdx + 1); - var payload = []; - buildPayload(payload, payloadMessage); - cordova.callbackFromNative(callbackId, success, status, payload, keepCallback); - } else { - console.log('processMessage failed: invalid message: ' + JSON.stringify(message)); - } - } - - function processMessages () { - // Check for the reentrant case. - if (isProcessing) { - return; - } - if (messagesFromNative.length === 0) { - return; - } - isProcessing = true; - try { - var msg = popMessageFromQueue(); - // The Java side can send a * message to indicate that it - // still has messages waiting to be retrieved. - if (msg === '*' && messagesFromNative.length === 0) { - nextTick(pollOnce); - return; - } - processMessage(msg); - } finally { - isProcessing = false; - if (messagesFromNative.length > 0) { - nextTick(processMessages); - } - } - } - - function popMessageFromQueue () { - var messageBatch = messagesFromNative.shift(); - if (messageBatch === '*') { - return '*'; - } - - var spaceIdx = messageBatch.indexOf(' '); - var msgLen = +messageBatch.slice(0, spaceIdx); - var message = messageBatch.substr(spaceIdx + 1, msgLen); - messageBatch = messageBatch.slice(spaceIdx + msgLen + 1); - if (messageBatch) { - messagesFromNative.unshift(messageBatch); - } - return message; - } - - module.exports = androidExec; - - }); - - // file: src/common/exec/proxy.js - define('cordova/exec/proxy', function (require, exports, module) { - - // internal map of proxy function - var CommandProxyMap = {}; - - module.exports = { - - // example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...); - add: function (id, proxyObj) { - console.log('adding proxy for ' + id); - CommandProxyMap[id] = proxyObj; - return proxyObj; - }, - - // cordova.commandProxy.remove("Accelerometer"); - remove: function (id) { - var proxy = CommandProxyMap[id]; - delete CommandProxyMap[id]; - CommandProxyMap[id] = null; - return proxy; - }, - - get: function (service, action) { - return (CommandProxyMap[service] ? CommandProxyMap[service][action] : null); - } - }; - }); - - // file: src/common/init.js - define('cordova/init', function (require, exports, module) { - - var channel = require('cordova/channel'); - var cordova = require('cordova'); - var modulemapper = require('cordova/modulemapper'); - var platform = require('cordova/platform'); - var pluginloader = require('cordova/pluginloader'); - var utils = require('cordova/utils'); - - var platformInitChannelsArray = [channel.onNativeReady, channel.onPluginsReady]; - - function logUnfiredChannels (arr) { - for (var i = 0; i < arr.length; ++i) { - if (arr[i].state !== 2) { - console.log('Channel not fired: ' + arr[i].type); - } - } - } - - window.setTimeout(function () { - if (channel.onDeviceReady.state !== 2) { - console.log('deviceready has not fired after 5 seconds.'); - logUnfiredChannels(platformInitChannelsArray); - logUnfiredChannels(channel.deviceReadyChannelsArray); - } - }, 5000); - - // Replace navigator before any modules are required(), to ensure it happens as soon as possible. - // We replace it so that properties that can't be clobbered can instead be overridden. - function replaceNavigator (origNavigator) { - var CordovaNavigator = function () {}; - CordovaNavigator.prototype = origNavigator; - var newNavigator = new CordovaNavigator(); - // This work-around really only applies to new APIs that are newer than Function.bind. - // Without it, APIs such as getGamepads() break. - if (CordovaNavigator.bind) { - for (var key in origNavigator) { - if (typeof origNavigator[key] === 'function') { - newNavigator[key] = origNavigator[key].bind(origNavigator); - } else { - (function (k) { - utils.defineGetterSetter(newNavigator, key, function () { - return origNavigator[k]; - }); - })(key); - } - } - } - return newNavigator; - } - - if (window.navigator) { - window.navigator = replaceNavigator(window.navigator); - } - - if (!window.console) { - window.console = { - log: function () {} - }; - } - if (!window.console.warn) { - window.console.warn = function (msg) { - this.log('warn: ' + msg); - }; - } - - // Register pause, resume and deviceready channels as events on document. - channel.onPause = cordova.addDocumentEventHandler('pause'); - channel.onResume = cordova.addDocumentEventHandler('resume'); - channel.onActivated = cordova.addDocumentEventHandler('activated'); - channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready'); - - // Listen for DOMContentLoaded and notify our channel subscribers. - if (document.readyState === 'complete' || document.readyState === 'interactive') { - channel.onDOMContentLoaded.fire(); - } else { - document.addEventListener('DOMContentLoaded', function () { - channel.onDOMContentLoaded.fire(); - }, false); - } - - // _nativeReady is global variable that the native side can set - // to signify that the native code is ready. It is a global since - // it may be called before any cordova JS is ready. - if (window._nativeReady) { - channel.onNativeReady.fire(); - } - - modulemapper.clobbers('cordova', 'cordova'); - modulemapper.clobbers('cordova/exec', 'cordova.exec'); - modulemapper.clobbers('cordova/exec', 'Cordova.exec'); - - // Call the platform-specific initialization. - platform.bootstrap && platform.bootstrap(); - - // Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js. - // The delay allows the attached modules to be defined before the plugin loader looks for them. - setTimeout(function () { - pluginloader.load(function () { - channel.onPluginsReady.fire(); - }); - }, 0); + }, /** - * Create all cordova objects once native side is ready. + * Indicate that initialization code has completed and the feature is ready to be used. + * + * @param feature {String} The unique feature name */ - channel.join(function () { - modulemapper.mapModules(window); + initializationComplete: function(feature) { + var c = this.deviceReadyChannelsMap[feature]; + if (c) { + c.fire(); + } + } + }; - platform.initialize && platform.initialize(); +function checkSubscriptionArgument(argument) { + if (typeof argument !== "function" && typeof argument.handleEvent !== "function") { + throw new Error( + "Must provide a function or an EventListener object " + + "implementing the handleEvent interface." + ); + } +} - // Fire event to notify that all objects are created - channel.onCordovaReady.fire(); +/** + * Subscribes the given function to the channel. Any time that + * Channel.fire is called so too will the function. + * Optionally specify an execution context for the function + * and a guid that can be used to stop subscribing to the channel. + * Returns the guid. + */ +Channel.prototype.subscribe = function(eventListenerOrFunction, eventListener) { + checkSubscriptionArgument(eventListenerOrFunction); + var handleEvent, guid; - // Fire onDeviceReady event once page has fully loaded, all - // constructors have run and cordova info has been received from native - // side. - channel.join(function () { - require('cordova').fireDocumentEvent('deviceready'); - }, channel.deviceReadyChannelsArray); + if (eventListenerOrFunction && typeof eventListenerOrFunction === "object") { + // Received an EventListener object implementing the handleEvent interface + handleEvent = eventListenerOrFunction.handleEvent; + eventListener = eventListenerOrFunction; + } else { + // Received a function to handle event + handleEvent = eventListenerOrFunction; + } - }, platformInitChannelsArray); + if (this.state == 2) { + handleEvent.apply(eventListener || this, this.fireArgs); + return; + } + guid = eventListenerOrFunction.observer_guid; + if (typeof eventListener === "object") { + handleEvent = utils.close(eventListener, handleEvent); + } + + if (!guid) { + // First time any channel has seen this subscriber + guid = '' + nextGuid++; + } + handleEvent.observer_guid = guid; + eventListenerOrFunction.observer_guid = guid; + + // Don't add the same handler more than once. + if (!this.handlers[guid]) { + this.handlers[guid] = handleEvent; + this.numHandlers++; + if (this.numHandlers == 1) { + this.onHasSubscribersChange && this.onHasSubscribersChange(); + } + } +}; + +/** + * Unsubscribes the function with the given guid from the channel. + */ +Channel.prototype.unsubscribe = function(eventListenerOrFunction) { + checkSubscriptionArgument(eventListenerOrFunction); + var handleEvent, guid, handler; + + if (eventListenerOrFunction && typeof eventListenerOrFunction === "object") { + // Received an EventListener object implementing the handleEvent interface + handleEvent = eventListenerOrFunction.handleEvent; + } else { + // Received a function to handle event + handleEvent = eventListenerOrFunction; + } + + guid = handleEvent.observer_guid; + handler = this.handlers[guid]; + if (handler) { + delete this.handlers[guid]; + this.numHandlers--; + if (this.numHandlers === 0) { + this.onHasSubscribersChange && this.onHasSubscribersChange(); + } + } +}; + +/** + * Calls all functions subscribed to this channel. + */ +Channel.prototype.fire = function(e) { + var fail = false, + fireArgs = Array.prototype.slice.call(arguments); + // Apply stickiness. + if (this.state == 1) { + this.state = 2; + this.fireArgs = fireArgs; + } + if (this.numHandlers) { + // Copy the values first so that it is safe to modify it from within + // callbacks. + var toCall = []; + for (var item in this.handlers) { + toCall.push(this.handlers[item]); + } + for (var i = 0; i < toCall.length; ++i) { + toCall[i].apply(this, fireArgs); + } + if (this.state == 2 && this.numHandlers) { + this.numHandlers = 0; + this.handlers = {}; + this.onHasSubscribersChange && this.onHasSubscribersChange(); + } + } +}; + + +// defining them here so they are ready super fast! +// DOM event that is received when the web page is loaded and parsed. +channel.createSticky('onDOMContentLoaded'); + +// Event to indicate the Cordova native side is ready. +channel.createSticky('onNativeReady'); + +// Event to indicate that all Cordova JavaScript objects have been created +// and it's time to run plugin constructors. +channel.createSticky('onCordovaReady'); + +// Event to indicate that all automatically loaded JS plugins are loaded and ready. +// FIXME remove this +channel.createSticky('onPluginsReady'); + +// Event to indicate that Cordova is ready +channel.createSticky('onDeviceReady'); + +// Event to indicate a resume lifecycle event +channel.create('onResume'); + +// Event to indicate a pause lifecycle event +channel.create('onPause'); + +// Channels that must fire before "deviceready" is fired. +channel.waitForInitialization('onCordovaReady'); +channel.waitForInitialization('onDOMContentLoaded'); + +module.exports = channel; + +}); + +// file: /Users/jbowser/cordova/cordova-android/cordova-js-src/exec.js +define("cordova/exec", function(require, exports, module) { + +/** + * Execute a cordova command. It is up to the native side whether this action + * is synchronous or asynchronous. The native side can return: + * Synchronous: PluginResult object as a JSON string + * Asynchronous: Empty string "" + * If async, the native side will cordova.callbackSuccess or cordova.callbackError, + * depending upon the result of the action. + * + * @param {Function} success The success callback + * @param {Function} fail The fail callback + * @param {String} service The name of the service to use + * @param {String} action Action to be run in cordova + * @param {String[]} [args] Zero or more arguments to pass to the method + */ +var cordova = require('cordova'), + nativeApiProvider = require('cordova/android/nativeapiprovider'), + utils = require('cordova/utils'), + base64 = require('cordova/base64'), + channel = require('cordova/channel'), + jsToNativeModes = { + PROMPT: 0, + JS_OBJECT: 1 + }, + nativeToJsModes = { + // Polls for messages using the JS->Native bridge. + POLLING: 0, + // For LOAD_URL to be viable, it would need to have a work-around for + // the bug where the soft-keyboard gets dismissed when a message is sent. + LOAD_URL: 1, + // For the ONLINE_EVENT to be viable, it would need to intercept all event + // listeners (both through addEventListener and window.ononline) as well + // as set the navigator property itself. + ONLINE_EVENT: 2, + EVAL_BRIDGE: 3 + }, + jsToNativeBridgeMode, // Set lazily. + nativeToJsBridgeMode = nativeToJsModes.EVAL_BRIDGE, + pollEnabled = false, + bridgeSecret = -1; + +var messagesFromNative = []; +var isProcessing = false; +var resolvedPromise = typeof Promise == 'undefined' ? null : Promise.resolve(); +var nextTick = resolvedPromise ? function(fn) { resolvedPromise.then(fn); } : function(fn) { setTimeout(fn); }; + +function androidExec(success, fail, service, action, args) { + if (bridgeSecret < 0) { + // If we ever catch this firing, we'll need to queue up exec()s + // and fire them once we get a secret. For now, I don't think + // it's possible for exec() to be called since plugins are parsed but + // not run until until after onNativeReady. + throw new Error('exec() called without bridgeSecret'); + } + // Set default bridge modes if they have not already been set. + // By default, we use the failsafe, since addJavascriptInterface breaks too often + if (jsToNativeBridgeMode === undefined) { + androidExec.setJsToNativeBridgeMode(jsToNativeModes.JS_OBJECT); + } + + // If args is not provided, default to an empty array + args = args || []; + + // Process any ArrayBuffers in the args into a string. + for (var i = 0; i < args.length; i++) { + if (utils.typeName(args[i]) == 'ArrayBuffer') { + args[i] = base64.fromArrayBuffer(args[i]); + } + } + + var callbackId = service + cordova.callbackId++, + argsJson = JSON.stringify(args); + if (success || fail) { + cordova.callbacks[callbackId] = {success:success, fail:fail}; + } + + var msgs = nativeApiProvider.get().exec(bridgeSecret, service, action, callbackId, argsJson); + // If argsJson was received by Java as null, try again with the PROMPT bridge mode. + // This happens in rare circumstances, such as when certain Unicode characters are passed over the bridge on a Galaxy S2. See CB-2666. + if (jsToNativeBridgeMode == jsToNativeModes.JS_OBJECT && msgs === "@Null arguments.") { + androidExec.setJsToNativeBridgeMode(jsToNativeModes.PROMPT); + androidExec(success, fail, service, action, args); + androidExec.setJsToNativeBridgeMode(jsToNativeModes.JS_OBJECT); + } else if (msgs) { + messagesFromNative.push(msgs); + // Always process async to avoid exceptions messing up stack. + nextTick(processMessages); + } +} + +androidExec.init = function() { + //CB-11828 + //This failsafe checks the version of Android and if it's Jellybean, it switches it to + //using the Online Event bridge for communicating from Native to JS + // + //It's ugly, but it's necessary. + var check = navigator.userAgent.toLowerCase().match(/android\s[0-9].[0-9]/); + var version_code = check && check[0].match(/4.[0-3].*/); + if (version_code != null && nativeToJsBridgeMode == nativeToJsModes.EVAL_BRIDGE) { + nativeToJsBridgeMode = nativeToJsModes.ONLINE_EVENT; + } + + bridgeSecret = +prompt('', 'gap_init:' + nativeToJsBridgeMode); + channel.onNativeReady.fire(); +}; + +function pollOnceFromOnlineEvent() { + pollOnce(true); +} + +function pollOnce(opt_fromOnlineEvent) { + if (bridgeSecret < 0) { + // This can happen when the NativeToJsMessageQueue resets the online state on page transitions. + // We know there's nothing to retrieve, so no need to poll. + return; + } + var msgs = nativeApiProvider.get().retrieveJsMessages(bridgeSecret, !!opt_fromOnlineEvent); + if (msgs) { + messagesFromNative.push(msgs); + // Process sync since we know we're already top-of-stack. + processMessages(); + } +} + +function pollingTimerFunc() { + if (pollEnabled) { + pollOnce(); + setTimeout(pollingTimerFunc, 50); + } +} + +function hookOnlineApis() { + function proxyEvent(e) { + cordova.fireWindowEvent(e.type); + } + // The network module takes care of firing online and offline events. + // It currently fires them only on document though, so we bridge them + // to window here (while first listening for exec()-releated online/offline + // events). + window.addEventListener('online', pollOnceFromOnlineEvent, false); + window.addEventListener('offline', pollOnceFromOnlineEvent, false); + cordova.addWindowEventHandler('online'); + cordova.addWindowEventHandler('offline'); + document.addEventListener('online', proxyEvent, false); + document.addEventListener('offline', proxyEvent, false); +} + +hookOnlineApis(); + +androidExec.jsToNativeModes = jsToNativeModes; +androidExec.nativeToJsModes = nativeToJsModes; + +androidExec.setJsToNativeBridgeMode = function(mode) { + if (mode == jsToNativeModes.JS_OBJECT && !window._cordovaNative) { + mode = jsToNativeModes.PROMPT; + } + nativeApiProvider.setPreferPrompt(mode == jsToNativeModes.PROMPT); + jsToNativeBridgeMode = mode; +}; + +androidExec.setNativeToJsBridgeMode = function(mode) { + if (mode == nativeToJsBridgeMode) { + return; + } + if (nativeToJsBridgeMode == nativeToJsModes.POLLING) { + pollEnabled = false; + } + + nativeToJsBridgeMode = mode; + // Tell the native side to switch modes. + // Otherwise, it will be set by androidExec.init() + if (bridgeSecret >= 0) { + nativeApiProvider.get().setNativeToJsBridgeMode(bridgeSecret, mode); + } + + if (mode == nativeToJsModes.POLLING) { + pollEnabled = true; + setTimeout(pollingTimerFunc, 1); + } +}; + +function buildPayload(payload, message) { + var payloadKind = message.charAt(0); + if (payloadKind == 's') { + payload.push(message.slice(1)); + } else if (payloadKind == 't') { + payload.push(true); + } else if (payloadKind == 'f') { + payload.push(false); + } else if (payloadKind == 'N') { + payload.push(null); + } else if (payloadKind == 'n') { + payload.push(+message.slice(1)); + } else if (payloadKind == 'A') { + var data = message.slice(1); + payload.push(base64.toArrayBuffer(data)); + } else if (payloadKind == 'S') { + payload.push(window.atob(message.slice(1))); + } else if (payloadKind == 'M') { + var multipartMessages = message.slice(1); + while (multipartMessages !== "") { + var spaceIdx = multipartMessages.indexOf(' '); + var msgLen = +multipartMessages.slice(0, spaceIdx); + var multipartMessage = multipartMessages.substr(spaceIdx + 1, msgLen); + multipartMessages = multipartMessages.slice(spaceIdx + msgLen + 1); + buildPayload(payload, multipartMessage); + } + } else { + payload.push(JSON.parse(message)); + } +} + +// Processes a single message, as encoded by NativeToJsMessageQueue.java. +function processMessage(message) { + var firstChar = message.charAt(0); + if (firstChar == 'J') { + // This is deprecated on the .java side. It doesn't work with CSP enabled. + eval(message.slice(1)); + } else if (firstChar == 'S' || firstChar == 'F') { + var success = firstChar == 'S'; + var keepCallback = message.charAt(1) == '1'; + var spaceIdx = message.indexOf(' ', 2); + var status = +message.slice(2, spaceIdx); + var nextSpaceIdx = message.indexOf(' ', spaceIdx + 1); + var callbackId = message.slice(spaceIdx + 1, nextSpaceIdx); + var payloadMessage = message.slice(nextSpaceIdx + 1); + var payload = []; + buildPayload(payload, payloadMessage); + cordova.callbackFromNative(callbackId, success, status, payload, keepCallback); + } else { + console.log("processMessage failed: invalid message: " + JSON.stringify(message)); + } +} + +function processMessages() { + // Check for the reentrant case. + if (isProcessing) { + return; + } + if (messagesFromNative.length === 0) { + return; + } + isProcessing = true; + try { + var msg = popMessageFromQueue(); + // The Java side can send a * message to indicate that it + // still has messages waiting to be retrieved. + if (msg == '*' && messagesFromNative.length === 0) { + nextTick(pollOnce); + return; + } + processMessage(msg); + } finally { + isProcessing = false; + if (messagesFromNative.length > 0) { + nextTick(processMessages); + } + } +} + +function popMessageFromQueue() { + var messageBatch = messagesFromNative.shift(); + if (messageBatch == '*') { + return '*'; + } + + var spaceIdx = messageBatch.indexOf(' '); + var msgLen = +messageBatch.slice(0, spaceIdx); + var message = messageBatch.substr(spaceIdx + 1, msgLen); + messageBatch = messageBatch.slice(spaceIdx + msgLen + 1); + if (messageBatch) { + messagesFromNative.unshift(messageBatch); + } + return message; +} + +module.exports = androidExec; + +}); + +// file: src/common/exec/proxy.js +define("cordova/exec/proxy", function(require, exports, module) { + + +// internal map of proxy function +var CommandProxyMap = {}; + +module.exports = { + + // example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...); + add:function(id,proxyObj) { + console.log("adding proxy for " + id); + CommandProxyMap[id] = proxyObj; + return proxyObj; + }, + + // cordova.commandProxy.remove("Accelerometer"); + remove:function(id) { + var proxy = CommandProxyMap[id]; + delete CommandProxyMap[id]; + CommandProxyMap[id] = null; + return proxy; + }, + + get:function(service,action) { + return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null ); + } +}; +}); + +// file: src/common/init.js +define("cordova/init", function(require, exports, module) { + +var channel = require('cordova/channel'); +var cordova = require('cordova'); +var modulemapper = require('cordova/modulemapper'); +var platform = require('cordova/platform'); +var pluginloader = require('cordova/pluginloader'); +var utils = require('cordova/utils'); + +var platformInitChannelsArray = [channel.onNativeReady, channel.onPluginsReady]; + +function logUnfiredChannels(arr) { + for (var i = 0; i < arr.length; ++i) { + if (arr[i].state != 2) { + console.log('Channel not fired: ' + arr[i].type); + } + } +} + +window.setTimeout(function() { + if (channel.onDeviceReady.state != 2) { + console.log('deviceready has not fired after 5 seconds.'); + logUnfiredChannels(platformInitChannelsArray); + logUnfiredChannels(channel.deviceReadyChannelsArray); + } +}, 5000); + +// Replace navigator before any modules are required(), to ensure it happens as soon as possible. +// We replace it so that properties that can't be clobbered can instead be overridden. +function replaceNavigator(origNavigator) { + var CordovaNavigator = function() {}; + CordovaNavigator.prototype = origNavigator; + var newNavigator = new CordovaNavigator(); + // This work-around really only applies to new APIs that are newer than Function.bind. + // Without it, APIs such as getGamepads() break. + if (CordovaNavigator.bind) { + for (var key in origNavigator) { + if (typeof origNavigator[key] == 'function') { + newNavigator[key] = origNavigator[key].bind(origNavigator); + } + else { + (function(k) { + utils.defineGetterSetter(newNavigator,key,function() { + return origNavigator[k]; + }); + })(key); + } + } + } + return newNavigator; +} + +if (window.navigator) { + window.navigator = replaceNavigator(window.navigator); +} + +if (!window.console) { + window.console = { + log: function(){} + }; +} +if (!window.console.warn) { + window.console.warn = function(msg) { + this.log("warn: " + msg); + }; +} + +// Register pause, resume and deviceready channels as events on document. +channel.onPause = cordova.addDocumentEventHandler('pause'); +channel.onResume = cordova.addDocumentEventHandler('resume'); +channel.onActivated = cordova.addDocumentEventHandler('activated'); +channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready'); + +// Listen for DOMContentLoaded and notify our channel subscribers. +if (document.readyState == 'complete' || document.readyState == 'interactive') { + channel.onDOMContentLoaded.fire(); +} else { + document.addEventListener('DOMContentLoaded', function() { + channel.onDOMContentLoaded.fire(); + }, false); +} + +// _nativeReady is global variable that the native side can set +// to signify that the native code is ready. It is a global since +// it may be called before any cordova JS is ready. +if (window._nativeReady) { + channel.onNativeReady.fire(); +} + +modulemapper.clobbers('cordova', 'cordova'); +modulemapper.clobbers('cordova/exec', 'cordova.exec'); +modulemapper.clobbers('cordova/exec', 'Cordova.exec'); + +// Call the platform-specific initialization. +platform.bootstrap && platform.bootstrap(); + +// Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js. +// The delay allows the attached modules to be defined before the plugin loader looks for them. +setTimeout(function() { + pluginloader.load(function() { + channel.onPluginsReady.fire(); }); +}, 0); - // file: src/common/init_b.js - define('cordova/init_b', function (require, exports, module) { +/** + * Create all cordova objects once native side is ready. + */ +channel.join(function() { + modulemapper.mapModules(window); - var channel = require('cordova/channel'); - var cordova = require('cordova'); - var modulemapper = require('cordova/modulemapper'); - var platform = require('cordova/platform'); - var pluginloader = require('cordova/pluginloader'); - var utils = require('cordova/utils'); + platform.initialize && platform.initialize(); - var platformInitChannelsArray = [channel.onDOMContentLoaded, channel.onNativeReady, channel.onPluginsReady]; + // Fire event to notify that all objects are created + channel.onCordovaReady.fire(); - // setting exec - cordova.exec = require('cordova/exec'); + // Fire onDeviceReady event once page has fully loaded, all + // constructors have run and cordova info has been received from native + // side. + channel.join(function() { + require('cordova').fireDocumentEvent('deviceready'); + }, channel.deviceReadyChannelsArray); - function logUnfiredChannels (arr) { - for (var i = 0; i < arr.length; ++i) { - if (arr[i].state !== 2) { - console.log('Channel not fired: ' + arr[i].type); - } +}, platformInitChannelsArray); + + +}); + +// file: src/common/init_b.js +define("cordova/init_b", function(require, exports, module) { + +var channel = require('cordova/channel'); +var cordova = require('cordova'); +var modulemapper = require('cordova/modulemapper'); +var platform = require('cordova/platform'); +var pluginloader = require('cordova/pluginloader'); +var utils = require('cordova/utils'); + +var platformInitChannelsArray = [channel.onDOMContentLoaded, channel.onNativeReady, channel.onPluginsReady]; + +// setting exec +cordova.exec = require('cordova/exec'); + +function logUnfiredChannels(arr) { + for (var i = 0; i < arr.length; ++i) { + if (arr[i].state != 2) { + console.log('Channel not fired: ' + arr[i].type); + } + } +} + +window.setTimeout(function() { + if (channel.onDeviceReady.state != 2) { + console.log('deviceready has not fired after 5 seconds.'); + logUnfiredChannels(platformInitChannelsArray); + logUnfiredChannels(channel.deviceReadyChannelsArray); + } +}, 5000); + +// Replace navigator before any modules are required(), to ensure it happens as soon as possible. +// We replace it so that properties that can't be clobbered can instead be overridden. +function replaceNavigator(origNavigator) { + var CordovaNavigator = function() {}; + CordovaNavigator.prototype = origNavigator; + var newNavigator = new CordovaNavigator(); + // This work-around really only applies to new APIs that are newer than Function.bind. + // Without it, APIs such as getGamepads() break. + if (CordovaNavigator.bind) { + for (var key in origNavigator) { + if (typeof origNavigator[key] == 'function') { + newNavigator[key] = origNavigator[key].bind(origNavigator); + } + else { + (function(k) { + utils.defineGetterSetter(newNavigator,key,function() { + return origNavigator[k]; + }); + })(key); } } + } + return newNavigator; +} +if (window.navigator) { + window.navigator = replaceNavigator(window.navigator); +} - window.setTimeout(function () { - if (channel.onDeviceReady.state !== 2) { - console.log('deviceready has not fired after 5 seconds.'); - logUnfiredChannels(platformInitChannelsArray); - logUnfiredChannels(channel.deviceReadyChannelsArray); - } - }, 5000); +if (!window.console) { + window.console = { + log: function(){} + }; +} +if (!window.console.warn) { + window.console.warn = function(msg) { + this.log("warn: " + msg); + }; +} - // Replace navigator before any modules are required(), to ensure it happens as soon as possible. - // We replace it so that properties that can't be clobbered can instead be overridden. - function replaceNavigator (origNavigator) { - var CordovaNavigator = function () {}; - CordovaNavigator.prototype = origNavigator; - var newNavigator = new CordovaNavigator(); - // This work-around really only applies to new APIs that are newer than Function.bind. - // Without it, APIs such as getGamepads() break. - if (CordovaNavigator.bind) { - for (var key in origNavigator) { - if (typeof origNavigator[key] === 'function') { - newNavigator[key] = origNavigator[key].bind(origNavigator); - } else { - (function (k) { - utils.defineGetterSetter(newNavigator, key, function () { - return origNavigator[k]; - }); - })(key); - } - } - } - return newNavigator; - } - if (window.navigator) { - window.navigator = replaceNavigator(window.navigator); +// Register pause, resume and deviceready channels as events on document. +channel.onPause = cordova.addDocumentEventHandler('pause'); +channel.onResume = cordova.addDocumentEventHandler('resume'); +channel.onActivated = cordova.addDocumentEventHandler('activated'); +channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready'); + +// Listen for DOMContentLoaded and notify our channel subscribers. +if (document.readyState == 'complete' || document.readyState == 'interactive') { + channel.onDOMContentLoaded.fire(); +} else { + document.addEventListener('DOMContentLoaded', function() { + channel.onDOMContentLoaded.fire(); + }, false); +} + +// _nativeReady is global variable that the native side can set +// to signify that the native code is ready. It is a global since +// it may be called before any cordova JS is ready. +if (window._nativeReady) { + channel.onNativeReady.fire(); +} + +// Call the platform-specific initialization. +platform.bootstrap && platform.bootstrap(); + +// Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js. +// The delay allows the attached modules to be defined before the plugin loader looks for them. +setTimeout(function() { + pluginloader.load(function() { + channel.onPluginsReady.fire(); + }); +}, 0); + +/** + * Create all cordova objects once native side is ready. + */ +channel.join(function() { + modulemapper.mapModules(window); + + platform.initialize && platform.initialize(); + + // Fire event to notify that all objects are created + channel.onCordovaReady.fire(); + + // Fire onDeviceReady event once page has fully loaded, all + // constructors have run and cordova info has been received from native + // side. + channel.join(function() { + require('cordova').fireDocumentEvent('deviceready'); + }, channel.deviceReadyChannelsArray); + +}, platformInitChannelsArray); + +}); + +// file: src/common/modulemapper.js +define("cordova/modulemapper", function(require, exports, module) { + +var builder = require('cordova/builder'), + moduleMap = define.moduleMap, + symbolList, + deprecationMap; + +exports.reset = function() { + symbolList = []; + deprecationMap = {}; +}; + +function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) { + if (!(moduleName in moduleMap)) { + throw new Error('Module ' + moduleName + ' does not exist.'); + } + symbolList.push(strategy, moduleName, symbolPath); + if (opt_deprecationMessage) { + deprecationMap[symbolPath] = opt_deprecationMessage; + } +} + +// Note: Android 2.3 does have Function.bind(). +exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('c', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('m', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('d', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.runs = function(moduleName) { + addEntry('r', moduleName, null); +}; + +function prepareNamespace(symbolPath, context) { + if (!symbolPath) { + return context; + } + var parts = symbolPath.split('.'); + var cur = context; + for (var i = 0, part; part = parts[i]; ++i) { + cur = cur[part] = cur[part] || {}; + } + return cur; +} + +exports.mapModules = function(context) { + var origSymbols = {}; + context.CDV_origSymbols = origSymbols; + for (var i = 0, len = symbolList.length; i < len; i += 3) { + var strategy = symbolList[i]; + var moduleName = symbolList[i + 1]; + var module = require(moduleName); + // + if (strategy == 'r') { + continue; } + var symbolPath = symbolList[i + 2]; + var lastDot = symbolPath.lastIndexOf('.'); + var namespace = symbolPath.substr(0, lastDot); + var lastName = symbolPath.substr(lastDot + 1); - if (!window.console) { - window.console = { - log: function () {} - }; - } - if (!window.console.warn) { - window.console.warn = function (msg) { - this.log('warn: ' + msg); + var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null; + var parentObj = prepareNamespace(namespace, context); + var target = parentObj[lastName]; + + if (strategy == 'm' && target) { + builder.recursiveMerge(target, module); + } else if ((strategy == 'd' && !target) || (strategy != 'd')) { + if (!(symbolPath in origSymbols)) { + origSymbols[symbolPath] = target; + } + builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg); + } + } +}; + +exports.getOriginalSymbol = function(context, symbolPath) { + var origSymbols = context.CDV_origSymbols; + if (origSymbols && (symbolPath in origSymbols)) { + return origSymbols[symbolPath]; + } + var parts = symbolPath.split('.'); + var obj = context; + for (var i = 0; i < parts.length; ++i) { + obj = obj && obj[parts[i]]; + } + return obj; +}; + +exports.reset(); + + +}); + +// file: src/common/modulemapper_b.js +define("cordova/modulemapper_b", function(require, exports, module) { + +var builder = require('cordova/builder'), + symbolList = [], + deprecationMap; + +exports.reset = function() { + symbolList = []; + deprecationMap = {}; +}; + +function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) { + symbolList.push(strategy, moduleName, symbolPath); + if (opt_deprecationMessage) { + deprecationMap[symbolPath] = opt_deprecationMessage; + } +} + +// Note: Android 2.3 does have Function.bind(). +exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('c', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('m', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('d', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.runs = function(moduleName) { + addEntry('r', moduleName, null); +}; + +function prepareNamespace(symbolPath, context) { + if (!symbolPath) { + return context; + } + var parts = symbolPath.split('.'); + var cur = context; + for (var i = 0, part; part = parts[i]; ++i) { + cur = cur[part] = cur[part] || {}; + } + return cur; +} + +exports.mapModules = function(context) { + var origSymbols = {}; + context.CDV_origSymbols = origSymbols; + for (var i = 0, len = symbolList.length; i < len; i += 3) { + var strategy = symbolList[i]; + var moduleName = symbolList[i + 1]; + var module = require(moduleName); + // + if (strategy == 'r') { + continue; + } + var symbolPath = symbolList[i + 2]; + var lastDot = symbolPath.lastIndexOf('.'); + var namespace = symbolPath.substr(0, lastDot); + var lastName = symbolPath.substr(lastDot + 1); + + var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null; + var parentObj = prepareNamespace(namespace, context); + var target = parentObj[lastName]; + + if (strategy == 'm' && target) { + builder.recursiveMerge(target, module); + } else if ((strategy == 'd' && !target) || (strategy != 'd')) { + if (!(symbolPath in origSymbols)) { + origSymbols[symbolPath] = target; + } + builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg); + } + } +}; + +exports.getOriginalSymbol = function(context, symbolPath) { + var origSymbols = context.CDV_origSymbols; + if (origSymbols && (symbolPath in origSymbols)) { + return origSymbols[symbolPath]; + } + var parts = symbolPath.split('.'); + var obj = context; + for (var i = 0; i < parts.length; ++i) { + obj = obj && obj[parts[i]]; + } + return obj; +}; + +exports.reset(); + + +}); + +// file: /Users/jbowser/cordova/cordova-android/cordova-js-src/platform.js +define("cordova/platform", function(require, exports, module) { + +// The last resume event that was received that had the result of a plugin call. +var lastResumeEvent = null; + +module.exports = { + id: 'android', + bootstrap: function() { + var channel = require('cordova/channel'), + cordova = require('cordova'), + exec = require('cordova/exec'), + modulemapper = require('cordova/modulemapper'); + + // Get the shared secret needed to use the bridge. + exec.init(); + + // TODO: Extract this as a proper plugin. + modulemapper.clobbers('cordova/plugin/android/app', 'navigator.app'); + + var APP_PLUGIN_NAME = Number(cordova.platformVersion.split('.')[0]) >= 4 ? 'CoreAndroid' : 'App'; + + // Inject a listener for the backbutton on the document. + var backButtonChannel = cordova.addDocumentEventHandler('backbutton'); + backButtonChannel.onHasSubscribersChange = function() { + // If we just attached the first handler or detached the last handler, + // let native know we need to override the back button. + exec(null, null, APP_PLUGIN_NAME, "overrideBackbutton", [this.numHandlers == 1]); + }; + + // Add hardware MENU and SEARCH button handlers + cordova.addDocumentEventHandler('menubutton'); + cordova.addDocumentEventHandler('searchbutton'); + + function bindButtonChannel(buttonName) { + // generic button bind used for volumeup/volumedown buttons + var volumeButtonChannel = cordova.addDocumentEventHandler(buttonName + 'button'); + volumeButtonChannel.onHasSubscribersChange = function() { + exec(null, null, APP_PLUGIN_NAME, "overrideButton", [buttonName, this.numHandlers == 1]); }; } + // Inject a listener for the volume buttons on the document. + bindButtonChannel('volumeup'); + bindButtonChannel('volumedown'); - // Register pause, resume and deviceready channels as events on document. - channel.onPause = cordova.addDocumentEventHandler('pause'); - channel.onResume = cordova.addDocumentEventHandler('resume'); - channel.onActivated = cordova.addDocumentEventHandler('activated'); - channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready'); + // The resume event is not "sticky", but it is possible that the event + // will contain the result of a plugin call. We need to ensure that the + // plugin result is delivered even after the event is fired (CB-10498) + var cordovaAddEventListener = document.addEventListener; - // Listen for DOMContentLoaded and notify our channel subscribers. - if (document.readyState === 'complete' || document.readyState === 'interactive') { - channel.onDOMContentLoaded.fire(); - } else { - document.addEventListener('DOMContentLoaded', function () { - channel.onDOMContentLoaded.fire(); - }, false); - } + document.addEventListener = function(evt, handler, capture) { + cordovaAddEventListener(evt, handler, capture); - // _nativeReady is global variable that the native side can set - // to signify that the native code is ready. It is a global since - // it may be called before any cordova JS is ready. - if (window._nativeReady) { - channel.onNativeReady.fire(); - } - - // Call the platform-specific initialization. - platform.bootstrap && platform.bootstrap(); - - // Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js. - // The delay allows the attached modules to be defined before the plugin loader looks for them. - setTimeout(function () { - pluginloader.load(function () { - channel.onPluginsReady.fire(); - }); - }, 0); - - /** - * Create all cordova objects once native side is ready. - */ - channel.join(function () { - modulemapper.mapModules(window); - - platform.initialize && platform.initialize(); - - // Fire event to notify that all objects are created - channel.onCordovaReady.fire(); - - // Fire onDeviceReady event once page has fully loaded, all - // constructors have run and cordova info has been received from native - // side. - channel.join(function () { - require('cordova').fireDocumentEvent('deviceready'); - }, channel.deviceReadyChannelsArray); - - }, platformInitChannelsArray); - - }); - - // file: src/common/modulemapper.js - define('cordova/modulemapper', function (require, exports, module) { - - var builder = require('cordova/builder'); - var moduleMap = define.moduleMap; - var symbolList; - var deprecationMap; - - exports.reset = function () { - symbolList = []; - deprecationMap = {}; - }; - - function addEntry (strategy, moduleName, symbolPath, opt_deprecationMessage) { - if (!(moduleName in moduleMap)) { - throw new Error('Module ' + moduleName + ' does not exist.'); + if (evt === 'resume' && lastResumeEvent) { + handler(lastResumeEvent); } - symbolList.push(strategy, moduleName, symbolPath); - if (opt_deprecationMessage) { - deprecationMap[symbolPath] = opt_deprecationMessage; - } - } - - // Note: Android 2.3 does have Function.bind(). - exports.clobbers = function (moduleName, symbolPath, opt_deprecationMessage) { - addEntry('c', moduleName, symbolPath, opt_deprecationMessage); }; - exports.merges = function (moduleName, symbolPath, opt_deprecationMessage) { - addEntry('m', moduleName, symbolPath, opt_deprecationMessage); - }; + // Let native code know we are all done on the JS side. + // Native code will then un-hide the WebView. + channel.onCordovaReady.subscribe(function() { + exec(onMessageFromNative, null, APP_PLUGIN_NAME, 'messageChannel', []); + exec(null, null, APP_PLUGIN_NAME, "show", []); + }); + } +}; - exports.defaults = function (moduleName, symbolPath, opt_deprecationMessage) { - addEntry('d', moduleName, symbolPath, opt_deprecationMessage); - }; +function onMessageFromNative(msg) { + var cordova = require('cordova'); + var action = msg.action; - exports.runs = function (moduleName) { - addEntry('r', moduleName, null); - }; - - function prepareNamespace (symbolPath, context) { - if (!symbolPath) { - return context; - } - var parts = symbolPath.split('.'); - var cur = context; - for (var i = 0, part; part = parts[i]; ++i) { - cur = cur[part] = cur[part] || {}; - } - return cur; - } - - exports.mapModules = function (context) { - var origSymbols = {}; - context.CDV_origSymbols = origSymbols; - for (var i = 0, len = symbolList.length; i < len; i += 3) { - var strategy = symbolList[i]; - var moduleName = symbolList[i + 1]; - var module = require(moduleName); - // - if (strategy === 'r') { - continue; - } - var symbolPath = symbolList[i + 2]; - var lastDot = symbolPath.lastIndexOf('.'); - var namespace = symbolPath.substr(0, lastDot); - var lastName = symbolPath.substr(lastDot + 1); - - var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null; - var parentObj = prepareNamespace(namespace, context); - var target = parentObj[lastName]; - - if (strategy === 'm' && target) { - builder.recursiveMerge(target, module); - } else if ((strategy === 'd' && !target) || (strategy !== 'd')) { - if (!(symbolPath in origSymbols)) { - origSymbols[symbolPath] = target; + switch (action) + { + // Button events + case 'backbutton': + case 'menubutton': + case 'searchbutton': + // App life cycle events + case 'pause': + // Volume events + case 'volumedownbutton': + case 'volumeupbutton': + cordova.fireDocumentEvent(action); + break; + case 'resume': + if(arguments.length > 1 && msg.pendingResult) { + if(arguments.length === 2) { + msg.pendingResult.result = arguments[1]; + } else { + // The plugin returned a multipart message + var res = []; + for(var i = 1; i < arguments.length; i++) { + res.push(arguments[i]); } - builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg); + msg.pendingResult.result = res; } + + // Save the plugin result so that it can be delivered to the js + // even if they miss the initial firing of the event + lastResumeEvent = msg; } - }; + cordova.fireDocumentEvent(action, msg); + break; + default: + throw new Error('Unknown event action ' + action); + } +} - exports.getOriginalSymbol = function (context, symbolPath) { - var origSymbols = context.CDV_origSymbols; - if (origSymbols && (symbolPath in origSymbols)) { - return origSymbols[symbolPath]; - } - var parts = symbolPath.split('.'); - var obj = context; - for (var i = 0; i < parts.length; ++i) { - obj = obj && obj[parts[i]]; - } - return obj; - }; +}); - exports.reset(); +// file: /Users/jbowser/cordova/cordova-android/cordova-js-src/plugin/android/app.js +define("cordova/plugin/android/app", function(require, exports, module) { - }); +var exec = require('cordova/exec'); +var APP_PLUGIN_NAME = Number(require('cordova').platformVersion.split('.')[0]) >= 4 ? 'CoreAndroid' : 'App'; - // file: src/common/modulemapper_b.js - define('cordova/modulemapper_b', function (require, exports, module) { +module.exports = { + /** + * Clear the resource cache. + */ + clearCache:function() { + exec(null, null, APP_PLUGIN_NAME, "clearCache", []); + }, - var builder = require('cordova/builder'); - var symbolList = []; - var deprecationMap; + /** + * Load the url into the webview or into new browser instance. + * + * @param url The URL to load + * @param props Properties that can be passed in to the activity: + * wait: int => wait msec before loading URL + * loadingDialog: "Title,Message" => display a native loading dialog + * loadUrlTimeoutValue: int => time in msec to wait before triggering a timeout error + * clearHistory: boolean => clear webview history (default=false) + * openExternal: boolean => open in a new browser (default=false) + * + * Example: + * navigator.app.loadUrl("http://server/myapp/index.html", {wait:2000, loadingDialog:"Wait,Loading App", loadUrlTimeoutValue: 60000}); + */ + loadUrl:function(url, props) { + exec(null, null, APP_PLUGIN_NAME, "loadUrl", [url, props]); + }, - exports.reset = function () { - symbolList = []; - deprecationMap = {}; - }; + /** + * Cancel loadUrl that is waiting to be loaded. + */ + cancelLoadUrl:function() { + exec(null, null, APP_PLUGIN_NAME, "cancelLoadUrl", []); + }, - function addEntry (strategy, moduleName, symbolPath, opt_deprecationMessage) { - symbolList.push(strategy, moduleName, symbolPath); - if (opt_deprecationMessage) { - deprecationMap[symbolPath] = opt_deprecationMessage; - } - } + /** + * Clear web history in this web view. + * Instead of BACK button loading the previous web page, it will exit the app. + */ + clearHistory:function() { + exec(null, null, APP_PLUGIN_NAME, "clearHistory", []); + }, - // Note: Android 2.3 does have Function.bind(). - exports.clobbers = function (moduleName, symbolPath, opt_deprecationMessage) { - addEntry('c', moduleName, symbolPath, opt_deprecationMessage); - }; + /** + * Go to previous page displayed. + * This is the same as pressing the backbutton on Android device. + */ + backHistory:function() { + exec(null, null, APP_PLUGIN_NAME, "backHistory", []); + }, - exports.merges = function (moduleName, symbolPath, opt_deprecationMessage) { - addEntry('m', moduleName, symbolPath, opt_deprecationMessage); - }; + /** + * Override the default behavior of the Android back button. + * If overridden, when the back button is pressed, the "backKeyDown" JavaScript event will be fired. + * + * Note: The user should not have to call this method. Instead, when the user + * registers for the "backbutton" event, this is automatically done. + * + * @param override T=override, F=cancel override + */ + overrideBackbutton:function(override) { + exec(null, null, APP_PLUGIN_NAME, "overrideBackbutton", [override]); + }, - exports.defaults = function (moduleName, symbolPath, opt_deprecationMessage) { - addEntry('d', moduleName, symbolPath, opt_deprecationMessage); - }; + /** + * Override the default behavior of the Android volume button. + * If overridden, when the volume button is pressed, the "volume[up|down]button" + * JavaScript event will be fired. + * + * Note: The user should not have to call this method. Instead, when the user + * registers for the "volume[up|down]button" event, this is automatically done. + * + * @param button volumeup, volumedown + * @param override T=override, F=cancel override + */ + overrideButton:function(button, override) { + exec(null, null, APP_PLUGIN_NAME, "overrideButton", [button, override]); + }, - exports.runs = function (moduleName) { - addEntry('r', moduleName, null); - }; + /** + * Exit and terminate the application. + */ + exitApp:function() { + return exec(null, null, APP_PLUGIN_NAME, "exitApp", []); + } +}; - function prepareNamespace (symbolPath, context) { - if (!symbolPath) { - return context; - } - var parts = symbolPath.split('.'); - var cur = context; - for (var i = 0, part; part = parts[i]; ++i) { - cur = cur[part] = cur[part] || {}; - } - return cur; - } +}); - exports.mapModules = function (context) { - var origSymbols = {}; - context.CDV_origSymbols = origSymbols; - for (var i = 0, len = symbolList.length; i < len; i += 3) { - var strategy = symbolList[i]; - var moduleName = symbolList[i + 1]; - var module = require(moduleName); - // - if (strategy === 'r') { - continue; - } - var symbolPath = symbolList[i + 2]; - var lastDot = symbolPath.lastIndexOf('.'); - var namespace = symbolPath.substr(0, lastDot); - var lastName = symbolPath.substr(lastDot + 1); +// file: src/common/pluginloader.js +define("cordova/pluginloader", function(require, exports, module) { - var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null; - var parentObj = prepareNamespace(namespace, context); - var target = parentObj[lastName]; +var modulemapper = require('cordova/modulemapper'); +var urlutil = require('cordova/urlutil'); - if (strategy === 'm' && target) { - builder.recursiveMerge(target, module); - } else if ((strategy === 'd' && !target) || (strategy !== 'd')) { - if (!(symbolPath in origSymbols)) { - origSymbols[symbolPath] = target; - } - builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg); - } - } - }; +// Helper function to inject a \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", + "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git+ssh://git@github.com/peterolson/BigInteger.js.git" @@ -112,5 +111,5 @@ "test": "tsc && node_modules/.bin/karma start my.conf.js && node spec/tsDefinitions.js" }, "typings": "./BigInteger.d.ts", - "version": "1.6.24" + "version": "1.6.25" } diff --git a/node_modules/bplist-parser/package.json b/node_modules/bplist-parser/package.json index e0bc4245..89dfc8d7 100644 --- a/node_modules/bplist-parser/package.json +++ b/node_modules/bplist-parser/package.json @@ -10,7 +10,7 @@ "spec": ">=0.1.0 <0.2.0", "type": "range" }, - "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common" + "/Users/jbowser/cordova/cordova-android/node_modules/cordova-common" ] ], "_from": "bplist-parser@>=0.1.0 <0.2.0", @@ -36,11 +36,11 @@ "_requiredBy": [ "/cordova-common" ], - "_resolved": "http://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", + "_resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", "_shasum": "d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6", "_shrinkwrap": null, "_spec": "bplist-parser@^0.1.0", - "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common", + "_where": "/Users/jbowser/cordova/cordova-android/node_modules/cordova-common", "author": { "name": "Joe Ferner", "email": "joe.ferner@nearinfinity.com" @@ -77,8 +77,7 @@ ], "name": "bplist-parser", "optionalDependencies": {}, - "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", + "readme": "ERROR: No README data found!", "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 f803589b..a8768dcd 100644 --- a/node_modules/brace-expansion/package.json +++ b/node_modules/brace-expansion/package.json @@ -10,7 +10,7 @@ "spec": ">=1.1.7 <2.0.0", "type": "range" }, - "/Users/steveng/repo/cordova/cordova-android/node_modules/minimatch" + "/Users/jbowser/cordova/cordova-android/node_modules/minimatch" ] ], "_from": "brace-expansion@>=1.1.7 <2.0.0", @@ -44,7 +44,7 @@ "_shasum": "c07b211c7c952ec1f8efd51a77ef0d1d3990a292", "_shrinkwrap": null, "_spec": "brace-expansion@^1.1.7", - "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/minimatch", + "_where": "/Users/jbowser/cordova/cordova-android/node_modules/minimatch", "author": { "name": "Julian Gruber", "email": "mail@juliangruber.com", @@ -84,8 +84,7 @@ ], "name": "brace-expansion", "optionalDependencies": {}, - "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[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)\n[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion)\n[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/)\n\n[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](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", + "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git://github.com/juliangruber/brace-expansion.git" diff --git a/node_modules/concat-map/package.json b/node_modules/concat-map/package.json index bfbfe3f7..7b6bcacd 100644 --- a/node_modules/concat-map/package.json +++ b/node_modules/concat-map/package.json @@ -10,7 +10,7 @@ "spec": "0.0.1", "type": "version" }, - "/Users/steveng/repo/cordova/cordova-android/node_modules/brace-expansion" + "/Users/jbowser/cordova/cordova-android/node_modules/brace-expansion" ] ], "_from": "concat-map@0.0.1", @@ -35,11 +35,11 @@ "_requiredBy": [ "/brace-expansion" ], - "_resolved": "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", "_shrinkwrap": null, "_spec": "concat-map@0.0.1", - "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/brace-expansion", + "_where": "/Users/jbowser/cordova/cordova-android/node_modules/brace-expansion", "author": { "name": "James Halliday", "email": "mail@substack.net", @@ -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#readme", + "homepage": "https://github.com/substack/node-concat-map", "keywords": [ "concat", "concatMap", @@ -79,8 +79,7 @@ ], "name": "concat-map", "optionalDependencies": {}, - "readme": "concat-map\n==========\n\nConcatenative mapdashery.\n\n[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map)\n\n[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](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", + "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git://github.com/substack/node-concat-map.git" diff --git a/node_modules/cordova-common/package.json b/node_modules/cordova-common/package.json index d7fb135e..3ac0c10b 100644 --- a/node_modules/cordova-common/package.json +++ b/node_modules/cordova-common/package.json @@ -10,7 +10,7 @@ "spec": ">=2.1.0 <3.0.0", "type": "range" }, - "/Users/steveng/repo/cordova/cordova-android" + "/Users/jbowser/cordova/cordova-android" ] ], "_from": "cordova-common@>=2.1.0 <3.0.0", @@ -44,7 +44,7 @@ "_shasum": "bb357ee1b9825031ed9db3c56b592efe973d1640", "_shrinkwrap": null, "_spec": "cordova-common@^2.1.0", - "_where": "/Users/steveng/repo/cordova/cordova-android", + "_where": "/Users/jbowser/cordova/cordova-android", "author": { "name": "Apache Software Foundation" }, @@ -133,8 +133,7 @@ ], "name": "cordova-common", "optionalDependencies": {}, - "readme": "\n\n[![Build status](https://ci.appveyor.com/api/projects/status/wxkmo0jalsr8gane?svg=true)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-common/branch/master)\n[![Build Status](https://travis-ci.org/apache/cordova-common.svg?branch=master)](https://travis-ci.org/apache/cordova-common)\n[![NPM](https://nodei.co/npm/cordova-common.png)](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", + "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git+https://github.com/apache/cordova-lib.git" diff --git a/node_modules/cordova-registry-mapper/package.json b/node_modules/cordova-registry-mapper/package.json index aa1da6a6..088dd045 100644 --- a/node_modules/cordova-registry-mapper/package.json +++ b/node_modules/cordova-registry-mapper/package.json @@ -10,7 +10,7 @@ "spec": ">=1.1.8 <2.0.0", "type": "range" }, - "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common" + "/Users/jbowser/cordova/cordova-android/node_modules/cordova-common" ] ], "_from": "cordova-registry-mapper@>=1.1.8 <2.0.0", @@ -36,11 +36,11 @@ "_requiredBy": [ "/cordova-common" ], - "_resolved": "http://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.15.tgz", + "_resolved": "https://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.15.tgz", "_shasum": "e244b9185b8175473bff6079324905115f83dc7c", "_shrinkwrap": null, "_spec": "cordova-registry-mapper@^1.1.8", - "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common", + "_where": "/Users/jbowser/cordova/cordova-android/node_modules/cordova-common", "author": { "name": "Steve Gill" }, @@ -73,8 +73,7 @@ ], "name": "cordova-registry-mapper", "optionalDependencies": {}, - "readme": "[![Build Status](https://travis-ci.org/stevengill/cordova-registry-mapper.svg?branch=master)](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", + "readme": "ERROR: No README data found!", "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 ffb3cc45..ef3c3d45 100644 --- a/node_modules/elementtree/package.json +++ b/node_modules/elementtree/package.json @@ -10,7 +10,7 @@ "spec": "0.1.6", "type": "version" }, - "/Users/steveng/repo/cordova/cordova-android" + "/Users/jbowser/cordova/cordova-android" ] ], "_from": "elementtree@0.1.6", @@ -36,11 +36,11 @@ "/", "/cordova-common" ], - "_resolved": "http://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz", + "_resolved": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz", "_shasum": "2ac4c46ea30516c8c4cbdb5e3ac7418e592de20c", "_shrinkwrap": null, "_spec": "elementtree@0.1.6", - "_where": "/Users/steveng/repo/cordova/cordova-android", + "_where": "/Users/jbowser/cordova/cordova-android", "author": { "name": "Rackspace US, Inc." }, @@ -97,8 +97,7 @@ ], "name": "elementtree", "optionalDependencies": {}, - "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[![Build Status](https://secure.travis-ci.org/racker/node-elementtree.png)](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", + "readme": "ERROR: No README data found!", "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 79cfdb15..6054ad3f 100644 --- a/node_modules/glob/package.json +++ b/node_modules/glob/package.json @@ -10,7 +10,7 @@ "spec": ">=5.0.13 <6.0.0", "type": "range" }, - "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common" + "/Users/jbowser/cordova/cordova-android/node_modules/cordova-common" ] ], "_from": "glob@>=5.0.13 <6.0.0", @@ -36,11 +36,11 @@ "_requiredBy": [ "/cordova-common" ], - "_resolved": "http://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "_resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", "_shasum": "1bc936b9e02f4a603fcc222ecf7633d30b8b93b1", "_shrinkwrap": null, "_spec": "glob@^5.0.13", - "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common", + "_where": "/Users/jbowser/cordova/cordova-android/node_modules/cordova-common", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -88,8 +88,7 @@ ], "name": "glob", "optionalDependencies": {}, - "readme": "[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Dependency Status](https://david-dm.org/isaacs/node-glob.svg)](https://david-dm.org/isaacs/node-glob) [![devDependency Status](https://david-dm.org/isaacs/node-glob/dev-status.svg)](https://david-dm.org/isaacs/node-glob#info=devDependencies) [![optionalDependency Status](https://david-dm.org/isaacs/node-glob/optional-status.svg)](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![](oh-my-glob.gif)\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", + "readme": "ERROR: No README data found!", "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 d73d3c27..dbbf1566 100644 --- a/node_modules/inflight/package.json +++ b/node_modules/inflight/package.json @@ -10,7 +10,7 @@ "spec": ">=1.0.4 <2.0.0", "type": "range" }, - "/Users/steveng/repo/cordova/cordova-android/node_modules/glob" + "/Users/jbowser/cordova/cordova-android/node_modules/glob" ] ], "_from": "inflight@>=1.0.4 <2.0.0", @@ -40,11 +40,11 @@ "_requiredBy": [ "/glob" ], - "_resolved": "http://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "_shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9", "_shrinkwrap": null, "_spec": "inflight@^1.0.4", - "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/glob", + "_where": "/Users/jbowser/cordova/cordova-android/node_modules/glob", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -93,8 +93,7 @@ ], "name": "inflight", "optionalDependencies": {}, - "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", + "readme": "ERROR: No README data found!", "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 e9e085a4..4805cb67 100644 --- a/node_modules/inherits/package.json +++ b/node_modules/inherits/package.json @@ -10,7 +10,7 @@ "spec": ">=2.0.0 <3.0.0", "type": "range" }, - "/Users/steveng/repo/cordova/cordova-android/node_modules/glob" + "/Users/jbowser/cordova/cordova-android/node_modules/glob" ] ], "_from": "inherits@>=2.0.0 <3.0.0", @@ -40,11 +40,11 @@ "_requiredBy": [ "/glob" ], - "_resolved": "http://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "_shasum": "633c2c83e3da42a502f52466022480f4208261de", "_shrinkwrap": null, "_spec": "inherits@2", - "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/glob", + "_where": "/Users/jbowser/cordova/cordova-android/node_modules/glob", "browser": "./inherits_browser.js", "bugs": { "url": "https://github.com/isaacs/inherits/issues" @@ -85,8 +85,7 @@ ], "name": "inherits", "optionalDependencies": {}, - "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", + "readme": "ERROR: No README data found!", "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 f68079e8..2a0b5435 100644 --- a/node_modules/lodash/package.json +++ b/node_modules/lodash/package.json @@ -10,7 +10,7 @@ "spec": ">=3.5.0 <4.0.0", "type": "range" }, - "/Users/steveng/repo/cordova/cordova-android/node_modules/xmlbuilder" + "/Users/jbowser/cordova/cordova-android/node_modules/xmlbuilder" ] ], "_from": "lodash@>=3.5.0 <4.0.0", @@ -36,11 +36,11 @@ "_requiredBy": [ "/xmlbuilder" ], - "_resolved": "http://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "_resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", "_shasum": "5bf45e8e49ba4189e17d482789dfd15bd140b7b6", "_shrinkwrap": null, "_spec": "lodash@^3.5.0", - "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/xmlbuilder", + "_where": "/Users/jbowser/cordova/cordova-android/node_modules/xmlbuilder", "author": { "name": "John-David Dalton", "email": "john.david.dalton@gmail.com", @@ -117,8 +117,7 @@ ], "name": "lodash", "optionalDependencies": {}, - "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", + "readme": "ERROR: No README data found!", "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 de7334a5..c37746f5 100644 --- a/node_modules/minimatch/package.json +++ b/node_modules/minimatch/package.json @@ -10,7 +10,7 @@ "spec": ">=3.0.0 <4.0.0", "type": "range" }, - "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common" + "/Users/jbowser/cordova/cordova-android/node_modules/cordova-common" ] ], "_from": "minimatch@>=3.0.0 <4.0.0", @@ -45,7 +45,7 @@ "_shasum": "5166e286457f03306064be5497e8dbb0c3d32083", "_shrinkwrap": null, "_spec": "minimatch@^3.0.0", - "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common", + "_where": "/Users/jbowser/cordova/cordova-android/node_modules/cordova-common", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -85,8 +85,7 @@ ], "name": "minimatch", "optionalDependencies": {}, - "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](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", + "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git://github.com/isaacs/minimatch.git" diff --git a/node_modules/nopt/package.json b/node_modules/nopt/package.json index 22ed6ec7..516dc8a0 100644 --- a/node_modules/nopt/package.json +++ b/node_modules/nopt/package.json @@ -10,7 +10,7 @@ "spec": ">=3.0.1 <4.0.0", "type": "range" }, - "/Users/steveng/repo/cordova/cordova-android" + "/Users/jbowser/cordova/cordova-android" ] ], "_from": "nopt@>=3.0.1 <4.0.0", @@ -36,11 +36,11 @@ "_requiredBy": [ "/" ], - "_resolved": "http://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "_resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", "_shasum": "c6465dbf08abcd4db359317f79ac68a646b28ff9", "_shrinkwrap": null, "_spec": "nopt@^3.0.1", - "_where": "/Users/steveng/repo/cordova/cordova-android", + "_where": "/Users/jbowser/cordova/cordova-android", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -84,8 +84,7 @@ ], "name": "nopt", "optionalDependencies": {}, - "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", + "readme": "ERROR: No README data found!", "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 3d4e8601..7211805d 100644 --- a/node_modules/once/package.json +++ b/node_modules/once/package.json @@ -10,7 +10,7 @@ "spec": ">=1.3.0 <2.0.0", "type": "range" }, - "/Users/steveng/repo/cordova/cordova-android/node_modules/glob" + "/Users/jbowser/cordova/cordova-android/node_modules/glob" ] ], "_from": "once@>=1.3.0 <2.0.0", @@ -41,11 +41,11 @@ "/glob", "/inflight" ], - "_resolved": "http://registry.npmjs.org/once/-/once-1.4.0.tgz", + "_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "_shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1", "_shrinkwrap": null, "_spec": "once@^1.3.0", - "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/glob", + "_where": "/Users/jbowser/cordova/cordova-android/node_modules/glob", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -89,8 +89,7 @@ ], "name": "once", "optionalDependencies": {}, - "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", + "readme": "ERROR: No README data found!", "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 0eb3a24c..f9a51eb3 100644 --- a/node_modules/os-homedir/package.json +++ b/node_modules/os-homedir/package.json @@ -10,7 +10,7 @@ "spec": ">=1.0.0 <2.0.0", "type": "range" }, - "/Users/steveng/repo/cordova/cordova-android/node_modules/osenv" + "/Users/jbowser/cordova/cordova-android/node_modules/osenv" ] ], "_from": "os-homedir@>=1.0.0 <2.0.0", @@ -40,11 +40,11 @@ "_requiredBy": [ "/osenv" ], - "_resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "_resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "_shasum": "ffbc4988336e0e833de0c168c7ef152121aa7fb3", "_shrinkwrap": null, "_spec": "os-homedir@^1.0.0", - "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/osenv", + "_where": "/Users/jbowser/cordova/cordova-android/node_modules/osenv", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -97,8 +97,7 @@ ], "name": "os-homedir", "optionalDependencies": {}, - "readme": "# os-homedir [![Build Status](https://travis-ci.org/sindresorhus/os-homedir.svg?branch=master)](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", + "readme": "ERROR: No README data found!", "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 2edc83bf..b9d6541b 100644 --- a/node_modules/os-tmpdir/package.json +++ b/node_modules/os-tmpdir/package.json @@ -10,7 +10,7 @@ "spec": ">=1.0.0 <2.0.0", "type": "range" }, - "/Users/steveng/repo/cordova/cordova-android/node_modules/osenv" + "/Users/jbowser/cordova/cordova-android/node_modules/osenv" ] ], "_from": "os-tmpdir@>=1.0.0 <2.0.0", @@ -40,11 +40,11 @@ "_requiredBy": [ "/osenv" ], - "_resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "_resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "_shasum": "bbe67406c79aa85c5cfec766fe5734555dfa1274", "_shrinkwrap": null, "_spec": "os-tmpdir@^1.0.0", - "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/osenv", + "_where": "/Users/jbowser/cordova/cordova-android/node_modules/osenv", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -97,8 +97,7 @@ ], "name": "os-tmpdir", "optionalDependencies": {}, - "readme": "# os-tmpdir [![Build Status](https://travis-ci.org/sindresorhus/os-tmpdir.svg?branch=master)](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", + "readme": "ERROR: No README data found!", "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 87c5e5ba..1ccdd7cf 100644 --- a/node_modules/osenv/package.json +++ b/node_modules/osenv/package.json @@ -10,7 +10,7 @@ "spec": ">=0.1.3 <0.2.0", "type": "range" }, - "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common" + "/Users/jbowser/cordova/cordova-android/node_modules/cordova-common" ] ], "_from": "osenv@>=0.1.3 <0.2.0", @@ -40,11 +40,11 @@ "_requiredBy": [ "/cordova-common" ], - "_resolved": "http://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "_resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", "_shasum": "42fe6d5953df06c8064be6f176c3d05aaaa34644", "_shrinkwrap": null, "_spec": "osenv@^0.1.3", - "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common", + "_where": "/Users/jbowser/cordova/cordova-android/node_modules/cordova-common", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -101,8 +101,7 @@ ], "name": "osenv", "optionalDependencies": {}, - "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", + "readme": "ERROR: No README data found!", "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 c29aaf2f..514e8ced 100644 --- a/node_modules/path-is-absolute/package.json +++ b/node_modules/path-is-absolute/package.json @@ -10,7 +10,7 @@ "spec": ">=1.0.0 <2.0.0", "type": "range" }, - "/Users/steveng/repo/cordova/cordova-android/node_modules/glob" + "/Users/jbowser/cordova/cordova-android/node_modules/glob" ] ], "_from": "path-is-absolute@>=1.0.0 <2.0.0", @@ -40,11 +40,11 @@ "_requiredBy": [ "/glob" ], - "_resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "_shasum": "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f", "_shrinkwrap": null, "_spec": "path-is-absolute@^1.0.0", - "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/glob", + "_where": "/Users/jbowser/cordova/cordova-android/node_modules/glob", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -99,8 +99,7 @@ ], "name": "path-is-absolute", "optionalDependencies": {}, - "readme": "# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](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", + "readme": "ERROR: No README data found!", "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 4cecbbc4..15ac22a8 100644 --- a/node_modules/plist/package.json +++ b/node_modules/plist/package.json @@ -10,7 +10,7 @@ "spec": ">=1.2.0 <2.0.0", "type": "range" }, - "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common" + "/Users/jbowser/cordova/cordova-android/node_modules/cordova-common" ] ], "_from": "plist@>=1.2.0 <2.0.0", @@ -36,11 +36,11 @@ "_requiredBy": [ "/cordova-common" ], - "_resolved": "http://registry.npmjs.org/plist/-/plist-1.2.0.tgz", + "_resolved": "https://registry.npmjs.org/plist/-/plist-1.2.0.tgz", "_shasum": "084b5093ddc92506e259f874b8d9b1afb8c79593", "_shrinkwrap": null, "_spec": "plist@^1.2.0", - "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common", + "_where": "/Users/jbowser/cordova/cordova-android/node_modules/cordova-common", "author": { "name": "Nathan Rajlich", "email": "nathan@tootallnate.net" @@ -113,8 +113,7 @@ ], "name": "plist", "optionalDependencies": {}, - "readme": "plist.js\n========\n### Mac OS X Plist parser/builder for Node.js and browsers\n\n[![Sauce Test Status](https://saucelabs.com/browser-matrix/plistjs.svg)](https://saucelabs.com/u/plistjs)\n\n[![Build Status](https://travis-ci.org/TooTallNate/plist.js.svg?branch=master)](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", + "readme": "ERROR: No README data found!", "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 c23164f9..fccf257a 100644 --- a/node_modules/properties-parser/package.json +++ b/node_modules/properties-parser/package.json @@ -10,7 +10,7 @@ "spec": ">=0.2.3 <0.3.0", "type": "range" }, - "/Users/steveng/repo/cordova/cordova-android" + "/Users/jbowser/cordova/cordova-android" ] ], "_from": "properties-parser@>=0.2.3 <0.3.0", @@ -35,11 +35,11 @@ "_requiredBy": [ "/" ], - "_resolved": "http://registry.npmjs.org/properties-parser/-/properties-parser-0.2.3.tgz", + "_resolved": "https://registry.npmjs.org/properties-parser/-/properties-parser-0.2.3.tgz", "_shasum": "f7591255f707abbff227c7b56b637dbb0373a10f", "_shrinkwrap": null, "_spec": "properties-parser@^0.2.3", - "_where": "/Users/steveng/repo/cordova/cordova-android", + "_where": "/Users/jbowser/cordova/cordova-android", "bugs": { "url": "https://github.com/xavi-/node-properties-parser/issues" }, @@ -54,7 +54,7 @@ "engines": { "node": ">= 0.3.1" }, - "homepage": "https://github.com/xavi-/node-properties-parser#readme", + "homepage": "https://github.com/xavi-/node-properties-parser", "keywords": [ "parser", ".properties", @@ -66,15 +66,13 @@ "main": "./index.js", "maintainers": [ { - "name": "Xavi", - "email": "xavi.rmz@gmail.com", - "url": "http://xavi.co" + "name": "xavi", + "email": "xavi.rmz@gmail.com" } ], "name": "properties-parser", "optionalDependencies": {}, - "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", + "readme": "ERROR: No README data found!", "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 8f68f43c..92536516 100644 --- a/node_modules/q/package.json +++ b/node_modules/q/package.json @@ -10,7 +10,7 @@ "spec": ">=1.4.1 <2.0.0", "type": "range" }, - "/Users/steveng/repo/cordova/cordova-android" + "/Users/jbowser/cordova/cordova-android" ] ], "_from": "q@>=1.4.1 <2.0.0", @@ -41,11 +41,11 @@ "/", "/cordova-common" ], - "_resolved": "http://registry.npmjs.org/q/-/q-1.5.0.tgz", + "_resolved": "https://registry.npmjs.org/q/-/q-1.5.0.tgz", "_shasum": "dd01bac9d06d30e6f219aecb8253ee9ebdc308f1", "_shrinkwrap": null, "_spec": "q@^1.4.1", - "_where": "/Users/steveng/repo/cordova/cordova-android", + "_where": "/Users/jbowser/cordova/cordova-android", "author": { "name": "Kris Kowal", "email": "kris@cixar.com", @@ -137,8 +137,7 @@ } } }, - "readme": "[![Build Status](https://secure.travis-ci.org/kriskowal/q.svg?branch=master)](http://travis-ci.org/kriskowal/q)\n[![CDNJS](https://img.shields.io/cdnjs/v/q.js.svg)](https://cdnjs.com/libraries/q.js)\n\n\n \"Q\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 ``