Compare commits
107 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37ee3cdf81 | ||
|
|
22694606f9 | ||
|
|
9d217813f1 | ||
|
|
07dce213a2 | ||
|
|
f114ac8c8c | ||
|
|
05af619521 | ||
|
|
96457effbc | ||
|
|
67e7980eba | ||
|
|
0efa6cd766 | ||
|
|
a51fc4b25e | ||
|
|
071ddbf6eb | ||
|
|
a87eb7266f | ||
|
|
c2ddd2da7f | ||
|
|
e856613787 | ||
|
|
94e9bd5e26 | ||
|
|
011b57da54 | ||
|
|
7e54af75d8 | ||
|
|
d95df96881 | ||
|
|
36646eb527 | ||
|
|
48940bf4c0 | ||
|
|
5346a386f7 | ||
|
|
b3201ad073 | ||
|
|
35b0ba6d07 | ||
|
|
3c087c6716 | ||
|
|
854946e313 | ||
|
|
1f06176149 | ||
|
|
e628026cf0 | ||
|
|
3a512c300e | ||
|
|
7f9e7c73ab | ||
|
|
3e7be6cc0f | ||
|
|
81dfe96355 | ||
|
|
efa23bd39b | ||
|
|
6aa4b1b301 | ||
|
|
304cbef5ed | ||
|
|
263968e019 | ||
|
|
c05521e55a | ||
|
|
2f3c71feaa | ||
|
|
0b710a86a9 | ||
|
|
2e37d2c253 | ||
|
|
d7c1dc5517 | ||
|
|
77b9fd62a7 | ||
|
|
f838db4e18 | ||
|
|
b2d7124424 | ||
|
|
2532c4a39e | ||
|
|
be19585c68 | ||
|
|
ca0cbad1c7 | ||
|
|
fb53452d37 | ||
|
|
b5246f3f09 | ||
|
|
4be413af79 | ||
|
|
5db2de95f5 | ||
|
|
6418add83d | ||
|
|
7d26c51da6 | ||
|
|
dcada79e06 | ||
|
|
37384c583d | ||
|
|
9544783b5e | ||
|
|
eaf9b319ca | ||
|
|
47abde2f8d | ||
|
|
30325e4f32 | ||
|
|
9cf38f8705 | ||
|
|
7de4803e21 | ||
|
|
9586a7ddcd | ||
|
|
a4f6c8bf7b | ||
|
|
f5ab6fc602 | ||
|
|
222fb1c0e7 | ||
|
|
511fe7c51e | ||
|
|
acb3cc80b7 | ||
|
|
23fd0982b0 | ||
|
|
d2a159d2dc | ||
|
|
dc0bfeb0cc | ||
|
|
deea0f7e4f | ||
|
|
3a33f4c0a6 | ||
|
|
312872adaf | ||
|
|
ba5e3a81e0 | ||
|
|
bf5c32d780 | ||
|
|
d3cb38de29 | ||
|
|
047ed52d60 | ||
|
|
bb96bb9a88 | ||
|
|
0ee672d2b0 | ||
|
|
2a8a6b3970 | ||
|
|
5dbc51da59 | ||
|
|
f1a6d938cd | ||
|
|
991a2b1873 | ||
|
|
172c01561b | ||
|
|
b2f061cbaf | ||
|
|
1f1b2977a4 | ||
|
|
4a0a7bc424 | ||
|
|
8fbb6d7c62 | ||
|
|
0299467831 | ||
|
|
2efe240617 | ||
|
|
ed543dc648 | ||
|
|
db6295c917 | ||
|
|
d54a42f0f0 | ||
|
|
74ae6651c8 | ||
|
|
f33f352501 | ||
|
|
39c17e71ef | ||
|
|
081637134f | ||
|
|
39165a8694 | ||
|
|
ad163ce244 | ||
|
|
a7176d39f0 | ||
|
|
f1c185b771 | ||
|
|
103e1e8d24 | ||
|
|
30198c4bdd | ||
|
|
841f02f43f | ||
|
|
a5e9861440 | ||
|
|
d69698c23f | ||
|
|
d763f14ffe | ||
|
|
2cefb42559 |
22
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
Please make sure the checklist boxes are all checked before submitting the PR. The checklist
|
||||
is intended as a quick reference, for complete details please see our Contributor Guidelines:
|
||||
|
||||
http://cordova.apache.org/contribute/contribute_guidelines.html
|
||||
|
||||
Thanks!
|
||||
-->
|
||||
|
||||
### Platforms affected
|
||||
|
||||
|
||||
### What does this PR do?
|
||||
|
||||
|
||||
### What testing has been done on this change?
|
||||
|
||||
|
||||
### Checklist
|
||||
- [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
|
||||
- [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
|
||||
- [ ] Added automated test coverage as appropriate for this change.
|
||||
88
.gitignore
vendored
@@ -40,10 +40,94 @@ Desktop.ini
|
||||
*.iml
|
||||
.idea
|
||||
npm-debug.log
|
||||
/framework/build
|
||||
node_modules/jshint
|
||||
node_modules/promise-matchers
|
||||
node_modules/jasmine-node
|
||||
node_modules/jasmine
|
||||
node_modules/rewire
|
||||
node_modules/istanbul
|
||||
node_modules/.bin/cake
|
||||
node_modules/.bin/coffee
|
||||
node_modules/.bin/escodegen
|
||||
node_modules/.bin/esgenerate
|
||||
node_modules/.bin/esparse
|
||||
node_modules/.bin/esvalidate
|
||||
node_modules/.bin/handlebars
|
||||
node_modules/.bin/istanbul
|
||||
node_modules/.bin/jasmine
|
||||
node_modules/.bin/js-yaml
|
||||
node_modules/.bin/jshint
|
||||
node_modules/.bin/mkdirp
|
||||
node_modules/.bin/r.js
|
||||
node_modules/.bin/r_js
|
||||
node_modules/.bin/strip-json-comments
|
||||
node_modules/.bin/uglifyjs
|
||||
node_modules/.bin/which
|
||||
node_modules/align-text/
|
||||
node_modules/amdefine/
|
||||
node_modules/argparse/
|
||||
node_modules/async/
|
||||
node_modules/camelcase/
|
||||
node_modules/center-align/
|
||||
node_modules/cli/
|
||||
node_modules/cliui/
|
||||
node_modules/coffee-script/
|
||||
node_modules/console-browserify/
|
||||
node_modules/core-util-is/
|
||||
node_modules/date-now/
|
||||
node_modules/decamelize/
|
||||
node_modules/deep-is/
|
||||
node_modules/dom-serializer/
|
||||
node_modules/domelementtype/
|
||||
node_modules/domhandler/
|
||||
node_modules/domutils/
|
||||
node_modules/entities/
|
||||
node_modules/escodegen/
|
||||
node_modules/esprima/
|
||||
node_modules/estraverse/
|
||||
node_modules/esutils/
|
||||
node_modules/exit/
|
||||
node_modules/fast-levenshtein/
|
||||
node_modules/fileset/
|
||||
node_modules/gaze/
|
||||
node_modules/growl/
|
||||
node_modules/handlebars/
|
||||
node_modules/has-flag/
|
||||
node_modules/htmlparser2/
|
||||
node_modules/is-buffer/
|
||||
node_modules/isarray/
|
||||
node_modules/isexe/
|
||||
node_modules/jasmine-growl-reporter/
|
||||
node_modules/jasmine-reporters/
|
||||
node_modules/js-yaml/
|
||||
node_modules/kind-of/
|
||||
node_modules/lazy-cache/
|
||||
node_modules/levn/
|
||||
node_modules/longest/
|
||||
node_modules/lru-cache/
|
||||
node_modules/minimist/
|
||||
node_modules/mkdirp/
|
||||
node_modules/optimist/
|
||||
node_modules/optionator/
|
||||
node_modules/prelude-ls/
|
||||
node_modules/readable-stream/
|
||||
node_modules/repeat-string/
|
||||
node_modules/requirejs/
|
||||
node_modules/resolve/
|
||||
node_modules/right-align/
|
||||
node_modules/sigmund/
|
||||
node_modules/source-map/
|
||||
node_modules/sprintf-js/
|
||||
node_modules/string_decoder/
|
||||
node_modules/strip-json-comments/
|
||||
node_modules/supports-color/
|
||||
node_modules/type-check/
|
||||
node_modules/uglify-js/
|
||||
node_modules/uglify-to-browserify/
|
||||
node_modules/walkdir/
|
||||
node_modules/which/
|
||||
node_modules/window-size/
|
||||
node_modules/wordwrap/
|
||||
node_modules/yargs/
|
||||
node_modules/jasmine-core/
|
||||
node_modules/fs.realpath/
|
||||
/coverage
|
||||
|
||||
@@ -2,3 +2,6 @@
|
||||
bin
|
||||
gen
|
||||
proguard-project.txt
|
||||
spec
|
||||
appveyor.yml
|
||||
framework/build
|
||||
|
||||
11
.travis.yml
@@ -1,9 +1,18 @@
|
||||
language: android
|
||||
sudo: false
|
||||
jdk:
|
||||
- oraclejdk8
|
||||
before_install:
|
||||
- nvm install 6
|
||||
- node --version
|
||||
install:
|
||||
- npm install
|
||||
- npm install -g codecov
|
||||
- echo y | android update sdk -u --filter android-22,android-23
|
||||
- echo y | android update sdk -u --filter android-22,android-23,android-24,android-25
|
||||
android:
|
||||
components:
|
||||
- tools
|
||||
- tools
|
||||
script:
|
||||
- npm run jshint
|
||||
- npm run cover
|
||||
|
||||
615
RELEASENOTES.md
@@ -20,129 +20,262 @@
|
||||
-->
|
||||
## Release Notes for Cordova (Android) ##
|
||||
|
||||
### 6.1.2 (Jan 26, 2017)
|
||||
* **Security** Change to `https` by default
|
||||
* [CB-12018](https://issues.apache.org/jira/browse/CB-12018): updated tests to work with jasmine (promise matcher tests commented out for now)
|
||||
* created directories and corresponding images for `xxhdpi` and `xxxhdpi`, both drawables and `mipmaps`
|
||||
|
||||
### 6.1.1 (Jan 03, 2017)
|
||||
* [CB-12159](https://issues.apache.org/jira/browse/CB-12159) **Android** Keystore password prompt won't show up
|
||||
* [CB-12169](https://issues.apache.org/jira/browse/CB-12169) Check for build directory before running a clean
|
||||
* Fixed `AndroidStudio` tests to actually run, removed `app/src/main/assets/` as a requirement and added `app/src/main/res` instead, added placeholder for `build/` folder, Removed dupe `gitignore`
|
||||
|
||||
### 6.1.0 (Nov 02, 2016)
|
||||
* [CB-12108](https://issues.apache.org/jira/browse/CB-12108) Updating gradle files to work with the latest version of Android Studio
|
||||
* [CB-12102](https://issues.apache.org/jira/browse/CB-12102) Bump travis to build to API 25
|
||||
* Bumping up the version
|
||||
* [CB-12101](https://issues.apache.org/jira/browse/CB-12101) Fix so that CLI builds don't conflict with Android Studio builds
|
||||
* [CB-12077](https://issues.apache.org/jira/browse/CB-12077) Fix paths for Android icons/splashscreens
|
||||
* added framework/build to .ratignore
|
||||
* Fix for broken testUrl test
|
||||
* Last minute change of test targets
|
||||
* Update JS snapshot to version 6.1.0-dev (via coho)
|
||||
* Set VERSION to 6.1.0-dev (via coho)
|
||||
|
||||
### 6.0.0 (Oct 20, 2016)
|
||||
|
||||
This release adds significant functionality, and also introduces a number
|
||||
of breaking changes. Some of the changes to the code base will be of
|
||||
particular interest to third party webview plugin developers.
|
||||
|
||||
#### Major Changes ####
|
||||
* Primary bridge is the EVAL_BRIDGE, which tells the WebView to execute JS directly. This is more stable than the ONLINE_EVENT bridge
|
||||
* Full Support for Android Nougat (API 24)
|
||||
* Ice Cream Sandwich Support has been deprecated. Minimum Supported Android Version is Jellybean (API 16/ Android 4.1)
|
||||
* Plugin Installation now CLEANS the build directory, this speeds up gradle build times and allows for CLI develoment to be more predictable
|
||||
|
||||
Changes For Third-Party WebView Developers:
|
||||
* executeJavascript method added and is an abstract method that must be implemented
|
||||
* the EVAL_BRIDGE must be added to the WebView
|
||||
|
||||
|
||||
#### Curated Changes from the Git Commit Logs ####
|
||||
* Updating the gradle build for test to use the latest
|
||||
* [CB-11083](https://issues.apache.org/jira/browse/CB-11083) Fixing syncronous file check and future-proofing the JS for Travis
|
||||
* [CB-11083](https://issues.apache.org/jira/browse/CB-11083) Reading files to check for CordovaLib dependency, if so, we exclude CordovaLib to be safe
|
||||
* [CB-11083](https://issues.apache.org/jira/browse/CB-11083) Plugin build script for dependencies without a gradle file
|
||||
* [CB-11083](https://issues.apache.org/jira/browse/CB-11083) The GradleBuidler can tell the difference between a Cordova Plugin Framework and a regular framework based on the name
|
||||
* [CB-11083](https://issues.apache.org/jira/browse/CB-11083) Fix to deal with custom frameworks with their own Gradle configuration
|
||||
* [CB-12003](https://issues.apache.org/jira/browse/CB-12003) updated node_modules
|
||||
* [CB-11771](https://issues.apache.org/jira/browse/CB-11771) Deep symlink directories to target project instead of linking the directory itself
|
||||
* [CB-11880](https://issues.apache.org/jira/browse/CB-11880) android: Fail-safe for cordova.exec()
|
||||
* [CB-11999](https://issues.apache.org/jira/browse/CB-11999) add message, catch exception if require fails
|
||||
* fix issue with app_name containing apostrophes
|
||||
* [CB-8722](https://issues.apache.org/jira/browse/CB-8722) - Move icons from drawable to mipmap
|
||||
* [CB-11964](https://issues.apache.org/jira/browse/CB-11964) Call clean after plugin install and mock it in tests
|
||||
* Did a try/catch to deal with the unit tests vs actual project environment, code duplication is needed because of builderEnv
|
||||
* [CB-11964](https://issues.apache.org/jira/browse/CB-11964) Do a clean when installing a plugin to et around the bug
|
||||
* [CB-11921](https://issues.apache.org/jira/browse/CB-11921) - Add github pull request template
|
||||
* [CB-11935](https://issues.apache.org/jira/browse/CB-11935) Does a best-effort attempt to pause any processing that can be paused safely, such as animations and geolocation.
|
||||
* [CB-11640](https://issues.apache.org/jira/browse/CB-11640) Fixing check_reqs.js so it actually works
|
||||
* [CB-11640](https://issues.apache.org/jira/browse/CB-11640) Changing requirements check to ask for Java 8
|
||||
* [CB-11869](https://issues.apache.org/jira/browse/CB-11869) Fix cordova-js android exec tests
|
||||
* [CB-11907](https://issues.apache.org/jira/browse/CB-11907) Bumping Gradle to work with Android Studio 2.2 and the Android Gradle Plugin
|
||||
* Enable background start of Cordova Android apps
|
||||
* fixing jshint issues
|
||||
* replace Integer.parseInt with BigInteger so that you can use longer Android version codes
|
||||
* [CB-11828](https://issues.apache.org/jira/browse/CB-11828) Adding dirty userAgent checking to see if we're running Jellybean or not for bridge modes
|
||||
* [CB-11828](https://issues.apache.org/jira/browse/CB-11828) Switching default bridge back to ONLINE_BRIDGE
|
||||
* Add gradle build flag to enable dex in process for large projects
|
||||
* added ability for cordova activity to be viewed in a real full screen regardless of android version (as was the case in previous cordova versions)
|
||||
* Updating travis
|
||||
* Adding Static Method to CoreAndroid Plugin so we can get the BuildConfig data from other plugins
|
||||
* Bump Target and Min API levels
|
||||
* Make evaluateJavaScript brige default
|
||||
* Creating an evaluateJavascript branch
|
||||
* [CB-11727](https://issues.apache.org/jira/browse/CB-11727) - travis ci setup is still using 0.10.32 node
|
||||
* [CB-11726](https://issues.apache.org/jira/browse/CB-11726) - Update appveyor node versions to 4 and 6, so they will always use the latest versions
|
||||
* Close invalid PRs
|
||||
* [CB-11683](https://issues.apache.org/jira/browse/CB-11683) Fixed linking to directories during plugin installation.
|
||||
* fixed [CB-11078](https://issues.apache.org/jira/browse/CB-11078) Empty string for BackgroundColor preference crashes application This closes #316
|
||||
* Update JS snapshot to version 5.3.0-dev (via coho)
|
||||
* Set VERSION to 5.3.0-dev (via coho)
|
||||
* [CB-11626](https://issues.apache.org/jira/browse/CB-11626) Updated RELEASENOTES and Version for release 5.2.2
|
||||
* updated cordoova-common to 1.4.0
|
||||
* This closes #195
|
||||
* Updaing the gradle for the tests to the latest
|
||||
* [CB-11550](https://issues.apache.org/jira/browse/CB-11550) Updated RELEASENOTES for release 5.2.1
|
||||
* [CB-9489](https://issues.apache.org/jira/browse/CB-9489) Fixed "endless waiting for emulator" issue
|
||||
* Update JS snapshot to version 5.3.0-dev (via coho)
|
||||
* Set VERSION to 5.3.0-dev (via coho)
|
||||
* [CB-11444](https://issues.apache.org/jira/browse/CB-11444) Updated RELEASENOTES and Version for release 5.2.0
|
||||
* [CB-11481](https://issues.apache.org/jira/browse/CB-11481) android-library is deprecated use com.android.library instead
|
||||
|
||||
### 5.2.2 (Jul 26, 2016)
|
||||
* [CB-11615](https://issues.apache.org/jira/browse/CB-11615) updated `cordoova-common` to `1.4.0`
|
||||
|
||||
### 5.2.1 (Jul 11, 2016)
|
||||
* [CB-9489](https://issues.apache.org/jira/browse/CB-9489) Fixed "endless waiting for emulator" issue
|
||||
* [CB-11481](https://issues.apache.org/jira/browse/CB-11481) android-library is deprecated use com.android.library instead
|
||||
|
||||
### 5.2.0 (Jun 29, 2016)
|
||||
* [CB-11383](https://issues.apache.org/jira/browse/CB-11383) Update to gradle for using `jcenter` and correct Application plugin
|
||||
* [CB-11365](https://issues.apache.org/jira/browse/CB-11365) fixed plugin rm issue with emit being `undefined`
|
||||
* [CB-11117](https://issues.apache.org/jira/browse/CB-11117) Use `FileUpdater` to optimize prepare for **android** platform
|
||||
* [CB-10096](https://issues.apache.org/jira/browse/CB-10096) Upgrade test project to `Gradle Plugin 2.1.0`
|
||||
* [CB-11292](https://issues.apache.org/jira/browse/CB-11292) fix broken `MessageChannel` after plugins are recreated
|
||||
* [CB-11259](https://issues.apache.org/jira/browse/CB-11259) Improving build output
|
||||
* [CB-10096](https://issues.apache.org/jira/browse/CB-10096) Upgrading to `Gradle Plugin 2.1.0`
|
||||
* [CB-11198](https://issues.apache.org/jira/browse/CB-11198) Skip **android** target sdk check. This closes #303.
|
||||
* [CB-11138](https://issues.apache.org/jira/browse/CB-11138) Reuse `PluginManager` from `common` to add/rm plugins
|
||||
* [CB-11133](https://issues.apache.org/jira/browse/CB-11133) Handle **android** emulator start failure
|
||||
* [CB-11132](https://issues.apache.org/jira/browse/CB-11132) Fix Error: Cannot read property `match` of undefined in `cordova-android` `emulator.js`
|
||||
* Add simple log for package name being deployed
|
||||
* [CB-11015](https://issues.apache.org/jira/browse/CB-11015) Error adding plugin with gradle extras
|
||||
* [CB-11095](https://issues.apache.org/jira/browse/CB-11095) Fix plugin add/removal when running on `Node v.010`
|
||||
* [CB-11022](https://issues.apache.org/jira/browse/CB-11022) Duplicate www files to both destinations on plugin operations
|
||||
* [CB-10964](https://issues.apache.org/jira/browse/CB-10964) Handle `build.json` file starting with a BOM.
|
||||
* [CB-10963](https://issues.apache.org/jira/browse/CB-10963) Handle overlapping permission requests from plugins
|
||||
* [CB-8582](https://issues.apache.org/jira/browse/CB-8582) Obscure `INSTALL_FAILED_VERSION_DOWNGRADE` error when installing app
|
||||
* [CB-10862](https://issues.apache.org/jira/browse/CB-10862) Cannot set `minsdkversion`
|
||||
* [CB-10896](https://issues.apache.org/jira/browse/CB-10896) We never enabled cookies on the `WebView` proper
|
||||
* [CB-10837](https://issues.apache.org/jira/browse/CB-10837) Support platform-specific orientation on **Android**
|
||||
* [CB-10600](https://issues.apache.org/jira/browse/CB-10600) `cordova run android --release` does not use signed and zip-aligned version of `APK`
|
||||
* [CB-9710](https://issues.apache.org/jira/browse/CB-9710) Fixing issues parsing `android avd list` output for certain AVDs which resulted in them not being included in the selection process even if they are the best match.
|
||||
* [CB-10888](https://issues.apache.org/jira/browse/CB-10888) Enable coverage reports collection via codecov
|
||||
* [CB-10846](https://issues.apache.org/jira/browse/CB-10846) Add Travis and AppVeyor badges to readme
|
||||
* [CB-10846](https://issues.apache.org/jira/browse/CB-10846) Add AppVeyor configuration
|
||||
* [CB-10749](https://issues.apache.org/jira/browse/CB-10749) Use `cordova-common.CordovaLogger` in `cordova-android`
|
||||
* [CB-10673](https://issues.apache.org/jira/browse/CB-10673) fixed conflicting plugin install issue with overlapped `<source-file>` tag. Add `--force` flag.
|
||||
* [CB-8976](https://issues.apache.org/jira/browse/CB-8976) Removing the auto-version for non-Crosswalk applications
|
||||
* [CB-10768](https://issues.apache.org/jira/browse/CB-10768) Use `cordova-common.superspawn` in `GradleBuilder`
|
||||
* [CB-10729](https://issues.apache.org/jira/browse/CB-10729) Move plugin handlers tests for into platform's repo
|
||||
* [CB-10669](https://issues.apache.org/jira/browse/CB-10669) `cordova run --list` cannot find `adb`
|
||||
* [CB-10660](https://issues.apache.org/jira/browse/CB-10660) fixed the exception when removing a non-existing directory.
|
||||
|
||||
### 5.1.1 (Feb 24, 2016)
|
||||
* updated `cordova-common` dependnecy to `1.1.0`
|
||||
* CB-10628 Fix `emulate android --target`
|
||||
* CB-10618 Handle gradle frameworks on plugin installation/uninstallation
|
||||
* CB-10510: Add an optional timeout to `emu` start script
|
||||
* CB-10498: Resume event should be sticky if it has a plugin result
|
||||
* [CB-10628](https://issues.apache.org/jira/browse/CB-10628) Fix `emulate android --target`
|
||||
* [CB-10618](https://issues.apache.org/jira/browse/CB-10618) Handle gradle frameworks on plugin installation/uninstallation
|
||||
* [CB-10510](https://issues.apache.org/jira/browse/CB-10510) Add an optional timeout to `emu` start script
|
||||
* [CB-10498](https://issues.apache.org/jira/browse/CB-10498) Resume event should be sticky if it has a plugin result
|
||||
* fix `HtmlNotFoundTest` so that it passes when file not found is handled correctly
|
||||
* CB-10472 `NullPointerException`: `org.apache.cordova.PluginManager.onSaveInstanceState` check if `pluginManager` is `null` before using it
|
||||
* CB-10138 Adds missing plugin metadata to `plugin_list` module.
|
||||
* CB-10443 Pass original options instead of remaining
|
||||
* CB-10443 Fix `this.root` null reference
|
||||
* CB-10421 Fixes exception when calling run script with `--help` option
|
||||
* [CB-10472](https://issues.apache.org/jira/browse/CB-10472) `NullPointerException`: `org.apache.cordova.PluginManager.onSaveInstanceState` check if `pluginManager` is `null` before using it
|
||||
* [CB-10138](https://issues.apache.org/jira/browse/CB-10138) Adds missing plugin metadata to `plugin_list` module.
|
||||
* [CB-10443](https://issues.apache.org/jira/browse/CB-10443) Pass original options instead of remaining
|
||||
* [CB-10443](https://issues.apache.org/jira/browse/CB-10443) Fix `this.root` null reference
|
||||
* [CB-10421](https://issues.apache.org/jira/browse/CB-10421) Fixes exception when calling run script with `--help` option
|
||||
* updated `.gitignore`
|
||||
* CB-10406 Fixes an exception, thrown when building using Ant.
|
||||
* CB-10157 Uninstall app from device/emulator only when signed apk is already installed
|
||||
* [CB-10406](https://issues.apache.org/jira/browse/CB-10406) Fixes an exception, thrown when building using Ant.
|
||||
* [CB-10157](https://issues.apache.org/jira/browse/CB-10157) Uninstall app from device/emulator only when signed apk is already installed
|
||||
|
||||
### 5.1.0 (Jan 19, 2016)
|
||||
* CB-10386 Add `android.useDeprecatedNdk=true` to support `NDK` in `gradle`
|
||||
* CB-8864: Fixing this to mitigate CB-8685 and CB-10104
|
||||
* CB-10105: Spot fix for tilde errors on paths.
|
||||
* [CB-10386](https://issues.apache.org/jira/browse/CB-10386) Add `android.useDeprecatedNdk=true` to support `NDK` in `gradle`
|
||||
* [CB-8864](https://issues.apache.org/jira/browse/CB-8864) Fixing this to mitigate [CB-8685](https://issues.apache.org/jira/browse/CB-8685) and [CB-10104](https://issues.apache.org/jira/browse/CB-10104)
|
||||
* [CB-10105](https://issues.apache.org/jira/browse/CB-10105) Spot fix for tilde errors on paths.
|
||||
* Update theme to `Theme.DeviceDefault.NoActionBar`
|
||||
* CB-10014: Set gradle `applicationId` to `package name`.
|
||||
* CB-9949: Fixing menu button event not fired in **Android**
|
||||
* CB-9479: Fixing the conditionals again, we should
|
||||
* CB-8917: New Plugin API for passing results on resume after Activity destruction
|
||||
* CB-9971 Suppress `gradlew _JAVA_OPTIONS` output during build
|
||||
* CB-9836 Add `.gitattributes` to prevent `CRLF` line endings in repos
|
||||
* [CB-10014](https://issues.apache.org/jira/browse/CB-10014) Set gradle `applicationId` to `package name`.
|
||||
* [CB-9949](https://issues.apache.org/jira/browse/CB-9949) Fixing menu button event not fired in **Android**
|
||||
* [CB-9479](https://issues.apache.org/jira/browse/CB-9479) Fixing the conditionals again, we should
|
||||
* [CB-8917](https://issues.apache.org/jira/browse/CB-8917) New Plugin API for passing results on resume after Activity destruction
|
||||
* [CB-9971](https://issues.apache.org/jira/browse/CB-9971) Suppress `gradlew _JAVA_OPTIONS` output during build
|
||||
* [CB-9836](https://issues.apache.org/jira/browse/CB-9836) Add `.gitattributes` to prevent `CRLF` line endings in repos
|
||||
* added node_modules back into `.gitignore`
|
||||
|
||||
### 5.0.0 (Nov 01, 2015)
|
||||
* Update CordovaWebViewEngine.java
|
||||
* CB-9909 Shouldn't escape spaces in paths on Windows.
|
||||
* CB-9870 updated hello world template
|
||||
* CB-9880 Fixes platform update failure when upgrading from android@<4.1.0
|
||||
* CB-9844 Remove old .java after renaming activity
|
||||
* CB-9800 Fixing contribute link.
|
||||
* CB-9782 Check in `cordova-common` dependency
|
||||
* [CB-9909](https://issues.apache.org/jira/browse/CB-9909) Shouldn't escape spaces in paths on Windows.
|
||||
* [CB-9870](https://issues.apache.org/jira/browse/CB-9870) updated hello world template
|
||||
* [CB-9880](https://issues.apache.org/jira/browse/CB-9880) Fixes platform update failure when upgrading from android@<4.1.0
|
||||
* [CB-9844](https://issues.apache.org/jira/browse/CB-9844) Remove old .java after renaming activity
|
||||
* [CB-9800](https://issues.apache.org/jira/browse/CB-9800) Fixing contribute link.
|
||||
* [CB-9782](https://issues.apache.org/jira/browse/CB-9782) Check in `cordova-common` dependency
|
||||
* Adds licence header to Adb to pass rat audit
|
||||
* CB-9835 Downgrade `properties-parser` to prevent failures in Node < 4.x
|
||||
* CB-9782 Implements PlatformApi contract for Android platform.
|
||||
* CB-9826 Fixed `test-build` script on windows.
|
||||
* [CB-9835](https://issues.apache.org/jira/browse/CB-9835) Downgrade `properties-parser` to prevent failures in Node < 4.x
|
||||
* [CB-9782](https://issues.apache.org/jira/browse/CB-9782) Implements PlatformApi contract for Android platform.
|
||||
* [CB-9826](https://issues.apache.org/jira/browse/CB-9826) Fixed `test-build` script on windows.
|
||||
* Refactor of the Cordova Plugin/Permissions API
|
||||
* Manually updating version to 5.0.0-dev for engine tags
|
||||
* Bump up to API level 23
|
||||
* Commiting code to handle permissions, and the special case of the Geolocation Plugin
|
||||
* CB-9608 cordova-android no longer builds on Node 0.10 or below
|
||||
* CB-9080 Cordova CLI run for Android versions 4.1.1 and lower throws error
|
||||
* CB-9557 Fixes apk install failure when switching from debug to release build
|
||||
* CB-9496 removed permissions added for crosswalk
|
||||
* CB-9402 Allow to set gradle distubutionUrl via env variable CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL
|
||||
* CB-9428 update script now bumps up minSdkVersion to 14 if it is less than that.
|
||||
* CB-9430 Fixes check_reqs failure when javac returns an extra line
|
||||
* CB-9172 Improved emulator deploy stability. This closes #188.
|
||||
* CB-9404 Fixed an exception when path contained -debug or -release
|
||||
* CB-8320 Setting up gradle so we can use CordovaLib as a standard Android Library
|
||||
* CB-9185 Fixed an issue when unsigned apks couldn't be found.
|
||||
* CB-9397 Fixes minor issues with `cordova requirements android`
|
||||
* CB-9389 Fixes build/check_reqs hang
|
||||
* [CB-9608](https://issues.apache.org/jira/browse/CB-9608) cordova-android no longer builds on Node 0.10 or below
|
||||
* [CB-9080](https://issues.apache.org/jira/browse/CB-9080) Cordova CLI run for Android versions 4.1.1 and lower throws error
|
||||
* [CB-9557](https://issues.apache.org/jira/browse/CB-9557) Fixes apk install failure when switching from debug to release build
|
||||
* [CB-9496](https://issues.apache.org/jira/browse/CB-9496) removed permissions added for crosswalk
|
||||
* [CB-9402](https://issues.apache.org/jira/browse/CB-9402) Allow to set gradle distubutionUrl via env variable CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL
|
||||
* [CB-9428](https://issues.apache.org/jira/browse/CB-9428) update script now bumps up minSdkVersion to 14 if it is less than that.
|
||||
* [CB-9430](https://issues.apache.org/jira/browse/CB-9430) Fixes check_reqs failure when javac returns an extra line
|
||||
* [CB-9172](https://issues.apache.org/jira/browse/CB-9172) Improved emulator deploy stability. This closes #188.
|
||||
* [CB-9404](https://issues.apache.org/jira/browse/CB-9404) Fixed an exception when path contained -debug or -release
|
||||
* [CB-8320](https://issues.apache.org/jira/browse/CB-8320) Setting up gradle so we can use CordovaLib as a standard Android Library
|
||||
* [CB-9185](https://issues.apache.org/jira/browse/CB-9185) Fixed an issue when unsigned apks couldn't be found.
|
||||
* [CB-9397](https://issues.apache.org/jira/browse/CB-9397) Fixes minor issues with `cordova requirements android`
|
||||
* [CB-9389](https://issues.apache.org/jira/browse/CB-9389) Fixes build/check_reqs hang
|
||||
|
||||
### Release 4.1.1 (Aug 2015) ###
|
||||
|
||||
* CB-9428 update script now bumps up minSdkVersion to 14 if it is less than that
|
||||
* CB-9430 Fixes check_reqs failure when javac returns an extra line
|
||||
* [CB-9428](https://issues.apache.org/jira/browse/CB-9428) update script now bumps up minSdkVersion to 14 if it is less than that
|
||||
* [CB-9430](https://issues.apache.org/jira/browse/CB-9430) Fixes check_reqs failure when javac returns an extra line
|
||||
|
||||
### Release 4.1.0 (Jul 2015) ###
|
||||
* CB-9392 Fixed printing flavored versions. This closes #184.
|
||||
* CB-9382 [Android] Fix KeepRunning setting when Plugin activity is showed. This closes #200
|
||||
* CB-9391 Fixes cdvBuildMultipleApks option casting
|
||||
* CB-9343 Split the Content-Type to obtain a clean mimetype
|
||||
* CB-9255 Make getUriType case insensitive.
|
||||
* CB-9149 Fixes JSHint issue introduced by 899daa9
|
||||
* CB-9372: Remove unused files: 'main.js' & 'master.css'. This closes #198
|
||||
* CB-9149 Make gradle alias subprojects in order to handle libs that depend on libs. This closes #182
|
||||
* [CB-9392](https://issues.apache.org/jira/browse/CB-9392) Fixed printing flavored versions. This closes #184.
|
||||
* [CB-9382](https://issues.apache.org/jira/browse/CB-9382) [Android] Fix KeepRunning setting when Plugin activity is showed. This closes #200
|
||||
* [CB-9391](https://issues.apache.org/jira/browse/CB-9391) Fixes cdvBuildMultipleApks option casting
|
||||
* [CB-9343](https://issues.apache.org/jira/browse/CB-9343) Split the Content-Type to obtain a clean mimetype
|
||||
* [CB-9255](https://issues.apache.org/jira/browse/CB-9255) Make getUriType case insensitive.
|
||||
* [CB-9149](https://issues.apache.org/jira/browse/CB-9149) Fixes JSHint issue introduced by 899daa9
|
||||
* [CB-9372](https://issues.apache.org/jira/browse/CB-9372) Remove unused files: 'main.js' & 'master.css'. This closes #198
|
||||
* [CB-9149](https://issues.apache.org/jira/browse/CB-9149) Make gradle alias subprojects in order to handle libs that depend on libs. This closes #182
|
||||
* Update min SDK version to 14
|
||||
* Update licenses. This closes #190
|
||||
* CB-9185 Fix signed release build exception. This closes #193.
|
||||
* CB-9286 Fixes build failure when ANDROID_HOME is not set.
|
||||
* CB-9284 Fix for handling absolute path for keystore in build.json
|
||||
* CB-9260 Install Android-22 on Travis-CI
|
||||
* [CB-9185](https://issues.apache.org/jira/browse/CB-9185) Fix signed release build exception. This closes #193.
|
||||
* [CB-9286](https://issues.apache.org/jira/browse/CB-9286) Fixes build failure when ANDROID_HOME is not set.
|
||||
* [CB-9284](https://issues.apache.org/jira/browse/CB-9284) Fix for handling absolute path for keystore in build.json
|
||||
* [CB-9260](https://issues.apache.org/jira/browse/CB-9260) Install Android-22 on Travis-CI
|
||||
* Adding .ratignore file.
|
||||
* CB-9119 Adding lib/retry.js for retrying promise-returning functions. Retrying 'adb install' in emulator.js because it sometimes hangs.
|
||||
* CB-9115 android: Grant Lollipop permission req
|
||||
* [CB-9119](https://issues.apache.org/jira/browse/CB-9119) Adding lib/retry.js for retrying promise-returning functions. Retrying 'adb install' in emulator.js because it sometimes hangs.
|
||||
* [CB-9115](https://issues.apache.org/jira/browse/CB-9115) android: Grant Lollipop permission req
|
||||
* Remove extra console message
|
||||
* CB-8898 Report expected gradle location properly
|
||||
* CB-8898 Fixes gradle check failure due to missing quotes
|
||||
* CB-9080: -d option is not supported on Android 4.1.1 and lower, removing
|
||||
* CB-8954 Adds `requirements` command support to check_reqs module
|
||||
* [CB-8898](https://issues.apache.org/jira/browse/CB-8898) Report expected gradle location properly
|
||||
* [CB-8898](https://issues.apache.org/jira/browse/CB-8898) Fixes gradle check failure due to missing quotes
|
||||
* [CB-9080](https://issues.apache.org/jira/browse/CB-9080) -d option is not supported on Android 4.1.1 and lower, removing
|
||||
* [CB-8954](https://issues.apache.org/jira/browse/CB-8954) Adds `requirements` command support to check_reqs module
|
||||
* Update JS snapshot to version 4.1.0-dev (via coho)
|
||||
* CB-8417 updated platform specific files from cordova.js repo
|
||||
* [CB-8417](https://issues.apache.org/jira/browse/CB-8417) updated platform specific files from cordova.js repo
|
||||
* Adding tests to confirm that preferences aren't changed by Intents
|
||||
* Forgot to remove the method that copied over the intent data
|
||||
* Getting around to removing this old Intent code
|
||||
* Update JS snapshot to version 4.1.0-dev (via coho)
|
||||
* Fix CordovaPluginTest on KitKat (start-up events seem to change)
|
||||
* CB-3360 Allow setting a custom User-Agent (close #162)
|
||||
* CB-8902 Use immersive mode when available when going fullscreen (close #175)
|
||||
* [CB-3360](https://issues.apache.org/jira/browse/CB-3360) Allow setting a custom User-Agent (close #162)
|
||||
* [CB-8902](https://issues.apache.org/jira/browse/CB-8902) Use immersive mode when available when going fullscreen (close #175)
|
||||
* Make BridgeMode methods public (they were always supposed to be)
|
||||
* Simplify: EncodingUtils.getBytes(str) -> str.getBytes()
|
||||
* Don't show warning when gradlew file is read-only
|
||||
* Don't show warning when prepEnv copies gradlew and it's read-only
|
||||
* Make gradle wrapper prepEnv code work even when android-sdk is read-only
|
||||
* CB-8897 Delete drawable/icon.png since it duplicates drawable-mdpi/icon.png
|
||||
* [CB-8897](https://issues.apache.org/jira/browse/CB-8897) Delete drawable/icon.png since it duplicates drawable-mdpi/icon.png
|
||||
* Updating the template to target mininumSdkTarget=14
|
||||
* CB-8894: Updating the template to target mininumSdkTarget=14
|
||||
* CB-8891 Add a note about when the gradle helpers were added
|
||||
* CB-8891 Add a gradle helper for retrieving config.xml preference values
|
||||
* CB-8884 Delete Eclipse tweaks from create script
|
||||
* CB-8834 Don't fail to install on VERSION_DOWNGRADE
|
||||
* [CB-8894](https://issues.apache.org/jira/browse/CB-8894) Updating the template to target mininumSdkTarget=14
|
||||
* [CB-8891](https://issues.apache.org/jira/browse/CB-8891) Add a note about when the gradle helpers were added
|
||||
* [CB-8891](https://issues.apache.org/jira/browse/CB-8891) Add a gradle helper for retrieving config.xml preference values
|
||||
* [CB-8884](https://issues.apache.org/jira/browse/CB-8884) Delete Eclipse tweaks from create script
|
||||
* [CB-8834](https://issues.apache.org/jira/browse/CB-8834) Don't fail to install on VERSION_DOWNGRADE
|
||||
* Automated tools fail, and you have to remember all four places where this is set.
|
||||
* Update the package.json
|
||||
* CB-9042 coho failed to update version, so here we are
|
||||
* [CB-9042](https://issues.apache.org/jira/browse/CB-9042) coho failed to update version, so here we are
|
||||
* CB9042 - Updating Release Notes
|
||||
* Adding tests to confirm that preferences aren't changed by Intents
|
||||
* updating existing test code
|
||||
* Forgot to remove the method that copied over the intent data
|
||||
* Getting around to removing this old Intent code
|
||||
* CB-8834 Don't fail to install on VERSION_DOWNGRADE
|
||||
* [CB-8834](https://issues.apache.org/jira/browse/CB-8834) Don't fail to install on VERSION_DOWNGRADE
|
||||
|
||||
### Release 4.0.2 (May 2015) ###
|
||||
|
||||
* Removed Intent Functionality from Preferences - Preferences can no longer be set by intents
|
||||
|
||||
### Release 4.0.1 (April 2015) ###
|
||||
### Release 4.0.1 (April 2015) ###
|
||||
|
||||
* Bug fixed where platform failed to install on a version downgrade
|
||||
|
||||
@@ -178,111 +311,111 @@ Changes For Plugin Developers:
|
||||
* Plugins can depend on Maven libraries using `<framework>` tags
|
||||
* New APIs: `onStart`, `onStop`, `onConfigurationChanged`
|
||||
* `"onScrollChanged"` message removed. Use `view.getViewTreeObserver().addOnScrollChangedListener(...)` instead
|
||||
* CB-8702 New API for plugins to override `shouldInterceptRequest` with a stream
|
||||
* [CB-8702](https://issues.apache.org/jira/browse/CB-8702) New API for plugins to override `shouldInterceptRequest` with a stream
|
||||
|
||||
#### Other Changes ####
|
||||
* CB-8378 Removed `hidekeyboard` and `showkeyboard` events (apps should use a plugin instead)
|
||||
* CB-8735 `bin/create` regex relaxed / better support for numbers
|
||||
* CB-8699 Fix CordovaResourceApi `copyResource` creating zero-length files when src=uncompressed asset
|
||||
* CB-8693 CordovaLib should not contain icons / splashscreens
|
||||
* CB-8592 Fix NPE if lifecycle events reach CordovaWebView before `init()` has been called
|
||||
* CB-8588 Add CATEGORY_BROWSABLE to intents from showWebPage openExternal=true
|
||||
* CB-8587 Don't allow WebView navigations within showWebPage that are not whitelisted
|
||||
* CB-7827 Add `--activity-name` for `bin/create`
|
||||
* CB-8548 Use debug-signing.properties and release-signing.properties when they exist
|
||||
* CB-8545 Don't add a layout as a parent of the WebView
|
||||
* CB-7159 BackgroundColor not used when `<html style="opacity:0">`, nor during screen rotation
|
||||
* CB-6630 Removed OkHttp from core library. It's now available as a plugin: [cordova-plugin-okhttp](https://www.npmjs.com/package/cordova-plugin-okhttp)
|
||||
* [CB-8378](https://issues.apache.org/jira/browse/CB-8378) Removed `hidekeyboard` and `showkeyboard` events (apps should use a plugin instead)
|
||||
* [CB-8735](https://issues.apache.org/jira/browse/CB-8735) `bin/create` regex relaxed / better support for numbers
|
||||
* [CB-8699](https://issues.apache.org/jira/browse/CB-8699) Fix CordovaResourceApi `copyResource` creating zero-length files when src=uncompressed asset
|
||||
* [CB-8693](https://issues.apache.org/jira/browse/CB-8693) CordovaLib should not contain icons / splashscreens
|
||||
* [CB-8592](https://issues.apache.org/jira/browse/CB-8592) Fix NPE if lifecycle events reach CordovaWebView before `init()` has been called
|
||||
* [CB-8588](https://issues.apache.org/jira/browse/CB-8588) Add CATEGORY_BROWSABLE to intents from showWebPage openExternal=true
|
||||
* [CB-8587](https://issues.apache.org/jira/browse/CB-8587) Don't allow WebView navigations within showWebPage that are not whitelisted
|
||||
* [CB-7827](https://issues.apache.org/jira/browse/CB-7827) Add `--activity-name` for `bin/create`
|
||||
* [CB-8548](https://issues.apache.org/jira/browse/CB-8548) Use debug-signing.properties and release-signing.properties when they exist
|
||||
* [CB-8545](https://issues.apache.org/jira/browse/CB-8545) Don't add a layout as a parent of the WebView
|
||||
* [CB-7159](https://issues.apache.org/jira/browse/CB-7159) BackgroundColor not used when `<html style="opacity:0">`, nor during screen rotation
|
||||
* [CB-6630](https://issues.apache.org/jira/browse/CB-6630) Removed OkHttp from core library. It's now available as a plugin: [cordova-plugin-okhttp](https://www.npmjs.com/package/cordova-plugin-okhttp)
|
||||
|
||||
### Release 3.7.1 (January 2015) ###
|
||||
* CB-8411 Initialize plugins only after `createViews()` is called (regression in 3.7.0)
|
||||
* [CB-8411](https://issues.apache.org/jira/browse/CB-8411) Initialize plugins only after `createViews()` is called (regression in 3.7.0)
|
||||
|
||||
### Release 3.7.0 (January 2015) ###
|
||||
|
||||
* CB-8328 Allow plugins to handle certificate challenges (close #150)
|
||||
* CB-8201 Add support for auth dialogs into Cordova Android
|
||||
* CB-8017 Add support for `<input type=file>` for Lollipop
|
||||
* CB-8143 Loads of gradle improvements (try it with cordova/build --gradle)
|
||||
* CB-8329 Cancel outstanding ActivityResult requests when a new startActivityForResult occurs
|
||||
* CB-8026 Bumping up Android Version and setting it up to allow third-party cookies. This might change later.
|
||||
* CB-8210 Use PluginResult for various events from native so that content-security-policy <meta> can be used
|
||||
* CB-8168 Add support for `cordova/run --list` (closes #139)
|
||||
* CB-8176 Vastly better auto-detection of SDK & JDK locations
|
||||
* CB-8079 Use activity class package name, but fallback to application package name when looking for splash screen drawable
|
||||
* CB-8147 Have corodva/build warn about unrecognized flags rather than fail
|
||||
* CB-7881 Android tooling shouldn't lock application directory
|
||||
* CB-8112 Turn off mediaPlaybackRequiresUserGesture
|
||||
* CB-6153 Add a preference for controlling hardware button audio stream (DefaultVolumeStream)
|
||||
* CB-8031 Fix race condition that shows as ConcurrentModificationException
|
||||
* CB-7974 Cancel timeout timer if view is destroyed
|
||||
* CB-7940 Disable exec bridge if bridgeSecret is wrong
|
||||
* CB-7758 Allow content-url-hosted pages to access the bridge
|
||||
* CB-6511 Fixes build for android when app name contains unicode characters.
|
||||
* CB-7707 Added multipart PluginResult
|
||||
* CB-6837 Fix leaked window when hitting back button while alert being rendered
|
||||
* CB-7674 Move preference activation back into onCreate()
|
||||
* CB-7499 Support RTL text direction
|
||||
* CB-7330 Don't run check_reqs for bin/create.
|
||||
* [CB-8328](https://issues.apache.org/jira/browse/CB-8328) Allow plugins to handle certificate challenges (close #150)
|
||||
* [CB-8201](https://issues.apache.org/jira/browse/CB-8201) Add support for auth dialogs into Cordova Android
|
||||
* [CB-8017](https://issues.apache.org/jira/browse/CB-8017) Add support for `<input type=file>` for Lollipop
|
||||
* [CB-8143](https://issues.apache.org/jira/browse/CB-8143) Loads of gradle improvements (try it with cordova/build --gradle)
|
||||
* [CB-8329](https://issues.apache.org/jira/browse/CB-8329) Cancel outstanding ActivityResult requests when a new startActivityForResult occurs
|
||||
* [CB-8026](https://issues.apache.org/jira/browse/CB-8026) Bumping up Android Version and setting it up to allow third-party cookies. This might change later.
|
||||
* [CB-8210](https://issues.apache.org/jira/browse/CB-8210) Use PluginResult for various events from native so that content-security-policy <meta> can be used
|
||||
* [CB-8168](https://issues.apache.org/jira/browse/CB-8168) Add support for `cordova/run --list` (closes #139)
|
||||
* [CB-8176](https://issues.apache.org/jira/browse/CB-8176) Vastly better auto-detection of SDK & JDK locations
|
||||
* [CB-8079](https://issues.apache.org/jira/browse/CB-8079) Use activity class package name, but fallback to application package name when looking for splash screen drawable
|
||||
* [CB-8147](https://issues.apache.org/jira/browse/CB-8147) Have corodva/build warn about unrecognized flags rather than fail
|
||||
* [CB-7881](https://issues.apache.org/jira/browse/CB-7881) Android tooling shouldn't lock application directory
|
||||
* [CB-8112](https://issues.apache.org/jira/browse/CB-8112) Turn off mediaPlaybackRequiresUserGesture
|
||||
* [CB-6153](https://issues.apache.org/jira/browse/CB-6153) Add a preference for controlling hardware button audio stream (DefaultVolumeStream)
|
||||
* [CB-8031](https://issues.apache.org/jira/browse/CB-8031) Fix race condition that shows as ConcurrentModificationException
|
||||
* [CB-7974](https://issues.apache.org/jira/browse/CB-7974) Cancel timeout timer if view is destroyed
|
||||
* [CB-7940](https://issues.apache.org/jira/browse/CB-7940) Disable exec bridge if bridgeSecret is wrong
|
||||
* [CB-7758](https://issues.apache.org/jira/browse/CB-7758) Allow content-url-hosted pages to access the bridge
|
||||
* [CB-6511](https://issues.apache.org/jira/browse/CB-6511) Fixes build for android when app name contains unicode characters.
|
||||
* [CB-7707](https://issues.apache.org/jira/browse/CB-7707) Added multipart PluginResult
|
||||
* [CB-6837](https://issues.apache.org/jira/browse/CB-6837) Fix leaked window when hitting back button while alert being rendered
|
||||
* [CB-7674](https://issues.apache.org/jira/browse/CB-7674) Move preference activation back into onCreate()
|
||||
* [CB-7499](https://issues.apache.org/jira/browse/CB-7499) Support RTL text direction
|
||||
* [CB-7330](https://issues.apache.org/jira/browse/CB-7330) Don't run check_reqs for bin/create.
|
||||
|
||||
### 3.6.4 (Sept 30, 2014) ###
|
||||
|
||||
* Set VERSION to 3.6.4 (via coho)
|
||||
* Update JS snapshot to version 3.6.4 (via coho)
|
||||
* CB-7634 Detect JAVA_HOME properly on Ubuntu
|
||||
* CB-7579 Fix run script's ability to use non-arch-specific APKs
|
||||
* CB-6511 Fixes build for android when app name contains unicode characters.
|
||||
* CB-7463: Adding licences. I don't know what the gradle syntax is for comments, that still needs to be done.
|
||||
* CB-7463: Looked at the Apache BigTop git, gradle uses C-style comments
|
||||
* CB-7460: Fixing bug with KitKat where the background colour would override the CSS colours on the application
|
||||
* [CB-7634](https://issues.apache.org/jira/browse/CB-7634) Detect JAVA_HOME properly on Ubuntu
|
||||
* [CB-7579](https://issues.apache.org/jira/browse/CB-7579) Fix run script's ability to use non-arch-specific APKs
|
||||
* [CB-6511](https://issues.apache.org/jira/browse/CB-6511) Fixes build for android when app name contains unicode characters.
|
||||
* [CB-7463](https://issues.apache.org/jira/browse/CB-7463) Adding licences. I don't know what the gradle syntax is for comments, that still needs to be done.
|
||||
* [CB-7463](https://issues.apache.org/jira/browse/CB-7463) Looked at the Apache BigTop git, gradle uses C-style comments
|
||||
* [CB-7460](https://issues.apache.org/jira/browse/CB-7460) Fixing bug with KitKat where the background colour would override the CSS colours on the application
|
||||
|
||||
### 3.6.0 (Sept 2014) ###
|
||||
|
||||
* Set VERSION to 3.6.0 (via coho)
|
||||
* CB-7410 fix the menu test
|
||||
* CB-7410 Fix the errorUrl test
|
||||
* CB-7410 Fix Basic Authentication test
|
||||
* CB-3445: Allow build and run scripts to select APK by architecture
|
||||
* CB-3445: Add environment variable 'BUILD_MULTIPLE_APKS' for splitting APKs based on architecture
|
||||
* CB-3445: Ensure that JAR files in libs directory are included
|
||||
* CB-7267 update RELEASENOTES for 3.5.1
|
||||
* CB-7410 clarify the title
|
||||
* CB-7385 update cordova.js for testing prior to branch/tag
|
||||
* CB-7410 add whitelist entries to get iframe/GoogleMaps working
|
||||
* CB-7291 propogate change in method signature to the native tests
|
||||
* CB-7291: Restrict meaning of "\*" in internal whitelist to just http and https
|
||||
* CB-7291: Only add file, content and data URLs to internal whitelist
|
||||
* CB-7291: Add defaults to external whitelist
|
||||
* CB-7291: Add external-launch-whitelist and use it for filtering intent launches
|
||||
* CB-3445: Read project.properties to configure gradle libraries
|
||||
* CB-7325 Fix error message in android_sdk_version.js when missing SDK on windows
|
||||
* CB-7335 Add a .gitignore to android project template
|
||||
* CB-7330 Fix dangling function call in last commit (broke gradle builds)
|
||||
* CB-7330 Don't run "android update" during creation
|
||||
* CB-3445 Add gradle support clean command (plus some code cleanup)
|
||||
* CB-7044 Fix typo in prev commit causing check_reqs to always fail.
|
||||
* CB-3445 Copy gradle wrapper in build instead of create
|
||||
* CB-3445 Add .gradle template files for "update" as well as "create"
|
||||
* CB-7044 Add JAVA_HOME when not set. Be stricter about ANDROID_HOME
|
||||
* CB-3445 Speed up gradle building (incremental builds go from 10s -> 1.5s for me)
|
||||
* CB-3445: android: Copy Gradle wrapper from Android SDK rather than bundling a JAR
|
||||
* CB-3445: Add which to checked-in node_modules
|
||||
* CB-3445: Add option to build and install with gradle
|
||||
* CB-3445: Add an initial set of Gradle build scripts
|
||||
* CB-7321 Don't require ant for create script
|
||||
* CB-7044, CB-7299 Fix up PATH problems when possible.
|
||||
* [CB-7410](https://issues.apache.org/jira/browse/CB-7410) fix the menu test
|
||||
* [CB-7410](https://issues.apache.org/jira/browse/CB-7410) Fix the errorUrl test
|
||||
* [CB-7410](https://issues.apache.org/jira/browse/CB-7410) Fix Basic Authentication test
|
||||
* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Allow build and run scripts to select APK by architecture
|
||||
* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Add environment variable 'BUILD_MULTIPLE_APKS' for splitting APKs based on architecture
|
||||
* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Ensure that JAR files in libs directory are included
|
||||
* [CB-7267](https://issues.apache.org/jira/browse/CB-7267) update RELEASENOTES for 3.5.1
|
||||
* [CB-7410](https://issues.apache.org/jira/browse/CB-7410) clarify the title
|
||||
* [CB-7385](https://issues.apache.org/jira/browse/CB-7385) update cordova.js for testing prior to branch/tag
|
||||
* [CB-7410](https://issues.apache.org/jira/browse/CB-7410) add whitelist entries to get iframe/GoogleMaps working
|
||||
* [CB-7291](https://issues.apache.org/jira/browse/CB-7291) propogate change in method signature to the native tests
|
||||
* [CB-7291](https://issues.apache.org/jira/browse/CB-7291) Restrict meaning of "\*" in internal whitelist to just http and https
|
||||
* [CB-7291](https://issues.apache.org/jira/browse/CB-7291) Only add file, content and data URLs to internal whitelist
|
||||
* [CB-7291](https://issues.apache.org/jira/browse/CB-7291) Add defaults to external whitelist
|
||||
* [CB-7291](https://issues.apache.org/jira/browse/CB-7291) Add external-launch-whitelist and use it for filtering intent launches
|
||||
* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Read project.properties to configure gradle libraries
|
||||
* [CB-7325](https://issues.apache.org/jira/browse/CB-7325) Fix error message in android_sdk_version.js when missing SDK on windows
|
||||
* [CB-7335](https://issues.apache.org/jira/browse/CB-7335) Add a .gitignore to android project template
|
||||
* [CB-7330](https://issues.apache.org/jira/browse/CB-7330) Fix dangling function call in last commit (broke gradle builds)
|
||||
* [CB-7330](https://issues.apache.org/jira/browse/CB-7330) Don't run "android update" during creation
|
||||
* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Add gradle support clean command (plus some code cleanup)
|
||||
* [CB-7044](https://issues.apache.org/jira/browse/CB-7044) Fix typo in prev commit causing check_reqs to always fail.
|
||||
* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Copy gradle wrapper in build instead of create
|
||||
* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Add .gradle template files for "update" as well as "create"
|
||||
* [CB-7044](https://issues.apache.org/jira/browse/CB-7044) Add JAVA_HOME when not set. Be stricter about ANDROID_HOME
|
||||
* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Speed up gradle building (incremental builds go from 10s -> 1.5s for me)
|
||||
* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) android: Copy Gradle wrapper from Android SDK rather than bundling a JAR
|
||||
* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Add which to checked-in node_modules
|
||||
* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Add option to build and install with gradle
|
||||
* [CB-3445](https://issues.apache.org/jira/browse/CB-3445) Add an initial set of Gradle build scripts
|
||||
* [CB-7321](https://issues.apache.org/jira/browse/CB-7321) Don't require ant for create script
|
||||
* CB-7044, [CB-7299](https://issues.apache.org/jira/browse/CB-7299) Fix up PATH problems when possible.
|
||||
* Change in test's AndroidManifest.xml needed for the test to run properly. Forgot the manifest.
|
||||
* Change in test's AndroidManifest.xml needed for the test to run properly
|
||||
* Adding tests related to 3.5.1
|
||||
* CB-7261 Fix setNativeToJsBridgeMode sometimes crashing when switching to ONLINE_EVENT
|
||||
* CB-7265 Fix crash when navigating to custom protocol (introduced in 3.5.1)
|
||||
* [CB-7261](https://issues.apache.org/jira/browse/CB-7261) Fix setNativeToJsBridgeMode sometimes crashing when switching to ONLINE_EVENT
|
||||
* [CB-7265](https://issues.apache.org/jira/browse/CB-7265) Fix crash when navigating to custom protocol (introduced in 3.5.1)
|
||||
* Filter out non-launchable intents
|
||||
* Handle unsupported protocol errors in webview better
|
||||
* CB-7238: I should have collapsed this, but Config.init() must go before the creation of CordovaWebView
|
||||
* CB-7238: Minor band-aid to get tests running again, this has to go away before 3.6.0 is released, since this is an API change.
|
||||
* [CB-7238](https://issues.apache.org/jira/browse/CB-7238) I should have collapsed this, but Config.init() must go before the creation of CordovaWebView
|
||||
* [CB-7238](https://issues.apache.org/jira/browse/CB-7238) Minor band-aid to get tests running again, this has to go away before 3.6.0 is released, since this is an API change.
|
||||
* Extend whitelist to handle URLs without // chars
|
||||
* CB-7172 Force window to have focus after resume
|
||||
* CB-7159 Set background color of webView as well as its parent
|
||||
* CB-7018 Fix setButtonPlumbedToJs never un-listening
|
||||
* [CB-7172](https://issues.apache.org/jira/browse/CB-7172) Force window to have focus after resume
|
||||
* [CB-7159](https://issues.apache.org/jira/browse/CB-7159) Set background color of webView as well as its parent
|
||||
* [CB-7018](https://issues.apache.org/jira/browse/CB-7018) Fix setButtonPlumbedToJs never un-listening
|
||||
* Undeprecate some just-deprecated symbols in PluginManager.
|
||||
* @Deprecate methods of PluginManager that were never meant to be public
|
||||
* Move plugin instantiation and instance storing logic PluginEntry->PluginManager
|
||||
@@ -307,7 +440,7 @@ Changes For Plugin Developers:
|
||||
* Fix PluginManager.setPluginEntries not removing old entries
|
||||
* Move registration of App plugin from config.xml -> code
|
||||
* Make setWebViewClient an override instead of an overload. Delete Location-change JS->Native bridge mode (missed some of it).
|
||||
* CB-4404 Revert setting android:windowSoftInputMode to "adjustPan"
|
||||
* [CB-4404](https://issues.apache.org/jira/browse/CB-4404) Revert setting android:windowSoftInputMode to "adjustPan"
|
||||
* Refactor: Use ConfigXmlParser in activity. Adds CordovaWebView.init()
|
||||
* Deprecate some convenience methods on CordovaActivity
|
||||
* Fix CordovaPreferences not correctly parsing hex values (valueOf->decode)
|
||||
@@ -319,36 +452,36 @@ Changes For Plugin Developers:
|
||||
* Delete "CB-3064: The errorUrl is..." Log message left over from debugging presumably
|
||||
* Refactor Config into ConfigXmlParser, CordovaPreferences
|
||||
* Delete Location-change JS->Native bridge mode
|
||||
* CB-5988 Allow exec() only from file: or start-up URL's domain
|
||||
* CB-6761 Fix native->JS bridge ceasing to fire when page changes and online is set to false and the JS loads quickly
|
||||
* [CB-5988](https://issues.apache.org/jira/browse/CB-5988) Allow exec() only from file: or start-up URL's domain
|
||||
* [CB-6761](https://issues.apache.org/jira/browse/CB-6761) Fix native->JS bridge ceasing to fire when page changes and online is set to false and the JS loads quickly
|
||||
* Update the errorurl to no longer use intents
|
||||
* This breaks running the JUnit tests, we'll bring it back soon
|
||||
* Refactoring the URI handling on Cordova, removing dead code
|
||||
* CB-7018 Clean up and deprecation of some button-related functions
|
||||
* CB-7017 Fix onload=true being set on all subsequent plugins
|
||||
* CB-5971: Fix package / project validation
|
||||
* CB-5971: Add unit tests to cordova-android
|
||||
* CB-5971: Factor out package/project name validation logic
|
||||
* [CB-7018](https://issues.apache.org/jira/browse/CB-7018) Clean up and deprecation of some button-related functions
|
||||
* [CB-7017](https://issues.apache.org/jira/browse/CB-7017) Fix onload=true being set on all subsequent plugins
|
||||
* [CB-5971](https://issues.apache.org/jira/browse/CB-5971) Fix package / project validation
|
||||
* [CB-5971](https://issues.apache.org/jira/browse/CB-5971) Add unit tests to cordova-android
|
||||
* [CB-5971](https://issues.apache.org/jira/browse/CB-5971) Factor out package/project name validation logic
|
||||
* Delete explicit activity.finish() in back button handling. No change in behaviour.
|
||||
* CB-5971: This would have been a good first bug, too bad
|
||||
* CB-4404: Changing where android:windowSoftInputMode is in the manifest so it works
|
||||
* [CB-5971](https://issues.apache.org/jira/browse/CB-5971) This would have been a good first bug, too bad
|
||||
* [CB-4404](https://issues.apache.org/jira/browse/CB-4404) Changing where android:windowSoftInputMode is in the manifest so it works
|
||||
* Add documentation referencing other implementation.
|
||||
* CB-6851 Deprecate WebView.sendJavascript()
|
||||
* CB-6876 Show the correct executable name
|
||||
* CB-6876 Fix the "print usage"
|
||||
* [CB-6851](https://issues.apache.org/jira/browse/CB-6851) Deprecate WebView.sendJavascript()
|
||||
* [CB-6876](https://issues.apache.org/jira/browse/CB-6876) Show the correct executable name
|
||||
* [CB-6876](https://issues.apache.org/jira/browse/CB-6876) Fix the "print usage"
|
||||
* Trivial spelling fix in comments when reading CordovaResourceApi
|
||||
* CB-6818: I want to remove this code, because Square didn't do their headers properly
|
||||
* CB-6860 Add activity_name and launcher_name to AndroidManifest.xml & strings.xml
|
||||
* [CB-6818](https://issues.apache.org/jira/browse/CB-6818) I want to remove this code, because Square didn't do their headers properly
|
||||
* [CB-6860](https://issues.apache.org/jira/browse/CB-6860) Add activity_name and launcher_name to AndroidManifest.xml & strings.xml
|
||||
* Add a comment to custom_rules.xml saying why we move AndroidManifest.xml
|
||||
* Remove +x from README.md
|
||||
* CB-6784 Add missing licenses
|
||||
* CB-6784 Add license to CONTRIBUTING.md
|
||||
* [CB-6784](https://issues.apache.org/jira/browse/CB-6784) Add missing licenses
|
||||
* [CB-6784](https://issues.apache.org/jira/browse/CB-6784) Add license to CONTRIBUTING.md
|
||||
* Revert "defaults.xml: Add AndroidLaunchMode preference"
|
||||
* updated RELEASENOTES
|
||||
* CB-6315: Wrapping this so it runs on the UI thread
|
||||
* CB-6723 Update package name for Robotium
|
||||
* CB-6707 Update minSdkVersion to 10 consistently
|
||||
* CB-5652 make visible cordova version
|
||||
* [CB-6315](https://issues.apache.org/jira/browse/CB-6315) Wrapping this so it runs on the UI thread
|
||||
* [CB-6723](https://issues.apache.org/jira/browse/CB-6723) Update package name for Robotium
|
||||
* [CB-6707](https://issues.apache.org/jira/browse/CB-6707) Update minSdkVersion to 10 consistently
|
||||
* [CB-5652](https://issues.apache.org/jira/browse/CB-5652) make visible cordova version
|
||||
* Update JS snapshot to version 3.6.0-dev (via coho)
|
||||
* Update JS snapshot to version 3.6.0-dev (via coho)
|
||||
* Set VERSION to 3.6.0-dev (via coho)
|
||||
@@ -368,112 +501,112 @@ http://cordova.apache.org/announcements/2014/08/04/android-351.html
|
||||
|
||||
* OkHttp has broken headers. Updating for ASF compliance.
|
||||
* Revert accidentally removed lines from NOTICE
|
||||
* CB-6552: added top level package.json
|
||||
* CB-6491 add CONTRIBUTING.md
|
||||
* CB-6543 Fix cordova/run failure when no custom_rules.xml available
|
||||
* [CB-6552](https://issues.apache.org/jira/browse/CB-6552) added top level package.json
|
||||
* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md
|
||||
* [CB-6543](https://issues.apache.org/jira/browse/CB-6543) Fix cordova/run failure when no custom_rules.xml available
|
||||
* defaults.xml: Add AndroidLaunchMode preference
|
||||
* Add JavaDoc for CordovaResourceApi
|
||||
* CB-6388: Handle binary data correctly in LOAD_URL bridge
|
||||
* Fix CB-6048: Set launchMode=singleTop so tapping app icon does not always restart app
|
||||
* [CB-6388](https://issues.apache.org/jira/browse/CB-6388) Handle binary data correctly in LOAD_URL bridge
|
||||
* Fix [CB-6048](https://issues.apache.org/jira/browse/CB-6048) Set launchMode=singleTop so tapping app icon does not always restart app
|
||||
* Remove incorrect usage of AlertDialog.Builder.create
|
||||
* Catch uncaught exceptions in from plugins and turn them into error responses.
|
||||
* Add NOTICE file
|
||||
* CB-6047 Fix online sometimes getting in a bad state on page transitions.
|
||||
* [CB-6047](https://issues.apache.org/jira/browse/CB-6047) Fix online sometimes getting in a bad state on page transitions.
|
||||
* Add another convenience overload for CordovaResourceApi.copyResource
|
||||
* Update framework's .classpath to what Eclipse wants it to be.
|
||||
* README.md: `android update` to `android-19`.
|
||||
* Fix NPE when POLLING bridge mode is used.
|
||||
* Updating NOTICE to include Square for OkHttp
|
||||
* CB-5398 Apply KitKat content URI fix to all content URIs
|
||||
* CB-5398 Work-around for KitKat content: URLs not rendering in <img> tags
|
||||
* CB-5908: add splascreen images to template
|
||||
* CB-5395: Make scheme and host (but not path) case-insensitive in whitelist
|
||||
* [CB-5398](https://issues.apache.org/jira/browse/CB-5398) Apply KitKat content URI fix to all content URIs
|
||||
* [CB-5398](https://issues.apache.org/jira/browse/CB-5398) Work-around for KitKat content: URLs not rendering in <img> tags
|
||||
* [CB-5908](https://issues.apache.org/jira/browse/CB-5908) add splascreen images to template
|
||||
* [CB-5395](https://issues.apache.org/jira/browse/CB-5395) Make scheme and host (but not path) case-insensitive in whitelist
|
||||
* Ignore multiple onPageFinished() callbacks & onReceivedError due to stopLoading()
|
||||
* Removing addJavascriptInterface support from all Android versions lower than 4.2 due to security vu
|
||||
* CB-4984 Don't create on CordovaActivity name
|
||||
* CB-5917 Add a loadUrlIntoView overload that doesn't recreate plugins.
|
||||
* [CB-4984](https://issues.apache.org/jira/browse/CB-4984) Don't create on CordovaActivity name
|
||||
* [CB-5917](https://issues.apache.org/jira/browse/CB-5917) Add a loadUrlIntoView overload that doesn't recreate plugins.
|
||||
* Use thread pool for load timeout.
|
||||
* CB-5715 For CLI, hide assets/www and res/xml/config.xml by default
|
||||
* CB-5793 ant builds: Rename AndroidManifest during -post-build to avoid Eclipse detecting ant-build/
|
||||
* CB-5889 Make update script find project name instead of using "null" for CordovaLib
|
||||
* CB-5889 Add a message in the update script about needing to import CordovaLib when using an IDE.
|
||||
* [CB-5715](https://issues.apache.org/jira/browse/CB-5715) For CLI, hide assets/www and res/xml/config.xml by default
|
||||
* [CB-5793](https://issues.apache.org/jira/browse/CB-5793) ant builds: Rename AndroidManifest during -post-build to avoid Eclipse detecting ant-build/
|
||||
* [CB-5889](https://issues.apache.org/jira/browse/CB-5889) Make update script find project name instead of using "null" for CordovaLib
|
||||
* [CB-5889](https://issues.apache.org/jira/browse/CB-5889) Add a message in the update script about needing to import CordovaLib when using an IDE.
|
||||
|
||||
### 3.4.0 (Feb 2014) ###
|
||||
|
||||
43 commits from 10 authors. Highlights include:
|
||||
|
||||
* Removing addJavascriptInterface support from all Android versions lower than 4.2 due to security vulnerability
|
||||
* CB-5917 Add a loadUrlIntoView overload that doesn't recreate plugins.
|
||||
* CB-5889 Make update script find project name instead of using "null" for CordovaLib
|
||||
* CB-5889 Add a message in the update script about needing to import CordovaLib when using an IDE.
|
||||
* CB-5793 Don't clean before build and change output directory to ant-build to avoid conflicts with Eclipse.
|
||||
* CB-5803 Fix cordova/emulate on windows.
|
||||
* CB-5801 exec->spawn in build to make sure compile errors are shown.
|
||||
* CB-5799 Update version of OkHTTP to 1.3
|
||||
* CB-4910 Update CLI project template to point to config.xml at the root now that it's not in www/ by default.
|
||||
* CB-5504 Adding onDestroy to app plugin to deregister telephonyReceiver
|
||||
* CB-5715 Add Eclipse .project file to create template. For CLI projects, it adds refs for root www/ & config.xml and hides platform versions
|
||||
* CB-5447 Removed android:debuggable=“true” from project template.
|
||||
* CB-5714 Fix of android build when too big output stops build with error due to buffer overflow.
|
||||
* CB-5592 Set MIME type for openExternal when scheme is file:
|
||||
* [CB-5917](https://issues.apache.org/jira/browse/CB-5917) Add a loadUrlIntoView overload that doesn't recreate plugins.
|
||||
* [CB-5889](https://issues.apache.org/jira/browse/CB-5889) Make update script find project name instead of using "null" for CordovaLib
|
||||
* [CB-5889](https://issues.apache.org/jira/browse/CB-5889) Add a message in the update script about needing to import CordovaLib when using an IDE.
|
||||
* [CB-5793](https://issues.apache.org/jira/browse/CB-5793) Don't clean before build and change output directory to ant-build to avoid conflicts with Eclipse.
|
||||
* [CB-5803](https://issues.apache.org/jira/browse/CB-5803) Fix cordova/emulate on windows.
|
||||
* [CB-5801](https://issues.apache.org/jira/browse/CB-5801) exec->spawn in build to make sure compile errors are shown.
|
||||
* [CB-5799](https://issues.apache.org/jira/browse/CB-5799) Update version of OkHTTP to 1.3
|
||||
* [CB-4910](https://issues.apache.org/jira/browse/CB-4910) Update CLI project template to point to config.xml at the root now that it's not in www/ by default.
|
||||
* [CB-5504](https://issues.apache.org/jira/browse/CB-5504) Adding onDestroy to app plugin to deregister telephonyReceiver
|
||||
* [CB-5715](https://issues.apache.org/jira/browse/CB-5715) Add Eclipse .project file to create template. For CLI projects, it adds refs for root www/ & config.xml and hides platform versions
|
||||
* [CB-5447](https://issues.apache.org/jira/browse/CB-5447) Removed android:debuggable=“true” from project template.
|
||||
* [CB-5714](https://issues.apache.org/jira/browse/CB-5714) Fix of android build when too big output stops build with error due to buffer overflow.
|
||||
* [CB-5592](https://issues.apache.org/jira/browse/CB-5592) Set MIME type for openExternal when scheme is file:
|
||||
|
||||
### 3.3.0 (Dec 2013) ###
|
||||
|
||||
41 commits from 11 authors. Highlights include:
|
||||
|
||||
* CB-5481 Fix for Cordova trying to get config.xml from the wrong namespace
|
||||
* CB-5487 Enable Remote Debugging when your Android app is debuggable.
|
||||
* CB-5445 Adding onScrollChanged and the ScrollEvent object
|
||||
* CB-5422 Don't require JAVA_HOME to be defined
|
||||
* CB-5490 Add javadoc target to ant script
|
||||
* CB-5471 Deprecated DroidGap class
|
||||
* CB-5255 Prefer Google API targets over android-## targets when building.
|
||||
* CB-5232 Change create script to use Cordova as a Library Project instead of a .jar
|
||||
* CB-5302 Massive movement to get tests working again
|
||||
* CB-4996 Fix paths with spaces while launching on emulator and device
|
||||
* CB-5209 Cannot build Android app if project path contains spaces
|
||||
* [CB-5481](https://issues.apache.org/jira/browse/CB-5481) Fix for Cordova trying to get config.xml from the wrong namespace
|
||||
* [CB-5487](https://issues.apache.org/jira/browse/CB-5487) Enable Remote Debugging when your Android app is debuggable.
|
||||
* [CB-5445](https://issues.apache.org/jira/browse/CB-5445) Adding onScrollChanged and the ScrollEvent object
|
||||
* [CB-5422](https://issues.apache.org/jira/browse/CB-5422) Don't require JAVA_HOME to be defined
|
||||
* [CB-5490](https://issues.apache.org/jira/browse/CB-5490) Add javadoc target to ant script
|
||||
* [CB-5471](https://issues.apache.org/jira/browse/CB-5471) Deprecated DroidGap class
|
||||
* [CB-5255](https://issues.apache.org/jira/browse/CB-5255) Prefer Google API targets over android-## targets when building.
|
||||
* [CB-5232](https://issues.apache.org/jira/browse/CB-5232) Change create script to use Cordova as a Library Project instead of a .jar
|
||||
* [CB-5302](https://issues.apache.org/jira/browse/CB-5302) Massive movement to get tests working again
|
||||
* [CB-4996](https://issues.apache.org/jira/browse/CB-4996) Fix paths with spaces while launching on emulator and device
|
||||
* [CB-5209](https://issues.apache.org/jira/browse/CB-5209) Cannot build Android app if project path contains spaces
|
||||
|
||||
|
||||
### 3.2.0 (Nov 2013) ###
|
||||
|
||||
27 commits from 7 authors. Highlights include:
|
||||
|
||||
* CB-5193 Fix Android WebSQL sometime throwing SECURITY_ERR.
|
||||
* CB-5191 Deprecate <url-filter>
|
||||
* [CB-5193](https://issues.apache.org/jira/browse/CB-5193) Fix Android WebSQL sometime throwing SECURITY_ERR.
|
||||
* [CB-5191](https://issues.apache.org/jira/browse/CB-5191) Deprecate <url-filter>
|
||||
* Updating shelljs to 0.2.6. Copy now preserves mode bits.
|
||||
* CB-4872 Added android version scripts (android_sdk_version, etc)
|
||||
* CB-5117 Output confirmation message if check_reqs passes.
|
||||
* CB-5080 Find resources in a way that works with aapt's --rename-manifest-package
|
||||
* CB-4527 Don't delete .bat files even when on non-windows platform
|
||||
* CB-4892 Fix create script only escaping the first space instead of all spaces.
|
||||
* [CB-4872](https://issues.apache.org/jira/browse/CB-4872) Added android version scripts (android_sdk_version, etc)
|
||||
* [CB-5117](https://issues.apache.org/jira/browse/CB-5117) Output confirmation message if check_reqs passes.
|
||||
* [CB-5080](https://issues.apache.org/jira/browse/CB-5080) Find resources in a way that works with aapt's --rename-manifest-package
|
||||
* [CB-4527](https://issues.apache.org/jira/browse/CB-4527) Don't delete .bat files even when on non-windows platform
|
||||
* [CB-4892](https://issues.apache.org/jira/browse/CB-4892) Fix create script only escaping the first space instead of all spaces.
|
||||
|
||||
### 3.1.0 (Sept 2013) ###
|
||||
|
||||
55 commits from 9 authors. Highlights include:
|
||||
|
||||
* [CB-4817] Remove unused assets in project template.
|
||||
* [CB-4817](https://issues.apache.org/jira/browse/CB-4817) Remove unused assets in project template.
|
||||
* Fail fast in create script if package name is not com.foo.bar.
|
||||
* [CB-4782] Convert ApplicationInfo.java -> appinfo.js
|
||||
* [CB-4766] Deprecated JSONUtils.java (moved into plugins)
|
||||
* [CB-4765] Deprecated ExifHelper.java (moved into plugins)
|
||||
* [CB-4764] Deprecated DirectoryManager.java (moved into plugins)
|
||||
* [CB-4763] Deprecated FileHelper.java (moved into plugins), Move getMimeType() into CordovaResourceApi.
|
||||
* [CB-4725] Add CordovaWebView.CORDOVA_VERSION constant
|
||||
* [CB-4782](https://issues.apache.org/jira/browse/CB-4782) Convert ApplicationInfo.java -> appinfo.js
|
||||
* [CB-4766](https://issues.apache.org/jira/browse/CB-4766) Deprecated JSONUtils.java (moved into plugins)
|
||||
* [CB-4765](https://issues.apache.org/jira/browse/CB-4765) Deprecated ExifHelper.java (moved into plugins)
|
||||
* [CB-4764](https://issues.apache.org/jira/browse/CB-4764) Deprecated DirectoryManager.java (moved into plugins)
|
||||
* [CB-4763](https://issues.apache.org/jira/browse/CB-4763) Deprecated FileHelper.java (moved into plugins), Move getMimeType() into CordovaResourceApi.
|
||||
* [CB-4725](https://issues.apache.org/jira/browse/CB-4725) Add CordovaWebView.CORDOVA_VERSION constant
|
||||
* Incrementing version check for Android 4.3 API Level 18
|
||||
* [CB-3542] rewrote cli tooling scripts in node
|
||||
* [CB-3542](https://issues.apache.org/jira/browse/CB-3542) rewrote cli tooling scripts in node
|
||||
* Allow CordovaChromeClient subclasses access to CordovaInterface and CordovaWebView members
|
||||
* Refactor CordovaActivity.init so that subclasses can easily override factory methods for webview objects
|
||||
* [CB-4652] Allow default project template to be overridden on create
|
||||
* [CB-4652](https://issues.apache.org/jira/browse/CB-4652) Allow default project template to be overridden on create
|
||||
* Tweak the online bridge to not send excess online events.
|
||||
* [CB-4495] Modify start-emulator script to exit immediately on a fatal emulator error.
|
||||
* [CB-4495](https://issues.apache.org/jira/browse/CB-4495) Modify start-emulator script to exit immediately on a fatal emulator error.
|
||||
* Log WebView IOExceptions only when they are not 404s
|
||||
* Use a higher threshold for slow exec() warnings when debugger is attached.
|
||||
* Fix data URI decoding in CordovaResourceApi
|
||||
* [CB-3819] Made it easier to set SplashScreen delay.
|
||||
* [CB-4013] Fixed loadUrlTimeoutValue preference.
|
||||
* [CB-3819](https://issues.apache.org/jira/browse/CB-3819) Made it easier to set SplashScreen delay.
|
||||
* [CB-4013](https://issues.apache.org/jira/browse/CB-4013) Fixed loadUrlTimeoutValue preference.
|
||||
* Upgrading project to Android 4.3
|
||||
* [CB-4198] bin/create script should be better at handling non-word characters in activity name. Patched windows script as well.
|
||||
* [CB-4198] bin/create should handle spaces in activity better.
|
||||
* [CB-4096] Implemented new unified whitelist for android
|
||||
* [CB-3384] Fix thread assertion when plugins remap URIs
|
||||
* [CB-4198](https://issues.apache.org/jira/browse/CB-4198) bin/create script should be better at handling non-word characters in activity name. Patched windows script as well.
|
||||
* [CB-4198](https://issues.apache.org/jira/browse/CB-4198) bin/create should handle spaces in activity better.
|
||||
* [CB-4096](https://issues.apache.org/jira/browse/CB-4096) Implemented new unified whitelist for android
|
||||
* [CB-3384](https://issues.apache.org/jira/browse/CB-3384) Fix thread assertion when plugins remap URIs
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@ environment:
|
||||
matrix:
|
||||
- nodejs_version: "0.10"
|
||||
- nodejs_version: "0.12"
|
||||
- nodejs_version: "4.2"
|
||||
- nodejs_version: "4"
|
||||
- nodejs_version: "6"
|
||||
|
||||
install:
|
||||
# - cinst android-sdk
|
||||
|
||||
@@ -152,7 +152,8 @@ module.exports.check_java = function() {
|
||||
// javac writes version info to stderr instead of stdout
|
||||
return tryCommand('javac -version', msg, true)
|
||||
.then(function (output) {
|
||||
var match = /javac ((?:\d+\.)+(?:\d+))/i.exec(output);
|
||||
//Let's check for at least Java 8, and keep it future proof so we can support Java 10
|
||||
var match = /javac ((?:1\.)(?:[8-9]\.)(?:\d+))|((?:1\.)(?:[1-9]\d+\.)(?:\d+))/i.exec(output);
|
||||
return match && match[1];
|
||||
});
|
||||
});
|
||||
@@ -225,6 +226,7 @@ module.exports.check_android = function() {
|
||||
throw new CordovaError('\'ANDROID_HOME\' environment variable is set to non-existent path: ' + process.env['ANDROID_HOME'] +
|
||||
'\nTry update it manually to point to valid SDK directory.');
|
||||
}
|
||||
return hasAndroidHome;
|
||||
});
|
||||
};
|
||||
|
||||
@@ -267,13 +269,23 @@ module.exports.check_android_target = function(originalError) {
|
||||
|
||||
// Returns a promise.
|
||||
module.exports.run = function() {
|
||||
return Q.all([this.check_java(), this.check_android()])
|
||||
.then(function() {
|
||||
console.log('ANDROID_HOME=' + process.env['ANDROID_HOME']);
|
||||
console.log('JAVA_HOME=' + process.env['JAVA_HOME']);
|
||||
});
|
||||
return Q.all([this.check_java(), this.check_android()])
|
||||
.then(function(values) {
|
||||
console.log('ANDROID_HOME=' + process.env['ANDROID_HOME']);
|
||||
console.log('JAVA_HOME=' + process.env['JAVA_HOME']);
|
||||
|
||||
if (!values[0]) {
|
||||
throw new CordovaError('Requirements check failed for JDK 1.8 or greater');
|
||||
}
|
||||
|
||||
|
||||
if (!values[1]) {
|
||||
throw new CordovaError('Requirements check failed for Android SDK');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Object thar represents one of requirements for current platform.
|
||||
* @param {String} id The unique identifier for this requirements.
|
||||
|
||||
@@ -26,7 +26,7 @@ var shell = require('shelljs'),
|
||||
check_reqs = require('./check_reqs'),
|
||||
ROOT = path.join(__dirname, '..', '..');
|
||||
|
||||
var MIN_SDK_VERSION = 14;
|
||||
var MIN_SDK_VERSION = 16;
|
||||
|
||||
var CordovaError = require('cordova-common').CordovaError;
|
||||
var AndroidManifest = require('../templates/cordova/lib/AndroidManifest');
|
||||
|
||||
116
bin/templates/cordova/Api.js
vendored
@@ -18,8 +18,10 @@
|
||||
*/
|
||||
|
||||
var path = require('path');
|
||||
var Q = require('q');
|
||||
|
||||
var AndroidProject = require('./lib/AndroidProject');
|
||||
var AndroidStudio = require('./lib/AndroidStudio');
|
||||
var PluginManager = require('cordova-common').PluginManager;
|
||||
|
||||
var CordovaLogger = require('cordova-common').CordovaLogger;
|
||||
@@ -27,6 +29,7 @@ var selfEvents = require('cordova-common').events;
|
||||
|
||||
var PLATFORM = 'android';
|
||||
|
||||
|
||||
function setupEvents(externalEventEmitter) {
|
||||
if (externalEventEmitter) {
|
||||
// This will make the platform internal events visible outside
|
||||
@@ -40,6 +43,7 @@ function setupEvents(externalEventEmitter) {
|
||||
return selfEvents;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Class, that acts as abstraction over particular platform. Encapsulates the
|
||||
* platform's properties and methods.
|
||||
@@ -62,15 +66,28 @@ function Api(platform, platformRootDir, events) {
|
||||
this.locations = {
|
||||
root: self.root,
|
||||
www: path.join(self.root, 'assets/www'),
|
||||
res: path.join(self.root, 'res'),
|
||||
platformWww: path.join(self.root, 'platform_www'),
|
||||
configXml: path.join(self.root, 'res/xml/config.xml'),
|
||||
defaultConfigXml: path.join(self.root, 'cordova/defaults.xml'),
|
||||
strings: path.join(self.root, 'res/values/strings.xml'),
|
||||
manifest: path.join(self.root, 'AndroidManifest.xml'),
|
||||
build: path.join(self.root, 'build'),
|
||||
// NOTE: Due to platformApi spec we need to return relative paths here
|
||||
cordovaJs: 'bin/templates/project/assets/www/cordova.js',
|
||||
cordovaJsSrc: 'cordova-js-src'
|
||||
};
|
||||
|
||||
// XXX Override some locations for Android Studio projects
|
||||
if(AndroidStudio.isAndroidStudioProject(self.root) === true) {
|
||||
selfEvents.emit('log', 'Android Studio project detected');
|
||||
this.android_studio = true;
|
||||
this.locations.configXml = path.join(self.root, 'app/src/main/res/xml/config.xml');
|
||||
this.locations.strings = path.join(self.root, 'app/src/main/res/xml/strings.xml');
|
||||
this.locations.manifest = path.join(self.root, 'app/src/main/AndroidManifest.xml');
|
||||
this.locations.www = path.join(self.root, 'app/src/main/assets/www');
|
||||
this.locations.res = path.join(self.root, 'app/src/main/res');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,13 +110,20 @@ function Api(platform, platformRootDir, events) {
|
||||
*/
|
||||
Api.createPlatform = function (destination, config, options, events) {
|
||||
events = setupEvents(events);
|
||||
|
||||
return require('../../lib/create')
|
||||
.create(destination, config, options, events)
|
||||
.then(function (destination) {
|
||||
var PlatformApi = require(path.resolve(destination, 'cordova/Api'));
|
||||
return new PlatformApi(PLATFORM, destination, events);
|
||||
});
|
||||
var result;
|
||||
try {
|
||||
result = require('../../lib/create')
|
||||
.create(destination, config, options, events)
|
||||
.then(function (destination) {
|
||||
var PlatformApi = require(path.resolve(destination, 'cordova/Api'));
|
||||
return new PlatformApi(PLATFORM, destination, events);
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
events.emit('error','createPlatform is not callable from the android project API.');
|
||||
throw(e);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -120,13 +144,20 @@ Api.createPlatform = function (destination, config, options, events) {
|
||||
*/
|
||||
Api.updatePlatform = function (destination, options, events) {
|
||||
events = setupEvents(events);
|
||||
|
||||
return require('../../lib/create')
|
||||
.update(destination, options, events)
|
||||
.then(function (destination) {
|
||||
var PlatformApi = require(path.resolve(destination, 'cordova/Api'));
|
||||
return new PlatformApi('android', destination, events);
|
||||
});
|
||||
var result;
|
||||
try {
|
||||
result = require('../../lib/create')
|
||||
.update(destination, options, events)
|
||||
.then(function (destination) {
|
||||
var PlatformApi = require(path.resolve(destination, 'cordova/Api'));
|
||||
return new PlatformApi('android', destination, events);
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
events.emit('error','updatePlatform is not callable from the android project API, you will need to do this manually.');
|
||||
throw(e);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -186,6 +217,7 @@ Api.prototype.prepare = function (cordovaProject, prepareOptions) {
|
||||
*/
|
||||
Api.prototype.addPlugin = function (plugin, installOptions) {
|
||||
var project = AndroidProject.getProjectFile(this.root);
|
||||
var self = this;
|
||||
|
||||
installOptions = installOptions || {};
|
||||
installOptions.variables = installOptions.variables || {};
|
||||
@@ -194,15 +226,40 @@ Api.prototype.addPlugin = function (plugin, installOptions) {
|
||||
installOptions.variables.PACKAGE_NAME = project.getPackageName();
|
||||
}
|
||||
|
||||
return PluginManager.get(this.platform, this.locations, project)
|
||||
.addPlugin(plugin, installOptions)
|
||||
.then(function () {
|
||||
if(this.android_studio === true) {
|
||||
installOptions.android_studio = true;
|
||||
}
|
||||
|
||||
return Q()
|
||||
.then(function () {
|
||||
//CB-11964: Do a clean when installing the plugin code to get around
|
||||
//the Gradle bug introduced by the Android Gradle Plugin Version 2.2
|
||||
//TODO: Delete when the next version of Android Gradle plugin comes out
|
||||
|
||||
// Since clean doesn't just clean the build, it also wipes out www, we need
|
||||
// to pass additional options.
|
||||
|
||||
// Do some basic argument parsing
|
||||
var opts = {};
|
||||
|
||||
// Skip cleaning prepared files when not invoking via cordova CLI.
|
||||
opts.noPrepare = true;
|
||||
|
||||
if(!AndroidStudio.isAndroidStudioProject(self.root) && !project.isClean()) {
|
||||
return self.clean(opts);
|
||||
}
|
||||
})
|
||||
.then(function () {
|
||||
return PluginManager.get(self.platform, self.locations, project)
|
||||
.addPlugin(plugin, installOptions);
|
||||
})
|
||||
.then(function () {
|
||||
if (plugin.getFrameworks(this.platform).length === 0) return;
|
||||
|
||||
selfEvents.emit('verbose', 'Updating build files since android plugin contained <framework>');
|
||||
require('./lib/builders/builders').getBuilder('gradle').prepBuildFiles();
|
||||
}.bind(this))
|
||||
// CB-11022 Return truthy value to prevent running prepare after
|
||||
// CB-11022 Return truthy value to prevent running prepare after
|
||||
.thenResolve(true);
|
||||
};
|
||||
|
||||
@@ -221,6 +278,12 @@ Api.prototype.addPlugin = function (plugin, installOptions) {
|
||||
*/
|
||||
Api.prototype.removePlugin = function (plugin, uninstallOptions) {
|
||||
var project = AndroidProject.getProjectFile(this.root);
|
||||
|
||||
if(uninstallOptions && uninstallOptions.usePlatformWww === true && this.android_studio === true) {
|
||||
uninstallOptions.usePlatformWww = false;
|
||||
uninstallOptions.android_studio = true;
|
||||
}
|
||||
|
||||
return PluginManager.get(this.platform, this.locations, project)
|
||||
.removePlugin(plugin, uninstallOptions)
|
||||
.then(function () {
|
||||
@@ -318,7 +381,8 @@ Api.prototype.run = function(runOptions) {
|
||||
};
|
||||
|
||||
/**
|
||||
* Cleans out the build artifacts from platform's directory.
|
||||
* Cleans out the build artifacts from platform's directory, and also
|
||||
* cleans out the platform www directory if called without options specified.
|
||||
*
|
||||
* @return {Promise} Return a promise either fulfilled, or rejected with
|
||||
* CordovaError.
|
||||
@@ -326,14 +390,16 @@ Api.prototype.run = function(runOptions) {
|
||||
Api.prototype.clean = function(cleanOptions) {
|
||||
var self = this;
|
||||
return require('./lib/check_reqs').run()
|
||||
.then(function () {
|
||||
return require('./lib/build').runClean.call(self, cleanOptions);
|
||||
})
|
||||
.then(function () {
|
||||
return require('./lib/prepare').clean.call(self, cleanOptions);
|
||||
});
|
||||
.then(function () {
|
||||
return require('./lib/build').runClean.call(self, cleanOptions);
|
||||
})
|
||||
.then(function () {
|
||||
return require('./lib/prepare').clean.call(self, cleanOptions);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Performs a requirements check for current platform. Each platform defines its
|
||||
* own set of requirements, which should be resolved before platform can be
|
||||
|
||||
19
bin/templates/cordova/lib/AndroidProject.js
vendored
@@ -21,6 +21,7 @@ var fs = require('fs');
|
||||
var path = require('path');
|
||||
var properties_parser = require('properties-parser');
|
||||
var AndroidManifest = require('./AndroidManifest');
|
||||
var AndroidStudio = require('./AndroidStudio');
|
||||
var pluginHandlers = require('./pluginHandlers');
|
||||
|
||||
var projectFileCache = {};
|
||||
@@ -63,6 +64,9 @@ function AndroidProject(projectDir) {
|
||||
this.projectDir = projectDir;
|
||||
this.platformWww = path.join(this.projectDir, 'platform_www');
|
||||
this.www = path.join(this.projectDir, 'assets/www');
|
||||
if(AndroidStudio.isAndroidStudioProject(projectDir) === true) {
|
||||
this.www = path.join(this.projectDir, 'app/src/main/assets/www');
|
||||
}
|
||||
}
|
||||
|
||||
AndroidProject.getProjectFile = function (projectDir) {
|
||||
@@ -89,7 +93,11 @@ AndroidProject.purgeCache = function (projectDir) {
|
||||
* @return {String} The name of the package
|
||||
*/
|
||||
AndroidProject.prototype.getPackageName = function() {
|
||||
return new AndroidManifest(path.join(this.projectDir, 'AndroidManifest.xml')).getPackageId();
|
||||
var manifestPath = path.join(this.projectDir, 'AndroidManifest.xml');
|
||||
if(AndroidStudio.isAndroidStudioProject(this.projectDir) === true) {
|
||||
manifestPath = path.join(this.projectDir, 'app/src/main/AndroidManifest.xml');
|
||||
}
|
||||
return new AndroidManifest(manifestPath).getPackageId();
|
||||
};
|
||||
|
||||
AndroidProject.prototype.getCustomSubprojectRelativeDir = function(plugin_id, src) {
|
||||
@@ -189,5 +197,14 @@ AndroidProject.prototype.getUninstaller = function (type) {
|
||||
return pluginHandlers.getUninstaller(type);
|
||||
};
|
||||
|
||||
/*
|
||||
* This checks if an Android project is clean or has old build artifacts
|
||||
*/
|
||||
|
||||
AndroidProject.prototype.isClean = function() {
|
||||
var build_path = path.join(this.projectDir, 'build');
|
||||
//If the build directory doesn't exist, it's clean
|
||||
return !(fs.existsSync(build_path));
|
||||
};
|
||||
|
||||
module.exports = AndroidProject;
|
||||
|
||||
42
bin/templates/cordova/lib/AndroidStudio.js
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* This is a simple routine that checks if project is an Android Studio Project
|
||||
*
|
||||
* @param {String} root Root folder of the project
|
||||
*/
|
||||
|
||||
/*jshint esnext: false */
|
||||
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
var CordovaError = require('cordova-common').CordovaError;
|
||||
|
||||
module.exports.isAndroidStudioProject = function isAndroidStudioProject(root) {
|
||||
var eclipseFiles = ['AndroidManifest.xml', 'libs', 'res', 'project.properties', 'platform_www'];
|
||||
var androidStudioFiles = ['app', 'gradle', 'app/src/main/res'];
|
||||
|
||||
// assume it is an AS project and not an Eclipse project
|
||||
var isEclipse = false;
|
||||
var isAS = true;
|
||||
|
||||
if(!fs.existsSync(root)) {
|
||||
throw new CordovaError('AndroidStudio.js:inAndroidStudioProject root does not exist: ' + root);
|
||||
}
|
||||
|
||||
// if any of the following exists, then we are not an ASProj
|
||||
eclipseFiles.forEach(function(file) {
|
||||
if(fs.existsSync(path.join(root, file))) {
|
||||
isEclipse = true;
|
||||
}
|
||||
});
|
||||
|
||||
// if it is NOT an eclipse project, check that all required files exist
|
||||
if(!isEclipse) {
|
||||
androidStudioFiles.forEach(function(file){
|
||||
if(!fs.existsSync(path.join(root, file))) {
|
||||
console.log('missing file :: ' + file);
|
||||
isAS = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
return (!isEclipse && isAS);
|
||||
};
|
||||
@@ -55,6 +55,8 @@ GradleBuilder.prototype.getArgs = function(cmd, opts) {
|
||||
|
||||
// 10 seconds -> 6 seconds
|
||||
args.push('-Dorg.gradle.daemon=true');
|
||||
// to allow dex in process
|
||||
args.push('-Dorg.gradle.jvmargs=-Xmx2048m');
|
||||
// allow NDK to be used - required by Gradle 1.5 plugin
|
||||
args.push('-Pandroid.useDeprecatedNdk=true');
|
||||
args.push.apply(args, opts.extraArgs);
|
||||
@@ -69,12 +71,21 @@ GradleBuilder.prototype.prepBuildFiles = function() {
|
||||
var pluginBuildGradle = path.join(this.root, 'cordova', 'lib', 'plugin-build.gradle');
|
||||
var propertiesObj = this.readProjectProperties();
|
||||
var subProjects = propertiesObj.libs;
|
||||
var checkAndCopy = function(subProject, root) {
|
||||
var subProjectGradle = path.join(root, subProject, 'build.gradle');
|
||||
// This is the future-proof way of checking if a file exists
|
||||
// This must be synchronous to satisfy a Travis test
|
||||
try {
|
||||
fs.accessSync(subProjectGradle, fs.F_OK);
|
||||
} catch (e) {
|
||||
shell.cp('-f', pluginBuildGradle, subProjectGradle);
|
||||
}
|
||||
};
|
||||
for (var i = 0; i < subProjects.length; ++i) {
|
||||
if (subProjects[i] !== 'CordovaLib') {
|
||||
shell.cp('-f', pluginBuildGradle, path.join(this.root, subProjects[i], 'build.gradle'));
|
||||
checkAndCopy(subProjects[i], this.root);
|
||||
}
|
||||
}
|
||||
|
||||
var name = this.extractRealProjectNameFromManifest();
|
||||
//Remove the proj.id/name- prefix from projects: https://issues.apache.org/jira/browse/CB-9149
|
||||
var settingsGradlePaths = subProjects.map(function(p){
|
||||
@@ -93,10 +104,24 @@ GradleBuilder.prototype.prepBuildFiles = function() {
|
||||
// Update dependencies within build.gradle.
|
||||
var buildGradle = fs.readFileSync(path.join(this.root, 'build.gradle'), 'utf8');
|
||||
var depsList = '';
|
||||
var root = this.root;
|
||||
var insertExclude = function(p) {
|
||||
var gradlePath = path.join(root, p, 'build.gradle');
|
||||
var projectGradleFile = fs.readFileSync(gradlePath, 'utf-8');
|
||||
if(projectGradleFile.indexOf('CordovaLib') != -1) {
|
||||
depsList += '{\n exclude module:("CordovaLib")\n }\n';
|
||||
}
|
||||
else {
|
||||
depsList +='\n';
|
||||
}
|
||||
};
|
||||
subProjects.forEach(function(p) {
|
||||
console.log('Subproject Path: ' + p);
|
||||
var libName=p.replace(/[/\\]/g, ':').replace(name+'-','');
|
||||
depsList += ' debugCompile project(path: "' + libName + '", configuration: "debug")\n';
|
||||
depsList += ' releaseCompile project(path: "' + libName + '", configuration: "release")\n';
|
||||
depsList += ' debugCompile(project(path: "' + libName + '", configuration: "debug"))';
|
||||
insertExclude(p);
|
||||
depsList += ' releaseCompile(project(path: "' + libName + '", configuration: "release"))';
|
||||
insertExclude(p);
|
||||
});
|
||||
// For why we do this mapping: https://issues.apache.org/jira/browse/CB-8390
|
||||
var SYSTEM_LIBRARY_MAPPINGS = [
|
||||
@@ -161,7 +186,7 @@ GradleBuilder.prototype.prepEnv = function(opts) {
|
||||
// For some reason, using ^ and $ don't work. This does the job, though.
|
||||
var distributionUrlRegex = /distributionUrl.*zip/;
|
||||
/*jshint -W069 */
|
||||
var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'http\\://services.gradle.org/distributions/gradle-2.13-all.zip';
|
||||
var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\\://services.gradle.org/distributions/gradle-2.14.1-all.zip';
|
||||
/*jshint +W069 */
|
||||
var gradleWrapperPropertiesPath = path.join(self.root, 'gradle', 'wrapper', 'gradle-wrapper.properties');
|
||||
shell.chmod('u+w', gradleWrapperPropertiesPath);
|
||||
@@ -189,7 +214,7 @@ GradleBuilder.prototype.build = function(opts) {
|
||||
.progress(function (stdio){
|
||||
if (stdio.stderr) {
|
||||
/*
|
||||
* Workaround for the issue with Java printing some unwanted information to
|
||||
* Workaround for the issue with Java printing some unwanted information to
|
||||
* stderr instead of stdout.
|
||||
* This function suppresses 'Picked up _JAVA_OPTIONS' message from being
|
||||
* printed to stderr. See https://issues.apache.org/jira/browse/CB-9971 for
|
||||
|
||||
82
bin/templates/cordova/lib/emulator.js
vendored
@@ -147,6 +147,25 @@ module.exports.list_targets = function() {
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
* Gets unused port for android emulator, between 5554 and 5584
|
||||
* Returns a promise.
|
||||
*/
|
||||
module.exports.get_available_port = function () {
|
||||
var self = this;
|
||||
|
||||
return self.list_started()
|
||||
.then(function (emulators) {
|
||||
for (var p = 5584; p >= 5554; p-=2) {
|
||||
if (emulators.indexOf('emulator-' + p) === -1) {
|
||||
events.emit('verbose', 'Found available port: ' + p);
|
||||
return p;
|
||||
}
|
||||
}
|
||||
throw new CordovaError('Could not find an available avd port');
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
* Starts an emulator with the given ID,
|
||||
* and returns the started ID of that emulator.
|
||||
@@ -178,17 +197,18 @@ module.exports.start = function(emulator_ID, boot_timeout) {
|
||||
'HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver\n'));
|
||||
});
|
||||
}).then(function(emulatorId) {
|
||||
var uuid = 'cordova_emulator_' + new Date().getTime();
|
||||
var uuidProp = 'emu.uuid=' + uuid;
|
||||
var args = ['-avd', emulatorId, '-prop', uuidProp];
|
||||
// Don't wait for it to finish, since the emulator will probably keep running for a long time.
|
||||
child_process
|
||||
.spawn('emulator', args, { stdio: 'inherit', detached: true })
|
||||
.unref();
|
||||
return self.get_available_port()
|
||||
.then(function (port) {
|
||||
var args = ['-avd', emulatorId, '-port', port];
|
||||
// Don't wait for it to finish, since the emulator will probably keep running for a long time.
|
||||
child_process
|
||||
.spawn('emulator', args, { stdio: 'inherit', detached: true })
|
||||
.unref();
|
||||
|
||||
// wait for emulator to start
|
||||
events.emit('log', 'Waiting for emulator to start...');
|
||||
return self.wait_for_emulator(uuid);
|
||||
// wait for emulator to start
|
||||
events.emit('log', 'Waiting for emulator to start...');
|
||||
return self.wait_for_emulator(port);
|
||||
});
|
||||
}).then(function(emulatorId) {
|
||||
if (!emulatorId)
|
||||
return Q.reject(new CordovaError('Failed to start emulator'));
|
||||
@@ -214,29 +234,29 @@ module.exports.start = function(emulator_ID, boot_timeout) {
|
||||
};
|
||||
|
||||
/*
|
||||
* Waits for an emulator with given uuid to apear on the started-emulator list.
|
||||
* Returns a promise with this emulator's ID.
|
||||
* Waits for an emulator to boot on a given port.
|
||||
* Returns this emulator's ID in a promise.
|
||||
*/
|
||||
module.exports.wait_for_emulator = function(uuid) {
|
||||
module.exports.wait_for_emulator = function(port) {
|
||||
var self = this;
|
||||
return self.list_started()
|
||||
.then(function(new_started) {
|
||||
var emulator_id = null;
|
||||
var promises = [];
|
||||
|
||||
new_started.forEach(function (emulator) {
|
||||
promises.push(
|
||||
Adb.shell(emulator, 'getprop emu.uuid')
|
||||
.then(function (output) {
|
||||
if (output.indexOf(uuid) >= 0) {
|
||||
emulator_id = emulator;
|
||||
}
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
return Q.all(promises).then(function () {
|
||||
return emulator_id || self.wait_for_emulator(uuid);
|
||||
return Q().then(function() {
|
||||
var emulator_id = 'emulator-' + port;
|
||||
return Adb.shell(emulator_id, 'getprop dev.bootcomplete')
|
||||
.then(function (output) {
|
||||
if (output.indexOf('1') >= 0) {
|
||||
return emulator_id;
|
||||
}
|
||||
return self.wait_for_emulator(port);
|
||||
}, function (error) {
|
||||
if (error && error.message &&
|
||||
(error.message.indexOf('not found') > -1) ||
|
||||
error.message.indexOf('device offline') > -1) {
|
||||
// emulator not yet started, continue waiting
|
||||
return self.wait_for_emulator(port);
|
||||
} else {
|
||||
// something unexpected has happened
|
||||
throw error;
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
@@ -21,28 +21,19 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
// Switch the Android Gradle plugin version requirement depending on the
|
||||
// installed version of Gradle. This dependency is documented at
|
||||
// http://tools.android.com/tech-docs/new-build-system/version-compatibility
|
||||
// and https://issues.apache.org/jira/browse/CB-8143
|
||||
if (gradle.gradleVersion >= "2.2") {
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.0.0+'
|
||||
}
|
||||
} else if (gradle.gradleVersion >= "2.1") {
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.14.0+'
|
||||
}
|
||||
} else {
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.12.0+'
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.0.0+'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'android-library'
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: '*.jar')
|
||||
|
||||
36
bin/templates/cordova/lib/pluginHandlers.js
vendored
@@ -30,7 +30,13 @@ var handlers = {
|
||||
install:function(obj, plugin, project, options) {
|
||||
if (!obj.src) throw new CordovaError(generateAttributeError('src', 'source-file', plugin.id));
|
||||
if (!obj.targetDir) throw new CordovaError(generateAttributeError('target-dir', 'source-file', plugin.id));
|
||||
|
||||
var dest = path.join(obj.targetDir, path.basename(obj.src));
|
||||
|
||||
if(options && options.android_studio === true) {
|
||||
dest = path.join('app/src/main/java', obj.targetDir.substring(4), path.basename(obj.src));
|
||||
}
|
||||
|
||||
if (options && options.force) {
|
||||
copyFile(plugin.dir, obj.src, project.projectDir, dest, !!(options && options.link));
|
||||
} else {
|
||||
@@ -39,16 +45,27 @@ var handlers = {
|
||||
},
|
||||
uninstall:function(obj, plugin, project, options) {
|
||||
var dest = path.join(obj.targetDir, path.basename(obj.src));
|
||||
|
||||
if(options && options.android_studio === true) {
|
||||
dest = path.join('app/src/main/java', obj.targetDir.substring(4), path.basename(obj.src));
|
||||
}
|
||||
|
||||
deleteJava(project.projectDir, dest);
|
||||
}
|
||||
},
|
||||
'lib-file':{
|
||||
install:function(obj, plugin, project, options) {
|
||||
var dest = path.join('libs', path.basename(obj.src));
|
||||
if(options && options.android_studio === true) {
|
||||
dest = path.join('app/libs', path.basename(obj.src));
|
||||
}
|
||||
copyFile(plugin.dir, obj.src, project.projectDir, dest, !!(options && options.link));
|
||||
},
|
||||
uninstall:function(obj, plugin, project, options) {
|
||||
var dest = path.join('libs', path.basename(obj.src));
|
||||
if(options && options.android_studio === true) {
|
||||
dest = path.join('app/libs', path.basename(obj.src));
|
||||
}
|
||||
removeFile(project.projectDir, dest);
|
||||
}
|
||||
},
|
||||
@@ -214,9 +231,8 @@ function copyFile (plugin_dir, src, project_dir, dest, link) {
|
||||
throw new CordovaError('Destination "' + dest + '" for source file "' + src + '" is located outside the project');
|
||||
|
||||
shell.mkdir('-p', path.dirname(dest));
|
||||
|
||||
if (link) {
|
||||
fs.symlinkSync(path.relative(path.dirname(dest), src), dest);
|
||||
symlinkFileOrDirTree(src, dest);
|
||||
} else if (fs.statSync(src).isDirectory()) {
|
||||
// XXX shelljs decides to create a directory when -R|-r is used which sucks. http://goo.gl/nbsjq
|
||||
shell.cp('-Rf', src+'/*', dest);
|
||||
@@ -234,6 +250,22 @@ function copyNewFile (plugin_dir, src, project_dir, dest, link) {
|
||||
copyFile(plugin_dir, src, project_dir, dest, !!link);
|
||||
}
|
||||
|
||||
function symlinkFileOrDirTree(src, dest) {
|
||||
if (fs.existsSync(dest)) {
|
||||
shell.rm('-Rf', dest);
|
||||
}
|
||||
|
||||
if (fs.statSync(src).isDirectory()) {
|
||||
shell.mkdir('-p', dest);
|
||||
fs.readdirSync(src).forEach(function(entry) {
|
||||
symlinkFileOrDirTree(path.join(src, entry), path.join(dest, entry));
|
||||
});
|
||||
}
|
||||
else {
|
||||
fs.symlinkSync(path.relative(fs.realpathSync(path.dirname(dest)), src), dest);
|
||||
}
|
||||
}
|
||||
|
||||
// checks if file exists and then deletes. Error if doesn't exist
|
||||
function removeFile (project_dir, src) {
|
||||
var file = path.resolve(project_dir, src);
|
||||
|
||||
39
bin/templates/cordova/lib/prepare.js
vendored
@@ -33,7 +33,6 @@ var PluginInfoProvider = require('cordova-common').PluginInfoProvider;
|
||||
|
||||
module.exports.prepare = function (cordovaProject, options) {
|
||||
var self = this;
|
||||
var platformResourcesDir = path.relative(cordovaProject.root, path.join(this.locations.root, 'res'));
|
||||
|
||||
var platformJson = PlatformJson.load(this.locations.root, this.platform);
|
||||
var munger = new PlatformMunger(this.platform, this.locations.root, platformJson, new PluginInfoProvider());
|
||||
@@ -47,8 +46,8 @@ module.exports.prepare = function (cordovaProject, options) {
|
||||
return updateProjectAccordingTo(self._config, self.locations);
|
||||
})
|
||||
.then(function () {
|
||||
updateIcons(cordovaProject, platformResourcesDir);
|
||||
updateSplashes(cordovaProject, platformResourcesDir);
|
||||
updateIcons(cordovaProject, path.relative(cordovaProject.root, self.locations.res));
|
||||
updateSplashes(cordovaProject, path.relative(cordovaProject.root, self.locations.res));
|
||||
})
|
||||
.then(function () {
|
||||
events.emit('verbose', 'Prepared android project successfully');
|
||||
@@ -61,20 +60,18 @@ module.exports.clean = function (options) {
|
||||
// noPrepare option passed in by the non-CLI clean script. If that's present, or if
|
||||
// there's no config.xml found at the project root, then don't clean prepared files.
|
||||
var projectRoot = path.resolve(this.root, '../..');
|
||||
var projectConfigFile = path.join(projectRoot, 'config.xml');
|
||||
if ((options && options.noPrepare) || !fs.existsSync(projectConfigFile) ||
|
||||
if ((options && options.noPrepare) || !fs.existsSync(this.locations.configXml) ||
|
||||
!fs.existsSync(this.locations.configXml)) {
|
||||
return Q();
|
||||
}
|
||||
|
||||
var projectConfig = new ConfigParser(this.locations.configXml);
|
||||
var platformResourcesDir = path.relative(projectRoot, path.join(this.locations.root, 'res'));
|
||||
|
||||
var self = this;
|
||||
return Q().then(function () {
|
||||
cleanWww(projectRoot, self.locations);
|
||||
cleanIcons(projectRoot, projectConfig, platformResourcesDir);
|
||||
cleanSplashes(projectRoot, projectConfig, platformResourcesDir);
|
||||
cleanIcons(projectRoot, projectConfig, path.relative(projectRoot, self.locations.res));
|
||||
cleanSplashes(projectRoot, projectConfig, path.relative(projectRoot, self.locations.res));
|
||||
});
|
||||
};
|
||||
|
||||
@@ -172,7 +169,7 @@ function updateProjectAccordingTo(platformConfig, locations) {
|
||||
// Update app name by editing res/values/strings.xml
|
||||
var name = platformConfig.name();
|
||||
var strings = xmlHelpers.parseElementtreeSync(locations.strings);
|
||||
strings.find('string[@name="app_name"]').text = name;
|
||||
strings.find('string[@name="app_name"]').text = name.replace(/\'/g, '\\\'');
|
||||
fs.writeFileSync(locations.strings, strings.write({indent: 4}), 'utf-8');
|
||||
events.emit('verbose', 'Wrote out android application name "' + name + '" to ' + locations.strings);
|
||||
|
||||
@@ -247,11 +244,11 @@ function default_versionCode(version) {
|
||||
return versionCode;
|
||||
}
|
||||
|
||||
function getImageResourcePath(resourcesDir, density, name, sourceName) {
|
||||
function getImageResourcePath(resourcesDir, type, density, name, sourceName) {
|
||||
if (/\.9\.png$/.test(sourceName)) {
|
||||
name = name.replace(/\.png$/, '.9.png');
|
||||
}
|
||||
var resourcePath = path.join(resourcesDir, (density ? 'drawable-' + density : 'drawable'), name);
|
||||
var resourcePath = path.join(resourcesDir, (density ? type + '-' + density : type), name);
|
||||
return resourcePath;
|
||||
}
|
||||
|
||||
@@ -264,7 +261,7 @@ function updateSplashes(cordovaProject, platformResourcesDir) {
|
||||
return;
|
||||
}
|
||||
|
||||
var resourceMap = mapImageResources(cordovaProject.root, platformResourcesDir, 'screen.png');
|
||||
var resourceMap = mapImageResources(cordovaProject.root, platformResourcesDir, 'drawable', 'screen.png');
|
||||
|
||||
var hadMdpi = false;
|
||||
resources.forEach(function (resource) {
|
||||
@@ -275,14 +272,14 @@ function updateSplashes(cordovaProject, platformResourcesDir) {
|
||||
hadMdpi = true;
|
||||
}
|
||||
var targetPath = getImageResourcePath(
|
||||
platformResourcesDir, resource.density, 'screen.png', path.basename(resource.src));
|
||||
platformResourcesDir, 'drawable', resource.density, 'screen.png', path.basename(resource.src));
|
||||
resourceMap[targetPath] = resource.src;
|
||||
});
|
||||
|
||||
// There's no "default" drawable, so assume default == mdpi.
|
||||
if (!hadMdpi && resources.defaultResource) {
|
||||
var targetPath = getImageResourcePath(
|
||||
platformResourcesDir, 'mdpi', 'screen.png', path.basename(resources.defaultResource.src));
|
||||
platformResourcesDir, 'drawable', 'mdpi', 'screen.png', path.basename(resources.defaultResource.src));
|
||||
resourceMap[targetPath] = resources.defaultResource.src;
|
||||
}
|
||||
|
||||
@@ -294,7 +291,7 @@ function updateSplashes(cordovaProject, platformResourcesDir) {
|
||||
function cleanSplashes(projectRoot, projectConfig, platformResourcesDir) {
|
||||
var resources = projectConfig.getSplashScreens('android');
|
||||
if (resources.length > 0) {
|
||||
var resourceMap = mapImageResources(projectRoot, platformResourcesDir, 'screen.png');
|
||||
var resourceMap = mapImageResources(projectRoot, platformResourcesDir, 'drawable', 'screen.png');
|
||||
events.emit('verbose', 'Cleaning splash screens at ' + platformResourcesDir);
|
||||
|
||||
// No source paths are specified in the map, so updatePaths() will delete the target files.
|
||||
@@ -312,7 +309,7 @@ function updateIcons(cordovaProject, platformResourcesDir) {
|
||||
return;
|
||||
}
|
||||
|
||||
var resourceMap = mapImageResources(cordovaProject.root, platformResourcesDir, 'icon.png');
|
||||
var resourceMap = mapImageResources(cordovaProject.root, platformResourcesDir, 'mipmap', 'icon.png');
|
||||
|
||||
var android_icons = {};
|
||||
var default_icon;
|
||||
@@ -363,14 +360,14 @@ function updateIcons(cordovaProject, platformResourcesDir) {
|
||||
// project's config.xml location, so we use it as base path.
|
||||
for (var density in android_icons) {
|
||||
var targetPath = getImageResourcePath(
|
||||
platformResourcesDir, density, 'icon.png', path.basename(android_icons[density].src));
|
||||
platformResourcesDir, 'mipmap', density, 'icon.png', path.basename(android_icons[density].src));
|
||||
resourceMap[targetPath] = android_icons[density].src;
|
||||
}
|
||||
|
||||
// There's no "default" drawable, so assume default == mdpi.
|
||||
if (default_icon && !android_icons.mdpi) {
|
||||
var defaultTargetPath = getImageResourcePath(
|
||||
platformResourcesDir, 'mdpi', 'icon.png', path.basename(default_icon.src));
|
||||
platformResourcesDir, 'mipmap', 'mdpi', 'icon.png', path.basename(default_icon.src));
|
||||
resourceMap[defaultTargetPath] = default_icon.src;
|
||||
}
|
||||
|
||||
@@ -382,7 +379,7 @@ function updateIcons(cordovaProject, platformResourcesDir) {
|
||||
function cleanIcons(projectRoot, projectConfig, platformResourcesDir) {
|
||||
var icons = projectConfig.getIcons('android');
|
||||
if (icons.length > 0) {
|
||||
var resourceMap = mapImageResources(projectRoot, platformResourcesDir, 'icon.png');
|
||||
var resourceMap = mapImageResources(projectRoot, platformResourcesDir, 'mipmap', 'icon.png');
|
||||
events.emit('verbose', 'Cleaning icons at ' + platformResourcesDir);
|
||||
|
||||
// No source paths are specified in the map, so updatePaths() will delete the target files.
|
||||
@@ -394,9 +391,9 @@ function cleanIcons(projectRoot, projectConfig, platformResourcesDir) {
|
||||
/**
|
||||
* Gets a map containing resources of a specified name from all drawable folders in a directory.
|
||||
*/
|
||||
function mapImageResources(rootDir, subDir, resourceName) {
|
||||
function mapImageResources(rootDir, subDir, type, resourceName) {
|
||||
var pathMap = {};
|
||||
shell.ls(path.join(rootDir, subDir, 'drawable-*'))
|
||||
shell.ls(path.join(rootDir, subDir, type + '-*'))
|
||||
.forEach(function (drawableFolder) {
|
||||
var imagePath = path.join(subDir, path.basename(drawableFolder), resourceName);
|
||||
pathMap[imagePath] = null;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
// Coho updates this line:
|
||||
var VERSION = "5.2.0-dev";
|
||||
var VERSION = "6.1.2";
|
||||
|
||||
module.exports.version = VERSION;
|
||||
|
||||
|
||||
@@ -28,6 +28,13 @@ public class __ACTIVITY__ extends CordovaActivity
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
// enable Cordova apps to be started in the background
|
||||
Bundle extras = getIntent().getExtras();
|
||||
if (extras != null && extras.getBoolean("cdvStartInBackground", false)) {
|
||||
moveTaskToBack(true);
|
||||
}
|
||||
|
||||
// Set by <content src="index.html" /> in config.xml
|
||||
loadUrl(launchUrl);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<application android:icon="@drawable/icon" android:label="@string/app_name"
|
||||
<application android:icon="@mipmap/icon" android:label="@string/app_name"
|
||||
android:hardwareAccelerated="true" android:supportsRtl="true">
|
||||
<activity android:name="__ACTIVITY__"
|
||||
android:label="@string/activity_name"
|
||||
@@ -45,5 +45,5 @@
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="__APILEVEL__"/>
|
||||
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="__APILEVEL__"/>
|
||||
</manifest>
|
||||
|
||||
89
bin/templates/project/assets/www/cordova.js
vendored
@@ -1,5 +1,5 @@
|
||||
// Platform: android
|
||||
// c517ca811b4948b630e0b74dbae6c9637939da24
|
||||
// 7c5fcc5a5adfbf3fb8ceaf36fbdd4bd970bd9c20
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
@@ -19,7 +19,7 @@
|
||||
under the License.
|
||||
*/
|
||||
;(function() {
|
||||
var PLATFORM_VERSION_BUILD_LABEL = '5.2.0-dev';
|
||||
var PLATFORM_VERSION_BUILD_LABEL = '6.1.2';
|
||||
// file: src/scripts/require.js
|
||||
|
||||
/*jshint -W079 */
|
||||
@@ -742,8 +742,13 @@ var Channel = function(type, sticky) {
|
||||
}
|
||||
};
|
||||
|
||||
function forceFunction(f) {
|
||||
if (typeof f != 'function') throw "Function required as first argument!";
|
||||
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."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -753,28 +758,39 @@ function forceFunction(f) {
|
||||
* and a guid that can be used to stop subscribing to the channel.
|
||||
* Returns the guid.
|
||||
*/
|
||||
Channel.prototype.subscribe = function(f, c) {
|
||||
// need a function to call
|
||||
forceFunction(f);
|
||||
Channel.prototype.subscribe = function(eventListenerOrFunction, eventListener) {
|
||||
checkSubscriptionArgument(eventListenerOrFunction);
|
||||
var handleEvent, guid;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
if (this.state == 2) {
|
||||
f.apply(c || this, this.fireArgs);
|
||||
handleEvent.apply(eventListener || this, this.fireArgs);
|
||||
return;
|
||||
}
|
||||
|
||||
var func = f,
|
||||
guid = f.observer_guid;
|
||||
if (typeof c == "object") { func = utils.close(c, f); }
|
||||
guid = eventListenerOrFunction.observer_guid;
|
||||
if (typeof eventListener === "object") {
|
||||
handleEvent = utils.close(eventListener, handleEvent);
|
||||
}
|
||||
|
||||
if (!guid) {
|
||||
// first time any channel has seen this subscriber
|
||||
// First time any channel has seen this subscriber
|
||||
guid = '' + nextGuid++;
|
||||
}
|
||||
func.observer_guid = guid;
|
||||
f.observer_guid = guid;
|
||||
handleEvent.observer_guid = guid;
|
||||
eventListenerOrFunction.observer_guid = guid;
|
||||
|
||||
// Don't add the same handler more than once.
|
||||
if (!this.handlers[guid]) {
|
||||
this.handlers[guid] = func;
|
||||
this.handlers[guid] = handleEvent;
|
||||
this.numHandlers++;
|
||||
if (this.numHandlers == 1) {
|
||||
this.onHasSubscribersChange && this.onHasSubscribersChange();
|
||||
@@ -785,12 +801,20 @@ Channel.prototype.subscribe = function(f, c) {
|
||||
/**
|
||||
* Unsubscribes the function with the given guid from the channel.
|
||||
*/
|
||||
Channel.prototype.unsubscribe = function(f) {
|
||||
// need a function to unsubscribe
|
||||
forceFunction(f);
|
||||
Channel.prototype.unsubscribe = function(eventListenerOrFunction) {
|
||||
checkSubscriptionArgument(eventListenerOrFunction);
|
||||
var handleEvent, guid, handler;
|
||||
|
||||
var guid = f.observer_guid,
|
||||
handler = this.handlers[guid];
|
||||
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--;
|
||||
@@ -897,10 +921,11 @@ var cordova = require('cordova'),
|
||||
// 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
|
||||
ONLINE_EVENT: 2,
|
||||
EVAL_BRIDGE: 3
|
||||
},
|
||||
jsToNativeBridgeMode, // Set lazily.
|
||||
nativeToJsBridgeMode = nativeToJsModes.ONLINE_EVENT,
|
||||
nativeToJsBridgeMode = nativeToJsModes.EVAL_BRIDGE,
|
||||
pollEnabled = false,
|
||||
bridgeSecret = -1;
|
||||
|
||||
@@ -923,6 +948,9 @@ function androidExec(success, fail, service, action, args) {
|
||||
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') {
|
||||
@@ -932,7 +960,6 @@ function androidExec(success, fail, service, action, args) {
|
||||
|
||||
var callbackId = service + cordova.callbackId++,
|
||||
argsJson = JSON.stringify(args);
|
||||
|
||||
if (success || fail) {
|
||||
cordova.callbacks[callbackId] = {success:success, fail:fail};
|
||||
}
|
||||
@@ -952,6 +979,17 @@ function androidExec(success, fail, service, action, args) {
|
||||
}
|
||||
|
||||
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();
|
||||
};
|
||||
@@ -2083,7 +2121,10 @@ utils.clone = function(obj) {
|
||||
|
||||
retVal = {};
|
||||
for(i in obj){
|
||||
if(!(i in retVal) || retVal[i] != obj[i]) {
|
||||
// https://issues.apache.org/jira/browse/CB-11522 'unknown' type may be returned in
|
||||
// custom protocol activation case on Windows Phone 8.1 causing "No such interface supported" exception
|
||||
// on cloning.
|
||||
if((!(i in retVal) || retVal[i] != obj[i]) && typeof obj[i] != 'undefined' && typeof obj[i] != 'unknown') {
|
||||
retVal[i] = utils.clone(obj[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ buildscript {
|
||||
// http://tools.android.com/tech-docs/new-build-system/version-compatibility
|
||||
// and https://issues.apache.org/jira/browse/CB-8143
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.1.0'
|
||||
classpath 'com.android.tools.build:gradle:2.2.1'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ allprojects {
|
||||
}
|
||||
|
||||
task wrapper(type: Wrapper) {
|
||||
gradleVersion = '2.13'
|
||||
gradleVersion = '2.14.1'
|
||||
}
|
||||
|
||||
// Configuration properties. Set these via environment variables, build-extras.gradle, or gradle.properties.
|
||||
@@ -164,7 +164,7 @@ android {
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
versionCode cdvVersionCode ?: Integer.parseInt("" + privateHelpers.extractIntFromManifest("versionCode"))
|
||||
versionCode cdvVersionCode ?: new BigInteger("" + privateHelpers.extractIntFromManifest("versionCode"))
|
||||
applicationId privateHelpers.extractStringFromManifest("package")
|
||||
|
||||
if (cdvMinSdkVersion != null) {
|
||||
@@ -264,7 +264,7 @@ def promptForReleaseKeyPassword() {
|
||||
|
||||
gradle.taskGraph.whenReady { taskGraph ->
|
||||
taskGraph.getAllTasks().each() { task ->
|
||||
if (task.name == 'validateReleaseSigning') {
|
||||
if (task.name == 'validateReleaseSigning' || task.name == 'validateSigningRelease') {
|
||||
promptForReleaseKeyPassword()
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
20
cordova-js-src/exec.js
vendored
@@ -51,10 +51,11 @@ var cordova = require('cordova'),
|
||||
// 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
|
||||
ONLINE_EVENT: 2,
|
||||
EVAL_BRIDGE: 3
|
||||
},
|
||||
jsToNativeBridgeMode, // Set lazily.
|
||||
nativeToJsBridgeMode = nativeToJsModes.ONLINE_EVENT,
|
||||
nativeToJsBridgeMode = nativeToJsModes.EVAL_BRIDGE,
|
||||
pollEnabled = false,
|
||||
bridgeSecret = -1;
|
||||
|
||||
@@ -77,6 +78,9 @@ function androidExec(success, fail, service, action, args) {
|
||||
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') {
|
||||
@@ -86,7 +90,6 @@ function androidExec(success, fail, service, action, args) {
|
||||
|
||||
var callbackId = service + cordova.callbackId++,
|
||||
argsJson = JSON.stringify(args);
|
||||
|
||||
if (success || fail) {
|
||||
cordova.callbacks[callbackId] = {success:success, fail:fail};
|
||||
}
|
||||
@@ -106,6 +109,17 @@ function androidExec(success, fail, service, action, args) {
|
||||
}
|
||||
|
||||
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();
|
||||
};
|
||||
|
||||
@@ -21,15 +21,16 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter();
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.1.0'
|
||||
classpath 'com.android.tools.build:gradle:2.2.1'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
apply plugin: 'android-library'
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
ext {
|
||||
apply from: 'cordova.gradle'
|
||||
|
||||
@@ -125,7 +125,7 @@ def doExtractIntFromManifest(name) {
|
||||
def pattern = Pattern.compile(name + "=\"(\\d+)\"")
|
||||
def matcher = pattern.matcher(manifestFile.getText())
|
||||
matcher.find()
|
||||
return Integer.parseInt(matcher.group(1))
|
||||
return new BigInteger(matcher.group(1))
|
||||
}
|
||||
|
||||
def doExtractStringFromManifest(name) {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
# Indicates whether an apk should be generated for each density.
|
||||
split.density=false
|
||||
# Project target.
|
||||
target=android-23
|
||||
target=android-25
|
||||
apk-configurations=
|
||||
renderscript.opt.level=O0
|
||||
android.library=true
|
||||
|
||||
@@ -20,8 +20,6 @@ package org.apache.cordova;
|
||||
|
||||
import org.json.JSONArray;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import org.apache.cordova.CordovaWebView;
|
||||
import org.apache.cordova.PluginResult;
|
||||
import org.json.JSONObject;
|
||||
@@ -38,15 +36,15 @@ public class CallbackContext {
|
||||
this.callbackId = callbackId;
|
||||
this.webView = webView;
|
||||
}
|
||||
|
||||
|
||||
public boolean isFinished() {
|
||||
return finished;
|
||||
}
|
||||
|
||||
|
||||
public boolean isChangingThreads() {
|
||||
return changingThreads > 0;
|
||||
}
|
||||
|
||||
|
||||
public String getCallbackId() {
|
||||
return callbackId;
|
||||
}
|
||||
@@ -54,7 +52,7 @@ public class CallbackContext {
|
||||
public void sendPluginResult(PluginResult pluginResult) {
|
||||
synchronized (this) {
|
||||
if (finished) {
|
||||
Log.w(LOG_TAG, "Attempted to send a second callback for ID: " + callbackId + "\nResult was: " + pluginResult.getMessage());
|
||||
LOG.w(LOG_TAG, "Attempted to send a second callback for ID: " + callbackId + "\nResult was: " + pluginResult.getMessage());
|
||||
return;
|
||||
} else {
|
||||
finished = !pluginResult.getKeepCallback();
|
||||
@@ -98,7 +96,7 @@ public class CallbackContext {
|
||||
public void success(byte[] message) {
|
||||
sendPluginResult(new PluginResult(PluginResult.Status.OK, message));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Helper for success callbacks that just returns the Status.OK by default
|
||||
*
|
||||
|
||||
@@ -22,7 +22,6 @@ package org.apache.cordova;
|
||||
import java.util.List;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.util.Log;
|
||||
|
||||
@Deprecated // Use Whitelist, CordovaPrefences, etc. directly.
|
||||
public class Config {
|
||||
@@ -61,7 +60,7 @@ public class Config {
|
||||
public static List<PluginEntry> getPluginEntries() {
|
||||
return parser.getPluginEntries();
|
||||
}
|
||||
|
||||
|
||||
public static CordovaPreferences getPreferences() {
|
||||
return parser.getPreferences();
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ import android.graphics.Color;
|
||||
import android.media.AudioManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
@@ -50,7 +49,7 @@ import android.widget.FrameLayout;
|
||||
* html file that contains the application.
|
||||
*
|
||||
* As an example:
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* package org.apache.cordova.examples;
|
||||
*
|
||||
@@ -67,8 +66,8 @@ import android.widget.FrameLayout;
|
||||
* }
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* Cordova xml configuration: Cordova uses a configuration file at
|
||||
*
|
||||
* Cordova xml configuration: Cordova uses a configuration file at
|
||||
* res/xml/config.xml to specify its settings. See "The config.xml File"
|
||||
* guide in cordova-docs at http://cordova.apache.org/docs for the documentation
|
||||
* for the configuration. The use of the set*Property() methods is
|
||||
@@ -104,21 +103,27 @@ public class CordovaActivity extends Activity {
|
||||
*/
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
// need to activate preferences before super.onCreate to avoid "requestFeature() must be called before adding content" exception
|
||||
loadConfig();
|
||||
|
||||
String logLevel = preferences.getString("loglevel", "ERROR");
|
||||
LOG.setLogLevel(logLevel);
|
||||
|
||||
LOG.i(TAG, "Apache Cordova native platform version " + CordovaWebView.CORDOVA_VERSION + " is starting");
|
||||
LOG.d(TAG, "CordovaActivity.onCreate()");
|
||||
|
||||
// need to activate preferences before super.onCreate to avoid "requestFeature() must be called before adding content" exception
|
||||
loadConfig();
|
||||
if (!preferences.getBoolean("ShowTitle", false)) {
|
||||
getWindow().requestFeature(Window.FEATURE_NO_TITLE);
|
||||
}
|
||||
|
||||
if (preferences.getBoolean("SetFullscreen", false)) {
|
||||
Log.d(TAG, "The SetFullscreen configuration is deprecated in favor of Fullscreen, and will be removed in a future version.");
|
||||
LOG.d(TAG, "The SetFullscreen configuration is deprecated in favor of Fullscreen, and will be removed in a future version.");
|
||||
preferences.set("Fullscreen", true);
|
||||
}
|
||||
if (preferences.getBoolean("Fullscreen", false)) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
// NOTE: use the FullscreenNotImmersive configuration key to set the activity in a REAL full screen
|
||||
// (as was the case in previous cordova versions)
|
||||
if ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) && !preferences.getBoolean("FullscreenNotImmersive", false)) {
|
||||
immersiveMode = true;
|
||||
} else {
|
||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
|
||||
@@ -175,9 +180,14 @@ public class CordovaActivity extends Activity {
|
||||
setContentView(appView.getView());
|
||||
|
||||
if (preferences.contains("BackgroundColor")) {
|
||||
int backgroundColor = preferences.getInteger("BackgroundColor", Color.BLACK);
|
||||
// Background of activity:
|
||||
appView.getView().setBackgroundColor(backgroundColor);
|
||||
try {
|
||||
int backgroundColor = preferences.getInteger("BackgroundColor", Color.BLACK);
|
||||
// Background of activity:
|
||||
appView.getView().setBackgroundColor(backgroundColor);
|
||||
}
|
||||
catch (NumberFormatException e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
appView.getView().requestFocusFromTouch();
|
||||
|
||||
@@ -23,8 +23,6 @@ import java.security.SecureRandom;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* Contains APIs that the JS can call. All functions in here should also have
|
||||
* an equivalent entry in CordovaChromeClient.java, and be added to
|
||||
@@ -87,15 +85,15 @@ public class CordovaBridge {
|
||||
private boolean verifySecret(String action, int bridgeSecret) throws IllegalAccessException {
|
||||
if (!jsMessageQueue.isBridgeEnabled()) {
|
||||
if (bridgeSecret == -1) {
|
||||
Log.d(LOG_TAG, action + " call made before bridge was enabled.");
|
||||
LOG.d(LOG_TAG, action + " call made before bridge was enabled.");
|
||||
} else {
|
||||
Log.d(LOG_TAG, "Ignoring " + action + " from previous page load.");
|
||||
LOG.d(LOG_TAG, "Ignoring " + action + " from previous page load.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// Bridge secret wrong and bridge not due to it being from the previous page.
|
||||
if (expectedBridgeSecret < 0 || bridgeSecret != expectedBridgeSecret) {
|
||||
Log.e(LOG_TAG, "Bridge access attempt with wrong secret token, possibly from malicious code. Disabling exec() bridge!");
|
||||
LOG.e(LOG_TAG, "Bridge access attempt with wrong secret token, possibly from malicious code. Disabling exec() bridge!");
|
||||
clearBridgeSecret();
|
||||
throw new IllegalAccessException();
|
||||
}
|
||||
@@ -120,7 +118,7 @@ public class CordovaBridge {
|
||||
|
||||
public void reset() {
|
||||
jsMessageQueue.reset();
|
||||
clearBridgeSecret();
|
||||
clearBridgeSecret();
|
||||
}
|
||||
|
||||
public String promptOnJsPrompt(String origin, String message, String defaultValue) {
|
||||
@@ -141,7 +139,7 @@ public class CordovaBridge {
|
||||
}
|
||||
return "";
|
||||
}
|
||||
// Sets the native->JS bridge mode.
|
||||
// Sets the native->JS bridge mode.
|
||||
else if (defaultValue != null && defaultValue.startsWith("gap_bridge_mode:")) {
|
||||
try {
|
||||
int bridgeSecret = Integer.parseInt(defaultValue.substring(16));
|
||||
@@ -153,7 +151,7 @@ public class CordovaBridge {
|
||||
}
|
||||
return "";
|
||||
}
|
||||
// Polling for JavaScript messages
|
||||
// Polling for JavaScript messages
|
||||
else if (defaultValue != null && defaultValue.startsWith("gap_poll:")) {
|
||||
int bridgeSecret = Integer.parseInt(defaultValue.substring(9));
|
||||
try {
|
||||
@@ -175,7 +173,7 @@ public class CordovaBridge {
|
||||
int secret = generateBridgeSecret();
|
||||
return ""+secret;
|
||||
} else {
|
||||
Log.e(LOG_TAG, "gap_init called from restricted origin: " + origin);
|
||||
LOG.e(LOG_TAG, "gap_init called from restricted origin: " + origin);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.util.Pair;
|
||||
|
||||
import org.json.JSONException;
|
||||
@@ -147,13 +146,13 @@ public class CordovaInterfaceImpl implements CordovaInterface {
|
||||
activityResultCallback = null;
|
||||
|
||||
if (callback != null) {
|
||||
Log.d(TAG, "Sending activity result to plugin");
|
||||
LOG.d(TAG, "Sending activity result to plugin");
|
||||
initCallbackService = null;
|
||||
savedResult = null;
|
||||
callback.onActivityResult(requestCode, resultCode, intent);
|
||||
return true;
|
||||
}
|
||||
Log.w(TAG, "Got an activity result, but no plugin was registered to receive it" + (savedResult != null ? " yet!" : "."));
|
||||
LOG.w(TAG, "Got an activity result, but no plugin was registered to receive it" + (savedResult != null ? " yet!" : "."));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import android.webkit.WebChromeClient.CustomViewCallback;
|
||||
* are not expected to implement it.
|
||||
*/
|
||||
public interface CordovaWebView {
|
||||
public static final String CORDOVA_VERSION = "5.2.0-dev";
|
||||
public static final String CORDOVA_VERSION = "6.1.2";
|
||||
|
||||
void init(CordovaInterface cordova, List<PluginEntry> pluginEntries, CordovaPreferences preferences);
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ package org.apache.cordova;
|
||||
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.webkit.ValueCallback;
|
||||
|
||||
/**
|
||||
* Interface for all Cordova engines.
|
||||
@@ -58,6 +59,9 @@ public interface CordovaWebViewEngine {
|
||||
/** Clean up all resources associated with the WebView. */
|
||||
void destroy();
|
||||
|
||||
/** Add the evaulate Javascript method **/
|
||||
void evaluateJavascript(String js, ValueCallback<String> callback);
|
||||
|
||||
/**
|
||||
* Used to retrieve the associated CordovaWebView given a View without knowing the type of Engine.
|
||||
* E.g. ((CordovaWebView.EngineView)activity.findViewById(android.R.id.webView)).getCordovaWebView();
|
||||
|
||||
@@ -21,7 +21,6 @@ package org.apache.cordova;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
@@ -245,7 +244,7 @@ public class CordovaWebViewImpl implements CordovaWebView {
|
||||
@Deprecated
|
||||
public void showCustomView(View view, WebChromeClient.CustomViewCallback callback) {
|
||||
// This code is adapted from the original Android Browser code, licensed under the Apache License, Version 2.0
|
||||
Log.d(TAG, "showing Custom View");
|
||||
LOG.d(TAG, "showing Custom View");
|
||||
// if a view already exists then immediately terminate the new one
|
||||
if (mCustomView != null) {
|
||||
callback.onCustomViewHidden();
|
||||
@@ -276,7 +275,7 @@ public class CordovaWebViewImpl implements CordovaWebView {
|
||||
public void hideCustomView() {
|
||||
// This code is adapted from the original Android Browser code, licensed under the Apache License, Version 2.0
|
||||
if (mCustomView == null) return;
|
||||
Log.d(TAG, "Hiding Custom View");
|
||||
LOG.d(TAG, "Hiding Custom View");
|
||||
|
||||
// Hide the custom view.
|
||||
mCustomView.setVisibility(View.GONE);
|
||||
|
||||
@@ -30,12 +30,13 @@ import android.content.IntentFilter;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.view.KeyEvent;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* This class exposes methods in Cordova that can be called from JavaScript.
|
||||
*/
|
||||
class CoreAndroid extends CordovaPlugin {
|
||||
public class CoreAndroid extends CordovaPlugin {
|
||||
|
||||
public static final String PLUGIN_NAME = "CoreAndroid";
|
||||
protected static final String TAG = "CordovaApp";
|
||||
@@ -357,4 +358,33 @@ class CoreAndroid extends CordovaPlugin {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This needs to be implemented if you wish to use the Camera Plugin or other plugins
|
||||
* that read the Build Configuration.
|
||||
*
|
||||
* Thanks to Phil@Medtronic and Graham Borland for finding the answer and posting it to
|
||||
* StackOverflow. This is annoying as hell!
|
||||
*
|
||||
*/
|
||||
|
||||
public static Object getBuildConfigValue(Context ctx, String key)
|
||||
{
|
||||
try
|
||||
{
|
||||
Class<?> clazz = Class.forName(ctx.getPackageName() + ".BuildConfig");
|
||||
Field field = clazz.getField(key);
|
||||
return field.get(null);
|
||||
} catch (ClassNotFoundException e) {
|
||||
LOG.d(TAG, "Unable to get the BuildConfig, is this built with ANT?");
|
||||
e.printStackTrace();
|
||||
} catch (NoSuchFieldException e) {
|
||||
LOG.d(TAG, key + " is not a valid field. Check your build.gradle");
|
||||
} catch (IllegalAccessException e) {
|
||||
LOG.d(TAG, "Illegal Access Exception: Let's print a stack trace.");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,6 +154,16 @@ public class LOG {
|
||||
if (LOG.INFO >= LOGLEVEL) Log.i(tag, s, e);
|
||||
}
|
||||
|
||||
/**
|
||||
* Warning log message.
|
||||
*
|
||||
* @param tag
|
||||
* @param e
|
||||
*/
|
||||
public static void w(String tag, Throwable e) {
|
||||
if (LOG.WARN >= LOGLEVEL) Log.w(tag, e);
|
||||
}
|
||||
|
||||
/**
|
||||
* Warning log message.
|
||||
*
|
||||
|
||||
@@ -21,8 +21,6 @@ package org.apache.cordova;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* Holds the list of messages to be sent to the WebView.
|
||||
*/
|
||||
@@ -42,13 +40,13 @@ public class NativeToJsMessageQueue {
|
||||
// This currently only chops up on message boundaries. It may be useful
|
||||
// to allow it to break up messages.
|
||||
private static int MAX_PAYLOAD_SIZE = 50 * 1024 * 10240;
|
||||
|
||||
|
||||
/**
|
||||
* When true, the active listener is not fired upon enqueue. When set to false,
|
||||
* the active listener will be fired if the queue is non-empty.
|
||||
* the active listener will be fired if the queue is non-empty.
|
||||
*/
|
||||
private boolean paused;
|
||||
|
||||
|
||||
/**
|
||||
* The list of JavaScript statements to be sent to JavaScript.
|
||||
*/
|
||||
@@ -58,7 +56,7 @@ public class NativeToJsMessageQueue {
|
||||
* The array of listeners that can be used to send messages to JS.
|
||||
*/
|
||||
private ArrayList<BridgeMode> bridgeModes = new ArrayList<BridgeMode>();
|
||||
|
||||
|
||||
/**
|
||||
* When null, the bridge is disabled. This occurs during page transitions.
|
||||
* When disabled, all callbacks are dropped since they are assumed to be
|
||||
@@ -83,11 +81,11 @@ public class NativeToJsMessageQueue {
|
||||
*/
|
||||
public void setBridgeMode(int value) {
|
||||
if (value < -1 || value >= bridgeModes.size()) {
|
||||
Log.d(LOG_TAG, "Invalid NativeToJsBridgeMode: " + value);
|
||||
LOG.d(LOG_TAG, "Invalid NativeToJsBridgeMode: " + value);
|
||||
} else {
|
||||
BridgeMode newMode = value < 0 ? null : bridgeModes.get(value);
|
||||
if (newMode != activeBridgeMode) {
|
||||
Log.d(LOG_TAG, "Set native->JS mode to " + (newMode == null ? "null" : newMode.getClass().getSimpleName()));
|
||||
LOG.d(LOG_TAG, "Set native->JS mode to " + (newMode == null ? "null" : newMode.getClass().getSimpleName()));
|
||||
synchronized (this) {
|
||||
activeBridgeMode = newMode;
|
||||
if (newMode != null) {
|
||||
@@ -100,7 +98,7 @@ public class NativeToJsMessageQueue {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Clears all messages and resets to the default bridge mode.
|
||||
*/
|
||||
@@ -114,16 +112,16 @@ public class NativeToJsMessageQueue {
|
||||
private int calculatePackedMessageLength(JsMessage message) {
|
||||
int messageLen = message.calculateEncodedLength();
|
||||
String messageLenStr = String.valueOf(messageLen);
|
||||
return messageLenStr.length() + messageLen + 1;
|
||||
return messageLenStr.length() + messageLen + 1;
|
||||
}
|
||||
|
||||
|
||||
private void packMessage(JsMessage message, StringBuilder sb) {
|
||||
int len = message.calculateEncodedLength();
|
||||
sb.append(len)
|
||||
.append(' ');
|
||||
message.encodeAsMessage(sb);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Combines and returns queued messages combined into a single string.
|
||||
* Combines as many messages as possible, while staying under MAX_PAYLOAD_SIZE.
|
||||
@@ -154,7 +152,7 @@ public class NativeToJsMessageQueue {
|
||||
JsMessage message = queue.removeFirst();
|
||||
packMessage(message, sb);
|
||||
}
|
||||
|
||||
|
||||
if (!queue.isEmpty()) {
|
||||
// Attach a char to indicate that there are more messages pending.
|
||||
sb.append('*');
|
||||
@@ -163,7 +161,7 @@ public class NativeToJsMessageQueue {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Same as popAndEncode(), except encodes in a form that can be executed as JS.
|
||||
*/
|
||||
@@ -185,7 +183,7 @@ public class NativeToJsMessageQueue {
|
||||
}
|
||||
boolean willSendAllMessages = numMessagesToSend == queue.size();
|
||||
StringBuilder sb = new StringBuilder(totalPayloadLen + (willSendAllMessages ? 0 : 100));
|
||||
// Wrap each statement in a try/finally so that if one throws it does
|
||||
// Wrap each statement in a try/finally so that if one throws it does
|
||||
// not affect the next.
|
||||
for (int i = 0; i < numMessagesToSend; ++i) {
|
||||
JsMessage message = queue.removeFirst();
|
||||
@@ -206,7 +204,7 @@ public class NativeToJsMessageQueue {
|
||||
String ret = sb.toString();
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a JavaScript statement to the list.
|
||||
@@ -220,7 +218,7 @@ public class NativeToJsMessageQueue {
|
||||
*/
|
||||
public void addPluginResult(PluginResult result, String callbackId) {
|
||||
if (callbackId == null) {
|
||||
Log.e(LOG_TAG, "Got plugin result with no callbackId", new Throwable());
|
||||
LOG.e(LOG_TAG, "Got plugin result with no callbackId", new Throwable());
|
||||
return;
|
||||
}
|
||||
// Don't send anything if there is no result and there is no need to
|
||||
@@ -243,7 +241,7 @@ public class NativeToJsMessageQueue {
|
||||
private void enqueueMessage(JsMessage message) {
|
||||
synchronized (this) {
|
||||
if (activeBridgeMode == null) {
|
||||
Log.d(LOG_TAG, "Dropping Native->JS message due to disabled bridge");
|
||||
LOG.d(LOG_TAG, "Dropping Native->JS message due to disabled bridge");
|
||||
return;
|
||||
}
|
||||
queue.add(message);
|
||||
@@ -257,7 +255,7 @@ public class NativeToJsMessageQueue {
|
||||
if (paused && value) {
|
||||
// This should never happen. If a use-case for it comes up, we should
|
||||
// change pause to be a counter.
|
||||
Log.e(LOG_TAG, "nested call to setPaused detected.", new Throwable());
|
||||
LOG.e(LOG_TAG, "nested call to setPaused detected.", new Throwable());
|
||||
}
|
||||
paused = value;
|
||||
if (!value) {
|
||||
@@ -265,7 +263,7 @@ public class NativeToJsMessageQueue {
|
||||
if (!queue.isEmpty() && activeBridgeMode != null) {
|
||||
activeBridgeMode.onNativeToJsMessageAvailable(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,6 +349,31 @@ public class NativeToJsMessageQueue {
|
||||
}
|
||||
}
|
||||
|
||||
/** Uses webView.evaluateJavascript to execute messages. */
|
||||
public static class EvalBridgeMode extends BridgeMode {
|
||||
private final CordovaWebViewEngine engine;
|
||||
private final CordovaInterface cordova;
|
||||
|
||||
public EvalBridgeMode(CordovaWebViewEngine engine, CordovaInterface cordova) {
|
||||
this.engine = engine;
|
||||
this.cordova = cordova;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNativeToJsMessageAvailable(final NativeToJsMessageQueue queue) {
|
||||
cordova.getActivity().runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
String js = queue.popAndEncodeAsJs();
|
||||
if (js != null) {
|
||||
engine.evaluateJavascript(js, null);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static class JsMessage {
|
||||
final String jsPayloadOrCallbackId;
|
||||
final PluginResult pluginResult;
|
||||
@@ -368,7 +391,7 @@ public class NativeToJsMessageQueue {
|
||||
jsPayloadOrCallbackId = callbackId;
|
||||
this.pluginResult = pluginResult;
|
||||
}
|
||||
|
||||
|
||||
static int calculateEncodedLengthHelper(PluginResult pluginResult) {
|
||||
switch (pluginResult.getMessageType()) {
|
||||
case PluginResult.MESSAGE_TYPE_BOOLEAN: // f or t
|
||||
@@ -395,7 +418,7 @@ public class NativeToJsMessageQueue {
|
||||
return pluginResult.getMessage().length();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int calculateEncodedLength() {
|
||||
if (pluginResult == null) {
|
||||
return jsPayloadOrCallbackId.length() + 1;
|
||||
@@ -424,7 +447,7 @@ public class NativeToJsMessageQueue {
|
||||
case PluginResult.MESSAGE_TYPE_BINARYSTRING: // S
|
||||
sb.append('S');
|
||||
sb.append(pluginResult.getMessage());
|
||||
break;
|
||||
break;
|
||||
case PluginResult.MESSAGE_TYPE_ARRAYBUFFER: // A
|
||||
sb.append('A');
|
||||
sb.append(pluginResult.getMessage());
|
||||
@@ -443,7 +466,7 @@ public class NativeToJsMessageQueue {
|
||||
sb.append(pluginResult.getMessage()); // [ or {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void encodeAsMessage(StringBuilder sb) {
|
||||
if (pluginResult == null) {
|
||||
sb.append('J')
|
||||
|
||||
@@ -28,7 +28,6 @@ import android.content.res.Configuration;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Debug;
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* PluginManager is exposed to JavaScript in the Cordova WebView.
|
||||
@@ -122,7 +121,7 @@ public class PluginManager {
|
||||
public void exec(final String service, final String action, final String callbackId, final String rawArgs) {
|
||||
CordovaPlugin plugin = getPlugin(service);
|
||||
if (plugin == null) {
|
||||
Log.d(TAG, "exec() call to unknown plugin: " + service);
|
||||
LOG.d(TAG, "exec() call to unknown plugin: " + service);
|
||||
PluginResult cr = new PluginResult(PluginResult.Status.CLASS_NOT_FOUND_EXCEPTION);
|
||||
app.sendPluginResult(cr, callbackId);
|
||||
return;
|
||||
@@ -134,7 +133,7 @@ public class PluginManager {
|
||||
long duration = System.currentTimeMillis() - pluginStartTime;
|
||||
|
||||
if (duration > SLOW_EXEC_WARNING_THRESHOLD) {
|
||||
Log.w(TAG, "THREAD WARNING: exec() call to " + service + "." + action + " blocked the main thread for " + duration + "ms. Plugin should use CordovaInterface.getThreadPool().");
|
||||
LOG.w(TAG, "THREAD WARNING: exec() call to " + service + "." + action + " blocked the main thread for " + duration + "ms. Plugin should use CordovaInterface.getThreadPool().");
|
||||
}
|
||||
if (!wasValidAction) {
|
||||
PluginResult cr = new PluginResult(PluginResult.Status.INVALID_ACTION);
|
||||
@@ -144,7 +143,7 @@ public class PluginManager {
|
||||
PluginResult cr = new PluginResult(PluginResult.Status.JSON_EXCEPTION);
|
||||
callbackContext.sendPluginResult(cr);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Uncaught exception from plugin", e);
|
||||
LOG.e(TAG, "Uncaught exception from plugin", e);
|
||||
callbackContext.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -222,9 +221,9 @@ public class PluginManager {
|
||||
* @param handler The HttpAuthHandler used to set the WebView's response
|
||||
* @param host The host requiring authentication
|
||||
* @param realm The realm for which authentication is required
|
||||
*
|
||||
*
|
||||
* @return Returns True if there is a plugin which will resolve this auth challenge, otherwise False
|
||||
*
|
||||
*
|
||||
*/
|
||||
public boolean onReceivedHttpAuthRequest(CordovaWebView view, ICordovaHttpAuthHandler handler, String host, String realm) {
|
||||
for (CordovaPlugin plugin : this.pluginMap.values()) {
|
||||
@@ -234,7 +233,7 @@ public class PluginManager {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Called when he system received an SSL client certificate request. Plugin can use
|
||||
* the supplied ClientCertRequest to process this certificate challenge.
|
||||
|
||||
@@ -26,7 +26,6 @@ import android.content.ActivityNotFoundException;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup.LayoutParams;
|
||||
@@ -62,7 +61,7 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
|
||||
// the video progress view
|
||||
private View mVideoProgressView;
|
||||
|
||||
|
||||
private CordovaDialogsHelper dialogsHelper;
|
||||
private Context appContext;
|
||||
|
||||
@@ -193,7 +192,7 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// API level 7 is required for this, see if we could lower this using something else
|
||||
@Override
|
||||
public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callback) {
|
||||
@@ -213,9 +212,9 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
*/
|
||||
public View getVideoLoadingProgressView() {
|
||||
|
||||
if (mVideoProgressView == null) {
|
||||
if (mVideoProgressView == null) {
|
||||
// Create a new Loading view programmatically.
|
||||
|
||||
|
||||
// create the linear layout
|
||||
LinearLayout layout = new LinearLayout(parentEngine.getView().getContext());
|
||||
layout.setOrientation(LinearLayout.VERTICAL);
|
||||
@@ -226,12 +225,12 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
ProgressBar bar = new ProgressBar(parentEngine.getView().getContext());
|
||||
LinearLayout.LayoutParams barLayoutParams = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
|
||||
barLayoutParams.gravity = Gravity.CENTER;
|
||||
bar.setLayoutParams(barLayoutParams);
|
||||
bar.setLayoutParams(barLayoutParams);
|
||||
layout.addView(bar);
|
||||
|
||||
|
||||
mVideoProgressView = layout;
|
||||
}
|
||||
return mVideoProgressView;
|
||||
return mVideoProgressView;
|
||||
}
|
||||
|
||||
// <input type=file> support:
|
||||
@@ -240,11 +239,11 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
public void openFileChooser(ValueCallback<Uri> uploadMsg) {
|
||||
this.openFileChooser(uploadMsg, "*/*");
|
||||
}
|
||||
|
||||
|
||||
public void openFileChooser( ValueCallback<Uri> uploadMsg, String acceptType ) {
|
||||
this.openFileChooser(uploadMsg, acceptType, null);
|
||||
}
|
||||
|
||||
|
||||
public void openFileChooser(final ValueCallback<Uri> uploadMsg, String acceptType, String capture)
|
||||
{
|
||||
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
@@ -254,7 +253,7 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
|
||||
Uri result = intent == null || resultCode != Activity.RESULT_OK ? null : intent.getData();
|
||||
Log.d(LOG_TAG, "Receive file chooser URL: " + result);
|
||||
LOG.d(LOG_TAG, "Receive file chooser URL: " + result);
|
||||
uploadMsg.onReceiveValue(result);
|
||||
}
|
||||
}, intent, FILECHOOSER_RESULTCODE);
|
||||
@@ -269,12 +268,12 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
|
||||
Uri[] result = WebChromeClient.FileChooserParams.parseResult(resultCode, intent);
|
||||
Log.d(LOG_TAG, "Receive file chooser URL: " + result);
|
||||
LOG.d(LOG_TAG, "Receive file chooser URL: " + result);
|
||||
filePathsCallback.onReceiveValue(result);
|
||||
}
|
||||
}, intent, FILECHOOSER_RESULTCODE);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Log.w("No activity found to handle file chooser intent.", e);
|
||||
LOG.w("No activity found to handle file chooser intent.", e);
|
||||
filePathsCallback.onReceiveValue(null);
|
||||
}
|
||||
return true;
|
||||
@@ -283,7 +282,7 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
public void onPermissionRequest(final PermissionRequest request) {
|
||||
Log.d(LOG_TAG, "onPermissionRequest: " + Arrays.toString(request.getResources()));
|
||||
LOG.d(LOG_TAG, "onPermissionRequest: " + Arrays.toString(request.getResources()));
|
||||
request.grant(request.getResources());
|
||||
}
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebSettings.LayoutAlgorithm;
|
||||
import android.webkit.WebView;
|
||||
@@ -40,6 +40,7 @@ import org.apache.cordova.CordovaResourceApi;
|
||||
import org.apache.cordova.CordovaWebView;
|
||||
import org.apache.cordova.CordovaWebViewEngine;
|
||||
import org.apache.cordova.ICordovaCookieManager;
|
||||
import org.apache.cordova.LOG;
|
||||
import org.apache.cordova.NativeToJsMessageQueue;
|
||||
import org.apache.cordova.PluginManager;
|
||||
|
||||
@@ -116,7 +117,9 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
|
||||
SystemWebViewEngine.this.cordova.getActivity().runOnUiThread(r);
|
||||
}
|
||||
}));
|
||||
bridge = new CordovaBridge(pluginManager, nativeToJsMessageQueue);
|
||||
if(Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN_MR2)
|
||||
nativeToJsMessageQueue.addBridgeMode(new NativeToJsMessageQueue.EvalBridgeMode(this, cordova));
|
||||
bridge = new CordovaBridge(pluginManager, nativeToJsMessageQueue);
|
||||
exposeJsInterface(webView, bridge);
|
||||
}
|
||||
|
||||
@@ -145,32 +148,32 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
|
||||
settings.setJavaScriptEnabled(true);
|
||||
settings.setJavaScriptCanOpenWindowsAutomatically(true);
|
||||
settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
|
||||
|
||||
|
||||
// Set the nav dump for HTC 2.x devices (disabling for ICS, deprecated entirely for Jellybean 4.2)
|
||||
try {
|
||||
Method gingerbread_getMethod = WebSettings.class.getMethod("setNavDump", new Class[] { boolean.class });
|
||||
|
||||
|
||||
String manufacturer = android.os.Build.MANUFACTURER;
|
||||
Log.d(TAG, "CordovaWebView is running on device made by: " + manufacturer);
|
||||
LOG.d(TAG, "CordovaWebView is running on device made by: " + manufacturer);
|
||||
if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.HONEYCOMB &&
|
||||
android.os.Build.MANUFACTURER.contains("HTC"))
|
||||
{
|
||||
gingerbread_getMethod.invoke(settings, true);
|
||||
}
|
||||
} catch (NoSuchMethodException e) {
|
||||
Log.d(TAG, "We are on a modern version of Android, we will deprecate HTC 2.3 devices in 2.8");
|
||||
LOG.d(TAG, "We are on a modern version of Android, we will deprecate HTC 2.3 devices in 2.8");
|
||||
} catch (IllegalArgumentException e) {
|
||||
Log.d(TAG, "Doing the NavDump failed with bad arguments");
|
||||
LOG.d(TAG, "Doing the NavDump failed with bad arguments");
|
||||
} catch (IllegalAccessException e) {
|
||||
Log.d(TAG, "This should never happen: IllegalAccessException means this isn't Android anymore");
|
||||
LOG.d(TAG, "This should never happen: IllegalAccessException means this isn't Android anymore");
|
||||
} catch (InvocationTargetException e) {
|
||||
Log.d(TAG, "This should never happen: InvocationTargetException means this isn't Android anymore.");
|
||||
LOG.d(TAG, "This should never happen: InvocationTargetException means this isn't Android anymore.");
|
||||
}
|
||||
|
||||
//We don't save any form data in the application
|
||||
settings.setSaveFormData(false);
|
||||
settings.setSavePassword(false);
|
||||
|
||||
|
||||
// Jellybean rightfully tried to lock this down. Too bad they didn't give us a whitelist
|
||||
// while we do this
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN) {
|
||||
@@ -184,15 +187,15 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
|
||||
String databasePath = webView.getContext().getApplicationContext().getDir("database", Context.MODE_PRIVATE).getPath();
|
||||
settings.setDatabaseEnabled(true);
|
||||
settings.setDatabasePath(databasePath);
|
||||
|
||||
|
||||
|
||||
|
||||
//Determine whether we're in debug or release mode, and turn on Debugging!
|
||||
ApplicationInfo appInfo = webView.getContext().getApplicationContext().getApplicationInfo();
|
||||
if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0 &&
|
||||
android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
|
||||
enableRemoteDebugging();
|
||||
}
|
||||
|
||||
|
||||
settings.setGeolocationDatabasePath(databasePath);
|
||||
|
||||
// Enable DOM storage
|
||||
@@ -200,13 +203,13 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
|
||||
|
||||
// Enable built-in geolocation
|
||||
settings.setGeolocationEnabled(true);
|
||||
|
||||
|
||||
// Enable AppCache
|
||||
// Fix for CB-2282
|
||||
settings.setAppCacheMaxSize(5 * 1048576);
|
||||
settings.setAppCachePath(databasePath);
|
||||
settings.setAppCacheEnabled(true);
|
||||
|
||||
|
||||
// Fix for CB-1405
|
||||
// Google issue 4641
|
||||
String defaultUserAgent = settings.getUserAgentString();
|
||||
@@ -222,7 +225,7 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
|
||||
}
|
||||
}
|
||||
// End CB-3360
|
||||
|
||||
|
||||
IntentFilter intentFilter = new IntentFilter();
|
||||
intentFilter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
|
||||
if (this.receiver == null) {
|
||||
@@ -242,18 +245,18 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
|
||||
try {
|
||||
WebView.setWebContentsDebuggingEnabled(true);
|
||||
} catch (IllegalArgumentException e) {
|
||||
Log.d(TAG, "You have one job! To turn on Remote Web Debugging! YOU HAVE FAILED! ");
|
||||
LOG.d(TAG, "You have one job! To turn on Remote Web Debugging! YOU HAVE FAILED! ");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static void exposeJsInterface(WebView webView, CordovaBridge bridge) {
|
||||
if ((Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1)) {
|
||||
Log.i(TAG, "Disabled addJavascriptInterface() bridge since Android version is old.");
|
||||
LOG.i(TAG, "Disabled addJavascriptInterface() bridge since Android version is old.");
|
||||
// Bug being that Java Strings do not get converted to JS strings automatically.
|
||||
// This isn't hard to work-around on the JS side, but it's easier to just
|
||||
// use the prompt bridge instead.
|
||||
return;
|
||||
return;
|
||||
}
|
||||
SystemExposedJsApi exposedJsApi = new SystemExposedJsApi(bridge);
|
||||
webView.addJavascriptInterface(exposedJsApi, "_cordovaNative");
|
||||
@@ -312,8 +315,10 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
|
||||
@Override
|
||||
public void setPaused(boolean value) {
|
||||
if (value) {
|
||||
webView.onPause();
|
||||
webView.pauseTimers();
|
||||
} else {
|
||||
webView.onResume();
|
||||
webView.resumeTimers();
|
||||
}
|
||||
}
|
||||
@@ -327,8 +332,19 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
|
||||
try {
|
||||
webView.getContext().unregisterReceiver(receiver);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Error unregistering configuration receiver: " + e.getMessage(), e);
|
||||
LOG.e(TAG, "Error unregistering configuration receiver: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void evaluateJavascript(String js, ValueCallback<String> callback) {
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
webView.evaluateJavascript(js, callback);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.d(TAG, "This webview is using the old bridge");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
16
node_modules/.bin/nopt
generated
vendored
@@ -1,15 +1 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../nopt/bin/nopt.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../nopt/bin/nopt.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
../nopt/bin/nopt.js
|
||||
7
node_modules/.bin/nopt.cmd
generated
vendored
@@ -1,7 +0,0 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\nopt\bin\nopt.js" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\nopt\bin\nopt.js" %*
|
||||
)
|
||||
16
node_modules/.bin/semver
generated
vendored
@@ -1,15 +1 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../semver/bin/semver" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../semver/bin/semver" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
../semver/bin/semver
|
||||
7
node_modules/.bin/semver.cmd
generated
vendored
@@ -1,7 +0,0 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\semver\bin\semver" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\semver\bin\semver" %*
|
||||
)
|
||||
16
node_modules/.bin/shjs
generated
vendored
@@ -1,15 +1 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../shelljs/bin/shjs" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../shelljs/bin/shjs" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
../shelljs/bin/shjs
|
||||
7
node_modules/.bin/shjs.cmd
generated
vendored
@@ -1,7 +0,0 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\shelljs\bin\shjs" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\shelljs\bin\shjs" %*
|
||||
)
|
||||
4
node_modules/abbrev/.npmignore
generated
vendored
@@ -1,4 +0,0 @@
|
||||
.nyc_output
|
||||
nyc_output
|
||||
node_modules
|
||||
coverage
|
||||
5
node_modules/abbrev/.travis.yml
generated
vendored
@@ -1,5 +0,0 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- '0.10'
|
||||
- '0.12'
|
||||
- 'iojs'
|
||||
3
node_modules/abbrev/CONTRIBUTING.md
generated
vendored
@@ -1,3 +0,0 @@
|
||||
To get started, <a
|
||||
href="http://www.clahub.com/agreements/isaacs/abbrev-js">sign the
|
||||
Contributor License Agreement</a>.
|
||||
61
node_modules/abbrev/package.json
generated
vendored
@@ -1,41 +1,55 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"abbrev@1",
|
||||
"D:\\Cordova\\cordova-android\\node_modules\\nopt"
|
||||
{
|
||||
"raw": "abbrev@1",
|
||||
"scope": null,
|
||||
"escapedName": "abbrev",
|
||||
"name": "abbrev",
|
||||
"rawSpec": "1",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/steveng/repo/cordova/cordova-android/node_modules/nopt"
|
||||
]
|
||||
],
|
||||
"_from": "abbrev@>=1.0.0 <2.0.0",
|
||||
"_id": "abbrev@1.0.7",
|
||||
"_id": "abbrev@1.0.9",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/abbrev",
|
||||
"_nodeVersion": "2.0.1",
|
||||
"_npmUser": {
|
||||
"email": "isaacs@npmjs.com",
|
||||
"name": "isaacs"
|
||||
"_nodeVersion": "4.4.4",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-16-east.internal.npmjs.com",
|
||||
"tmp": "tmp/abbrev-1.0.9.tgz_1466016055839_0.7825860097073019"
|
||||
},
|
||||
"_npmVersion": "2.10.1",
|
||||
"_npmUser": {
|
||||
"name": "isaacs",
|
||||
"email": "i@izs.me"
|
||||
},
|
||||
"_npmVersion": "3.9.1",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "abbrev",
|
||||
"raw": "abbrev@1",
|
||||
"rawSpec": "1",
|
||||
"scope": null,
|
||||
"escapedName": "abbrev",
|
||||
"name": "abbrev",
|
||||
"rawSpec": "1",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/istanbul",
|
||||
"/nopt"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz",
|
||||
"_shasum": "5b6035b2ee9d4fb5cf859f08a9be81b208491843",
|
||||
"_resolved": "http://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz",
|
||||
"_shasum": "91b4792588a7738c25f35dd6f63752a2f8776135",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "abbrev@1",
|
||||
"_where": "D:\\Cordova\\cordova-android\\node_modules\\nopt",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/nopt",
|
||||
"author": {
|
||||
"email": "i@izs.me",
|
||||
"name": "Isaac Z. Schlueter"
|
||||
"name": "Isaac Z. Schlueter",
|
||||
"email": "i@izs.me"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/isaacs/abbrev-js/issues"
|
||||
@@ -43,21 +57,24 @@
|
||||
"dependencies": {},
|
||||
"description": "Like ruby's abbrev module, but in js",
|
||||
"devDependencies": {
|
||||
"tap": "^1.2.0"
|
||||
"tap": "^5.7.2"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "5b6035b2ee9d4fb5cf859f08a9be81b208491843",
|
||||
"tarball": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz"
|
||||
"shasum": "91b4792588a7738c25f35dd6f63752a2f8776135",
|
||||
"tarball": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz"
|
||||
},
|
||||
"gitHead": "821d09ce7da33627f91bbd8ed631497ed6f760c2",
|
||||
"files": [
|
||||
"abbrev.js"
|
||||
],
|
||||
"gitHead": "c386cd9dbb1d8d7581718c54d4ba944cc9298d6f",
|
||||
"homepage": "https://github.com/isaacs/abbrev-js#readme",
|
||||
"license": "ISC",
|
||||
"main": "abbrev.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "i@izs.me",
|
||||
"name": "isaacs"
|
||||
"name": "isaacs",
|
||||
"email": "i@izs.me"
|
||||
}
|
||||
],
|
||||
"name": "abbrev",
|
||||
@@ -70,5 +87,5 @@
|
||||
"scripts": {
|
||||
"test": "tap test.js --cov"
|
||||
},
|
||||
"version": "1.0.7"
|
||||
"version": "1.0.9"
|
||||
}
|
||||
|
||||
47
node_modules/abbrev/test.js
generated
vendored
@@ -1,47 +0,0 @@
|
||||
var abbrev = require('./abbrev.js')
|
||||
var assert = require("assert")
|
||||
var util = require("util")
|
||||
|
||||
console.log("TAP version 13")
|
||||
var count = 0
|
||||
|
||||
function test (list, expect) {
|
||||
count++
|
||||
var actual = abbrev(list)
|
||||
assert.deepEqual(actual, expect,
|
||||
"abbrev("+util.inspect(list)+") === " + util.inspect(expect) + "\n"+
|
||||
"actual: "+util.inspect(actual))
|
||||
actual = abbrev.apply(exports, list)
|
||||
assert.deepEqual(abbrev.apply(exports, list), expect,
|
||||
"abbrev("+list.map(JSON.stringify).join(",")+") === " + util.inspect(expect) + "\n"+
|
||||
"actual: "+util.inspect(actual))
|
||||
console.log('ok - ' + list.join(' '))
|
||||
}
|
||||
|
||||
test([ "ruby", "ruby", "rules", "rules", "rules" ],
|
||||
{ rub: 'ruby'
|
||||
, ruby: 'ruby'
|
||||
, rul: 'rules'
|
||||
, rule: 'rules'
|
||||
, rules: 'rules'
|
||||
})
|
||||
test(["fool", "foom", "pool", "pope"],
|
||||
{ fool: 'fool'
|
||||
, foom: 'foom'
|
||||
, poo: 'pool'
|
||||
, pool: 'pool'
|
||||
, pop: 'pope'
|
||||
, pope: 'pope'
|
||||
})
|
||||
test(["a", "ab", "abc", "abcd", "abcde", "acde"],
|
||||
{ a: 'a'
|
||||
, ab: 'ab'
|
||||
, abc: 'abc'
|
||||
, abcd: 'abcd'
|
||||
, abcde: 'abcde'
|
||||
, ac: 'acde'
|
||||
, acd: 'acde'
|
||||
, acde: 'acde'
|
||||
})
|
||||
|
||||
console.log("1..%d", count)
|
||||
35
node_modules/ansi/package.json
generated
vendored
@@ -1,8 +1,16 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"ansi@^0.3.1",
|
||||
"D:\\Cordova\\cordova-android\\node_modules\\cordova-common"
|
||||
{
|
||||
"raw": "ansi@^0.3.1",
|
||||
"scope": null,
|
||||
"escapedName": "ansi",
|
||||
"name": "ansi",
|
||||
"rawSpec": "^0.3.1",
|
||||
"spec": ">=0.3.1 <0.4.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common"
|
||||
]
|
||||
],
|
||||
"_from": "ansi@>=0.3.1 <0.4.0",
|
||||
@@ -12,30 +20,31 @@
|
||||
"_location": "/ansi",
|
||||
"_nodeVersion": "5.3.0",
|
||||
"_npmUser": {
|
||||
"email": "nathan@tootallnate.net",
|
||||
"name": "tootallnate"
|
||||
"name": "tootallnate",
|
||||
"email": "nathan@tootallnate.net"
|
||||
},
|
||||
"_npmVersion": "3.3.12",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "ansi",
|
||||
"raw": "ansi@^0.3.1",
|
||||
"rawSpec": "^0.3.1",
|
||||
"scope": null,
|
||||
"escapedName": "ansi",
|
||||
"name": "ansi",
|
||||
"rawSpec": "^0.3.1",
|
||||
"spec": ">=0.3.1 <0.4.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/cordova-common"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz",
|
||||
"_resolved": "http://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz",
|
||||
"_shasum": "0c42d4fb17160d5a9af1e484bace1c66922c1b21",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "ansi@^0.3.1",
|
||||
"_where": "D:\\Cordova\\cordova-android\\node_modules\\cordova-common",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
|
||||
"author": {
|
||||
"email": "nathan@tootallnate.net",
|
||||
"name": "Nathan Rajlich",
|
||||
"email": "nathan@tootallnate.net",
|
||||
"url": "http://tootallnate.net"
|
||||
},
|
||||
"bugs": {
|
||||
@@ -65,12 +74,12 @@
|
||||
"main": "./lib/ansi.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "nathan@tootallnate.net",
|
||||
"name": "TooTallNate"
|
||||
"name": "TooTallNate",
|
||||
"email": "nathan@tootallnate.net"
|
||||
},
|
||||
{
|
||||
"email": "nathan@tootallnate.net",
|
||||
"name": "tootallnate"
|
||||
"name": "tootallnate",
|
||||
"email": "nathan@tootallnate.net"
|
||||
}
|
||||
],
|
||||
"name": "ansi",
|
||||
|
||||
4
node_modules/balanced-match/README.md
generated
vendored
@@ -47,7 +47,7 @@ object with those keys:
|
||||
|
||||
If there's no match, `undefined` will be returned.
|
||||
|
||||
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']`.
|
||||
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
|
||||
|
||||
### var r = balanced.range(a, b, str)
|
||||
|
||||
@@ -56,7 +56,7 @@ array with indexes: `[ <a index>, <b index> ]`.
|
||||
|
||||
If there's no match, `undefined` will be returned.
|
||||
|
||||
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]`.
|
||||
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.
|
||||
|
||||
## Installation
|
||||
|
||||
|
||||
2
node_modules/balanced-match/index.js
generated
vendored
@@ -30,7 +30,7 @@ function range(a, b, str) {
|
||||
begs = [];
|
||||
left = str.length;
|
||||
|
||||
while (i < str.length && i >= 0 && ! result) {
|
||||
while (i >= 0 && !result) {
|
||||
if (i == ai) {
|
||||
begs.push(i);
|
||||
ai = str.indexOf(a, i + 1);
|
||||
|
||||
57
node_modules/balanced-match/package.json
generated
vendored
@@ -1,45 +1,54 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"balanced-match@^0.4.1",
|
||||
"D:\\Cordova\\cordova-android\\node_modules\\brace-expansion"
|
||||
{
|
||||
"raw": "balanced-match@^0.4.1",
|
||||
"scope": null,
|
||||
"escapedName": "balanced-match",
|
||||
"name": "balanced-match",
|
||||
"rawSpec": "^0.4.1",
|
||||
"spec": ">=0.4.1 <0.5.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/steveng/repo/cordova/cordova-android/node_modules/brace-expansion"
|
||||
]
|
||||
],
|
||||
"_from": "balanced-match@>=0.4.1 <0.5.0",
|
||||
"_id": "balanced-match@0.4.1",
|
||||
"_id": "balanced-match@0.4.2",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/balanced-match",
|
||||
"_nodeVersion": "6.0.0",
|
||||
"_nodeVersion": "4.4.7",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/balanced-match-0.4.1.tgz_1462129663650_0.39764496590942144"
|
||||
"host": "packages-16-east.internal.npmjs.com",
|
||||
"tmp": "tmp/balanced-match-0.4.2.tgz_1468834991581_0.6590619895141572"
|
||||
},
|
||||
"_npmUser": {
|
||||
"email": "julian@juliangruber.com",
|
||||
"name": "juliangruber"
|
||||
"name": "juliangruber",
|
||||
"email": "julian@juliangruber.com"
|
||||
},
|
||||
"_npmVersion": "3.8.6",
|
||||
"_npmVersion": "2.15.8",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "balanced-match",
|
||||
"raw": "balanced-match@^0.4.1",
|
||||
"rawSpec": "^0.4.1",
|
||||
"scope": null,
|
||||
"escapedName": "balanced-match",
|
||||
"name": "balanced-match",
|
||||
"rawSpec": "^0.4.1",
|
||||
"spec": ">=0.4.1 <0.5.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/brace-expansion"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz",
|
||||
"_shasum": "19053e2e0748eadb379da6c09d455cf5e1039335",
|
||||
"_resolved": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz",
|
||||
"_shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "balanced-match@^0.4.1",
|
||||
"_where": "D:\\Cordova\\cordova-android\\node_modules\\brace-expansion",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/brace-expansion",
|
||||
"author": {
|
||||
"email": "mail@juliangruber.com",
|
||||
"name": "Julian Gruber",
|
||||
"email": "mail@juliangruber.com",
|
||||
"url": "http://juliangruber.com"
|
||||
},
|
||||
"bugs": {
|
||||
@@ -48,14 +57,14 @@
|
||||
"dependencies": {},
|
||||
"description": "Match balanced character pairs, like \"{\" and \"}\"",
|
||||
"devDependencies": {
|
||||
"tape": "~4.5.0"
|
||||
"tape": "^4.6.0"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "19053e2e0748eadb379da6c09d455cf5e1039335",
|
||||
"tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz"
|
||||
"shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838",
|
||||
"tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz"
|
||||
},
|
||||
"gitHead": "7004b289baaaab6a832f4901735e29d37cc2a863",
|
||||
"gitHead": "57c2ea29d89a2844ae3bdcc637c6e2cbb73725e2",
|
||||
"homepage": "https://github.com/juliangruber/balanced-match",
|
||||
"keywords": [
|
||||
"match",
|
||||
@@ -68,8 +77,8 @@
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "julian@juliangruber.com",
|
||||
"name": "juliangruber"
|
||||
"name": "juliangruber",
|
||||
"email": "julian@juliangruber.com"
|
||||
}
|
||||
],
|
||||
"name": "balanced-match",
|
||||
@@ -83,6 +92,7 @@
|
||||
"test": "make test"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": [
|
||||
"ie/8..latest",
|
||||
"firefox/20..latest",
|
||||
@@ -95,8 +105,7 @@
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest",
|
||||
"android-browser/4.2..latest"
|
||||
],
|
||||
"files": "test/*.js"
|
||||
]
|
||||
},
|
||||
"version": "0.4.1"
|
||||
"version": "0.4.2"
|
||||
}
|
||||
|
||||
41
node_modules/base64-js/package.json
generated
vendored
@@ -1,8 +1,16 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"base64-js@0.0.8",
|
||||
"D:\\Cordova\\cordova-android\\node_modules\\plist"
|
||||
{
|
||||
"raw": "base64-js@0.0.8",
|
||||
"scope": null,
|
||||
"escapedName": "base64-js",
|
||||
"name": "base64-js",
|
||||
"rawSpec": "0.0.8",
|
||||
"spec": "0.0.8",
|
||||
"type": "version"
|
||||
},
|
||||
"/Users/steveng/repo/cordova/cordova-android/node_modules/plist"
|
||||
]
|
||||
],
|
||||
"_from": "base64-js@0.0.8",
|
||||
@@ -12,30 +20,31 @@
|
||||
"_location": "/base64-js",
|
||||
"_nodeVersion": "0.10.35",
|
||||
"_npmUser": {
|
||||
"email": "feross@feross.org",
|
||||
"name": "feross"
|
||||
"name": "feross",
|
||||
"email": "feross@feross.org"
|
||||
},
|
||||
"_npmVersion": "2.1.16",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "base64-js",
|
||||
"raw": "base64-js@0.0.8",
|
||||
"rawSpec": "0.0.8",
|
||||
"scope": null,
|
||||
"escapedName": "base64-js",
|
||||
"name": "base64-js",
|
||||
"rawSpec": "0.0.8",
|
||||
"spec": "0.0.8",
|
||||
"type": "version"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/plist"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz",
|
||||
"_resolved": "http://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz",
|
||||
"_shasum": "1101e9544f4a76b1bc3b26d452ca96d7a35e7978",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "base64-js@0.0.8",
|
||||
"_where": "D:\\Cordova\\cordova-android\\node_modules\\plist",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/plist",
|
||||
"author": {
|
||||
"email": "t.jameson.little@gmail.com",
|
||||
"name": "T. Jameson Little"
|
||||
"name": "T. Jameson Little",
|
||||
"email": "t.jameson.little@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/beatgammit/base64-js/issues"
|
||||
@@ -59,12 +68,12 @@
|
||||
"main": "lib/b64.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "t.jameson.little@gmail.com",
|
||||
"name": "beatgammit"
|
||||
"name": "beatgammit",
|
||||
"email": "t.jameson.little@gmail.com"
|
||||
},
|
||||
{
|
||||
"email": "feross@feross.org",
|
||||
"name": "feross"
|
||||
"name": "feross",
|
||||
"email": "feross@feross.org"
|
||||
}
|
||||
],
|
||||
"name": "base64-js",
|
||||
@@ -78,6 +87,7 @@
|
||||
"test": "tape test/*.js"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": [
|
||||
"ie/6..latest",
|
||||
"chrome/4..latest",
|
||||
@@ -86,8 +96,7 @@
|
||||
"opera/11.0..latest",
|
||||
"iphone/6",
|
||||
"ipad/6"
|
||||
],
|
||||
"files": "test/*.js"
|
||||
]
|
||||
},
|
||||
"version": "0.0.8"
|
||||
}
|
||||
|
||||
17
node_modules/big-integer/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/.travis.yml
|
||||
/.npmignore
|
||||
/.gitignore
|
||||
/spec
|
||||
/benchmark
|
||||
/big-integer*.tgz
|
||||
/my.conf.js
|
||||
/node_modules
|
||||
/*.csproj*
|
||||
/*.sh
|
||||
/*.suo
|
||||
/bin
|
||||
/coverage
|
||||
/*.bat
|
||||
/obj
|
||||
/Properties
|
||||
/Web.*
|
||||
24
node_modules/big-integer/BigInteger.js
generated
vendored
@@ -301,7 +301,7 @@ var bigInt = (function (undefined) {
|
||||
|
||||
function multiplyKaratsuba(x, y) {
|
||||
var n = Math.max(x.length, y.length);
|
||||
|
||||
|
||||
if (n <= 30) return multiplyLong(x, y);
|
||||
n = Math.ceil(n / 2);
|
||||
|
||||
@@ -822,6 +822,24 @@ var bigInt = (function (undefined) {
|
||||
};
|
||||
SmallInteger.prototype.isProbablePrime = BigInteger.prototype.isProbablePrime;
|
||||
|
||||
BigInteger.prototype.modInv = function (n) {
|
||||
var t = bigInt.zero, newT = bigInt.one, r = parseValue(n), newR = this.abs(), q, lastT, lastR;
|
||||
while (!newR.equals(bigInt.zero)) {
|
||||
q = r.divide(newR);
|
||||
lastT = t;
|
||||
lastR = r;
|
||||
t = newT;
|
||||
r = newR;
|
||||
newT = lastT.subtract(q.multiply(newT));
|
||||
newR = lastR.subtract(q.multiply(newR));
|
||||
}
|
||||
if (t.compare(0) === -1) {
|
||||
t = t.add(n);
|
||||
}
|
||||
return t;
|
||||
}
|
||||
SmallInteger.prototype.modInv = BigInteger.prototype.modInv;
|
||||
|
||||
BigInteger.prototype.next = function () {
|
||||
var value = this.value;
|
||||
if (this.sign) {
|
||||
@@ -1114,7 +1132,7 @@ var bigInt = (function (undefined) {
|
||||
return this.value;
|
||||
};
|
||||
SmallInteger.prototype.toJSNumber = SmallInteger.prototype.valueOf;
|
||||
|
||||
|
||||
function parseStringValue(v) {
|
||||
if (isPrecise(+v)) {
|
||||
var x = +v;
|
||||
@@ -1153,7 +1171,7 @@ var bigInt = (function (undefined) {
|
||||
trim(r);
|
||||
return new BigInteger(r, sign);
|
||||
}
|
||||
|
||||
|
||||
function parseNumberValue(v) {
|
||||
if (isPrecise(v)) {
|
||||
if (v !== truncate(v)) throw new Error(v + " is not an integer.");
|
||||
|
||||
34
node_modules/big-integer/BigInteger.min.js
generated
vendored
24
node_modules/big-integer/LICENSE
generated
vendored
@@ -1,24 +0,0 @@
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please refer to <http://unlicense.org>
|
||||
7
node_modules/big-integer/README.md
generated
vendored
@@ -280,6 +280,13 @@ Performs division and returns the remainder, disregarding the quotient. The sign
|
||||
|
||||
[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division)
|
||||
|
||||
#### `modInv(mod)`
|
||||
|
||||
Finds the [multiplicative inverse](https://en.wikipedia.org/wiki/Modular_multiplicative_inverse) of the number modulo `mod`.
|
||||
|
||||
- `bigInt(3).modInv(11)` => `4`
|
||||
- `bigInt(42).modInv(2017)` => `1969`
|
||||
|
||||
#### `modPow(exp, mod)`
|
||||
|
||||
Takes the number to the power `exp` modulo `mod`.
|
||||
|
||||
30
node_modules/big-integer/bower.json
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "big-integer",
|
||||
"description": "An arbitrary length integer library for Javascript",
|
||||
"main": "./BigInteger.js",
|
||||
"authors": [
|
||||
"Peter Olson"
|
||||
],
|
||||
"license": "Unlicense",
|
||||
"keywords": [
|
||||
"math",
|
||||
"big",
|
||||
"bignum",
|
||||
"bigint",
|
||||
"biginteger",
|
||||
"integer",
|
||||
"arbitrary",
|
||||
"precision",
|
||||
"arithmetic"
|
||||
],
|
||||
"homepage": "https://github.com/peterolson/BigInteger.js",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"coverage",
|
||||
"spec",
|
||||
"tests"
|
||||
]
|
||||
}
|
||||
53
node_modules/big-integer/package.json
generated
vendored
@@ -1,45 +1,54 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"big-integer@^1.6.7",
|
||||
"D:\\Cordova\\cordova-android\\node_modules\\bplist-parser"
|
||||
{
|
||||
"raw": "big-integer@^1.6.7",
|
||||
"scope": null,
|
||||
"escapedName": "big-integer",
|
||||
"name": "big-integer",
|
||||
"rawSpec": "^1.6.7",
|
||||
"spec": ">=1.6.7 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/steveng/repo/cordova/cordova-android/node_modules/bplist-parser"
|
||||
]
|
||||
],
|
||||
"_from": "big-integer@>=1.6.7 <2.0.0",
|
||||
"_id": "big-integer@1.6.15",
|
||||
"_id": "big-integer@1.6.16",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/big-integer",
|
||||
"_nodeVersion": "0.12.3",
|
||||
"_nodeVersion": "4.4.5",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/big-integer-1.6.15.tgz_1460079231162_0.7087579960934818"
|
||||
"host": "packages-16-east.internal.npmjs.com",
|
||||
"tmp": "tmp/big-integer-1.6.16.tgz_1473665148825_0.5824211346916854"
|
||||
},
|
||||
"_npmUser": {
|
||||
"email": "peter.e.c.olson+npm@gmail.com",
|
||||
"name": "peterolson"
|
||||
"name": "peterolson",
|
||||
"email": "peter.e.c.olson+npm@gmail.com"
|
||||
},
|
||||
"_npmVersion": "2.9.1",
|
||||
"_npmVersion": "2.15.5",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "big-integer",
|
||||
"raw": "big-integer@^1.6.7",
|
||||
"rawSpec": "^1.6.7",
|
||||
"scope": null,
|
||||
"escapedName": "big-integer",
|
||||
"name": "big-integer",
|
||||
"rawSpec": "^1.6.7",
|
||||
"spec": ">=1.6.7 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/bplist-parser"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.15.tgz",
|
||||
"_shasum": "33d27d3b7388dfcc4b86d3130c10740cec01fb9e",
|
||||
"_resolved": "http://registry.npmjs.org/big-integer/-/big-integer-1.6.16.tgz",
|
||||
"_shasum": "0ca30b58013db46b10084a09242ca1d8954724cc",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "big-integer@^1.6.7",
|
||||
"_where": "D:\\Cordova\\cordova-android\\node_modules\\bplist-parser",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/bplist-parser",
|
||||
"author": {
|
||||
"email": "peter.e.c.olson+npm@gmail.com",
|
||||
"name": "Peter Olson"
|
||||
"name": "Peter Olson",
|
||||
"email": "peter.e.c.olson+npm@gmail.com"
|
||||
},
|
||||
"bin": {},
|
||||
"bugs": {
|
||||
@@ -59,13 +68,13 @@
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "33d27d3b7388dfcc4b86d3130c10740cec01fb9e",
|
||||
"tarball": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.15.tgz"
|
||||
"shasum": "0ca30b58013db46b10084a09242ca1d8954724cc",
|
||||
"tarball": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.16.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
},
|
||||
"gitHead": "cda5bcce74c3a4eb34951201d50c1b8776a56eca",
|
||||
"gitHead": "09b50ab4e701a2ec4d403fa3ecf12ae327227190",
|
||||
"homepage": "https://github.com/peterolson/BigInteger.js#readme",
|
||||
"keywords": [
|
||||
"math",
|
||||
@@ -82,8 +91,8 @@
|
||||
"main": "./BigInteger",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "peter.e.c.olson+npm@gmail.com",
|
||||
"name": "peterolson"
|
||||
"name": "peterolson",
|
||||
"email": "peter.e.c.olson+npm@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "big-integer",
|
||||
@@ -96,5 +105,5 @@
|
||||
"scripts": {
|
||||
"test": "karma start my.conf.js"
|
||||
},
|
||||
"version": "1.6.15"
|
||||
"version": "1.6.16"
|
||||
}
|
||||
|
||||
33
node_modules/bplist-parser/package.json
generated
vendored
@@ -1,8 +1,16 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"bplist-parser@^0.1.0",
|
||||
"D:\\Cordova\\cordova-android\\node_modules\\cordova-common"
|
||||
{
|
||||
"raw": "bplist-parser@^0.1.0",
|
||||
"scope": null,
|
||||
"escapedName": "bplist-parser",
|
||||
"name": "bplist-parser",
|
||||
"rawSpec": "^0.1.0",
|
||||
"spec": ">=0.1.0 <0.2.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common"
|
||||
]
|
||||
],
|
||||
"_from": "bplist-parser@>=0.1.0 <0.2.0",
|
||||
@@ -12,30 +20,31 @@
|
||||
"_location": "/bplist-parser",
|
||||
"_nodeVersion": "5.1.0",
|
||||
"_npmUser": {
|
||||
"email": "joe@fernsroth.com",
|
||||
"name": "joeferner"
|
||||
"name": "joeferner",
|
||||
"email": "joe@fernsroth.com"
|
||||
},
|
||||
"_npmVersion": "3.4.0",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "bplist-parser",
|
||||
"raw": "bplist-parser@^0.1.0",
|
||||
"rawSpec": "^0.1.0",
|
||||
"scope": null,
|
||||
"escapedName": "bplist-parser",
|
||||
"name": "bplist-parser",
|
||||
"rawSpec": "^0.1.0",
|
||||
"spec": ">=0.1.0 <0.2.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/cordova-common"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz",
|
||||
"_resolved": "http://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz",
|
||||
"_shasum": "d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "bplist-parser@^0.1.0",
|
||||
"_where": "D:\\Cordova\\cordova-android\\node_modules\\cordova-common",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
|
||||
"author": {
|
||||
"email": "joe.ferner@nearinfinity.com",
|
||||
"name": "Joe Ferner"
|
||||
"name": "Joe Ferner",
|
||||
"email": "joe.ferner@nearinfinity.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/nearinfinity/node-bplist-parser/issues"
|
||||
@@ -63,8 +72,8 @@
|
||||
"main": "bplistParser.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "joe@fernsroth.com",
|
||||
"name": "joeferner"
|
||||
"name": "joeferner",
|
||||
"email": "joe@fernsroth.com"
|
||||
}
|
||||
],
|
||||
"name": "bplist-parser",
|
||||
|
||||
3
node_modules/brace-expansion/.npmignore
generated
vendored
@@ -1,3 +0,0 @@
|
||||
test
|
||||
.gitignore
|
||||
.travis.yml
|
||||
8
node_modules/brace-expansion/example.js
generated
vendored
@@ -1,8 +0,0 @@
|
||||
var expand = require('./');
|
||||
|
||||
console.log(expand('http://any.org/archive{1996..1999}/vol{1..4}/part{a,b,c}.html'));
|
||||
console.log(expand('http://www.numericals.com/file{1..100..10}.txt'));
|
||||
console.log(expand('http://www.letters.com/file{a..z..2}.txt'));
|
||||
console.log(expand('mkdir /usr/local/src/bash/{old,new,dist,bugs}'));
|
||||
console.log(expand('chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}'));
|
||||
|
||||
10
node_modules/brace-expansion/index.js
generated
vendored
@@ -66,6 +66,16 @@ function expandTop(str) {
|
||||
if (!str)
|
||||
return [];
|
||||
|
||||
// I don't know why Bash 4.3 does this, but it does.
|
||||
// Anything starting with {} will have the first two bytes preserved
|
||||
// but *only* at the top level, so {},a}b will not expand to anything,
|
||||
// but a{},b}c will be expanded to [a}c,abc].
|
||||
// One could argue that this is a bug in Bash, but since the goal of
|
||||
// this module is to match Bash's rules, we escape a leading {}
|
||||
if (str.substr(0, 2) === '{}') {
|
||||
str = '\\{\\}' + str.substr(2);
|
||||
}
|
||||
|
||||
return expand(escapeBraces(str), true).map(unescapeBraces);
|
||||
}
|
||||
|
||||
|
||||
61
node_modules/brace-expansion/package.json
generated
vendored
@@ -1,45 +1,54 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"brace-expansion@^1.0.0",
|
||||
"D:\\Cordova\\cordova-android\\node_modules\\minimatch"
|
||||
{
|
||||
"raw": "brace-expansion@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "brace-expansion",
|
||||
"name": "brace-expansion",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/steveng/repo/cordova/cordova-android/node_modules/minimatch"
|
||||
]
|
||||
],
|
||||
"_from": "brace-expansion@>=1.0.0 <2.0.0",
|
||||
"_id": "brace-expansion@1.1.4",
|
||||
"_id": "brace-expansion@1.1.6",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/brace-expansion",
|
||||
"_nodeVersion": "6.0.0",
|
||||
"_nodeVersion": "4.4.7",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/brace-expansion-1.1.4.tgz_1462130058897_0.14984136167913675"
|
||||
"host": "packages-16-east.internal.npmjs.com",
|
||||
"tmp": "tmp/brace-expansion-1.1.6.tgz_1469047715600_0.9362958471756428"
|
||||
},
|
||||
"_npmUser": {
|
||||
"email": "julian@juliangruber.com",
|
||||
"name": "juliangruber"
|
||||
"name": "juliangruber",
|
||||
"email": "julian@juliangruber.com"
|
||||
},
|
||||
"_npmVersion": "3.8.6",
|
||||
"_npmVersion": "2.15.8",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "brace-expansion",
|
||||
"raw": "brace-expansion@^1.0.0",
|
||||
"rawSpec": "^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "brace-expansion",
|
||||
"name": "brace-expansion",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/minimatch"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.4.tgz",
|
||||
"_shasum": "464a204c77f482c085c2a36c456bbfbafb67a127",
|
||||
"_resolved": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz",
|
||||
"_shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "brace-expansion@^1.0.0",
|
||||
"_where": "D:\\Cordova\\cordova-android\\node_modules\\minimatch",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/minimatch",
|
||||
"author": {
|
||||
"email": "mail@juliangruber.com",
|
||||
"name": "Julian Gruber",
|
||||
"email": "mail@juliangruber.com",
|
||||
"url": "http://juliangruber.com"
|
||||
},
|
||||
"bugs": {
|
||||
@@ -51,26 +60,26 @@
|
||||
},
|
||||
"description": "Brace expansion as known from sh/bash",
|
||||
"devDependencies": {
|
||||
"tape": "4.5.1"
|
||||
"tape": "^4.6.0"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "464a204c77f482c085c2a36c456bbfbafb67a127",
|
||||
"tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.4.tgz"
|
||||
"shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9",
|
||||
"tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz"
|
||||
},
|
||||
"gitHead": "1660b75d0bf03b022e7888b576cd5a4080692c1d",
|
||||
"gitHead": "791262fa06625e9c5594cde529a21d82086af5f2",
|
||||
"homepage": "https://github.com/juliangruber/brace-expansion",
|
||||
"keywords": [],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "julian@juliangruber.com",
|
||||
"name": "juliangruber"
|
||||
"name": "juliangruber",
|
||||
"email": "julian@juliangruber.com"
|
||||
},
|
||||
{
|
||||
"email": "isaacs@npmjs.com",
|
||||
"name": "isaacs"
|
||||
"name": "isaacs",
|
||||
"email": "isaacs@npmjs.com"
|
||||
}
|
||||
],
|
||||
"name": "brace-expansion",
|
||||
@@ -85,6 +94,7 @@
|
||||
"test": "tape test/*.js"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": [
|
||||
"ie/8..latest",
|
||||
"firefox/20..latest",
|
||||
@@ -97,8 +107,7 @@
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest",
|
||||
"android-browser/4.2..latest"
|
||||
],
|
||||
"files": "test/*.js"
|
||||
]
|
||||
},
|
||||
"version": "1.1.4"
|
||||
"version": "1.1.6"
|
||||
}
|
||||
|
||||
57
node_modules/concat-map/package.json
generated
vendored
@@ -1,8 +1,16 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"concat-map@0.0.1",
|
||||
"D:\\Cordova\\cordova-android\\node_modules\\brace-expansion"
|
||||
{
|
||||
"raw": "concat-map@0.0.1",
|
||||
"scope": null,
|
||||
"escapedName": "concat-map",
|
||||
"name": "concat-map",
|
||||
"rawSpec": "0.0.1",
|
||||
"spec": "0.0.1",
|
||||
"type": "version"
|
||||
},
|
||||
"/Users/steveng/repo/cordova/cordova-android/node_modules/brace-expansion"
|
||||
]
|
||||
],
|
||||
"_from": "concat-map@0.0.1",
|
||||
@@ -11,30 +19,31 @@
|
||||
"_installable": true,
|
||||
"_location": "/concat-map",
|
||||
"_npmUser": {
|
||||
"email": "mail@substack.net",
|
||||
"name": "substack"
|
||||
"name": "substack",
|
||||
"email": "mail@substack.net"
|
||||
},
|
||||
"_npmVersion": "1.3.21",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "concat-map",
|
||||
"raw": "concat-map@0.0.1",
|
||||
"rawSpec": "0.0.1",
|
||||
"scope": null,
|
||||
"escapedName": "concat-map",
|
||||
"name": "concat-map",
|
||||
"rawSpec": "0.0.1",
|
||||
"spec": "0.0.1",
|
||||
"type": "version"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/brace-expansion"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"_resolved": "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "concat-map@0.0.1",
|
||||
"_where": "D:\\Cordova\\cordova-android\\node_modules\\brace-expansion",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/brace-expansion",
|
||||
"author": {
|
||||
"email": "mail@substack.net",
|
||||
"name": "James Halliday",
|
||||
"email": "mail@substack.net",
|
||||
"url": "http://substack.net"
|
||||
},
|
||||
"bugs": {
|
||||
@@ -65,8 +74,8 @@
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "mail@substack.net",
|
||||
"name": "substack"
|
||||
"name": "substack",
|
||||
"email": "mail@substack.net"
|
||||
}
|
||||
],
|
||||
"name": "concat-map",
|
||||
@@ -80,30 +89,30 @@
|
||||
"test": "tape test/*.js"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": {
|
||||
"chrome": [
|
||||
10,
|
||||
22
|
||||
],
|
||||
"ff": [
|
||||
3.5,
|
||||
10,
|
||||
15
|
||||
],
|
||||
"ie": [
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9
|
||||
],
|
||||
"opera": [
|
||||
12
|
||||
"ff": [
|
||||
3.5,
|
||||
10,
|
||||
15
|
||||
],
|
||||
"chrome": [
|
||||
10,
|
||||
22
|
||||
],
|
||||
"safari": [
|
||||
5.1
|
||||
],
|
||||
"opera": [
|
||||
12
|
||||
]
|
||||
},
|
||||
"files": "test/*.js"
|
||||
}
|
||||
},
|
||||
"version": "0.0.1"
|
||||
}
|
||||
|
||||
14
node_modules/cordova-common/README.md
generated
vendored
@@ -28,7 +28,7 @@ Expoeses shared functionality used by [cordova-lib](https://github.com/apache/co
|
||||
Represents special instance of NodeJS EventEmitter which is intended to be used to post events to cordova-lib and cordova-cli
|
||||
|
||||
Usage:
|
||||
```
|
||||
```js
|
||||
var events = require('cordova-common').events;
|
||||
events.emit('warn', 'Some warning message')
|
||||
```
|
||||
@@ -41,7 +41,7 @@ An error class used by Cordova to throw cordova-specific errors. The CordovaErro
|
||||
|
||||
Usage:
|
||||
|
||||
```
|
||||
```js
|
||||
var CordovaError = require('cordova-common').CordovaError;
|
||||
throw new CordovaError('Some error message', SOME_ERR_CODE);
|
||||
```
|
||||
@@ -53,7 +53,7 @@ See [CordovaError](src/CordovaError/CordovaError.js) for supported error codes.
|
||||
Exposes functionality to deal with cordova project `config.xml` files. For ConfigParser API reference check [ConfigParser Readme](src/ConfigParser/README.md).
|
||||
|
||||
Usage:
|
||||
```
|
||||
```js
|
||||
var ConfigParser = require('cordova-common').ConfigParser;
|
||||
var appConfig = new ConfigParser('path/to/cordova-app/config.xml');
|
||||
console.log(appconfig.name() + ':' + appConfig.version());
|
||||
@@ -64,7 +64,7 @@ console.log(appconfig.name() + ':' + appConfig.version());
|
||||
`PluginInfo` is a wrapper for cordova plugins' `plugin.xml` files. This class may be instantiated directly or via `PluginInfoProvider`. The difference is that `PluginInfoProvider` caches `PluginInfo` instances based on plugin source directory.
|
||||
|
||||
Usage:
|
||||
```
|
||||
```js
|
||||
var PluginInfo: require('cordova-common').PluginInfo;
|
||||
var PluginInfoProvider: require('cordova-common').PluginInfoProvider;
|
||||
|
||||
@@ -80,7 +80,7 @@ console.log('The plugin ' + plugin1.id + ' has version ' + plugin1.version)
|
||||
Utility module for dealing with sequential tasks. Provides a set of tasks that are needed to be done and reverts all tasks that are already completed if one of those tasks fail to complete. Used internally by cordova-lib and platform's plugin installation routines.
|
||||
|
||||
Usage:
|
||||
```
|
||||
```js
|
||||
var ActionStack = require('cordova-common').ActionStack;
|
||||
var stack = new ActionStack()
|
||||
|
||||
@@ -104,7 +104,7 @@ stack.process()
|
||||
Module for spawning child processes with some advanced logic.
|
||||
|
||||
Usage:
|
||||
```
|
||||
```js
|
||||
var superspawn = require('cordova-common').superspawn;
|
||||
superspawn.spawn('adb', ['devices'])
|
||||
.progress(function(data){
|
||||
@@ -121,7 +121,7 @@ superspawn.spawn('adb', ['devices'])
|
||||
A set of utility methods for dealing with xml files.
|
||||
|
||||
Usage:
|
||||
```
|
||||
```js
|
||||
var xml = require('cordova-common').xmlHelpers;
|
||||
|
||||
var xmlDoc1 = xml.parseElementtreeSync('some/xml/file');
|
||||
|
||||
23
node_modules/cordova-common/RELEASENOTES.md
generated
vendored
@@ -20,6 +20,29 @@
|
||||
-->
|
||||
# Cordova-common Release Notes
|
||||
|
||||
### 1.5.1 (Oct 12, 2016)
|
||||
* [CB-12002](https://issues.apache.org/jira/browse/CB-12002) Add `getAllowIntents()` to `ConfigParser`
|
||||
* [CB-11998](https://issues.apache.org/jira/browse/CB-11998) `cordova platform add` error with `cordova-common@1.5.0`
|
||||
|
||||
### 1.5.0 (Oct 06, 2016)
|
||||
* [CB-11776](https://issues.apache.org/jira/browse/CB-11776) Add test case for different `edit-config` targets
|
||||
* [CB-11908](https://issues.apache.org/jira/browse/CB-11908) Add `edit-config` to `config.xml`
|
||||
* [CB-11936](https://issues.apache.org/jira/browse/CB-11936) Support four new **App Transport Security (ATS)** keys
|
||||
* update `config.xml` location if it is a **Android Studio** project.
|
||||
* use `array` methods and `object.keys` for iterating. avoiding `for-in` loops
|
||||
* [CB-11517](https://issues.apache.org/jira/browse/CB-11517) Allow `.folder` matches
|
||||
* [CB-11776](https://issues.apache.org/jira/browse/CB-11776) check `edit-config` target exists
|
||||
|
||||
### 1.4.1 (Aug 09, 2016)
|
||||
* Add general purpose `ConfigParser.getAttribute` API
|
||||
* [CB-11653](https://issues.apache.org/jira/browse/CB-11653) moved `findProjectRoot` from `cordova-lib` to `cordova-common`
|
||||
* [CB-11636](https://issues.apache.org/jira/browse/CB-11636) Handle attributes with quotes correctly
|
||||
* [CB-11645](https://issues.apache.org/jira/browse/CB-11645) added check to see if `getEditConfig` exists before trying to use it
|
||||
* [CB-9825](https://issues.apache.org/jira/browse/CB-9825) framework tag spec parsing
|
||||
|
||||
### 1.4.0 (Jul 12, 2016)
|
||||
* [CB-11023](https://issues.apache.org/jira/browse/CB-11023) Add edit-config functionality
|
||||
|
||||
### 1.3.0 (May 12, 2016)
|
||||
* [CB-11259](https://issues.apache.org/jira/browse/CB-11259): Improving prepare and build logging
|
||||
* [CB-11194](https://issues.apache.org/jira/browse/CB-11194) Improve cordova load time
|
||||
|
||||
1
node_modules/cordova-common/cordova-common.js
generated
vendored
@@ -27,6 +27,7 @@ addProperty(module, 'superspawn', './src/superspawn');
|
||||
addProperty(module, 'ActionStack', './src/ActionStack');
|
||||
addProperty(module, 'CordovaError', './src/CordovaError/CordovaError');
|
||||
addProperty(module, 'CordovaLogger', './src/CordovaLogger');
|
||||
addProperty(module, 'CordovaCheck', './src/CordovaCheck');
|
||||
addProperty(module, 'CordovaExternalToolErrorContext', './src/CordovaError/CordovaExternalToolErrorContext');
|
||||
addProperty(module, 'PlatformJson', './src/PlatformJson');
|
||||
addProperty(module, 'ConfigParser', './src/ConfigParser/ConfigParser');
|
||||
|
||||
79
node_modules/cordova-common/package.json
generated
vendored
@@ -1,48 +1,57 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"cordova-common@^1.3.0",
|
||||
"D:\\Cordova\\cordova-android"
|
||||
{
|
||||
"raw": "cordova-common@^1.5.0",
|
||||
"scope": null,
|
||||
"escapedName": "cordova-common",
|
||||
"name": "cordova-common",
|
||||
"rawSpec": "^1.5.0",
|
||||
"spec": ">=1.5.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/steveng/repo/cordova/cordova-android"
|
||||
]
|
||||
],
|
||||
"_from": "cordova-common@>=1.3.0 <2.0.0",
|
||||
"_id": "cordova-common@1.3.0",
|
||||
"_from": "cordova-common@>=1.5.0 <2.0.0",
|
||||
"_id": "cordova-common@1.5.1",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/cordova-common",
|
||||
"_nodeVersion": "5.4.1",
|
||||
"_nodeVersion": "6.6.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-16-east.internal.npmjs.com",
|
||||
"tmp": "tmp/cordova-common-1.3.0.tgz_1464130094288_0.48495062021538615"
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/cordova-common-1.5.1.tgz_1476725179180_0.39604957425035536"
|
||||
},
|
||||
"_npmUser": {
|
||||
"email": "stevengill97@gmail.com",
|
||||
"name": "stevegill"
|
||||
"name": "stevegill",
|
||||
"email": "stevengill97@gmail.com"
|
||||
},
|
||||
"_npmVersion": "3.9.0",
|
||||
"_npmVersion": "3.10.3",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "cordova-common",
|
||||
"raw": "cordova-common@^1.3.0",
|
||||
"rawSpec": "^1.3.0",
|
||||
"raw": "cordova-common@^1.5.0",
|
||||
"scope": null,
|
||||
"spec": ">=1.3.0 <2.0.0",
|
||||
"escapedName": "cordova-common",
|
||||
"name": "cordova-common",
|
||||
"rawSpec": "^1.5.0",
|
||||
"spec": ">=1.5.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-1.3.0.tgz",
|
||||
"_shasum": "f75161f6aa7cef5486fd5d69a3b0a1f628334491",
|
||||
"_resolved": "file:cordova-dist/tools/cordova-common-1.5.1.tgz",
|
||||
"_shasum": "6770de0d6200ad6f94a1abe8939b5bd9ece139e3",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "cordova-common@^1.3.0",
|
||||
"_where": "D:\\Cordova\\cordova-android",
|
||||
"_spec": "cordova-common@^1.5.0",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android",
|
||||
"author": {
|
||||
"name": "Apache Software Foundation"
|
||||
},
|
||||
"bugs": {
|
||||
"email": "dev@cordova.apache.org",
|
||||
"url": "https://issues.apache.org/jira/browse/CB"
|
||||
"url": "https://issues.apache.org/jira/browse/CB",
|
||||
"email": "dev@cordova.apache.org"
|
||||
},
|
||||
"contributors": [],
|
||||
"dependencies": {
|
||||
@@ -70,8 +79,8 @@
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "f75161f6aa7cef5486fd5d69a3b0a1f628334491",
|
||||
"tarball": "https://registry.npmjs.org/cordova-common/-/cordova-common-1.3.0.tgz"
|
||||
"shasum": "6770de0d6200ad6f94a1abe8939b5bd9ece139e3",
|
||||
"tarball": "https://registry.npmjs.org/cordova-common/-/cordova-common-1.5.1.tgz"
|
||||
},
|
||||
"engineStrict": true,
|
||||
"engines": {
|
||||
@@ -81,28 +90,28 @@
|
||||
"main": "cordova-common.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "bowserj@apache.org",
|
||||
"name": "bowserj"
|
||||
"name": "bowserj",
|
||||
"email": "bowserj@apache.org"
|
||||
},
|
||||
{
|
||||
"email": "kotikov.vladimir@gmail.com",
|
||||
"name": "kotikov.vladimir"
|
||||
"name": "kotikov.vladimir",
|
||||
"email": "kotikov.vladimir@gmail.com"
|
||||
},
|
||||
{
|
||||
"email": "purplecabbage@gmail.com",
|
||||
"name": "purplecabbage"
|
||||
"name": "purplecabbage",
|
||||
"email": "purplecabbage@gmail.com"
|
||||
},
|
||||
{
|
||||
"email": "shazron@gmail.com",
|
||||
"name": "shazron"
|
||||
"name": "shazron",
|
||||
"email": "shazron@gmail.com"
|
||||
},
|
||||
{
|
||||
"email": "stevengill97@gmail.com",
|
||||
"name": "stevegill"
|
||||
"name": "stevegill",
|
||||
"email": "stevengill97@gmail.com"
|
||||
},
|
||||
{
|
||||
"email": "npmjs@barhams.info",
|
||||
"name": "timbarham"
|
||||
"name": "timbarham",
|
||||
"email": "npmjs@barhams.info"
|
||||
}
|
||||
],
|
||||
"name": "cordova-common",
|
||||
@@ -118,5 +127,5 @@
|
||||
"jshint": "node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint spec",
|
||||
"test": "npm run jshint && npm run jasmine"
|
||||
},
|
||||
"version": "1.3.0"
|
||||
"version": "1.5.1"
|
||||
}
|
||||
|
||||
243
node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js
generated
vendored
@@ -36,9 +36,11 @@ var fs = require('fs'),
|
||||
et = require('elementtree'),
|
||||
semver = require('semver'),
|
||||
events = require('../events'),
|
||||
ConfigKeeper = require('./ConfigKeeper');
|
||||
ConfigKeeper = require('./ConfigKeeper'),
|
||||
CordovaLogger = require('../CordovaLogger');
|
||||
|
||||
var mungeutil = require('./munge-util');
|
||||
var xml_helpers = require('../util/xml-helpers');
|
||||
|
||||
exports.PlatformMunger = PlatformMunger;
|
||||
|
||||
@@ -95,9 +97,13 @@ function remove_plugin_changes(pluginInfo, is_top_level) {
|
||||
var plugin_vars = is_top_level ?
|
||||
platform_config.installed_plugins[pluginInfo.id] :
|
||||
platform_config.dependent_plugins[pluginInfo.id];
|
||||
var edit_config_changes = null;
|
||||
if(pluginInfo.getEditConfigs) {
|
||||
edit_config_changes = pluginInfo.getEditConfigs(self.platform);
|
||||
}
|
||||
|
||||
// get config munge, aka how did this plugin change various config files
|
||||
var config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars);
|
||||
var config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes);
|
||||
// global munge looks at all plugins' changes to config files
|
||||
var global_munge = platform_config.config_munge;
|
||||
var munge = mungeutil.decrement_munge(global_munge, config_munge);
|
||||
@@ -125,13 +131,111 @@ function remove_plugin_changes(pluginInfo, is_top_level) {
|
||||
|
||||
|
||||
PlatformMunger.prototype.add_plugin_changes = add_plugin_changes;
|
||||
function add_plugin_changes(pluginInfo, plugin_vars, is_top_level, should_increment) {
|
||||
function add_plugin_changes(pluginInfo, plugin_vars, is_top_level, should_increment, plugin_force) {
|
||||
var self = this;
|
||||
var platform_config = self.platformJson.root;
|
||||
|
||||
// get config munge, aka how should this plugin change various config files
|
||||
var config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars);
|
||||
// global munge looks at all plugins' changes to config files
|
||||
var edit_config_changes = null;
|
||||
if(pluginInfo.getEditConfigs) {
|
||||
edit_config_changes = pluginInfo.getEditConfigs(self.platform);
|
||||
}
|
||||
|
||||
var config_munge;
|
||||
|
||||
if (!edit_config_changes || edit_config_changes.length === 0) {
|
||||
// get config munge, aka how should this plugin change various config files
|
||||
config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars);
|
||||
}
|
||||
else {
|
||||
var isConflictingInfo = is_conflicting(edit_config_changes, platform_config.config_munge, self, plugin_force);
|
||||
|
||||
if (isConflictingInfo.conflictWithConfigxml) {
|
||||
throw new Error(pluginInfo.id +
|
||||
' cannot be added. <edit-config> changes in this plugin conflicts with <edit-config> changes in config.xml. Conflicts must be resolved before plugin can be added.');
|
||||
}
|
||||
if (plugin_force) {
|
||||
CordovaLogger.get().log(CordovaLogger.WARN, '--force is used. edit-config will overwrite conflicts if any. Conflicting plugins may not work as expected.');
|
||||
|
||||
// remove conflicting munges
|
||||
var conflict_munge = mungeutil.decrement_munge(platform_config.config_munge, isConflictingInfo.conflictingMunge);
|
||||
for (var conflict_file in conflict_munge.files) {
|
||||
self.apply_file_munge(conflict_file, conflict_munge.files[conflict_file], /* remove = */ true);
|
||||
}
|
||||
|
||||
// force add new munges
|
||||
config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes);
|
||||
}
|
||||
else if(isConflictingInfo.conflictFound) {
|
||||
throw new Error('There was a conflict trying to modify attributes with <edit-config> in plugin ' + pluginInfo.id +
|
||||
'. The conflicting plugin, ' + isConflictingInfo.conflictingPlugin + ', already modified the same attributes. The conflict must be resolved before ' +
|
||||
pluginInfo.id + ' can be added. You may use --force to add the plugin and overwrite the conflicting attributes.');
|
||||
}
|
||||
else {
|
||||
// no conflicts, will handle edit-config
|
||||
config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes);
|
||||
}
|
||||
}
|
||||
|
||||
self = munge_helper(should_increment, self, platform_config, config_munge);
|
||||
|
||||
// Move to installed/dependent_plugins
|
||||
self.platformJson.addPlugin(pluginInfo.id, plugin_vars || {}, is_top_level);
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
// Handle edit-config changes from config.xml
|
||||
PlatformMunger.prototype.add_config_changes = add_config_changes;
|
||||
function add_config_changes(config, should_increment) {
|
||||
var self = this;
|
||||
var platform_config = self.platformJson.root;
|
||||
|
||||
var config_munge;
|
||||
var edit_config_changes = null;
|
||||
if(config.getEditConfigs) {
|
||||
edit_config_changes = config.getEditConfigs(self.platform);
|
||||
}
|
||||
|
||||
if (!edit_config_changes || edit_config_changes.length === 0) {
|
||||
// There are no edit-config changes to add, return here
|
||||
return self;
|
||||
}
|
||||
else {
|
||||
var isConflictingInfo = is_conflicting(edit_config_changes, platform_config.config_munge, self, true /*always force overwrite other edit-config*/);
|
||||
|
||||
if(isConflictingInfo.conflictFound) {
|
||||
var conflict_munge;
|
||||
var conflict_file;
|
||||
|
||||
if (Object.keys(isConflictingInfo.configxmlMunge.files).length !== 0) {
|
||||
// silently remove conflicting config.xml munges so new munges can be added
|
||||
conflict_munge = mungeutil.decrement_munge(platform_config.config_munge, isConflictingInfo.configxmlMunge);
|
||||
for (conflict_file in conflict_munge.files) {
|
||||
self.apply_file_munge(conflict_file, conflict_munge.files[conflict_file], /* remove = */ true);
|
||||
}
|
||||
}
|
||||
if (Object.keys(isConflictingInfo.conflictingMunge.files).length !== 0) {
|
||||
CordovaLogger.get().log(CordovaLogger.WARN, 'Conflict found, edit-config changes from config.xml will overwrite plugin.xml changes');
|
||||
|
||||
// remove conflicting plugin.xml munges
|
||||
conflict_munge = mungeutil.decrement_munge(platform_config.config_munge, isConflictingInfo.conflictingMunge);
|
||||
for (conflict_file in conflict_munge.files) {
|
||||
self.apply_file_munge(conflict_file, conflict_munge.files[conflict_file], /* remove = */ true);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Add config.xml edit-config munges
|
||||
config_munge = self.generate_config_xml_munge(config, edit_config_changes, 'config.xml');
|
||||
}
|
||||
|
||||
self = munge_helper(should_increment, self, platform_config, config_munge);
|
||||
|
||||
// Move to installed/dependent_plugins
|
||||
return self;
|
||||
}
|
||||
|
||||
function munge_helper(should_increment, self, platform_config, config_munge) {
|
||||
// global munge looks at all changes to config files
|
||||
|
||||
// TODO: The should_increment param is only used by cordova-cli and is going away soon.
|
||||
// If should_increment is set to false, avoid modifying the global_munge (use clone)
|
||||
@@ -157,11 +261,10 @@ function add_plugin_changes(pluginInfo, plugin_vars, is_top_level, should_increm
|
||||
});
|
||||
/* jshint loopfunc:false */
|
||||
}
|
||||
|
||||
self.apply_file_munge(file, munge.files[file]);
|
||||
}
|
||||
|
||||
// Move to installed/dependent_plugins
|
||||
self.platformJson.addPlugin(pluginInfo.id, plugin_vars || {}, is_top_level);
|
||||
return self;
|
||||
}
|
||||
|
||||
@@ -182,17 +285,54 @@ function reapply_global_munge () {
|
||||
return self;
|
||||
}
|
||||
|
||||
// generate_plugin_config_munge
|
||||
// Generate the munge object from config.xml
|
||||
PlatformMunger.prototype.generate_config_xml_munge = generate_config_xml_munge;
|
||||
function generate_config_xml_munge(config, edit_config_changes, type) {
|
||||
|
||||
var munge = { files: {} };
|
||||
var changes = edit_config_changes;
|
||||
var id;
|
||||
|
||||
if(!changes) {
|
||||
return munge;
|
||||
}
|
||||
|
||||
if (type === 'config.xml') {
|
||||
id = type;
|
||||
}
|
||||
else {
|
||||
id = config.id;
|
||||
}
|
||||
|
||||
changes.forEach(function(change) {
|
||||
change.xmls.forEach(function(xml) {
|
||||
// 1. stringify each xml
|
||||
var stringified = (new et.ElementTree(xml)).write({xml_declaration:false});
|
||||
// 2. add into munge
|
||||
if (change.mode) {
|
||||
mungeutil.deep_add(munge, change.file, change.target, { xml: stringified, count: 1, mode: change.mode, id: id });
|
||||
}
|
||||
});
|
||||
});
|
||||
return munge;
|
||||
}
|
||||
|
||||
|
||||
// generate_plugin_config_munge
|
||||
// Generate the munge object from plugin.xml + vars
|
||||
PlatformMunger.prototype.generate_plugin_config_munge = generate_plugin_config_munge;
|
||||
function generate_plugin_config_munge(pluginInfo, vars) {
|
||||
function generate_plugin_config_munge(pluginInfo, vars, edit_config_changes) {
|
||||
var self = this;
|
||||
|
||||
vars = vars || {};
|
||||
var munge = { files: {} };
|
||||
var changes = pluginInfo.getConfigFiles(self.platform);
|
||||
|
||||
if(edit_config_changes) {
|
||||
Array.prototype.push.apply(changes, edit_config_changes);
|
||||
}
|
||||
|
||||
// Demux 'package.appxmanifest' into relevant platform-specific appx manifests.
|
||||
// Only spend the cycles if there are version-specific plugin settings
|
||||
if (self.platform === 'windows' &&
|
||||
@@ -291,12 +431,93 @@ function generate_plugin_config_munge(pluginInfo, vars) {
|
||||
});
|
||||
}
|
||||
// 2. add into munge
|
||||
mungeutil.deep_add(munge, change.target, change.parent, { xml: stringified, count: 1, after: change.after });
|
||||
if (change.mode) {
|
||||
if (change.mode !== 'remove') {
|
||||
mungeutil.deep_add(munge, change.file, change.target, { xml: stringified, count: 1, mode: change.mode, plugin: pluginInfo.id });
|
||||
}
|
||||
}
|
||||
else {
|
||||
mungeutil.deep_add(munge, change.target, change.parent, { xml: stringified, count: 1, after: change.after });
|
||||
}
|
||||
});
|
||||
});
|
||||
return munge;
|
||||
}
|
||||
|
||||
function is_conflicting(editchanges, config_munge, self, force) {
|
||||
var files = config_munge.files;
|
||||
var conflictFound = false;
|
||||
var conflictWithConfigxml = false;
|
||||
var conflictingMunge = { files: {} };
|
||||
var configxmlMunge = { files: {} };
|
||||
var conflictingParent;
|
||||
var conflictingPlugin;
|
||||
|
||||
editchanges.forEach(function(editchange) {
|
||||
if (files[editchange.file]) {
|
||||
var parents = files[editchange.file].parents;
|
||||
var target = parents[editchange.target];
|
||||
|
||||
// Check if the edit target will resolve to an existing target
|
||||
if (!target || target.length === 0) {
|
||||
var file_xml = self.config_keeper.get(self.project_dir, self.platform, editchange.file).data;
|
||||
var resolveEditTarget = xml_helpers.resolveParent(file_xml, editchange.target);
|
||||
var resolveTarget;
|
||||
|
||||
if (resolveEditTarget) {
|
||||
for (var parent in parents) {
|
||||
resolveTarget = xml_helpers.resolveParent(file_xml, parent);
|
||||
if (resolveEditTarget === resolveTarget) {
|
||||
conflictingParent = parent;
|
||||
target = parents[parent];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
conflictingParent = editchange.target;
|
||||
}
|
||||
|
||||
if (target && target.length !== 0) {
|
||||
// conflict has been found
|
||||
conflictFound = true;
|
||||
|
||||
if (editchange.id === 'config.xml') {
|
||||
if (target[0].id === 'config.xml') {
|
||||
// Keep track of config.xml/config.xml edit-config conflicts
|
||||
mungeutil.deep_add(configxmlMunge, editchange.file, conflictingParent, target[0]);
|
||||
}
|
||||
else {
|
||||
// Keep track of config.xml x plugin.xml edit-config conflicts
|
||||
mungeutil.deep_add(conflictingMunge, editchange.file, conflictingParent, target[0]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (target[0].id === 'config.xml') {
|
||||
// plugin.xml cannot overwrite config.xml changes even if --force is used
|
||||
conflictWithConfigxml = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (force) {
|
||||
// Need to find all conflicts when --force is used, track conflicting munges
|
||||
mungeutil.deep_add(conflictingMunge, editchange.file, conflictingParent, target[0]);
|
||||
}
|
||||
else {
|
||||
// plugin cannot overwrite other plugin changes without --force
|
||||
conflictingPlugin = target[0].plugin;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return {conflictFound: conflictFound, conflictingPlugin: conflictingPlugin, conflictingMunge: conflictingMunge,
|
||||
configxmlMunge: configxmlMunge, conflictWithConfigxml:conflictWithConfigxml};
|
||||
}
|
||||
|
||||
// Go over the prepare queue and apply the config munges for each plugin
|
||||
// that has been (un)installed.
|
||||
PlatformMunger.prototype.process = PlatformMunger_process;
|
||||
@@ -313,7 +534,7 @@ function PlatformMunger_process(plugins_dir) {
|
||||
// Now handle installation
|
||||
platform_config.prepare_queue.installed.forEach(function(u) {
|
||||
var pluginInfo = self.pluginInfoProvider.get(path.join(plugins_dir, u.plugin));
|
||||
self.add_plugin_changes(pluginInfo, u.vars, u.topLevel, true);
|
||||
self.add_plugin_changes(pluginInfo, u.vars, u.topLevel, true, u.force);
|
||||
});
|
||||
|
||||
// Empty out installed/ uninstalled queues.
|
||||
|
||||
32
node_modules/cordova-common/src/ConfigChanges/ConfigFile.js
generated
vendored
@@ -103,7 +103,19 @@ ConfigFile.prototype.graft_child = function ConfigFile_graft_child(selector, xml
|
||||
var result;
|
||||
if (self.type === 'xml') {
|
||||
var xml_to_graft = [modules.et.XML(xml_child.xml)];
|
||||
result = modules.xml_helpers.graftXML(self.data, xml_to_graft, selector, xml_child.after);
|
||||
switch (xml_child.mode) {
|
||||
case 'merge':
|
||||
result = modules.xml_helpers.graftXMLMerge(self.data, xml_to_graft, selector, xml_child);
|
||||
break;
|
||||
case 'overwrite':
|
||||
result = modules.xml_helpers.graftXMLOverwrite(self.data, xml_to_graft, selector, xml_child);
|
||||
break;
|
||||
case 'remove':
|
||||
result= true;
|
||||
break;
|
||||
default:
|
||||
result = modules.xml_helpers.graftXML(self.data, xml_to_graft, selector, xml_child.after);
|
||||
}
|
||||
if ( !result) {
|
||||
throw new Error('Unable to graft xml at selector "' + selector + '" from "' + filepath + '" during config install');
|
||||
}
|
||||
@@ -123,7 +135,17 @@ ConfigFile.prototype.prune_child = function ConfigFile_prune_child(selector, xml
|
||||
var result;
|
||||
if (self.type === 'xml') {
|
||||
var xml_to_graft = [modules.et.XML(xml_child.xml)];
|
||||
result = modules.xml_helpers.pruneXML(self.data, xml_to_graft, selector);
|
||||
switch (xml_child.mode) {
|
||||
case 'merge':
|
||||
case 'overwrite':
|
||||
result = modules.xml_helpers.pruneXMLRestore(self.data, selector, xml_child);
|
||||
break;
|
||||
case 'remove':
|
||||
result = modules.xml_helpers.prunXMLRemove(self.data, selector, xml_to_graft);
|
||||
break;
|
||||
default:
|
||||
result = modules.xml_helpers.pruneXML(self.data, xml_to_graft, selector);
|
||||
}
|
||||
} else {
|
||||
// plist file
|
||||
result = modules.plist_helpers.prunePLIST(self.data, xml_child.xml, selector);
|
||||
@@ -177,6 +199,12 @@ function resolveConfigFilePath(project_dir, platform, file) {
|
||||
return filepath;
|
||||
}
|
||||
|
||||
// XXX this checks for android studio projects
|
||||
// only if none of the options above are satisfied does this get called
|
||||
if(platform === 'android' && !fs.existsSync(filepath)) {
|
||||
filepath = path.join(project_dir, 'app', 'src', 'main', 'res', 'xml', 'config.xml');
|
||||
}
|
||||
|
||||
// None of the special cases matched, returning project_dir/file.
|
||||
return filepath;
|
||||
}
|
||||
|
||||
3
node_modules/cordova-common/src/ConfigChanges/munge-util.js
generated
vendored
@@ -52,6 +52,9 @@ exports.deep_remove = function deep_remove(obj, keys /* or key1, key2 .... */ )
|
||||
return element.xml == k.xml;
|
||||
});
|
||||
if (found) {
|
||||
if (parentArray[index].oldAttrib) {
|
||||
k.oldAttrib = _.extend({}, parentArray[index].oldAttrib);
|
||||
}
|
||||
found.count -= k.count;
|
||||
if (found.count > 0) {
|
||||
return false;
|
||||
|
||||
64
node_modules/cordova-common/src/ConfigParser/ConfigParser.js
generated
vendored
@@ -90,20 +90,24 @@ function findElementAttributeValue(attributeName, elems) {
|
||||
}
|
||||
|
||||
ConfigParser.prototype = {
|
||||
getAttribute: function(attr) {
|
||||
return this.doc.getroot().attrib[attr];
|
||||
},
|
||||
|
||||
packageName: function(id) {
|
||||
return this.doc.getroot().attrib['id'];
|
||||
return this.getAttribute('id');
|
||||
},
|
||||
setPackageName: function(id) {
|
||||
this.doc.getroot().attrib['id'] = id;
|
||||
},
|
||||
android_packageName: function() {
|
||||
return this.doc.getroot().attrib['android-packageName'];
|
||||
return this.getAttribute('android-packageName');
|
||||
},
|
||||
android_activityName: function() {
|
||||
return this.doc.getroot().attrib['android-activityName'];
|
||||
return this.getAttribute('android-activityName');
|
||||
},
|
||||
ios_CFBundleIdentifier: function() {
|
||||
return this.doc.getroot().attrib['ios-CFBundleIdentifier'];
|
||||
return this.getAttribute('ios-CFBundleIdentifier');
|
||||
},
|
||||
name: function() {
|
||||
return getNodeTextSafe(this.doc.find('name'));
|
||||
@@ -120,16 +124,16 @@ ConfigParser.prototype = {
|
||||
el.text = text;
|
||||
},
|
||||
version: function() {
|
||||
return this.doc.getroot().attrib['version'];
|
||||
return this.getAttribute('version');
|
||||
},
|
||||
windows_packageVersion: function() {
|
||||
return this.doc.getroot().attrib('windows-packageVersion');
|
||||
return this.getAttribute('windows-packageVersion');
|
||||
},
|
||||
android_versionCode: function() {
|
||||
return this.doc.getroot().attrib['android-versionCode'];
|
||||
return this.getAttribute('android-versionCode');
|
||||
},
|
||||
ios_CFBundleVersion: function() {
|
||||
return this.doc.getroot().attrib['ios-CFBundleVersion'];
|
||||
return this.getAttribute('ios-CFBundleVersion');
|
||||
},
|
||||
setVersion: function(value) {
|
||||
this.doc.getroot().attrib['version'] = value;
|
||||
@@ -444,10 +448,19 @@ ConfigParser.prototype = {
|
||||
return accesses.map(function(access){
|
||||
var minimum_tls_version = access.attrib['minimum-tls-version']; /* String */
|
||||
var requires_forward_secrecy = access.attrib['requires-forward-secrecy']; /* Boolean */
|
||||
var requires_certificate_transparency = access.attrib['requires-certificate-transparency']; /* Boolean */
|
||||
var allows_arbitrary_loads_in_web_content = access.attrib['allows-arbitrary-loads-in-web-content']; /* Boolean */
|
||||
var allows_arbitrary_loads_in_media = access.attrib['allows-arbitrary-loads-in-media']; /* Boolean */
|
||||
var allows_local_networking = access.attrib['allows-local-networking']; /* Boolean */
|
||||
|
||||
return {
|
||||
'origin': access.attrib.origin,
|
||||
'minimum_tls_version': minimum_tls_version,
|
||||
'requires_forward_secrecy' : requires_forward_secrecy
|
||||
'requires_forward_secrecy' : requires_forward_secrecy,
|
||||
'requires_certificate_transparency' : requires_certificate_transparency,
|
||||
'allows_arbitrary_loads_in_web_content' : allows_arbitrary_loads_in_web_content,
|
||||
'allows_arbitrary_loads_in_media' : allows_arbitrary_loads_in_media,
|
||||
'allows_local_networking' : allows_local_networking
|
||||
};
|
||||
});
|
||||
},
|
||||
@@ -457,13 +470,44 @@ ConfigParser.prototype = {
|
||||
return allow_navigations.map(function(allow_navigation){
|
||||
var minimum_tls_version = allow_navigation.attrib['minimum-tls-version']; /* String */
|
||||
var requires_forward_secrecy = allow_navigation.attrib['requires-forward-secrecy']; /* Boolean */
|
||||
var requires_certificate_transparency = allow_navigation.attrib['requires-certificate-transparency']; /* Boolean */
|
||||
|
||||
return {
|
||||
'href': allow_navigation.attrib.href,
|
||||
'minimum_tls_version': minimum_tls_version,
|
||||
'requires_forward_secrecy' : requires_forward_secrecy
|
||||
'requires_forward_secrecy' : requires_forward_secrecy,
|
||||
'requires_certificate_transparency' : requires_certificate_transparency
|
||||
};
|
||||
});
|
||||
},
|
||||
/* Get all the allow-intent tags */
|
||||
getAllowIntents: function() {
|
||||
var allow_intents = this.doc.findall('./allow-intent');
|
||||
return allow_intents.map(function(allow_intent){
|
||||
return {
|
||||
'href': allow_intent.attrib.href
|
||||
};
|
||||
});
|
||||
},
|
||||
/* Get all edit-config tags */
|
||||
getEditConfigs: function(platform) {
|
||||
var platform_tag = this.doc.find('./platform[@name="' + platform + '"]');
|
||||
var platform_edit_configs = platform_tag ? platform_tag.findall('edit-config') : [];
|
||||
|
||||
var edit_configs = this.doc.findall('edit-config').concat(platform_edit_configs);
|
||||
|
||||
return edit_configs.map(function(tag) {
|
||||
var editConfig =
|
||||
{
|
||||
file : tag.attrib['file'],
|
||||
target : tag.attrib['target'],
|
||||
mode : tag.attrib['mode'],
|
||||
id : 'config.xml',
|
||||
xmls : tag.getchildren()
|
||||
};
|
||||
return editConfig;
|
||||
});
|
||||
},
|
||||
write:function() {
|
||||
fs.writeFileSync(this.path, this.doc.write({indent: 4}), 'utf-8');
|
||||
}
|
||||
|
||||
76
node_modules/cordova-common/src/CordovaCheck.js
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
/**
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
*/
|
||||
|
||||
var fs = require('fs'),
|
||||
path = require('path');
|
||||
|
||||
function isRootDir(dir) {
|
||||
if (fs.existsSync(path.join(dir, 'www'))) {
|
||||
if (fs.existsSync(path.join(dir, 'config.xml'))) {
|
||||
// For sure is.
|
||||
if (fs.existsSync(path.join(dir, 'platforms'))) {
|
||||
return 2;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
// Might be (or may be under platforms/).
|
||||
if (fs.existsSync(path.join(dir, 'www', 'config.xml'))) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Runs up the directory chain looking for a .cordova directory.
|
||||
// IF it is found we are in a Cordova project.
|
||||
// Omit argument to use CWD.
|
||||
function isCordova(dir) {
|
||||
if (!dir) {
|
||||
// Prefer PWD over cwd so that symlinked dirs within your PWD work correctly (CB-5687).
|
||||
var pwd = process.env.PWD;
|
||||
var cwd = process.cwd();
|
||||
if (pwd && pwd != cwd && pwd != 'undefined') {
|
||||
return isCordova(pwd) || isCordova(cwd);
|
||||
}
|
||||
return isCordova(cwd);
|
||||
}
|
||||
var bestReturnValueSoFar = false;
|
||||
for (var i = 0; i < 1000; ++i) {
|
||||
var result = isRootDir(dir);
|
||||
if (result === 2) {
|
||||
return dir;
|
||||
}
|
||||
if (result === 1) {
|
||||
bestReturnValueSoFar = dir;
|
||||
}
|
||||
var parentDir = path.normalize(path.join(dir, '..'));
|
||||
// Detect fs root.
|
||||
if (parentDir == dir) {
|
||||
return bestReturnValueSoFar;
|
||||
}
|
||||
dir = parentDir;
|
||||
}
|
||||
console.error('Hit an unhandled case in CordovaCheck.isCordova');
|
||||
return false;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
findProjectRoot : isCordova
|
||||
};
|
||||
82
node_modules/cordova-common/src/FileUpdater.js
generated
vendored
@@ -285,14 +285,14 @@ function mergeAndUpdateDir(sourceDirs, targetDir, options, log) {
|
||||
}
|
||||
|
||||
// Scan the files in each of the source directories.
|
||||
var sourceMaps = [];
|
||||
for (var i in sourceDirs) {
|
||||
var sourceFullPath = path.join(rootDir, sourceDirs[i]);
|
||||
if (!fs.existsSync(sourceFullPath)) {
|
||||
throw new Error("Source directory does not exist: " + sourceDirs[i]);
|
||||
}
|
||||
sourceMaps[i] = mapDirectory(rootDir, sourceDirs[i], include, exclude);
|
||||
}
|
||||
var sourceMaps = sourceDirs.map(function (sourceDir) {
|
||||
return path.join(rootDir, sourceDir);
|
||||
}).map(function (sourcePath) {
|
||||
if (!fs.existsSync(sourcePath)) {
|
||||
throw new Error("Source directory does not exist: " + sourcePath);
|
||||
}
|
||||
return mapDirectory(rootDir, path.relative(rootDir, sourcePath), include, exclude);
|
||||
});
|
||||
|
||||
// Scan the files in the target directory, if it exists.
|
||||
var targetMap = {};
|
||||
@@ -331,46 +331,40 @@ function mapDirectory(rootDir, subDir, include, exclude) {
|
||||
function mapSubdirectory(rootDir, subDir, relativeDir, include, exclude, dirMap) {
|
||||
var itemMapped = false;
|
||||
var items = fs.readdirSync(path.join(rootDir, subDir, relativeDir));
|
||||
for (var i in items) {
|
||||
var relativePath = path.join(relativeDir, items[i]);
|
||||
|
||||
// Skip any files or directories (and everything under) that match an exclude glob.
|
||||
if (matchGlobArray(relativePath, exclude)) {
|
||||
continue;
|
||||
}
|
||||
items.forEach(function(item) {
|
||||
var relativePath = path.join(relativeDir, item);
|
||||
if(!matchGlobArray(relativePath, exclude)) {
|
||||
// Stats obtained here (required at least to know where to recurse in directories)
|
||||
// are saved for later, where the modified times may also be used. This minimizes
|
||||
// the number of file I/O operations performed.
|
||||
var fullPath = path.join(rootDir, subDir, relativePath);
|
||||
var stats = fs.statSync(fullPath);
|
||||
|
||||
// Stats obtained here (required at least to know where to recurse in directories)
|
||||
// are saved for later, where the modified times may also be used. This minimizes
|
||||
// the number of file I/O operations performed.
|
||||
var fullPath = path.join(rootDir, subDir, relativePath);
|
||||
var stats = fs.statSync(fullPath);
|
||||
|
||||
if (stats.isDirectory()) {
|
||||
// Directories are included if either something under them is included or they
|
||||
// match an include glob.
|
||||
if (mapSubdirectory(rootDir, subDir, relativePath, include, exclude, dirMap) ||
|
||||
matchGlobArray(relativePath, include)) {
|
||||
dirMap[relativePath] = { subDir: subDir, stats: stats };
|
||||
itemMapped = true;
|
||||
}
|
||||
} else if (stats.isFile()) {
|
||||
// Files are included only if they match an include glob.
|
||||
if (matchGlobArray(relativePath, include)) {
|
||||
dirMap[relativePath] = { subDir: subDir, stats: stats };
|
||||
itemMapped = true;
|
||||
if (stats.isDirectory()) {
|
||||
// Directories are included if either something under them is included or they
|
||||
// match an include glob.
|
||||
if (mapSubdirectory(rootDir, subDir, relativePath, include, exclude, dirMap) ||
|
||||
matchGlobArray(relativePath, include)) {
|
||||
dirMap[relativePath] = { subDir: subDir, stats: stats };
|
||||
itemMapped = true;
|
||||
}
|
||||
} else if (stats.isFile()) {
|
||||
// Files are included only if they match an include glob.
|
||||
if (matchGlobArray(relativePath, include)) {
|
||||
dirMap[relativePath] = { subDir: subDir, stats: stats };
|
||||
itemMapped = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return itemMapped;
|
||||
}
|
||||
|
||||
function matchGlobArray(path, globs) {
|
||||
for (var i in globs) {
|
||||
if (minimatch(path, globs[i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return globs.some(function(elem) {
|
||||
return minimatch(path, elem, {dot:true});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -384,7 +378,7 @@ function mergePathMaps(sourceMaps, targetMap, targetDir) {
|
||||
// Target stats will be filled in below for targets that exist.
|
||||
var pathMap = {};
|
||||
sourceMaps.forEach(function (sourceMap) {
|
||||
for (var sourceSubPath in sourceMap) {
|
||||
Object.keys(sourceMap).forEach(function(sourceSubPath){
|
||||
var sourceEntry = sourceMap[sourceSubPath];
|
||||
pathMap[sourceSubPath] = {
|
||||
targetPath: path.join(targetDir, sourceSubPath),
|
||||
@@ -392,12 +386,12 @@ function mergePathMaps(sourceMaps, targetMap, targetDir) {
|
||||
sourcePath: path.join(sourceEntry.subDir, sourceSubPath),
|
||||
sourceStats: sourceEntry.stats
|
||||
};
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Fill in target stats for targets that exist, and create entries
|
||||
// for targets that don't have any corresponding sources.
|
||||
for (var subPath in targetMap) {
|
||||
Object.keys(targetMap).forEach(function(subPath){
|
||||
var entry = pathMap[subPath];
|
||||
if (entry) {
|
||||
entry.targetStats = targetMap[subPath].stats;
|
||||
@@ -409,7 +403,7 @@ function mergePathMaps(sourceMaps, targetMap, targetDir) {
|
||||
sourceStats: null
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return pathMap;
|
||||
}
|
||||
|
||||
5
node_modules/cordova-common/src/PlatformJson.js
generated
vendored
@@ -162,8 +162,8 @@ PlatformJson.prototype.removePluginMetadata = function (pluginInfo) {
|
||||
return this;
|
||||
};
|
||||
|
||||
PlatformJson.prototype.addInstalledPluginToPrepareQueue = function(pluginDirName, vars, is_top_level) {
|
||||
this.root.prepare_queue.installed.push({'plugin':pluginDirName, 'vars':vars, 'topLevel':is_top_level});
|
||||
PlatformJson.prototype.addInstalledPluginToPrepareQueue = function(pluginDirName, vars, is_top_level, force) {
|
||||
this.root.prepare_queue.installed.push({'plugin':pluginDirName, 'vars':vars, 'topLevel':is_top_level, 'force':force});
|
||||
};
|
||||
|
||||
PlatformJson.prototype.addUninstalledPluginToPrepareQueue = function(pluginId, is_top_level) {
|
||||
@@ -276,4 +276,3 @@ function ModuleMetadata (pluginId, jsModule) {
|
||||
}
|
||||
|
||||
module.exports = PlatformJson;
|
||||
|
||||
|
||||
19
node_modules/cordova-common/src/PluginInfo/PluginInfo.js
generated
vendored
@@ -146,6 +146,22 @@ function PluginInfo(dirname) {
|
||||
return configFile;
|
||||
}
|
||||
|
||||
self.getEditConfigs = getEditConfigs;
|
||||
function getEditConfigs(platform) {
|
||||
var editConfigs = _getTags(self._et, 'edit-config', platform, _parseEditConfigs);
|
||||
return editConfigs;
|
||||
}
|
||||
|
||||
function _parseEditConfigs(tag) {
|
||||
var editConfig =
|
||||
{ file : tag.attrib['file']
|
||||
, target : tag.attrib['target']
|
||||
, mode : tag.attrib['mode']
|
||||
, xmls : tag.getchildren()
|
||||
};
|
||||
return editConfig;
|
||||
}
|
||||
|
||||
// <info> tags, both global and within a <platform>
|
||||
// TODO (kamrik): Do we ever use <info> under <platform>? Example wanted.
|
||||
self.getInfo = getInfo;
|
||||
@@ -302,6 +318,7 @@ function PluginInfo(dirname) {
|
||||
parent: el.attrib.parent,
|
||||
custom: isStrTrue(el.attrib.custom),
|
||||
src: el.attrib.src,
|
||||
spec: el.attrib.spec,
|
||||
weak: isStrTrue(el.attrib.weak),
|
||||
versions: el.attrib.versions,
|
||||
targetDir: el.attrib['target-dir'],
|
||||
@@ -382,7 +399,7 @@ function _getTags(pelem, tag, platform, transform) {
|
||||
return tags;
|
||||
}
|
||||
|
||||
// Same as _getTags() but only looks inside a platfrom section.
|
||||
// Same as _getTags() but only looks inside a platform section.
|
||||
function _getTagsInPlatform(pelem, tag, platform, transform) {
|
||||
var platformTag = pelem.find('./platform[@name="' + platform + '"]');
|
||||
var tags = platformTag ? platformTag.findall(tag) : [];
|
||||
|
||||
2
node_modules/cordova-common/src/PluginManager.js
generated
vendored
@@ -123,7 +123,7 @@ PluginManager.prototype.doOperation = function (operation, plugin, options) {
|
||||
if (operation === PluginManager.INSTALL) {
|
||||
// Ignore passed `is_top_level` option since platform itself doesn't know
|
||||
// anything about managing dependencies - it's responsibility of caller.
|
||||
self.munger.add_plugin_changes(plugin, options.variables, /*is_top_level=*/true, /*should_increment=*/true);
|
||||
self.munger.add_plugin_changes(plugin, options.variables, /*is_top_level=*/true, /*should_increment=*/true, options.force);
|
||||
self.munger.platformJson.addPluginMetadata(plugin);
|
||||
} else {
|
||||
self.munger.remove_plugin_changes(plugin, /*is_top_level=*/true);
|
||||
|
||||
225
node_modules/cordova-common/src/util/xml-helpers.js
generated
vendored
@@ -29,6 +29,9 @@ var fs = require('fs')
|
||||
, et = require('elementtree')
|
||||
;
|
||||
|
||||
var ROOT = /^\/([^\/]*)/,
|
||||
ABSOLUTE = /^\/([^\/]*)\/(.*)/;
|
||||
|
||||
module.exports = {
|
||||
// compare two et.XML nodes, see if they match
|
||||
// compares tagName, text, attributes and children (recursively)
|
||||
@@ -41,23 +44,9 @@ module.exports = {
|
||||
return false;
|
||||
}
|
||||
|
||||
var oneAttribKeys = Object.keys(one.attrib),
|
||||
twoAttribKeys = Object.keys(two.attrib),
|
||||
i = 0, attribName;
|
||||
if (!attribMatch(one, two)) return false;
|
||||
|
||||
if (oneAttribKeys.length != twoAttribKeys.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (i; i < oneAttribKeys.length; i++) {
|
||||
attribName = oneAttribKeys[i];
|
||||
|
||||
if (one.attrib[attribName] != two.attrib[attribName]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (i; i < one._children.length; i++) {
|
||||
for (var i = 0; i < one._children.length; i++) {
|
||||
if (!module.exports.equalNodes(one._children[i], two._children[i])) {
|
||||
return false;
|
||||
}
|
||||
@@ -68,7 +57,7 @@ module.exports = {
|
||||
|
||||
// adds node to doc at selector, creating parent if it doesn't exist
|
||||
graftXML: function(doc, nodes, selector, after) {
|
||||
var parent = resolveParent(doc, selector);
|
||||
var parent = module.exports.resolveParent(doc, selector);
|
||||
if (!parent) {
|
||||
//Try to create the parent recursively if necessary
|
||||
try {
|
||||
@@ -79,7 +68,7 @@ module.exports = {
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
parent = resolveParent(doc, selector);
|
||||
parent = module.exports.resolveParent(doc, selector);
|
||||
if (!parent) return false;
|
||||
}
|
||||
|
||||
@@ -97,9 +86,54 @@ module.exports = {
|
||||
return true;
|
||||
},
|
||||
|
||||
// adds new attributes to doc at selector
|
||||
// Will only merge if attribute has not been modified already or --force is used
|
||||
graftXMLMerge: function(doc, nodes, selector, xml) {
|
||||
var target = module.exports.resolveParent(doc, selector);
|
||||
if (!target) return false;
|
||||
|
||||
// saves the attributes of the original xml before making changes
|
||||
xml.oldAttrib = _.extend({}, target.attrib);
|
||||
|
||||
nodes.forEach(function (node) {
|
||||
var attributes = node.attrib;
|
||||
for (var attribute in attributes) {
|
||||
target.attrib[attribute] = node.attrib[attribute];
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
// overwrite all attributes to doc at selector with new attributes
|
||||
// Will only overwrite if attribute has not been modified already or --force is used
|
||||
graftXMLOverwrite: function(doc, nodes, selector, xml) {
|
||||
var target = module.exports.resolveParent(doc, selector);
|
||||
if (!target) return false;
|
||||
|
||||
// saves the attributes of the original xml before making changes
|
||||
xml.oldAttrib = _.extend({}, target.attrib);
|
||||
|
||||
// remove old attributes from target
|
||||
var targetAttributes = target.attrib;
|
||||
for (var targetAttribute in targetAttributes) {
|
||||
delete targetAttributes[targetAttribute];
|
||||
}
|
||||
|
||||
// add new attributes to target
|
||||
nodes.forEach(function (node) {
|
||||
var attributes = node.attrib;
|
||||
for (var attribute in attributes) {
|
||||
target.attrib[attribute] = node.attrib[attribute];
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
// removes node from doc at selector
|
||||
pruneXML: function(doc, nodes, selector) {
|
||||
var parent = resolveParent(doc, selector);
|
||||
var parent = module.exports.resolveParent(doc, selector);
|
||||
if (!parent) return false;
|
||||
|
||||
nodes.forEach(function (node) {
|
||||
@@ -114,6 +148,36 @@ module.exports = {
|
||||
return true;
|
||||
},
|
||||
|
||||
// restores attributes from doc at selector
|
||||
pruneXMLRestore: function(doc, selector, xml) {
|
||||
var target = module.exports.resolveParent(doc, selector);
|
||||
if (!target) return false;
|
||||
|
||||
if (xml.oldAttrib) {
|
||||
target.attrib = _.extend({}, xml.oldAttrib);
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
prunXMLRemove: function(doc, selector, nodes) {
|
||||
var target = module.exports.resolveParent(doc, selector);
|
||||
if (!target) return false;
|
||||
|
||||
nodes.forEach(function (node) {
|
||||
var attributes = node.attrib;
|
||||
for (var attribute in attributes) {
|
||||
if (target.attrib[attribute]) {
|
||||
delete target.attrib[attribute];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
|
||||
},
|
||||
|
||||
|
||||
parseElementtreeSync: function (filename) {
|
||||
var contents = fs.readFileSync(filename, 'utf-8');
|
||||
if(contents) {
|
||||
@@ -121,6 +185,30 @@ module.exports = {
|
||||
contents = contents.substring(contents.indexOf('<'));
|
||||
}
|
||||
return new et.ElementTree(et.XML(contents));
|
||||
},
|
||||
|
||||
resolveParent: function (doc, selector) {
|
||||
var parent, tagName, subSelector;
|
||||
|
||||
// handle absolute selector (which elementtree doesn't like)
|
||||
if (ROOT.test(selector)) {
|
||||
tagName = selector.match(ROOT)[1];
|
||||
// test for wildcard "any-tag" root selector
|
||||
if (tagName == '*' || tagName === doc._root.tag) {
|
||||
parent = doc._root;
|
||||
|
||||
// could be an absolute path, but not selecting the root
|
||||
if (ABSOLUTE.test(selector)) {
|
||||
subSelector = selector.match(ABSOLUTE)[2];
|
||||
parent = parent.find(subSelector);
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
parent = doc.find(selector);
|
||||
}
|
||||
return parent;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -152,33 +240,6 @@ function uniqueChild(node, parent) {
|
||||
}
|
||||
}
|
||||
|
||||
var ROOT = /^\/([^\/]*)/,
|
||||
ABSOLUTE = /^\/([^\/]*)\/(.*)/;
|
||||
|
||||
function resolveParent(doc, selector) {
|
||||
var parent, tagName, subSelector;
|
||||
|
||||
// handle absolute selector (which elementtree doesn't like)
|
||||
if (ROOT.test(selector)) {
|
||||
tagName = selector.match(ROOT)[1];
|
||||
// test for wildcard "any-tag" root selector
|
||||
if (tagName == '*' || tagName === doc._root.tag) {
|
||||
parent = doc._root;
|
||||
|
||||
// could be an absolute path, but not selecting the root
|
||||
if (ABSOLUTE.test(selector)) {
|
||||
subSelector = selector.match(ABSOLUTE)[2];
|
||||
parent = parent.find(subSelector);
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
parent = doc.find(selector);
|
||||
}
|
||||
return parent;
|
||||
}
|
||||
|
||||
// Find the index at which to insert an entry. After is a ;-separated priority list
|
||||
// of tags after which the insertion should be made. E.g. If we need to
|
||||
// insert an element C, and the rule is that the order of children has to be
|
||||
@@ -229,47 +290,44 @@ function mergeXml(src, dest, platform, clobber) {
|
||||
query = srcTag + '',
|
||||
shouldMerge = true;
|
||||
|
||||
if (BLACKLIST.indexOf(srcTag) === -1) {
|
||||
if (SINGLETONS.indexOf(srcTag) !== -1) {
|
||||
foundChild = dest.find(query);
|
||||
if (foundChild) {
|
||||
destChild = foundChild;
|
||||
dest.remove(destChild);
|
||||
}
|
||||
} else {
|
||||
//Check for an exact match and if you find one don't add
|
||||
Object.getOwnPropertyNames(srcChild.attrib).forEach(function (attribute) {
|
||||
query += '[@' + attribute + '="' + srcChild.attrib[attribute] + '"]';
|
||||
});
|
||||
var foundChildren = dest.findall(query);
|
||||
for(var i = 0; i < foundChildren.length; i++) {
|
||||
foundChild = foundChildren[i];
|
||||
if (foundChild && textMatch(srcChild, foundChild) && (Object.keys(srcChild.attrib).length==Object.keys(foundChild.attrib).length)) {
|
||||
destChild = foundChild;
|
||||
dest.remove(destChild);
|
||||
shouldMerge = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (BLACKLIST.indexOf(srcTag) !== -1) return;
|
||||
|
||||
mergeXml(srcChild, destChild, platform, clobber && shouldMerge);
|
||||
dest.append(destChild);
|
||||
if (SINGLETONS.indexOf(srcTag) !== -1) {
|
||||
foundChild = dest.find(query);
|
||||
if (foundChild) {
|
||||
destChild = foundChild;
|
||||
dest.remove(destChild);
|
||||
}
|
||||
} else {
|
||||
//Check for an exact match and if you find one don't add
|
||||
var mergeCandidates = dest.findall(query)
|
||||
.filter(function (foundChild) {
|
||||
return foundChild && textMatch(srcChild, foundChild) && attribMatch(srcChild, foundChild);
|
||||
});
|
||||
|
||||
if (mergeCandidates.length > 0) {
|
||||
destChild = mergeCandidates[0];
|
||||
dest.remove(destChild);
|
||||
shouldMerge = false;
|
||||
}
|
||||
}
|
||||
|
||||
mergeXml(srcChild, destChild, platform, clobber && shouldMerge);
|
||||
dest.append(destChild);
|
||||
}
|
||||
|
||||
|
||||
function removeDuplicatePreferences(xml) {
|
||||
// reduce preference tags to a hashtable to remove dupes
|
||||
var prefHash = xml.findall('preference[@name][@value]').reduce(function(previousValue, currentValue) {
|
||||
previousValue[ currentValue.attrib.name ] = currentValue.attrib.value;
|
||||
return previousValue;
|
||||
}, {});
|
||||
|
||||
|
||||
// remove all preferences
|
||||
xml.findall('preference[@name][@value]').forEach(function(pref) {
|
||||
xml.remove(pref);
|
||||
});
|
||||
|
||||
|
||||
// write new preferences
|
||||
Object.keys(prefHash).forEach(function(key, index) {
|
||||
var element = et.SubElement(xml, 'preference');
|
||||
@@ -287,3 +345,22 @@ function textMatch(elm1, elm2) {
|
||||
text2 = elm2.text ? elm2.text.replace(/\s+/, '') : '';
|
||||
return (text1 === '' || text1 === text2);
|
||||
}
|
||||
|
||||
function attribMatch(one, two) {
|
||||
var oneAttribKeys = Object.keys(one.attrib);
|
||||
var twoAttribKeys = Object.keys(two.attrib);
|
||||
|
||||
if (oneAttribKeys.length != twoAttribKeys.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var i = 0; i < oneAttribKeys.length; i++) {
|
||||
var attribName = oneAttribKeys[i];
|
||||
|
||||
if (one.attrib[attribName] != two.attrib[attribName]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
31
node_modules/cordova-registry-mapper/package.json
generated
vendored
@@ -1,8 +1,16 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"cordova-registry-mapper@^1.1.8",
|
||||
"D:\\Cordova\\cordova-android\\node_modules\\cordova-common"
|
||||
{
|
||||
"raw": "cordova-registry-mapper@^1.1.8",
|
||||
"scope": null,
|
||||
"escapedName": "cordova-registry-mapper",
|
||||
"name": "cordova-registry-mapper",
|
||||
"rawSpec": "^1.1.8",
|
||||
"spec": ">=1.1.8 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common"
|
||||
]
|
||||
],
|
||||
"_from": "cordova-registry-mapper@>=1.1.8 <2.0.0",
|
||||
@@ -12,27 +20,28 @@
|
||||
"_location": "/cordova-registry-mapper",
|
||||
"_nodeVersion": "5.4.1",
|
||||
"_npmUser": {
|
||||
"email": "stevengill97@gmail.com",
|
||||
"name": "stevegill"
|
||||
"name": "stevegill",
|
||||
"email": "stevengill97@gmail.com"
|
||||
},
|
||||
"_npmVersion": "3.5.3",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "cordova-registry-mapper",
|
||||
"raw": "cordova-registry-mapper@^1.1.8",
|
||||
"rawSpec": "^1.1.8",
|
||||
"scope": null,
|
||||
"escapedName": "cordova-registry-mapper",
|
||||
"name": "cordova-registry-mapper",
|
||||
"rawSpec": "^1.1.8",
|
||||
"spec": ">=1.1.8 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/cordova-common"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.15.tgz",
|
||||
"_resolved": "http://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.15.tgz",
|
||||
"_shasum": "e244b9185b8175473bff6079324905115f83dc7c",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "cordova-registry-mapper@^1.1.8",
|
||||
"_where": "D:\\Cordova\\cordova-android\\node_modules\\cordova-common",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
|
||||
"author": {
|
||||
"name": "Steve Gill"
|
||||
},
|
||||
@@ -47,7 +56,7 @@
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "e244b9185b8175473bff6079324905115f83dc7c",
|
||||
"tarball": "http://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.15.tgz"
|
||||
"tarball": "https://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.15.tgz"
|
||||
},
|
||||
"gitHead": "00af0f028ec94154a364eeabe38b8e22320647bd",
|
||||
"homepage": "https://github.com/stevengill/cordova-registry-mapper#readme",
|
||||
@@ -59,8 +68,8 @@
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "stevengill97@gmail.com",
|
||||
"name": "stevegill"
|
||||
"name": "stevegill",
|
||||
"email": "stevengill97@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "cordova-registry-mapper",
|
||||
|
||||
37
node_modules/elementtree/package.json
generated
vendored
@@ -1,8 +1,16 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"elementtree@^0.1.6",
|
||||
"D:\\Cordova\\cordova-android"
|
||||
{
|
||||
"raw": "elementtree@^0.1.6",
|
||||
"scope": null,
|
||||
"escapedName": "elementtree",
|
||||
"name": "elementtree",
|
||||
"rawSpec": "^0.1.6",
|
||||
"spec": ">=0.1.6 <0.2.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/steveng/repo/cordova/cordova-android"
|
||||
]
|
||||
],
|
||||
"_from": "elementtree@>=0.1.6 <0.2.0",
|
||||
@@ -11,16 +19,17 @@
|
||||
"_installable": true,
|
||||
"_location": "/elementtree",
|
||||
"_npmUser": {
|
||||
"email": "ryan@trolocsis.com",
|
||||
"name": "rphillips"
|
||||
"name": "rphillips",
|
||||
"email": "ryan@trolocsis.com"
|
||||
},
|
||||
"_npmVersion": "1.3.24",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "elementtree",
|
||||
"raw": "elementtree@^0.1.6",
|
||||
"rawSpec": "^0.1.6",
|
||||
"scope": null,
|
||||
"escapedName": "elementtree",
|
||||
"name": "elementtree",
|
||||
"rawSpec": "^0.1.6",
|
||||
"spec": ">=0.1.6 <0.2.0",
|
||||
"type": "range"
|
||||
},
|
||||
@@ -28,11 +37,11 @@
|
||||
"/",
|
||||
"/cordova-common"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz",
|
||||
"_resolved": "http://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz",
|
||||
"_shasum": "2ac4c46ea30516c8c4cbdb5e3ac7418e592de20c",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "elementtree@^0.1.6",
|
||||
"_where": "D:\\Cordova\\cordova-android",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android",
|
||||
"author": {
|
||||
"name": "Rackspace US, Inc."
|
||||
},
|
||||
@@ -41,12 +50,12 @@
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"email": "paul.querna@rackspace.com",
|
||||
"name": "Paul Querna"
|
||||
"name": "Paul Querna",
|
||||
"email": "paul.querna@rackspace.com"
|
||||
},
|
||||
{
|
||||
"email": "tomaz.muraus@rackspace.com",
|
||||
"name": "Tomaz Muraus"
|
||||
"name": "Tomaz Muraus",
|
||||
"email": "tomaz.muraus@rackspace.com"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
@@ -83,8 +92,8 @@
|
||||
"main": "lib/elementtree.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "ryan@trolocsis.com",
|
||||
"name": "rphillips"
|
||||
"name": "rphillips",
|
||||
"email": "ryan@trolocsis.com"
|
||||
}
|
||||
],
|
||||
"name": "elementtree",
|
||||
|
||||
34
node_modules/glob/package.json
generated
vendored
@@ -1,8 +1,16 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"glob@^5.0.13",
|
||||
"D:\\Cordova\\cordova-android\\node_modules\\cordova-common"
|
||||
{
|
||||
"raw": "glob@^5.0.13",
|
||||
"scope": null,
|
||||
"escapedName": "glob",
|
||||
"name": "glob",
|
||||
"rawSpec": "^5.0.13",
|
||||
"spec": ">=5.0.13 <6.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common"
|
||||
]
|
||||
],
|
||||
"_from": "glob@>=5.0.13 <6.0.0",
|
||||
@@ -12,30 +20,32 @@
|
||||
"_location": "/glob",
|
||||
"_nodeVersion": "4.0.0",
|
||||
"_npmUser": {
|
||||
"email": "isaacs@npmjs.com",
|
||||
"name": "isaacs"
|
||||
"name": "isaacs",
|
||||
"email": "isaacs@npmjs.com"
|
||||
},
|
||||
"_npmVersion": "3.3.2",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "glob",
|
||||
"raw": "glob@^5.0.13",
|
||||
"rawSpec": "^5.0.13",
|
||||
"scope": null,
|
||||
"escapedName": "glob",
|
||||
"name": "glob",
|
||||
"rawSpec": "^5.0.13",
|
||||
"spec": ">=5.0.13 <6.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/cordova-common"
|
||||
"/cordova-common",
|
||||
"/istanbul"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
|
||||
"_resolved": "http://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
|
||||
"_shasum": "1bc936b9e02f4a603fcc222ecf7633d30b8b93b1",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "glob@^5.0.13",
|
||||
"_where": "D:\\Cordova\\cordova-android\\node_modules\\cordova-common",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
|
||||
"author": {
|
||||
"email": "i@izs.me",
|
||||
"name": "Isaac Z. Schlueter",
|
||||
"email": "i@izs.me",
|
||||
"url": "http://blog.izs.me/"
|
||||
},
|
||||
"bugs": {
|
||||
@@ -74,8 +84,8 @@
|
||||
"main": "glob.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "i@izs.me",
|
||||
"name": "isaacs"
|
||||
"name": "isaacs",
|
||||
"email": "i@izs.me"
|
||||
}
|
||||
],
|
||||
"name": "glob",
|
||||
|
||||
34
node_modules/inflight/inflight.js
generated
vendored
@@ -19,18 +19,28 @@ function makeres (key) {
|
||||
var cbs = reqs[key]
|
||||
var len = cbs.length
|
||||
var args = slice(arguments)
|
||||
for (var i = 0; i < len; i++) {
|
||||
cbs[i].apply(null, args)
|
||||
}
|
||||
if (cbs.length > len) {
|
||||
// added more in the interim.
|
||||
// de-zalgo, just in case, but don't call again.
|
||||
cbs.splice(0, len)
|
||||
process.nextTick(function () {
|
||||
RES.apply(null, args)
|
||||
})
|
||||
} else {
|
||||
delete reqs[key]
|
||||
|
||||
// XXX It's somewhat ambiguous whether a new callback added in this
|
||||
// pass should be queued for later execution if something in the
|
||||
// list of callbacks throws, or if it should just be discarded.
|
||||
// However, it's such an edge case that it hardly matters, and either
|
||||
// choice is likely as surprising as the other.
|
||||
// As it happens, we do go ahead and schedule it for later execution.
|
||||
try {
|
||||
for (var i = 0; i < len; i++) {
|
||||
cbs[i].apply(null, args)
|
||||
}
|
||||
} finally {
|
||||
if (cbs.length > len) {
|
||||
// added more in the interim.
|
||||
// de-zalgo, just in case, but don't call again.
|
||||
cbs.splice(0, len)
|
||||
process.nextTick(function () {
|
||||
RES.apply(null, args)
|
||||
})
|
||||
} else {
|
||||
delete reqs[key]
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
68
node_modules/inflight/package.json
generated
vendored
@@ -1,45 +1,55 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"inflight@^1.0.4",
|
||||
"D:\\Cordova\\cordova-android\\node_modules\\glob"
|
||||
{
|
||||
"raw": "inflight@^1.0.4",
|
||||
"scope": null,
|
||||
"escapedName": "inflight",
|
||||
"name": "inflight",
|
||||
"rawSpec": "^1.0.4",
|
||||
"spec": ">=1.0.4 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/steveng/repo/cordova/cordova-android/node_modules/glob"
|
||||
]
|
||||
],
|
||||
"_from": "inflight@>=1.0.4 <2.0.0",
|
||||
"_id": "inflight@1.0.5",
|
||||
"_id": "inflight@1.0.6",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/inflight",
|
||||
"_nodeVersion": "5.10.1",
|
||||
"_nodeVersion": "6.5.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/inflight-1.0.5.tgz_1463529611443_0.00041943578980863094"
|
||||
"host": "packages-16-east.internal.npmjs.com",
|
||||
"tmp": "tmp/inflight-1.0.6.tgz_1476330807696_0.10388551792129874"
|
||||
},
|
||||
"_npmUser": {
|
||||
"email": "kat@sykosomatic.org",
|
||||
"name": "zkat"
|
||||
"name": "isaacs",
|
||||
"email": "i@izs.me"
|
||||
},
|
||||
"_npmVersion": "3.9.1",
|
||||
"_npmVersion": "3.10.7",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "inflight",
|
||||
"raw": "inflight@^1.0.4",
|
||||
"rawSpec": "^1.0.4",
|
||||
"scope": null,
|
||||
"escapedName": "inflight",
|
||||
"name": "inflight",
|
||||
"rawSpec": "^1.0.4",
|
||||
"spec": ">=1.0.4 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/cli/glob",
|
||||
"/glob"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz",
|
||||
"_shasum": "db3204cd5a9de2e6cd890b85c6e2f66bcf4f620a",
|
||||
"_resolved": "http://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"_shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "inflight@^1.0.4",
|
||||
"_where": "D:\\Cordova\\cordova-android\\node_modules\\glob",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/glob",
|
||||
"author": {
|
||||
"email": "i@izs.me",
|
||||
"name": "Isaac Z. Schlueter",
|
||||
"email": "i@izs.me",
|
||||
"url": "http://blog.izs.me/"
|
||||
},
|
||||
"bugs": {
|
||||
@@ -51,36 +61,36 @@
|
||||
},
|
||||
"description": "Add callbacks to requests in flight to avoid async duplication",
|
||||
"devDependencies": {
|
||||
"tap": "^1.2.0"
|
||||
"tap": "^7.1.2"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "db3204cd5a9de2e6cd890b85c6e2f66bcf4f620a",
|
||||
"tarball": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz"
|
||||
"shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9",
|
||||
"tarball": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz"
|
||||
},
|
||||
"files": [
|
||||
"inflight.js"
|
||||
],
|
||||
"gitHead": "559e37b4f6327fca797fe8d7fe8ed6d9cae08821",
|
||||
"gitHead": "a547881738c8f57b27795e584071d67cf6ac1a57",
|
||||
"homepage": "https://github.com/isaacs/inflight",
|
||||
"license": "ISC",
|
||||
"main": "inflight.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "me@re-becca.org",
|
||||
"name": "iarna"
|
||||
"name": "iarna",
|
||||
"email": "me@re-becca.org"
|
||||
},
|
||||
{
|
||||
"email": "i@izs.me",
|
||||
"name": "isaacs"
|
||||
"name": "isaacs",
|
||||
"email": "i@izs.me"
|
||||
},
|
||||
{
|
||||
"email": "ogd@aoaioxxysz.net",
|
||||
"name": "othiym23"
|
||||
"name": "othiym23",
|
||||
"email": "ogd@aoaioxxysz.net"
|
||||
},
|
||||
{
|
||||
"email": "kat@sykosomatic.org",
|
||||
"name": "zkat"
|
||||
"name": "zkat",
|
||||
"email": "kat@sykosomatic.org"
|
||||
}
|
||||
],
|
||||
"name": "inflight",
|
||||
@@ -91,7 +101,7 @@
|
||||
"url": "git+https://github.com/npm/inflight.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test.js"
|
||||
"test": "tap test.js --100"
|
||||
},
|
||||
"version": "1.0.5"
|
||||
"version": "1.0.6"
|
||||
}
|
||||
|
||||
8
node_modules/inherits/inherits.js
generated
vendored
@@ -1 +1,7 @@
|
||||
module.exports = require('util').inherits
|
||||
try {
|
||||
var util = require('util');
|
||||
if (typeof util.inherits !== 'function') throw '';
|
||||
module.exports = util.inherits;
|
||||
} catch (e) {
|
||||
module.exports = require('./inherits_browser.js');
|
||||
}
|
||||
|
||||
62
node_modules/inherits/package.json
generated
vendored
@@ -1,49 +1,73 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"inherits@2",
|
||||
"D:\\Cordova\\cordova-android\\node_modules\\glob"
|
||||
{
|
||||
"raw": "inherits@2",
|
||||
"scope": null,
|
||||
"escapedName": "inherits",
|
||||
"name": "inherits",
|
||||
"rawSpec": "2",
|
||||
"spec": ">=2.0.0 <3.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/steveng/repo/cordova/cordova-android/node_modules/glob"
|
||||
]
|
||||
],
|
||||
"_from": "inherits@>=2.0.0 <3.0.0",
|
||||
"_id": "inherits@2.0.1",
|
||||
"_id": "inherits@2.0.3",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/inherits",
|
||||
"_npmUser": {
|
||||
"email": "i@izs.me",
|
||||
"name": "isaacs"
|
||||
"_nodeVersion": "6.5.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-16-east.internal.npmjs.com",
|
||||
"tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328"
|
||||
},
|
||||
"_npmVersion": "1.3.8",
|
||||
"_npmUser": {
|
||||
"name": "isaacs",
|
||||
"email": "i@izs.me"
|
||||
},
|
||||
"_npmVersion": "3.10.7",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "inherits",
|
||||
"raw": "inherits@2",
|
||||
"rawSpec": "2",
|
||||
"scope": null,
|
||||
"escapedName": "inherits",
|
||||
"name": "inherits",
|
||||
"rawSpec": "2",
|
||||
"spec": ">=2.0.0 <3.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/glob"
|
||||
"/cli/glob",
|
||||
"/fileset/glob",
|
||||
"/glob",
|
||||
"/readable-stream"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
|
||||
"_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1",
|
||||
"_resolved": "http://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||
"_shasum": "633c2c83e3da42a502f52466022480f4208261de",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "inherits@2",
|
||||
"_where": "D:\\Cordova\\cordova-android\\node_modules\\glob",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/glob",
|
||||
"browser": "./inherits_browser.js",
|
||||
"bugs": {
|
||||
"url": "https://github.com/isaacs/inherits/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
|
||||
"devDependencies": {},
|
||||
"devDependencies": {
|
||||
"tap": "^7.1.0"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1",
|
||||
"tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
|
||||
"shasum": "633c2c83e3da42a502f52466022480f4208261de",
|
||||
"tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
|
||||
},
|
||||
"files": [
|
||||
"inherits.js",
|
||||
"inherits_browser.js"
|
||||
],
|
||||
"gitHead": "e05d0fb27c61a3ec687214f0476386b765364d5f",
|
||||
"homepage": "https://github.com/isaacs/inherits#readme",
|
||||
"keywords": [
|
||||
"inheritance",
|
||||
@@ -59,8 +83,8 @@
|
||||
"main": "./inherits.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "i@izs.me",
|
||||
"name": "isaacs"
|
||||
"name": "isaacs",
|
||||
"email": "i@izs.me"
|
||||
}
|
||||
],
|
||||
"name": "inherits",
|
||||
@@ -73,5 +97,5 @@
|
||||
"scripts": {
|
||||
"test": "node test"
|
||||
},
|
||||
"version": "2.0.1"
|
||||
"version": "2.0.3"
|
||||
}
|
||||
|
||||
25
node_modules/inherits/test.js
generated
vendored
@@ -1,25 +0,0 @@
|
||||
var inherits = require('./inherits.js')
|
||||
var assert = require('assert')
|
||||
|
||||
function test(c) {
|
||||
assert(c.constructor === Child)
|
||||
assert(c.constructor.super_ === Parent)
|
||||
assert(Object.getPrototypeOf(c) === Child.prototype)
|
||||
assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype)
|
||||
assert(c instanceof Child)
|
||||
assert(c instanceof Parent)
|
||||
}
|
||||
|
||||
function Child() {
|
||||
Parent.call(this)
|
||||
test(this)
|
||||
}
|
||||
|
||||
function Parent() {}
|
||||
|
||||
inherits(Child, Parent)
|
||||
|
||||
var c = new Child
|
||||
test(c)
|
||||
|
||||
console.log('ok')
|
||||
57
node_modules/lodash/package.json
generated
vendored
@@ -1,8 +1,16 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"lodash@^3.5.0",
|
||||
"D:\\Cordova\\cordova-android\\node_modules\\xmlbuilder"
|
||||
{
|
||||
"raw": "lodash@^3.5.0",
|
||||
"scope": null,
|
||||
"escapedName": "lodash",
|
||||
"name": "lodash",
|
||||
"rawSpec": "^3.5.0",
|
||||
"spec": ">=3.5.0 <4.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/steveng/repo/cordova/cordova-android/node_modules/xmlbuilder"
|
||||
]
|
||||
],
|
||||
"_from": "lodash@>=3.5.0 <4.0.0",
|
||||
@@ -12,30 +20,31 @@
|
||||
"_location": "/lodash",
|
||||
"_nodeVersion": "0.12.5",
|
||||
"_npmUser": {
|
||||
"email": "john.david.dalton@gmail.com",
|
||||
"name": "jdalton"
|
||||
"name": "jdalton",
|
||||
"email": "john.david.dalton@gmail.com"
|
||||
},
|
||||
"_npmVersion": "2.13.1",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "lodash",
|
||||
"raw": "lodash@^3.5.0",
|
||||
"rawSpec": "^3.5.0",
|
||||
"scope": null,
|
||||
"escapedName": "lodash",
|
||||
"name": "lodash",
|
||||
"rawSpec": "^3.5.0",
|
||||
"spec": ">=3.5.0 <4.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/xmlbuilder"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
|
||||
"_resolved": "http://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
|
||||
"_shasum": "5bf45e8e49ba4189e17d482789dfd15bd140b7b6",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "lodash@^3.5.0",
|
||||
"_where": "D:\\Cordova\\cordova-android\\node_modules\\xmlbuilder",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/xmlbuilder",
|
||||
"author": {
|
||||
"email": "john.david.dalton@gmail.com",
|
||||
"name": "John-David Dalton",
|
||||
"email": "john.david.dalton@gmail.com",
|
||||
"url": "http://allyoucanleet.com/"
|
||||
},
|
||||
"bugs": {
|
||||
@@ -43,28 +52,28 @@
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"email": "john.david.dalton@gmail.com",
|
||||
"name": "John-David Dalton",
|
||||
"email": "john.david.dalton@gmail.com",
|
||||
"url": "http://allyoucanleet.com/"
|
||||
},
|
||||
{
|
||||
"email": "demoneaux@gmail.com",
|
||||
"name": "Benjamin Tan",
|
||||
"email": "demoneaux@gmail.com",
|
||||
"url": "https://d10.github.io/"
|
||||
},
|
||||
{
|
||||
"email": "blaine@iceddev.com",
|
||||
"name": "Blaine Bublitz",
|
||||
"email": "blaine@iceddev.com",
|
||||
"url": "http://www.iceddev.com/"
|
||||
},
|
||||
{
|
||||
"email": "github@kitcambridge.be",
|
||||
"name": "Kit Cambridge",
|
||||
"email": "github@kitcambridge.be",
|
||||
"url": "http://kitcambridge.be/"
|
||||
},
|
||||
{
|
||||
"email": "mathias@qiwi.be",
|
||||
"name": "Mathias Bynens",
|
||||
"email": "mathias@qiwi.be",
|
||||
"url": "https://mathiasbynens.be/"
|
||||
}
|
||||
],
|
||||
@@ -87,24 +96,24 @@
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "john.david.dalton@gmail.com",
|
||||
"name": "jdalton"
|
||||
"name": "jdalton",
|
||||
"email": "john.david.dalton@gmail.com"
|
||||
},
|
||||
{
|
||||
"email": "mathias@qiwi.be",
|
||||
"name": "mathias"
|
||||
"name": "mathias",
|
||||
"email": "mathias@qiwi.be"
|
||||
},
|
||||
{
|
||||
"email": "blaine@iceddev.com",
|
||||
"name": "phated"
|
||||
"name": "phated",
|
||||
"email": "blaine@iceddev.com"
|
||||
},
|
||||
{
|
||||
"email": "github@kitcambridge.be",
|
||||
"name": "kitcambridge"
|
||||
"name": "kitcambridge",
|
||||
"email": "github@kitcambridge.be"
|
||||
},
|
||||
{
|
||||
"email": "demoneaux@gmail.com",
|
||||
"name": "d10"
|
||||
"name": "d10",
|
||||
"email": "demoneaux@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "lodash",
|
||||
|
||||
11
node_modules/minimatch/README.md
generated
vendored
@@ -2,7 +2,7 @@
|
||||
|
||||
A minimal matching utility.
|
||||
|
||||
[](http://travis-ci.org/isaacs/minimatch)
|
||||
[](http://travis-ci.org/isaacs/minimatch)
|
||||
|
||||
|
||||
This is the matching library used internally by npm.
|
||||
@@ -37,7 +37,7 @@ See:
|
||||
|
||||
## Minimatch Class
|
||||
|
||||
Create a minimatch object by instanting the `minimatch.Minimatch` class.
|
||||
Create a minimatch object by instantiating the `minimatch.Minimatch` class.
|
||||
|
||||
```javascript
|
||||
var Minimatch = require("minimatch").Minimatch
|
||||
@@ -82,13 +82,6 @@ var mm = new Minimatch(pattern, options)
|
||||
|
||||
All other methods are internal, and will be called as necessary.
|
||||
|
||||
## Functions
|
||||
|
||||
The top-level exported function has a `cache` property, which is an LRU
|
||||
cache set to store 100 items. So, calling these methods repeatedly
|
||||
with the same pattern and options will use the same Minimatch object,
|
||||
saving the cost of parsing it multiple times.
|
||||
|
||||
### minimatch(path, pattern, options)
|
||||
|
||||
Main export. Tests a path against the pattern using the options.
|
||||
|
||||
57
node_modules/minimatch/minimatch.js
generated
vendored
@@ -9,6 +9,14 @@ try {
|
||||
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
|
||||
var expand = require('brace-expansion')
|
||||
|
||||
var plTypes = {
|
||||
'!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
|
||||
'?': { open: '(?:', close: ')?' },
|
||||
'+': { open: '(?:', close: ')+' },
|
||||
'*': { open: '(?:', close: ')*' },
|
||||
'@': { open: '(?:', close: ')' }
|
||||
}
|
||||
|
||||
// any single thing other than /
|
||||
// don't need to escape / when using new RegExp()
|
||||
var qmark = '[^/]'
|
||||
@@ -235,7 +243,7 @@ function braceExpand (pattern, options) {
|
||||
? this.pattern : pattern
|
||||
|
||||
if (typeof pattern === 'undefined') {
|
||||
throw new Error('undefined pattern')
|
||||
throw new TypeError('undefined pattern')
|
||||
}
|
||||
|
||||
if (options.nobrace ||
|
||||
@@ -261,6 +269,10 @@ function braceExpand (pattern, options) {
|
||||
Minimatch.prototype.parse = parse
|
||||
var SUBPARSE = {}
|
||||
function parse (pattern, isSub) {
|
||||
if (pattern.length > 1024 * 64) {
|
||||
throw new TypeError('pattern is too long')
|
||||
}
|
||||
|
||||
var options = this.options
|
||||
|
||||
// shortcuts
|
||||
@@ -273,7 +285,6 @@ function parse (pattern, isSub) {
|
||||
// ? => one single character
|
||||
var patternListStack = []
|
||||
var negativeLists = []
|
||||
var plType
|
||||
var stateChar
|
||||
var inClass = false
|
||||
var reClassStart = -1
|
||||
@@ -372,11 +383,12 @@ function parse (pattern, isSub) {
|
||||
continue
|
||||
}
|
||||
|
||||
plType = stateChar
|
||||
patternListStack.push({
|
||||
type: plType,
|
||||
type: stateChar,
|
||||
start: i - 1,
|
||||
reStart: re.length
|
||||
reStart: re.length,
|
||||
open: plTypes[stateChar].open,
|
||||
close: plTypes[stateChar].close
|
||||
})
|
||||
// negation is (?:(?!js)[^/]*)
|
||||
re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
|
||||
@@ -392,24 +404,14 @@ function parse (pattern, isSub) {
|
||||
|
||||
clearStateChar()
|
||||
hasMagic = true
|
||||
re += ')'
|
||||
var pl = patternListStack.pop()
|
||||
plType = pl.type
|
||||
// negation is (?:(?!js)[^/]*)
|
||||
// The others are (?:<pattern>)<type>
|
||||
switch (plType) {
|
||||
case '!':
|
||||
negativeLists.push(pl)
|
||||
re += ')[^/]*?)'
|
||||
pl.reEnd = re.length
|
||||
break
|
||||
case '?':
|
||||
case '+':
|
||||
case '*':
|
||||
re += plType
|
||||
break
|
||||
case '@': break // the default anyway
|
||||
re += pl.close
|
||||
if (pl.type === '!') {
|
||||
negativeLists.push(pl)
|
||||
}
|
||||
pl.reEnd = re.length
|
||||
continue
|
||||
|
||||
case '|':
|
||||
@@ -516,9 +518,10 @@ function parse (pattern, isSub) {
|
||||
// Go through and escape them, taking care not to double-escape any
|
||||
// | chars that were already escaped.
|
||||
for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
|
||||
var tail = re.slice(pl.reStart + 3)
|
||||
var tail = re.slice(pl.reStart + pl.open.length)
|
||||
this.debug('setting tail', re, pl)
|
||||
// maybe some even number of \, then maybe 1 \, followed by a |
|
||||
tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
|
||||
tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
|
||||
if (!$2) {
|
||||
// the | isn't already escaped, so escape it.
|
||||
$2 = '\\'
|
||||
@@ -533,7 +536,7 @@ function parse (pattern, isSub) {
|
||||
return $1 + $1 + $2 + '|'
|
||||
})
|
||||
|
||||
this.debug('tail=%j\n %s', tail, tail)
|
||||
this.debug('tail=%j\n %s', tail, tail, pl, re)
|
||||
var t = pl.type === '*' ? star
|
||||
: pl.type === '?' ? qmark
|
||||
: '\\' + pl.type
|
||||
@@ -615,7 +618,15 @@ function parse (pattern, isSub) {
|
||||
}
|
||||
|
||||
var flags = options.nocase ? 'i' : ''
|
||||
var regExp = new RegExp('^' + re + '$', flags)
|
||||
try {
|
||||
var regExp = new RegExp('^' + re + '$', flags)
|
||||
} catch (er) {
|
||||
// If it was an invalid regular expression, then it can't match
|
||||
// anything. This trick looks for a character after the end of
|
||||
// the string, which is of course impossible, except in multi-line
|
||||
// mode, but it's not a /m regex.
|
||||
return new RegExp('$.')
|
||||
}
|
||||
|
||||
regExp._glob = pattern
|
||||
regExp._src = re
|
||||
|
||||
59
node_modules/minimatch/package.json
generated
vendored
@@ -1,42 +1,57 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"minimatch@^3.0.0",
|
||||
"D:\\Cordova\\cordova-android\\node_modules\\cordova-common"
|
||||
{
|
||||
"raw": "minimatch@^3.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "minimatch",
|
||||
"name": "minimatch",
|
||||
"rawSpec": "^3.0.0",
|
||||
"spec": ">=3.0.0 <4.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common"
|
||||
]
|
||||
],
|
||||
"_from": "minimatch@>=3.0.0 <4.0.0",
|
||||
"_id": "minimatch@3.0.0",
|
||||
"_id": "minimatch@3.0.3",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/minimatch",
|
||||
"_nodeVersion": "4.0.0",
|
||||
"_npmUser": {
|
||||
"email": "isaacs@npmjs.com",
|
||||
"name": "isaacs"
|
||||
"_nodeVersion": "4.4.4",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/minimatch-3.0.3.tgz_1470678322731_0.1892083385027945"
|
||||
},
|
||||
"_npmVersion": "3.3.2",
|
||||
"_npmUser": {
|
||||
"name": "isaacs",
|
||||
"email": "i@izs.me"
|
||||
},
|
||||
"_npmVersion": "3.10.6",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "minimatch",
|
||||
"raw": "minimatch@^3.0.0",
|
||||
"rawSpec": "^3.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "minimatch",
|
||||
"name": "minimatch",
|
||||
"rawSpec": "^3.0.0",
|
||||
"spec": ">=3.0.0 <4.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/cli/glob",
|
||||
"/cordova-common",
|
||||
"/glob"
|
||||
"/glob",
|
||||
"/jshint"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz",
|
||||
"_shasum": "5236157a51e4f004c177fb3c527ff7dd78f0ef83",
|
||||
"_resolved": "http://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz",
|
||||
"_shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "minimatch@^3.0.0",
|
||||
"_where": "D:\\Cordova\\cordova-android\\node_modules\\cordova-common",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
|
||||
"author": {
|
||||
"email": "i@izs.me",
|
||||
"name": "Isaac Z. Schlueter",
|
||||
"email": "i@izs.me",
|
||||
"url": "http://blog.izs.me"
|
||||
},
|
||||
"bugs": {
|
||||
@@ -48,12 +63,12 @@
|
||||
"description": "a glob matcher in javascript",
|
||||
"devDependencies": {
|
||||
"standard": "^3.7.2",
|
||||
"tap": "^1.2.0"
|
||||
"tap": "^5.6.0"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "5236157a51e4f004c177fb3c527ff7dd78f0ef83",
|
||||
"tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz"
|
||||
"shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774",
|
||||
"tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
@@ -61,14 +76,14 @@
|
||||
"files": [
|
||||
"minimatch.js"
|
||||
],
|
||||
"gitHead": "270dbea567f0af6918cb18103e98c612aa717a20",
|
||||
"gitHead": "eed89491bd4a4e6bc463aac0dfb5c29ef0d1dc13",
|
||||
"homepage": "https://github.com/isaacs/minimatch#readme",
|
||||
"license": "ISC",
|
||||
"main": "minimatch.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "i@izs.me",
|
||||
"name": "isaacs"
|
||||
"name": "isaacs",
|
||||
"email": "i@izs.me"
|
||||
}
|
||||
],
|
||||
"name": "minimatch",
|
||||
@@ -82,5 +97,5 @@
|
||||
"posttest": "standard minimatch.js test/*.js",
|
||||
"test": "tap test/*.js"
|
||||
},
|
||||
"version": "3.0.0"
|
||||
"version": "3.0.3"
|
||||
}
|
||||
|
||||
42
node_modules/nopt/package.json
generated
vendored
@@ -1,8 +1,16 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"nopt@^3.0.1",
|
||||
"D:\\Cordova\\cordova-android"
|
||||
{
|
||||
"raw": "nopt@^3.0.1",
|
||||
"scope": null,
|
||||
"escapedName": "nopt",
|
||||
"name": "nopt",
|
||||
"rawSpec": "^3.0.1",
|
||||
"spec": ">=3.0.1 <4.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/steveng/repo/cordova/cordova-android"
|
||||
]
|
||||
],
|
||||
"_from": "nopt@>=3.0.1 <4.0.0",
|
||||
@@ -12,30 +20,32 @@
|
||||
"_location": "/nopt",
|
||||
"_nodeVersion": "4.2.1",
|
||||
"_npmUser": {
|
||||
"email": "ogd@aoaioxxysz.net",
|
||||
"name": "othiym23"
|
||||
"name": "othiym23",
|
||||
"email": "ogd@aoaioxxysz.net"
|
||||
},
|
||||
"_npmVersion": "2.14.10",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "nopt",
|
||||
"raw": "nopt@^3.0.1",
|
||||
"rawSpec": "^3.0.1",
|
||||
"scope": null,
|
||||
"escapedName": "nopt",
|
||||
"name": "nopt",
|
||||
"rawSpec": "^3.0.1",
|
||||
"spec": ">=3.0.1 <4.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/"
|
||||
"/",
|
||||
"/istanbul"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
|
||||
"_resolved": "http://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
|
||||
"_shasum": "c6465dbf08abcd4db359317f79ac68a646b28ff9",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "nopt@^3.0.1",
|
||||
"_where": "D:\\Cordova\\cordova-android",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android",
|
||||
"author": {
|
||||
"email": "i@izs.me",
|
||||
"name": "Isaac Z. Schlueter",
|
||||
"email": "i@izs.me",
|
||||
"url": "http://blog.izs.me/"
|
||||
},
|
||||
"bin": {
|
||||
@@ -62,16 +72,16 @@
|
||||
"main": "lib/nopt.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "i@izs.me",
|
||||
"name": "isaacs"
|
||||
"name": "isaacs",
|
||||
"email": "i@izs.me"
|
||||
},
|
||||
{
|
||||
"email": "ogd@aoaioxxysz.net",
|
||||
"name": "othiym23"
|
||||
"name": "othiym23",
|
||||
"email": "ogd@aoaioxxysz.net"
|
||||
},
|
||||
{
|
||||
"email": "kat@sykosomatic.org",
|
||||
"name": "zkat"
|
||||
"name": "zkat",
|
||||
"email": "kat@sykosomatic.org"
|
||||
}
|
||||
],
|
||||
"name": "nopt",
|
||||
|
||||