CB-9828 Implement and expose PlatformApi for Windows This closes #132
Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/58047a3d Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/58047a3d Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/58047a3d Branch: refs/heads/master Commit: 58047a3daf21dbd046a6354bf748b83f3ae7b5b9 Parents: e0f3560 Author: Vladimir Kotikov <[email protected]> Authored: Mon Nov 9 22:05:05 2015 +0300 Committer: Vladimir Kotikov <[email protected]> Committed: Fri Dec 11 11:49:18 2015 +0300 ---------------------------------------------------------------------- .gitignore | 7 +- .jshintignore | 2 +- bin/create | 49 +- bin/lib/check_reqs.js | 26 +- bin/lib/create.js | 100 +- bin/lib/update.js | 79 +- bin/update | 22 +- node_modules/.bin/nopt | 15 - node_modules/.bin/nopt.cmd | 5 - node_modules/.bin/shjs | 15 - node_modules/.bin/shjs.cmd | 5 - node_modules/cordova-common/.jscs.json | 24 + node_modules/cordova-common/.jshintignore | 1 + node_modules/cordova-common/.npmignore | 2 + node_modules/cordova-common/.ratignore | 2 + node_modules/cordova-common/README.md | 149 + node_modules/cordova-common/RELEASENOTES.md | 34 + node_modules/cordova-common/cordova-common.js | 42 + .../node_modules/bplist-parser/.npmignore | 8 + .../node_modules/bplist-parser/README.md | 47 + .../node_modules/bplist-parser/bplistParser.js | 337 + .../node_modules/bplist-parser/package.json | 52 + .../cordova-registry-mapper/.npmignore | 1 + .../cordova-registry-mapper/.travis.yml | 7 + .../cordova-registry-mapper/README.md | 14 + .../cordova-registry-mapper/index.js | 199 + .../node_modules/.bin/tape | 15 + .../node_modules/.bin/tape.cmd | 7 + .../node_modules/tape/.npmignore | 1 + .../node_modules/tape/.travis.yml | 4 + .../node_modules/tape/LICENSE | 18 + .../node_modules/tape/bin/tape | 14 + .../node_modules/tape/example/array.js | 35 + .../node_modules/tape/example/fail.js | 35 + .../node_modules/tape/example/nested.js | 51 + .../node_modules/tape/example/nested_fail.js | 51 + .../node_modules/tape/example/not_enough.js | 35 + .../node_modules/tape/example/static/build.sh | 2 + .../node_modules/tape/example/static/index.html | 21 + .../node_modules/tape/example/static/server.js | 4 + .../node_modules/tape/example/stream/object.js | 10 + .../node_modules/tape/example/stream/tap.js | 8 + .../node_modules/tape/example/throw.js | 10 + .../node_modules/tape/example/timing.js | 12 + .../node_modules/tape/example/too_many.js | 35 + .../node_modules/tape/example/two.js | 18 + .../node_modules/tape/index.js | 140 + .../node_modules/tape/lib/default_stream.js | 31 + .../node_modules/tape/lib/results.js | 189 + .../node_modules/tape/lib/test.js | 496 + .../tape/node_modules/deep-equal/.travis.yml | 4 + .../tape/node_modules/deep-equal/LICENSE | 18 + .../tape/node_modules/deep-equal/index.js | 94 + .../node_modules/deep-equal/lib/is_arguments.js | 20 + .../tape/node_modules/deep-equal/lib/keys.js | 9 + .../tape/node_modules/deep-equal/package.json | 84 + .../node_modules/deep-equal/readme.markdown | 61 + .../tape/node_modules/defined/.travis.yml | 4 + .../tape/node_modules/defined/LICENSE | 18 + .../tape/node_modules/defined/index.js | 5 + .../tape/node_modules/defined/package.json | 60 + .../tape/node_modules/defined/readme.markdown | 51 + .../tape/node_modules/glob/.npmignore | 2 + .../tape/node_modules/glob/.travis.yml | 3 + .../node_modules/tape/node_modules/glob/LICENSE | 27 + .../tape/node_modules/glob/README.md | 250 + .../node_modules/tape/node_modules/glob/glob.js | 728 + .../glob/node_modules/minimatch/.npmignore | 1 + .../glob/node_modules/minimatch/LICENSE | 23 + .../glob/node_modules/minimatch/README.md | 218 + .../glob/node_modules/minimatch/minimatch.js | 1061 ++ .../minimatch/node_modules/lru-cache/.npmignore | 1 + .../node_modules/lru-cache/.travis.yml | 8 + .../node_modules/lru-cache/CONTRIBUTORS | 14 + .../minimatch/node_modules/lru-cache/LICENSE | 15 + .../minimatch/node_modules/lru-cache/README.md | 119 + .../node_modules/lru-cache/lib/lru-cache.js | 318 + .../node_modules/lru-cache/package.json | 58 + .../minimatch/node_modules/sigmund/LICENSE | 15 + .../minimatch/node_modules/sigmund/README.md | 53 + .../minimatch/node_modules/sigmund/bench.js | 283 + .../minimatch/node_modules/sigmund/package.json | 60 + .../minimatch/node_modules/sigmund/sigmund.js | 39 + .../glob/node_modules/minimatch/package.json | 57 + .../tape/node_modules/glob/package.json | 58 + .../tape/node_modules/inherits/LICENSE | 16 + .../tape/node_modules/inherits/README.md | 42 + .../tape/node_modules/inherits/inherits.js | 1 + .../node_modules/inherits/inherits_browser.js | 23 + .../tape/node_modules/inherits/package.json | 50 + .../tape/node_modules/inherits/test.js | 25 + .../node_modules/object-inspect/.travis.yml | 4 + .../tape/node_modules/object-inspect/LICENSE | 18 + .../tape/node_modules/object-inspect/index.js | 127 + .../node_modules/object-inspect/package.json | 70 + .../node_modules/object-inspect/readme.markdown | 59 + .../tape/node_modules/resumer/.travis.yml | 4 + .../tape/node_modules/resumer/LICENSE | 18 + .../tape/node_modules/resumer/index.js | 29 + .../tape/node_modules/resumer/package.json | 71 + .../tape/node_modules/resumer/readme.markdown | 59 + .../tape/node_modules/through/.travis.yml | 5 + .../tape/node_modules/through/LICENSE.APACHE2 | 15 + .../tape/node_modules/through/LICENSE.MIT | 24 + .../tape/node_modules/through/index.js | 108 + .../tape/node_modules/through/package.json | 66 + .../tape/node_modules/through/readme.markdown | 64 + .../node_modules/tape/package.json | 88 + .../node_modules/tape/readme.markdown | 317 + .../cordova-registry-mapper/package.json | 51 + .../cordova-common/node_modules/glob/LICENSE | 15 + .../cordova-common/node_modules/glob/README.md | 377 + .../cordova-common/node_modules/glob/common.js | 245 + .../cordova-common/node_modules/glob/glob.js | 752 + .../glob/node_modules/inflight/.eslintrc | 17 + .../glob/node_modules/inflight/LICENSE | 15 + .../glob/node_modules/inflight/README.md | 37 + .../glob/node_modules/inflight/inflight.js | 44 + .../glob/node_modules/inflight/package.json | 61 + .../glob/node_modules/inflight/test.js | 97 + .../glob/node_modules/inherits/LICENSE | 16 + .../glob/node_modules/inherits/README.md | 42 + .../glob/node_modules/inherits/inherits.js | 1 + .../node_modules/inherits/inherits_browser.js | 23 + .../glob/node_modules/inherits/package.json | 50 + .../glob/node_modules/inherits/test.js | 25 + .../glob/node_modules/minimatch/LICENSE | 15 + .../glob/node_modules/minimatch/README.md | 216 + .../glob/node_modules/minimatch/minimatch.js | 912 + .../node_modules/brace-expansion/.npmignore | 3 + .../node_modules/brace-expansion/README.md | 122 + .../node_modules/brace-expansion/example.js | 8 + .../node_modules/brace-expansion/index.js | 191 + .../node_modules/balanced-match/.npmignore | 2 + .../node_modules/balanced-match/.travis.yml | 3 + .../node_modules/balanced-match/LICENSE.md | 21 + .../node_modules/balanced-match/Makefile | 6 + .../node_modules/balanced-match/README.md | 80 + .../node_modules/balanced-match/example.js | 5 + .../node_modules/balanced-match/index.js | 38 + .../node_modules/balanced-match/package.json | 73 + .../node_modules/concat-map/.travis.yml | 4 + .../node_modules/concat-map/LICENSE | 18 + .../node_modules/concat-map/README.markdown | 62 + .../node_modules/concat-map/index.js | 13 + .../node_modules/concat-map/package.json | 83 + .../node_modules/brace-expansion/package.json | 75 + .../glob/node_modules/minimatch/package.json | 60 + .../node_modules/glob/node_modules/once/LICENSE | 15 + .../glob/node_modules/once/README.md | 51 + .../node_modules/glob/node_modules/once/once.js | 21 + .../glob/node_modules/once/package.json | 60 + .../glob/node_modules/path-is-absolute/index.js | 20 + .../glob/node_modules/path-is-absolute/license | 21 + .../node_modules/path-is-absolute/package.json | 70 + .../node_modules/path-is-absolute/readme.md | 51 + .../glob/node_modules/wrappy/LICENSE | 15 + .../glob/node_modules/wrappy/README.md | 36 + .../glob/node_modules/wrappy/package.json | 52 + .../glob/node_modules/wrappy/wrappy.js | 33 + .../node_modules/glob/package.json | 73 + .../cordova-common/node_modules/glob/sync.js | 460 + .../node_modules/osenv/.npmignore | 13 + .../node_modules/osenv/.travis.yml | 9 + .../cordova-common/node_modules/osenv/LICENSE | 15 + .../cordova-common/node_modules/osenv/README.md | 63 + .../osenv/node_modules/os-homedir/index.js | 24 + .../osenv/node_modules/os-homedir/license | 21 + .../osenv/node_modules/os-homedir/package.json | 70 + .../osenv/node_modules/os-homedir/readme.md | 33 + .../osenv/node_modules/os-tmpdir/index.js | 25 + .../osenv/node_modules/os-tmpdir/license | 21 + .../osenv/node_modules/os-tmpdir/package.json | 70 + .../osenv/node_modules/os-tmpdir/readme.md | 36 + .../cordova-common/node_modules/osenv/osenv.js | 72 + .../node_modules/osenv/package.json | 76 + .../cordova-common/node_modules/osenv/x.tap | 39 + .../cordova-common/node_modules/plist/.jshintrc | 4 + .../node_modules/plist/.travis.yml | 32 + .../node_modules/plist/History.md | 112 + .../cordova-common/node_modules/plist/LICENSE | 24 + .../cordova-common/node_modules/plist/Makefile | 76 + .../cordova-common/node_modules/plist/README.md | 113 + .../node_modules/plist/dist/plist-build.js | 12596 ++++++++++++++ .../node_modules/plist/dist/plist-parse.js | 3628 ++++ .../node_modules/plist/dist/plist.js | 14920 +++++++++++++++++ .../node_modules/plist/lib/build.js | 136 + .../node_modules/plist/lib/node.js | 49 + .../node_modules/plist/lib/parse.js | 200 + .../node_modules/plist/lib/plist.js | 23 + .../plist/node_modules/base64-js/.travis.yml | 5 + .../plist/node_modules/base64-js/LICENSE.MIT | 21 + .../plist/node_modules/base64-js/README.md | 31 + .../plist/node_modules/base64-js/bench/bench.js | 19 + .../plist/node_modules/base64-js/lib/b64.js | 121 + .../plist/node_modules/base64-js/package.json | 62 + .../node_modules/base64-js/test/convert.js | 52 + .../node_modules/util-deprecate/History.md | 5 + .../plist/node_modules/util-deprecate/LICENSE | 24 + .../plist/node_modules/util-deprecate/README.md | 53 + .../node_modules/util-deprecate/browser.js | 55 + .../plist/node_modules/util-deprecate/node.js | 6 + .../node_modules/util-deprecate/package.json | 52 + .../plist/node_modules/xmlbuilder/.npmignore | 4 + .../plist/node_modules/xmlbuilder/LICENSE | 21 + .../plist/node_modules/xmlbuilder/README.md | 82 + .../node_modules/xmlbuilder/lib/XMLAttribute.js | 32 + .../node_modules/xmlbuilder/lib/XMLBuilder.js | 70 + .../node_modules/xmlbuilder/lib/XMLCData.js | 48 + .../node_modules/xmlbuilder/lib/XMLComment.js | 48 + .../xmlbuilder/lib/XMLDTDAttList.js | 71 + .../xmlbuilder/lib/XMLDTDElement.js | 49 + .../node_modules/xmlbuilder/lib/XMLDTDEntity.js | 85 + .../xmlbuilder/lib/XMLDTDNotation.js | 59 + .../xmlbuilder/lib/XMLDeclaration.js | 70 + .../node_modules/xmlbuilder/lib/XMLDocType.js | 183 + .../node_modules/xmlbuilder/lib/XMLElement.js | 190 + .../node_modules/xmlbuilder/lib/XMLNode.js | 304 + .../xmlbuilder/lib/XMLProcessingInstruction.js | 50 + .../plist/node_modules/xmlbuilder/lib/XMLRaw.js | 48 + .../xmlbuilder/lib/XMLStringifier.js | 163 + .../node_modules/xmlbuilder/lib/XMLText.js | 49 + .../plist/node_modules/xmlbuilder/lib/index.js | 14 + .../node_modules/lodash-node/LICENSE.txt | 22 + .../node_modules/lodash-node/README.md | 44 + .../node_modules/lodash-node/compat/arrays.js | 40 + .../lodash-node/compat/arrays/compact.js | 38 + .../lodash-node/compat/arrays/difference.js | 31 + .../lodash-node/compat/arrays/findIndex.js | 65 + .../lodash-node/compat/arrays/findLastIndex.js | 63 + .../lodash-node/compat/arrays/first.js | 86 + .../lodash-node/compat/arrays/flatten.js | 66 + .../lodash-node/compat/arrays/indexOf.js | 50 + .../lodash-node/compat/arrays/initial.js | 82 + .../lodash-node/compat/arrays/intersection.js | 83 + .../lodash-node/compat/arrays/last.js | 84 + .../lodash-node/compat/arrays/lastIndexOf.js | 54 + .../lodash-node/compat/arrays/pull.js | 57 + .../lodash-node/compat/arrays/range.js | 69 + .../lodash-node/compat/arrays/remove.js | 71 + .../lodash-node/compat/arrays/rest.js | 83 + .../lodash-node/compat/arrays/sortedIndex.js | 77 + .../lodash-node/compat/arrays/union.js | 30 + .../lodash-node/compat/arrays/uniq.js | 69 + .../lodash-node/compat/arrays/without.js | 31 + .../lodash-node/compat/arrays/xor.js | 46 + .../lodash-node/compat/arrays/zip.js | 40 + .../lodash-node/compat/arrays/zipObject.js | 48 + .../node_modules/lodash-node/compat/chaining.js | 17 + .../lodash-node/compat/chaining/chain.js | 41 + .../lodash-node/compat/chaining/tap.js | 35 + .../lodash-node/compat/chaining/wrapperChain.js | 40 + .../compat/chaining/wrapperToString.js | 26 + .../compat/chaining/wrapperValueOf.js | 28 + .../lodash-node/compat/collections.js | 49 + .../lodash-node/compat/collections/at.js | 50 + .../lodash-node/compat/collections/contains.js | 65 + .../lodash-node/compat/collections/countBy.js | 55 + .../lodash-node/compat/collections/every.js | 75 + .../lodash-node/compat/collections/filter.js | 77 + .../lodash-node/compat/collections/find.js | 81 + .../lodash-node/compat/collections/findLast.js | 44 + .../lodash-node/compat/collections/forEach.js | 55 + .../compat/collections/forEachRight.js | 59 + .../lodash-node/compat/collections/groupBy.js | 56 + .../lodash-node/compat/collections/indexBy.js | 54 + .../lodash-node/compat/collections/invoke.js | 47 + .../lodash-node/compat/collections/map.js | 70 + .../lodash-node/compat/collections/max.js | 90 + .../lodash-node/compat/collections/min.js | 90 + .../lodash-node/compat/collections/pluck.js | 33 + .../lodash-node/compat/collections/reduce.js | 67 + .../compat/collections/reduceRight.js | 42 + .../lodash-node/compat/collections/reject.js | 57 + .../lodash-node/compat/collections/sample.js | 52 + .../lodash-node/compat/collections/shuffle.js | 39 + .../lodash-node/compat/collections/size.js | 36 + .../lodash-node/compat/collections/some.js | 76 + .../lodash-node/compat/collections/sortBy.js | 101 + .../lodash-node/compat/collections/toArray.js | 36 + .../lodash-node/compat/collections/where.js | 38 + .../lodash-node/compat/functions.js | 27 + .../lodash-node/compat/functions/after.js | 46 + .../lodash-node/compat/functions/bind.js | 41 + .../lodash-node/compat/functions/bindAll.js | 49 + .../lodash-node/compat/functions/bindKey.js | 52 + .../lodash-node/compat/functions/compose.js | 61 + .../compat/functions/createCallback.js | 81 + .../lodash-node/compat/functions/curry.js | 44 + .../lodash-node/compat/functions/debounce.js | 156 + .../lodash-node/compat/functions/defer.js | 35 + .../lodash-node/compat/functions/delay.js | 36 + .../lodash-node/compat/functions/memoize.js | 71 + .../lodash-node/compat/functions/once.js | 48 + .../lodash-node/compat/functions/partial.js | 34 + .../compat/functions/partialRight.js | 43 + .../lodash-node/compat/functions/throttle.js | 71 + .../lodash-node/compat/functions/wrap.js | 36 + .../node_modules/lodash-node/compat/index.js | 376 + .../lodash-node/compat/internals/arrayPool.js | 13 + .../lodash-node/compat/internals/baseBind.js | 62 + .../lodash-node/compat/internals/baseClone.js | 154 + .../lodash-node/compat/internals/baseCreate.js | 42 + .../compat/internals/baseCreateCallback.js | 80 + .../compat/internals/baseCreateWrapper.js | 78 + .../compat/internals/baseDifference.js | 52 + .../lodash-node/compat/internals/baseEach.js | 28 + .../lodash-node/compat/internals/baseFlatten.js | 52 + .../lodash-node/compat/internals/baseIndexOf.js | 32 + .../lodash-node/compat/internals/baseIsEqual.js | 212 + .../lodash-node/compat/internals/baseMerge.js | 79 + .../lodash-node/compat/internals/baseRandom.js | 29 + .../lodash-node/compat/internals/baseUniq.js | 64 + .../compat/internals/cacheIndexOf.js | 39 + .../lodash-node/compat/internals/cachePush.js | 38 + .../compat/internals/charAtCallback.js | 22 + .../compat/internals/compareAscending.js | 47 + .../compat/internals/createAggregator.js | 45 + .../lodash-node/compat/internals/createCache.js | 45 + .../compat/internals/createIterator.js | 127 + .../compat/internals/createWrapper.js | 106 + .../compat/internals/defaultsIteratorOptions.js | 26 + .../compat/internals/eachIteratorOptions.js | 20 + .../compat/internals/escapeHtmlChar.js | 22 + .../compat/internals/escapeStringChar.js | 33 + .../compat/internals/forOwnIteratorOptions.js | 17 + .../lodash-node/compat/internals/getArray.js | 21 + .../lodash-node/compat/internals/getObject.js | 35 + .../lodash-node/compat/internals/htmlEscapes.js | 26 + .../compat/internals/htmlUnescapes.js | 15 + .../compat/internals/indicatorObject.js | 13 + .../lodash-node/compat/internals/isNative.js | 34 + .../lodash-node/compat/internals/isNode.js | 23 + .../compat/internals/iteratorTemplate.js | 109 + .../lodash-node/compat/internals/keyPrefix.js | 13 + .../compat/internals/largeArraySize.js | 13 + .../compat/internals/lodashWrapper.js | 23 + .../lodash-node/compat/internals/maxPoolSize.js | 13 + .../lodash-node/compat/internals/objectPool.js | 13 + .../lodash-node/compat/internals/objectTypes.js | 20 + .../compat/internals/reEscapedHtml.js | 15 + .../compat/internals/reInterpolate.js | 13 + .../compat/internals/reUnescapedHtml.js | 15 + .../compat/internals/releaseArray.js | 25 + .../compat/internals/releaseObject.js | 29 + .../lodash-node/compat/internals/setBindData.js | 43 + .../compat/internals/shimIsPlainObject.js | 67 + .../lodash-node/compat/internals/shimKeys.js | 27 + .../lodash-node/compat/internals/slice.js | 38 + .../compat/internals/unescapeHtmlChar.js | 22 + .../node_modules/lodash-node/compat/objects.js | 52 + .../lodash-node/compat/objects/assign.js | 55 + .../lodash-node/compat/objects/clone.js | 63 + .../lodash-node/compat/objects/cloneDeep.js | 57 + .../lodash-node/compat/objects/create.js | 48 + .../lodash-node/compat/objects/defaults.js | 34 + .../lodash-node/compat/objects/findKey.js | 65 + .../lodash-node/compat/objects/findLastKey.js | 65 + .../lodash-node/compat/objects/forIn.js | 48 + .../lodash-node/compat/objects/forInRight.js | 57 + .../lodash-node/compat/objects/forOwn.js | 36 + .../lodash-node/compat/objects/forOwnRight.js | 44 + .../lodash-node/compat/objects/functions.js | 37 + .../lodash-node/compat/objects/has.js | 35 + .../lodash-node/compat/objects/invert.js | 37 + .../lodash-node/compat/objects/isArguments.js | 52 + .../lodash-node/compat/objects/isArray.js | 45 + .../lodash-node/compat/objects/isBoolean.js | 37 + .../lodash-node/compat/objects/isDate.js | 36 + .../lodash-node/compat/objects/isElement.js | 27 + .../lodash-node/compat/objects/isEmpty.js | 66 + .../lodash-node/compat/objects/isEqual.js | 54 + .../lodash-node/compat/objects/isFinite.js | 46 + .../lodash-node/compat/objects/isFunction.js | 42 + .../lodash-node/compat/objects/isNaN.js | 42 + .../lodash-node/compat/objects/isNull.js | 30 + .../lodash-node/compat/objects/isNumber.js | 39 + .../lodash-node/compat/objects/isObject.js | 39 + .../lodash-node/compat/objects/isPlainObject.js | 62 + .../lodash-node/compat/objects/isRegExp.js | 37 + .../lodash-node/compat/objects/isString.js | 37 + .../lodash-node/compat/objects/isUndefined.js | 27 + .../lodash-node/compat/objects/keys.js | 42 + .../lodash-node/compat/objects/mapValues.js | 58 + .../lodash-node/compat/objects/merge.js | 97 + .../lodash-node/compat/objects/omit.js | 67 + .../lodash-node/compat/objects/pairs.js | 38 + .../lodash-node/compat/objects/pick.js | 65 + .../lodash-node/compat/objects/transform.js | 67 + .../lodash-node/compat/objects/values.js | 36 + .../node_modules/lodash-node/compat/support.js | 177 + .../lodash-node/compat/utilities.js | 28 + .../lodash-node/compat/utilities/constant.js | 31 + .../lodash-node/compat/utilities/escape.js | 31 + .../lodash-node/compat/utilities/identity.js | 28 + .../lodash-node/compat/utilities/mixin.js | 88 + .../lodash-node/compat/utilities/noConflict.js | 30 + .../lodash-node/compat/utilities/noop.js | 26 + .../lodash-node/compat/utilities/now.js | 28 + .../lodash-node/compat/utilities/parseInt.js | 53 + .../lodash-node/compat/utilities/property.js | 40 + .../lodash-node/compat/utilities/random.js | 73 + .../lodash-node/compat/utilities/result.js | 45 + .../lodash-node/compat/utilities/template.js | 216 + .../compat/utilities/templateSettings.js | 73 + .../lodash-node/compat/utilities/times.js | 46 + .../lodash-node/compat/utilities/unescape.js | 32 + .../lodash-node/compat/utilities/uniqueId.js | 34 + .../node_modules/lodash-node/modern/arrays.js | 40 + .../lodash-node/modern/arrays/compact.js | 38 + .../lodash-node/modern/arrays/difference.js | 31 + .../lodash-node/modern/arrays/findIndex.js | 65 + .../lodash-node/modern/arrays/findLastIndex.js | 63 + .../lodash-node/modern/arrays/first.js | 86 + .../lodash-node/modern/arrays/flatten.js | 66 + .../lodash-node/modern/arrays/indexOf.js | 50 + .../lodash-node/modern/arrays/initial.js | 82 + .../lodash-node/modern/arrays/intersection.js | 83 + .../lodash-node/modern/arrays/last.js | 84 + .../lodash-node/modern/arrays/lastIndexOf.js | 54 + .../lodash-node/modern/arrays/pull.js | 57 + .../lodash-node/modern/arrays/range.js | 69 + .../lodash-node/modern/arrays/remove.js | 71 + .../lodash-node/modern/arrays/rest.js | 83 + .../lodash-node/modern/arrays/sortedIndex.js | 77 + .../lodash-node/modern/arrays/union.js | 30 + .../lodash-node/modern/arrays/uniq.js | 69 + .../lodash-node/modern/arrays/without.js | 31 + .../lodash-node/modern/arrays/xor.js | 46 + .../lodash-node/modern/arrays/zip.js | 40 + .../lodash-node/modern/arrays/zipObject.js | 48 + .../node_modules/lodash-node/modern/chaining.js | 17 + .../lodash-node/modern/chaining/chain.js | 41 + .../lodash-node/modern/chaining/tap.js | 35 + .../lodash-node/modern/chaining/wrapperChain.js | 40 + .../modern/chaining/wrapperToString.js | 26 + .../modern/chaining/wrapperValueOf.js | 29 + .../lodash-node/modern/collections.js | 49 + .../lodash-node/modern/collections/at.js | 46 + .../lodash-node/modern/collections/contains.js | 65 + .../lodash-node/modern/collections/countBy.js | 55 + .../lodash-node/modern/collections/every.js | 74 + .../lodash-node/modern/collections/filter.js | 76 + .../lodash-node/modern/collections/find.js | 80 + .../lodash-node/modern/collections/findLast.js | 44 + .../lodash-node/modern/collections/forEach.js | 55 + .../modern/collections/forEachRight.js | 52 + .../lodash-node/modern/collections/groupBy.js | 56 + .../lodash-node/modern/collections/indexBy.js | 54 + .../lodash-node/modern/collections/invoke.js | 47 + .../lodash-node/modern/collections/map.js | 70 + .../lodash-node/modern/collections/max.js | 91 + .../lodash-node/modern/collections/min.js | 91 + .../lodash-node/modern/collections/pluck.js | 33 + .../lodash-node/modern/collections/reduce.js | 67 + .../modern/collections/reduceRight.js | 42 + .../lodash-node/modern/collections/reject.js | 57 + .../lodash-node/modern/collections/sample.js | 49 + .../lodash-node/modern/collections/shuffle.js | 39 + .../lodash-node/modern/collections/size.js | 36 + .../lodash-node/modern/collections/some.js | 76 + .../lodash-node/modern/collections/sortBy.js | 101 + .../lodash-node/modern/collections/toArray.js | 33 + .../lodash-node/modern/collections/where.js | 38 + .../lodash-node/modern/functions.js | 27 + .../lodash-node/modern/functions/after.js | 46 + .../lodash-node/modern/functions/bind.js | 40 + .../lodash-node/modern/functions/bindAll.js | 49 + .../lodash-node/modern/functions/bindKey.js | 52 + .../lodash-node/modern/functions/compose.js | 61 + .../modern/functions/createCallback.js | 81 + .../lodash-node/modern/functions/curry.js | 44 + .../lodash-node/modern/functions/debounce.js | 156 + .../lodash-node/modern/functions/defer.js | 35 + .../lodash-node/modern/functions/delay.js | 36 + .../lodash-node/modern/functions/memoize.js | 71 + .../lodash-node/modern/functions/once.js | 48 + .../lodash-node/modern/functions/partial.js | 34 + .../modern/functions/partialRight.js | 43 + .../lodash-node/modern/functions/throttle.js | 71 + .../lodash-node/modern/functions/wrap.js | 36 + .../node_modules/lodash-node/modern/index.js | 354 + .../lodash-node/modern/internals/arrayPool.js | 13 + .../lodash-node/modern/internals/baseBind.js | 62 + .../lodash-node/modern/internals/baseClone.js | 152 + .../lodash-node/modern/internals/baseCreate.js | 42 + .../modern/internals/baseCreateCallback.js | 80 + .../modern/internals/baseCreateWrapper.js | 78 + .../modern/internals/baseDifference.js | 52 + .../lodash-node/modern/internals/baseFlatten.js | 52 + .../lodash-node/modern/internals/baseIndexOf.js | 32 + .../lodash-node/modern/internals/baseIsEqual.js | 209 + .../lodash-node/modern/internals/baseMerge.js | 79 + .../lodash-node/modern/internals/baseRandom.js | 29 + .../lodash-node/modern/internals/baseUniq.js | 64 + .../modern/internals/cacheIndexOf.js | 39 + .../lodash-node/modern/internals/cachePush.js | 38 + .../modern/internals/charAtCallback.js | 22 + .../modern/internals/compareAscending.js | 47 + .../modern/internals/createAggregator.js | 45 + .../lodash-node/modern/internals/createCache.js | 45 + .../modern/internals/createWrapper.js | 106 + .../modern/internals/escapeHtmlChar.js | 22 + .../modern/internals/escapeStringChar.js | 33 + .../lodash-node/modern/internals/getArray.js | 21 + .../lodash-node/modern/internals/getObject.js | 35 + .../lodash-node/modern/internals/htmlEscapes.js | 26 + .../modern/internals/htmlUnescapes.js | 15 + .../lodash-node/modern/internals/isNative.js | 34 + .../lodash-node/modern/internals/keyPrefix.js | 13 + .../modern/internals/largeArraySize.js | 13 + .../modern/internals/lodashWrapper.js | 23 + .../lodash-node/modern/internals/maxPoolSize.js | 13 + .../lodash-node/modern/internals/objectPool.js | 13 + .../lodash-node/modern/internals/objectTypes.js | 20 + .../modern/internals/reEscapedHtml.js | 15 + .../modern/internals/reInterpolate.js | 13 + .../modern/internals/reUnescapedHtml.js | 15 + .../modern/internals/releaseArray.js | 25 + .../modern/internals/releaseObject.js | 29 + .../lodash-node/modern/internals/setBindData.js | 43 + .../modern/internals/shimIsPlainObject.js | 52 + .../lodash-node/modern/internals/shimKeys.js | 38 + .../lodash-node/modern/internals/slice.js | 38 + .../modern/internals/unescapeHtmlChar.js | 22 + .../node_modules/lodash-node/modern/objects.js | 52 + .../lodash-node/modern/objects/assign.js | 70 + .../lodash-node/modern/objects/clone.js | 63 + .../lodash-node/modern/objects/cloneDeep.js | 57 + .../lodash-node/modern/objects/create.js | 48 + .../lodash-node/modern/objects/defaults.js | 54 + .../lodash-node/modern/objects/findKey.js | 65 + .../lodash-node/modern/objects/findLastKey.js | 65 + .../lodash-node/modern/objects/forIn.js | 54 + .../lodash-node/modern/objects/forInRight.js | 57 + .../lodash-node/modern/objects/forOwn.js | 50 + .../lodash-node/modern/objects/forOwnRight.js | 44 + .../lodash-node/modern/objects/functions.js | 37 + .../lodash-node/modern/objects/has.js | 35 + .../lodash-node/modern/objects/invert.js | 37 + .../lodash-node/modern/objects/isArguments.js | 40 + .../lodash-node/modern/objects/isArray.js | 45 + .../lodash-node/modern/objects/isBoolean.js | 37 + .../lodash-node/modern/objects/isDate.js | 36 + .../lodash-node/modern/objects/isElement.js | 27 + .../lodash-node/modern/objects/isEmpty.js | 63 + .../lodash-node/modern/objects/isEqual.js | 54 + .../lodash-node/modern/objects/isFinite.js | 46 + .../lodash-node/modern/objects/isFunction.js | 27 + .../lodash-node/modern/objects/isNaN.js | 42 + .../lodash-node/modern/objects/isNull.js | 30 + .../lodash-node/modern/objects/isNumber.js | 39 + .../lodash-node/modern/objects/isObject.js | 39 + .../lodash-node/modern/objects/isPlainObject.js | 60 + .../lodash-node/modern/objects/isRegExp.js | 36 + .../lodash-node/modern/objects/isString.js | 37 + .../lodash-node/modern/objects/isUndefined.js | 27 + .../lodash-node/modern/objects/keys.js | 36 + .../lodash-node/modern/objects/mapValues.js | 58 + .../lodash-node/modern/objects/merge.js | 97 + .../lodash-node/modern/objects/omit.js | 67 + .../lodash-node/modern/objects/pairs.js | 38 + .../lodash-node/modern/objects/pick.js | 65 + .../lodash-node/modern/objects/transform.js | 67 + .../lodash-node/modern/objects/values.js | 36 + .../node_modules/lodash-node/modern/support.js | 40 + .../lodash-node/modern/utilities.js | 28 + .../lodash-node/modern/utilities/constant.js | 31 + .../lodash-node/modern/utilities/escape.js | 31 + .../lodash-node/modern/utilities/identity.js | 28 + .../lodash-node/modern/utilities/mixin.js | 88 + .../lodash-node/modern/utilities/noConflict.js | 30 + .../lodash-node/modern/utilities/noop.js | 26 + .../lodash-node/modern/utilities/now.js | 28 + .../lodash-node/modern/utilities/parseInt.js | 53 + .../lodash-node/modern/utilities/property.js | 40 + .../lodash-node/modern/utilities/random.js | 73 + .../lodash-node/modern/utilities/result.js | 45 + .../lodash-node/modern/utilities/template.js | 216 + .../modern/utilities/templateSettings.js | 73 + .../lodash-node/modern/utilities/times.js | 46 + .../lodash-node/modern/utilities/unescape.js | 32 + .../lodash-node/modern/utilities/uniqueId.js | 34 + .../node_modules/lodash-node/package.json | 83 + .../lodash-node/underscore/arrays.js | 35 + .../lodash-node/underscore/arrays/compact.js | 38 + .../lodash-node/underscore/arrays/difference.js | 31 + .../lodash-node/underscore/arrays/first.js | 86 + .../lodash-node/underscore/arrays/flatten.js | 56 + .../lodash-node/underscore/arrays/indexOf.js | 50 + .../lodash-node/underscore/arrays/initial.js | 82 + .../underscore/arrays/intersection.js | 60 + .../lodash-node/underscore/arrays/last.js | 84 + .../underscore/arrays/lastIndexOf.js | 54 + .../lodash-node/underscore/arrays/range.js | 69 + .../lodash-node/underscore/arrays/rest.js | 83 + .../underscore/arrays/sortedIndex.js | 77 + .../lodash-node/underscore/arrays/union.js | 30 + .../lodash-node/underscore/arrays/uniq.js | 69 + .../lodash-node/underscore/arrays/without.js | 31 + .../lodash-node/underscore/arrays/zip.js | 39 + .../lodash-node/underscore/arrays/zipObject.js | 48 + .../lodash-node/underscore/chaining.js | 16 + .../lodash-node/underscore/chaining/chain.js | 41 + .../lodash-node/underscore/chaining/tap.js | 35 + .../underscore/chaining/wrapperChain.js | 40 + .../underscore/chaining/wrapperValueOf.js | 29 + .../lodash-node/underscore/collections.js | 47 + .../underscore/collections/contains.js | 54 + .../underscore/collections/countBy.js | 55 + .../lodash-node/underscore/collections/every.js | 75 + .../underscore/collections/filter.js | 76 + .../lodash-node/underscore/collections/find.js | 81 + .../underscore/collections/findWhere.js | 38 + .../underscore/collections/forEach.js | 55 + .../underscore/collections/forEachRight.js | 51 + .../underscore/collections/groupBy.js | 56 + .../underscore/collections/indexBy.js | 54 + .../underscore/collections/invoke.js | 47 + .../lodash-node/underscore/collections/map.js | 70 + .../lodash-node/underscore/collections/max.js | 86 + .../lodash-node/underscore/collections/min.js | 86 + .../lodash-node/underscore/collections/pluck.js | 33 + .../underscore/collections/reduce.js | 67 + .../underscore/collections/reduceRight.js | 42 + .../underscore/collections/reject.js | 57 + .../underscore/collections/sample.js | 49 + .../underscore/collections/shuffle.js | 39 + .../lodash-node/underscore/collections/size.js | 36 + .../lodash-node/underscore/collections/some.js | 77 + .../underscore/collections/sortBy.js | 86 + .../underscore/collections/toArray.js | 37 + .../lodash-node/underscore/collections/where.js | 44 + .../lodash-node/underscore/functions.js | 24 + .../lodash-node/underscore/functions/after.js | 46 + .../lodash-node/underscore/functions/bind.js | 40 + .../lodash-node/underscore/functions/bindAll.js | 49 + .../lodash-node/underscore/functions/compose.js | 61 + .../underscore/functions/createCallback.js | 67 + .../underscore/functions/debounce.js | 156 + .../lodash-node/underscore/functions/defer.js | 35 + .../lodash-node/underscore/functions/delay.js | 36 + .../lodash-node/underscore/functions/memoize.js | 65 + .../lodash-node/underscore/functions/once.js | 48 + .../lodash-node/underscore/functions/partial.js | 34 + .../underscore/functions/throttle.js | 65 + .../lodash-node/underscore/functions/wrap.js | 36 + .../lodash-node/underscore/index.js | 284 + .../underscore/internals/baseBind.js | 60 + .../underscore/internals/baseCreate.js | 42 + .../underscore/internals/baseCreateCallback.js | 47 + .../underscore/internals/baseCreateWrapper.js | 76 + .../underscore/internals/baseDifference.js | 35 + .../underscore/internals/baseFlatten.js | 52 + .../underscore/internals/baseIndexOf.js | 32 + .../underscore/internals/baseIsEqual.js | 149 + .../underscore/internals/baseRandom.js | 29 + .../underscore/internals/baseUniq.js | 45 + .../underscore/internals/compareAscending.js | 47 + .../underscore/internals/createAggregator.js | 45 + .../underscore/internals/createWrapper.js | 60 + .../underscore/internals/escapeHtmlChar.js | 22 + .../underscore/internals/escapeStringChar.js | 33 + .../underscore/internals/htmlEscapes.js | 26 + .../underscore/internals/htmlUnescapes.js | 15 + .../underscore/internals/indicatorObject.js | 13 + .../underscore/internals/isNative.js | 34 + .../underscore/internals/keyPrefix.js | 13 + .../underscore/internals/lodashWrapper.js | 23 + .../underscore/internals/objectTypes.js | 20 + .../underscore/internals/reEscapedHtml.js | 15 + .../underscore/internals/reInterpolate.js | 13 + .../underscore/internals/reUnescapedHtml.js | 15 + .../underscore/internals/shimKeys.js | 38 + .../lodash-node/underscore/internals/slice.js | 38 + .../underscore/internals/unescapeHtmlChar.js | 22 + .../lodash-node/underscore/objects.js | 42 + .../lodash-node/underscore/objects/assign.js | 58 + .../lodash-node/underscore/objects/clone.js | 61 + .../lodash-node/underscore/objects/defaults.js | 49 + .../lodash-node/underscore/objects/forIn.js | 54 + .../lodash-node/underscore/objects/forOwn.js | 53 + .../lodash-node/underscore/objects/functions.js | 37 + .../lodash-node/underscore/objects/has.js | 35 + .../lodash-node/underscore/objects/invert.js | 37 + .../underscore/objects/isArguments.js | 51 + .../lodash-node/underscore/objects/isArray.js | 45 + .../lodash-node/underscore/objects/isBoolean.js | 37 + .../lodash-node/underscore/objects/isDate.js | 36 + .../lodash-node/underscore/objects/isElement.js | 27 + .../lodash-node/underscore/objects/isEmpty.js | 54 + .../lodash-node/underscore/objects/isEqual.js | 53 + .../lodash-node/underscore/objects/isFinite.js | 46 + .../underscore/objects/isFunction.js | 42 + .../lodash-node/underscore/objects/isNaN.js | 42 + .../lodash-node/underscore/objects/isNull.js | 30 + .../lodash-node/underscore/objects/isNumber.js | 39 + .../lodash-node/underscore/objects/isObject.js | 39 + .../lodash-node/underscore/objects/isRegExp.js | 37 + .../lodash-node/underscore/objects/isString.js | 37 + .../underscore/objects/isUndefined.js | 27 + .../lodash-node/underscore/objects/keys.js | 36 + .../lodash-node/underscore/objects/omit.js | 57 + .../lodash-node/underscore/objects/pairs.js | 38 + .../lodash-node/underscore/objects/pick.js | 53 + .../lodash-node/underscore/objects/values.js | 36 + .../lodash-node/underscore/support.js | 46 + .../lodash-node/underscore/utilities.js | 26 + .../lodash-node/underscore/utilities/escape.js | 31 + .../underscore/utilities/identity.js | 28 + .../lodash-node/underscore/utilities/mixin.js | 74 + .../underscore/utilities/noConflict.js | 30 + .../lodash-node/underscore/utilities/noop.js | 26 + .../lodash-node/underscore/utilities/now.js | 28 + .../underscore/utilities/property.js | 40 + .../lodash-node/underscore/utilities/random.js | 58 + .../lodash-node/underscore/utilities/result.js | 45 + .../underscore/utilities/template.js | 163 + .../underscore/utilities/templateSettings.js | 73 + .../lodash-node/underscore/utilities/times.js | 46 + .../underscore/utilities/unescape.js | 32 + .../underscore/utilities/uniqueId.js | 34 + .../plist/node_modules/xmlbuilder/package.json | 65 + .../plist/node_modules/xmldom/.npmignore | 5 + .../plist/node_modules/xmldom/.travis.yml | 22 + .../plist/node_modules/xmldom/LICENSE | 8 + .../plist/node_modules/xmldom/__package__.js | 4 + .../plist/node_modules/xmldom/component.json | 10 + .../plist/node_modules/xmldom/dom-parser.js | 255 + .../plist/node_modules/xmldom/dom.js | 1138 ++ .../plist/node_modules/xmldom/package.json | 96 + .../plist/node_modules/xmldom/readme.md | 219 + .../plist/node_modules/xmldom/sax.js | 584 + .../node_modules/plist/package.json | 90 + .../node_modules/underscore/LICENSE | 23 + .../node_modules/underscore/README.md | 22 + .../node_modules/underscore/package.json | 70 + .../node_modules/underscore/underscore-min.js | 6 + .../node_modules/underscore/underscore-min.map | 1 + .../node_modules/underscore/underscore.js | 1548 ++ .../node_modules/unorm/LICENSE.md | 42 + .../cordova-common/node_modules/unorm/README.md | 118 + .../node_modules/unorm/lib/unorm.js | 442 + .../node_modules/unorm/package.json | 69 + node_modules/cordova-common/package.json | 53 + node_modules/cordova-common/src/.jshintrc | 10 + node_modules/cordova-common/src/ActionStack.js | 85 + .../src/ConfigChanges/ConfigChanges.js | 325 + .../src/ConfigChanges/ConfigFile.js | 208 + .../src/ConfigChanges/ConfigKeeper.js | 65 + .../src/ConfigChanges/munge-util.js | 160 + .../src/ConfigParser/ConfigParser.js | 499 + .../cordova-common/src/ConfigParser/README.md | 86 + .../src/CordovaError/CordovaError.js | 91 + .../CordovaExternalToolErrorContext.js | 48 + node_modules/cordova-common/src/PlatformJson.js | 155 + .../cordova-common/src/PluginInfo/PluginInfo.js | 416 + .../src/PluginInfo/PluginInfoProvider.js | 82 + node_modules/cordova-common/src/events.js | 19 + node_modules/cordova-common/src/superspawn.js | 154 + .../cordova-common/src/util/plist-helpers.js | 101 + .../cordova-common/src/util/xml-helpers.js | 266 + node_modules/elementtree/CHANGES.md | 13 +- node_modules/elementtree/README.md | 114 + node_modules/elementtree/lib/elementtree.js | 17 +- .../elementtree/node_modules/sax/package.json | 35 +- node_modules/elementtree/package.json | 28 +- node_modules/node-uuid/LICENSE.md | 23 +- node_modules/node-uuid/README.md | 40 +- node_modules/node-uuid/bin/uuid | 26 + node_modules/node-uuid/bower.json | 23 + node_modules/node-uuid/component.json | 4 +- node_modules/node-uuid/package.json | 42 +- node_modules/node-uuid/uuid.js | 16 +- node_modules/nopt/.travis.yml | 9 + node_modules/nopt/LICENSE | 32 +- node_modules/nopt/README.md | 22 +- node_modules/nopt/examples/my-program.js | 30 - .../nopt/node_modules/abbrev/.npmignore | 4 + .../nopt/node_modules/abbrev/.travis.yml | 5 + node_modules/nopt/node_modules/abbrev/LICENSE | 32 +- .../nopt/node_modules/abbrev/package.json | 41 +- node_modules/nopt/node_modules/abbrev/test.js | 4 +- node_modules/nopt/package.json | 46 +- node_modules/nopt/test/basic.js | 251 - node_modules/q/CHANGES.md | 786 + node_modules/q/CONTRIBUTING.md | 40 - node_modules/q/README.md | 81 +- .../q/benchmark/compare-with-callbacks.js | 71 - node_modules/q/benchmark/scenarios.js | 36 - node_modules/q/package.json | 51 +- node_modules/q/q.js | 280 +- node_modules/semver/.npmignore | 4 + node_modules/semver/.travis.yml | 5 + node_modules/semver/LICENSE | 15 + node_modules/semver/README.md | 303 + node_modules/semver/package.json | 51 + node_modules/semver/semver.js | 1200 ++ node_modules/shelljs/.travis.yml | 3 +- node_modules/shelljs/README.md | 26 +- node_modules/shelljs/RELEASE.md | 9 + node_modules/shelljs/make.js | 19 +- node_modules/shelljs/package.json | 33 +- node_modules/shelljs/shell.js | 8 +- node_modules/shelljs/src/cp.js | 5 +- node_modules/shelljs/src/exec.js | 71 +- node_modules/shelljs/src/rm.js | 20 +- node_modules/winjs/README.md | 17 +- node_modules/winjs/css/ui-dark.css | 944 +- node_modules/winjs/css/ui-dark.min.css | 2 +- node_modules/winjs/css/ui-light.css | 944 +- node_modules/winjs/css/ui-light.min.css | 2 +- node_modules/winjs/js/base.js | 1457 +- node_modules/winjs/js/base.min.js | 21 +- node_modules/winjs/js/base.min.js.map | 2 +- node_modules/winjs/js/en-US/ui.strings.js | 804 +- node_modules/winjs/js/ui.js | 6812 ++++---- node_modules/winjs/js/ui.min.js | 55 +- node_modules/winjs/js/ui.min.js.map | 2 +- node_modules/winjs/package.json | 51 +- package.json | 94 +- spec/unit/AppxManifest.spec.js | 102 + spec/unit/MSBuildTools.spec.js | 52 +- spec/unit/Prepare.Win10.spec.js | 433 +- spec/unit/Version.spec.js | 47 +- spec/unit/WindowsConfigParser.spec.js | 104 + spec/unit/build.spec.js | 18 +- spec/unit/deployment.spec.js | 43 +- spec/unit/run.spec.js | 8 +- template/cordova/Api.js | 470 + template/cordova/build | 72 +- template/cordova/clean | 14 +- template/cordova/lib/AppxManifest.js | 595 + template/cordova/lib/ConfigParser.js | 334 +- template/cordova/lib/ConsoleLogger.js | 75 + template/cordova/lib/JsprojManager.js | 608 + template/cordova/lib/MSBuildTools.js | 46 +- template/cordova/lib/PluginHandler.js | 233 + template/cordova/lib/build.js | 351 +- template/cordova/lib/deployment.js | 59 +- template/cordova/lib/exec.js | 38 - template/cordova/lib/log.js | 43 +- template/cordova/lib/package.js | 84 +- template/cordova/lib/prepare.js | 679 +- template/cordova/lib/run.js | 125 +- template/cordova/lib/spawn.js | 40 - template/cordova/lib/target-list.js | 6 +- template/cordova/lib/utils.js | 45 +- template/cordova/log | 2 +- template/cordova/run | 66 +- template/cordova/version | 6 +- 851 files changed, 93778 insertions(+), 6821 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index 759486e..9899188 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,10 @@ obj Thumbs.db # Skip node_modules +node_modules/ -node_modules/ \ No newline at end of file +npm-debug.log + +# Skip testing stuff +coverage/* +testcreate* http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/.jshintignore ---------------------------------------------------------------------- diff --git a/.jshintignore b/.jshintignore index 126ec0f..7e102e2 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1,2 +1,2 @@ template/www/* -template/WinJS/* \ No newline at end of file +template/WinJS/* http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/bin/create ---------------------------------------------------------------------- diff --git a/bin/create b/bin/create index a687b3b..d34fac3 100755 --- a/bin/create +++ b/bin/create @@ -19,20 +19,37 @@ under the License. */ -/* - * create a cordova/windows8 project - * USAGE - * ./create [path package activity] - * ./bin/create.bat C:\Users\Me\MyTestProj "test.proj" "TestProject" - */ - -var create = require('./lib/create'); - -if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) > -1) { - create.help(); -} else { - create.run(process.argv).done(null, function (err) { - console.error('Failed to create project due to', err); - process.exit(2); - }); +var path = require('path'); +var ConfigParser = require('cordova-common').ConfigParser; +var Api = require('../template/cordova/Api'); + +var argv = require('nopt')({ + 'help' : Boolean, + 'guid': String +}); + +if (argv.help || argv.argv.remain.length === 0) { + console.log('Usage: create PathToProject [ PackageName [ AppName [ CustomTemplate ] ] ] [--guid=<GUID string>]'); + console.log(' PathToProject : The path to where you wish to create the project'); + console.log(' PackageName : The namespace for the project (default is Cordova.Example)'); + console.log(' AppName : The name of the application (default is CordovaAppProj)'); + console.log(' CustomTemplate: The path to project template overrides'); + console.log(' (will be copied over default platform template files)'); + console.log(' --guid : The App\'s GUID (default is random generated)'); + console.log('examples:'); + console.log(' create C:\\Users\\anonymous\\Desktop\\MyProject'); + console.log(' create C:\\Users\\anonymous\\Desktop\\MyProject io.Cordova.Example AnApp'); + process.exit(1); } + +var config = new ConfigParser(path.resolve(__dirname, '../template/config.xml')); + +if (argv.argv.remain[1]) config.setPackageName(argv.argv.remain[1]); +if (argv.argv.remain[2]) config.setName(argv.argv.remain[2]); + +var options = { + guid: argv.guid, + customTemplate: argv.argv.remain[3] +}; + +Api.createPlatform(argv.argv.remain[0], config, options).done(); http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/bin/lib/check_reqs.js ---------------------------------------------------------------------- diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js index 9b7eab1..7ba036d 100644 --- a/bin/lib/check_reqs.js +++ b/bin/lib/check_reqs.js @@ -23,19 +23,19 @@ var Q = require('q'); var os = require('os'); var path = require('path'); var shell = require('shelljs'); +var spawn = require('cordova-common').superspawn.spawn; +var CordovaError = require('cordova-common').CordovaError; -var ConfigParser, MSBuildTools, Version, exec; +var ConfigParser, MSBuildTools, Version; try { ConfigParser = require('../../template/cordova/lib/ConfigParser'); MSBuildTools = require('../../template/cordova/lib/MSBuildTools'); - exec = require('../../template/cordova/lib/exec'); Version = require('../../template/cordova/lib/Version'); } catch (ex) { // If previous import fails, we're probably running this script // from installed platform and the module location is different. ConfigParser = require('./ConfigParser'); MSBuildTools = require('./MSBuildTools'); - exec = require('./exec'); Version = require('./Version'); } @@ -70,9 +70,10 @@ var REQUIRED_VERSIONS = { function getConfig() { try { - return new ConfigParser(path.join(__dirname, '..', '..', 'config.xml')); + return new ConfigParser(path.join(__dirname, '../../config.xml')); } catch (e) { - throw new Error('Can\'t find config.xml file or it is malformed.'); + throw new CordovaError('Can\'t check requirements for Windows platform.' + + 'The config.xml file is either missing or malformed.'); } } @@ -118,7 +119,7 @@ function getHighestAppropriateVersion (versions, requiredVersion) { * @return {Version} Version information for current OS. */ function getWindowsVersion() { - return exec('ver').then(function (output) { + return spawn('ver').then(function (output) { var match = /\[Version (.*)\]\s*$/.exec(output); return Version.fromString(match[1]); }).fail(function () { @@ -135,7 +136,7 @@ function getWindowsVersion() { function getInstalledVSVersions() { // Query all keys with Install value equal to 1, then filter out // those, which are not related to VS itself - return exec('reg query HKLM\\SOFTWARE\\Microsoft\\DevDiv\\vs\\Servicing /s /v Install /f 1 /d /e /reg:32') + return spawn('reg', ['query', 'HKLM\\SOFTWARE\\Microsoft\\DevDiv\\vs\\Servicing', '/s', '/v', 'Install', '/f', '1', '/d', '/e', '/reg:32']) .fail(function () { return ''; }) .then(function (output) { return output.split('\n') @@ -151,8 +152,7 @@ function getInstalledVSVersions() { if (installedVersions.indexOf('12.0') === -1) return installedVersions; // special case for VS 2013. We need to check if VS2013 update 2 is installed - return exec('reg query "HKLM\\SOFTWARE\\Microsoft\\Updates\\Microsoft Visual Studio' + - ' 2013\\vsupdate_KB2829760" /v PackageVersion /reg:32') + return spawn('reg', ['query','HKLM\\SOFTWARE\\Microsoft\\Updates\\Microsoft Visual Studio 2013\\vsupdate_KB2829760','/v','PackageVersion','/reg:32']) .then(function (output) { var updateVer = Version.fromString(/PackageVersion\s+REG_SZ\s+(.*)/i.exec(output)[1]); // if update version is lover than Update2, reject the promise @@ -175,7 +175,7 @@ function getInstalledVSVersions() { */ function getInstalledWindowsSdks () { var installedSdks = []; - return exec('reg query "HKLM\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows" /s /v InstallationFolder /reg:32') + return spawn('reg', ['query','HKLM\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows','/s','/v','InstallationFolder','/reg:32']) .fail(function () { return ''; }) .then(function (output) { var re = /\\Microsoft SDKs\\Windows\\v(\d+\.\d+)\s*InstallationFolder\s+REG_SZ\s+(.*)/gim; @@ -200,7 +200,7 @@ function getInstalledWindowsSdks () { */ function getInstalledPhoneSdks () { var installedSdks = []; - return exec('reg query "HKLM\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows Phone\\v8.1" /v InstallationFolder /reg:32') + return spawn('reg', ['query','HKLM\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows Phone\\v8.1','/v','InstallationFolder','/reg:32']) .fail(function () { return ''; }) .then(function (output) { var match = /\\Microsoft SDKs\\Windows Phone\\v(\d+\.\d+)\s*InstallationFolder\s+REG_SZ\s+(.*)/gim.exec(output); @@ -209,7 +209,7 @@ function getInstalledPhoneSdks () { } }) .then(function () { - return exec('reg query "HKLM\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v10.0" /v InstallationFolder /reg:32'); + return spawn('reg', ['query','HKLM\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v10.0','/v','InstallationFolder','/reg:32']); }) .fail(function () { return ''; }) .then(function (output) { @@ -267,7 +267,7 @@ var checkOS = function () { var requiredOsVersion = getMinimalRequiredVersionFor('os'); if (actualVersion.gte(requiredOsVersion) || // Special case for Windows 10/Phone 10 targets which can be built on Windows 7 (version 6.1) - actualVersion.major === 6 && actualVersion.minor === 1 && getConfig.getWindowsTargetVersion() === '10.0') { + actualVersion.major === 6 && actualVersion.minor === 1 && getConfig().getWindowsTargetVersion() === '10.0') { return mapWindowsVersionToName(actualVersion); } http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/bin/lib/create.js ---------------------------------------------------------------------- diff --git a/bin/lib/create.js b/bin/lib/create.js index 7604304..22e713a 100644 --- a/bin/lib/create.js +++ b/bin/lib/create.js @@ -17,59 +17,58 @@ under the License. */ -/* jshint sub:true */ - -var Q = require('q'), - fs = require('fs'), - path = require('path'), - nopt = require('nopt'), - shell = require('shelljs'), - uuid = require('node-uuid'); +var Q = require('q'); +var fs = require('fs'); +var path = require('path'); +var shell = require('shelljs'); +var uuid = require('node-uuid'); +var CordovaError = require('cordova-common').CordovaError; +var AppxManifest = require('../../template/cordova/lib/AppxManifest'); // Creates cordova-windows project at specified path with specified namespace, app name and GUID -module.exports.run = function (argv) { - - // Parse args - var args = nopt({'guid': String}, {}, argv); +// module.exports.run = function (argv) { +module.exports.create = function (destinationDir, config, options, events) { + if(!destinationDir) return Q.reject('No destination directory specified.'); - if(!args.argv.remain.length) { - return Q.reject('No path specified.'); + var projectPath = path.resolve(destinationDir); + if (fs.existsSync(projectPath)) { + return Q.reject(new CordovaError('Project directory already exists:\n\t' + projectPath)); } // Set parameters/defaults for create - var projectPath = args.argv.remain[0]; - if (fs.existsSync(projectPath)){ - return Q.reject('Project directory already exists:\n\t' + projectPath); - } - var packageName = args.argv.remain[1] || 'Cordova.Example', - appName = args.argv.remain[2] || 'CordovaAppProj', + var packageName = (config && config.packageName()) || 'Cordova.Example'; + var appName = (config && config.name()) || 'CordovaAppProj'; // 64 symbols restriction goes from manifest schema definition // http://msdn.microsoft.com/en-us/library/windows/apps/br211415.aspx - safeAppName = appName.length <= 64 ? appName : appName.substr(0, 64), - templateOverrides = args.argv.remain[3], - guid = args['guid'] || uuid.v1(), - root = path.join(__dirname, '..', '..'); - - console.log('Creating Cordova Windows Project:'); - console.log('\tApp Name : ' + appName); - console.log('\tNamespace : ' + packageName); - console.log('\tPath : ' + projectPath); + var safeAppName = appName.length <= 64 ? appName : appName.substr(0, 64); + var templateOverrides = options.customTemplate; + var guid = options.guid || uuid.v1(); + var root = path.join(__dirname, '..', '..'); + + events.emit('log', 'Creating Cordova Windows Project:'); + events.emit('log', '\tApp Name : ' + appName); + events.emit('log', '\tNamespace : ' + packageName); + events.emit('log', '\tPath : ' + projectPath); if (templateOverrides) { - console.log('\tCustomTemplatePath : ' + templateOverrides); + events.emit('log', '\tCustomTemplatePath : ' + templateOverrides); } - // Copy the template source files to the new destination - console.log('Copying template to ' + projectPath); + events.emit('verbose', 'Copying template to ' + projectPath); shell.cp('-rf', path.join(root, 'template', '*'), projectPath); + // Duplicate cordova.js to platform_www otherwise it will get removed by prepare + shell.cp('-rf', path.join(root, 'template/www/cordova.js'), path.join(projectPath, 'platform_www')); + // Copy cordova-js-src directory + events.emit('verbose', 'Copying cordova-js sources to platform_www'); shell.cp('-rf', path.join(root, 'cordova-js-src'), path.join(projectPath, 'platform_www')); // Copy our unique VERSION file, so peeps can tell what version this project was created from. shell.cp('-rf', path.join(root, 'VERSION'), projectPath); // copy node_modules to cordova directory + events.emit('verbose', 'Copying node_modules to ' + projectPath); shell.cp('-r', path.join(root, 'node_modules'), path.join(projectPath, 'cordova')); // copy check_reqs module to cordova directory @@ -77,7 +76,7 @@ module.exports.run = function (argv) { shell.cp('-rf', path.join(root, 'bin', 'lib', 'check_reqs*'), path.join(projectPath, 'cordova', 'lib')); if (templateOverrides && fs.existsSync(templateOverrides)) { - console.log('Copying template overrides from ' + templateOverrides + ' to ' + projectPath); + events.emit('verbose', 'Copying template overrides from ' + templateOverrides + ' to ' + projectPath); shell.cp('-rf', templateOverrides, projectPath); } @@ -89,11 +88,18 @@ module.exports.run = function (argv) { shell.cp('-f', srcBaseJsPath, destBaseJsPath); // replace specific values in manifests' templates - ['package.windows.appxmanifest', 'package.windows80.appxmanifest', 'package.phone.appxmanifest', 'package.windows10.appxmanifest'].forEach(function (file) { - var fileToReplace = path.join(projectPath, file); - shell.sed('-i', /\$guid1\$/g, guid, fileToReplace); - shell.sed('-i', /\$packagename\$/g, packageName, fileToReplace); - shell.sed('-i', /\$projectname\$/g, safeAppName, fileToReplace); + events.emit('verbose', 'Updating manifest files with project configuration.'); + [ 'package.windows.appxmanifest', 'package.windows80.appxmanifest', + 'package.phone.appxmanifest', 'package.windows10.appxmanifest' ] + .forEach(function (item) { + var manifest = AppxManifest.get(path.join(projectPath, item)); + if (manifest.hasPhoneIdentity) { + manifest.getPhoneIdentity().setPhoneProductId(guid); + } + + manifest.setPackageName(packageName) + .setAppName(safeAppName) + .write(); }); // Delete bld forder and bin folder @@ -101,11 +107,6 @@ module.exports.run = function (argv) { shell.rm('-rf', path.join(projectPath, file)); }); - // TODO: Name the project according to the arguments - // update the solution to include the new project by name - // version BS - // index.html title set to project name ? - return Q.resolve(); }; @@ -124,16 +125,3 @@ function recursiveCreateDirectory(targetPath, previousPath) { fs.mkdirSync(targetPath); } - -module.exports.help = function () { - console.log('Usage: create PathToProject [ PackageName [ AppName [ CustomTemplate ] ] ] [--guid=<GUID string>]'); - console.log(' PathToProject : The path to where you wish to create the project'); - console.log(' PackageName : The namespace for the project (default is Cordova.Example)'); - console.log(' AppName : The name of the application (default is CordovaAppProj)'); - console.log(' CustomTemplate: The path to project template overrides'); - console.log(' (will be copied over default platform template files)'); - console.log(' --guid : The App\'s GUID (default is random generated)'); - console.log('examples:'); - console.log(' create C:\\Users\\anonymous\\Desktop\\MyProject'); - console.log(' create C:\\Users\\anonymous\\Desktop\\MyProject io.Cordova.Example AnApp'); -}; http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/bin/lib/update.js ---------------------------------------------------------------------- diff --git a/bin/lib/update.js b/bin/lib/update.js index 91833e8..2e3e9e3 100644 --- a/bin/lib/update.js +++ b/bin/lib/update.js @@ -17,71 +17,42 @@ under the License. */ -var Q = require('q'), - fs = require('fs'), - path = require('path'), - shell = require('shelljs'), - create = require('./create'), - ConfigParser = require('../../template/cordova/lib/ConfigParser'); +var Q = require('q'); +var fs = require('fs'); +var path = require('path'); +var shell = require('shelljs'); +var create = require('./create'); +var ConfigParser = require('cordova-common').ConfigParser; +var CordovaError = require('cordova-common').CordovaError; +var AppxManifest = require('../../template/cordova/lib/AppxManifest'); -// returns package metadata from config.xml with fields 'namespace' and 'name' -function extractMetadata(projectPath) { - var projectConfig = path.join(projectPath, 'config.xml'); +// updates the cordova.js in project along with the cordova tooling. +module.exports.update = function (destinationDir, options, events) { + if (!fs.existsSync(destinationDir)){ + // if specified project path is not valid then reject promise + return Q.reject(new CordovaError('The given path to the project does not exist.' + + ' Please provide a path to the project you\'d like to update.')); + } + + var projectConfig = path.join(destinationDir, 'config.xml'); if (!fs.existsSync(projectConfig)){ - return Q.reject('config.xml does not exist'); + return Q.reject(new CordovaError('Can\'t update project at ' + destinationDir + + '. config.xml does not exist in destination directory')); } + var guid; var config = new ConfigParser(projectConfig); - var meta = { - packageName: config.packageName(), - name: config.name(), - guid: undefined - }; // guid param is used only when adding a platform, and isn't saved anywhere. // The only place, where it is being persisted - phone/win10 appxmanifest file, - // but since win10 introduced just recently, we're can't rely on its manifest + // but since win10 introduced just recently, we can't rely on its manifest // for old platform versions. - var manifestPath = path.join(projectPath, 'package.phone.appxmanifest'); + var manifestPath = path.join(destinationDir, 'package.phone.appxmanifest'); try { - var manifest = fs.readFileSync(manifestPath, 'utf-8'); - var matches = /\bPhoneProductId="(.*?)"/gm.exec(manifest); - if (matches) { - meta.guid = matches[1]; - } + guid = AppxManifest.get(manifestPath).getPhoneIdentity().getPhoneProductId(); } catch (e) { /*ignore IO errors */ } - return Q.resolve(meta); -} - -module.exports.help = function () { - console.log('WARNING : Make sure to back up your project before updating!'); - console.log('Usage: update PathToProject '); - console.log(' PathToProject : The path the project you would like to update.'); - console.log('examples:'); - console.log(' update C:\\Users\\anonymous\\Desktop\\MyProject'); -}; - -// updates the cordova.js in project along with the cordova tooling. -module.exports.run = function (argv) { - var projectPath = argv[2]; - if (!fs.existsSync(projectPath)){ - // if specified project path is not valid then reject promise - Q.reject('The given path to the project does not exist.' + - ' Please provide a path to the project you would like to update.'); - } - - return extractMetadata(projectPath) - .then(function (metadata) { - shell.rm('-rf', projectPath); - - // setup args for create.run which requires process.argv-like array - var createArgs = argv.concat([metadata.packageName, metadata.name]); - if (metadata.guid) { - createArgs.push('--guid=' + metadata.guid); - } - - return create.run(createArgs); - }); + shell.rm('-rf', destinationDir); + return create.create(destinationDir, config, {guid: guid}, events); }; http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/bin/update ---------------------------------------------------------------------- diff --git a/bin/update b/bin/update index f3e8287..a0d1524 100755 --- a/bin/update +++ b/bin/update @@ -19,16 +19,16 @@ under the License. */ -var update = require('./lib/update'); +var Api = require('../template/cordova/Api'); +var args = require('nopt')({ 'help': Boolean }); -// check for help flag -if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) > -1) { - update.help(); -} else { - update.run(process.argv).done(function () { - console.log('Successfully updated windows project.'); - }, function (err) { - console.error('Failed to check requirements due to', err); - process.exit(2); - }); +if (args.help || args.argv.remain.length === 0) { + console.log('WARNING : Make sure to back up your project before updating!'); + console.log('Usage: update PathToProject '); + console.log(' PathToProject : The path the project you would like to update.'); + console.log('examples:'); + console.log(' update C:\\Users\\anonymous\\Desktop\\MyProject'); + process.exit(1); } + +Api.updatePlatform(args.argv.remain[0]).done(); http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/node_modules/.bin/nopt ---------------------------------------------------------------------- diff --git a/node_modules/.bin/nopt b/node_modules/.bin/nopt deleted file mode 100644 index 25995f3..0000000 --- a/node_modules/.bin/nopt +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=`dirname "$0"` - -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 http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/node_modules/.bin/nopt.cmd ---------------------------------------------------------------------- diff --git a/node_modules/.bin/nopt.cmd b/node_modules/.bin/nopt.cmd deleted file mode 100644 index c8e8216..0000000 --- a/node_modules/.bin/nopt.cmd +++ /dev/null @@ -1,5 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\nopt\bin\nopt.js" %* -) ELSE ( - node "%~dp0\..\nopt\bin\nopt.js" %* -) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/node_modules/.bin/shjs ---------------------------------------------------------------------- diff --git a/node_modules/.bin/shjs b/node_modules/.bin/shjs deleted file mode 100644 index 9908675..0000000 --- a/node_modules/.bin/shjs +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=`dirname "$0"` - -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 http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/node_modules/.bin/shjs.cmd ---------------------------------------------------------------------- diff --git a/node_modules/.bin/shjs.cmd b/node_modules/.bin/shjs.cmd deleted file mode 100644 index 9ce460a..0000000 --- a/node_modules/.bin/shjs.cmd +++ /dev/null @@ -1,5 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\shelljs\bin\shjs" %* -) ELSE ( - node "%~dp0\..\shelljs\bin\shjs" %* -) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/node_modules/cordova-common/.jscs.json ---------------------------------------------------------------------- diff --git a/node_modules/cordova-common/.jscs.json b/node_modules/cordova-common/.jscs.json new file mode 100644 index 0000000..5cc7e26 --- /dev/null +++ b/node_modules/cordova-common/.jscs.json @@ -0,0 +1,24 @@ +{ + "disallowMixedSpacesAndTabs": true, + "disallowTrailingWhitespace": true, + "validateLineBreaks": "LF", + "validateIndentation": 4, + "requireLineFeedAtFileEnd": true, + + "disallowSpaceAfterPrefixUnaryOperators": true, + "disallowSpaceBeforePostfixUnaryOperators": true, + "requireSpaceAfterLineComment": true, + "requireCapitalizedConstructors": true, + + "disallowSpacesInNamedFunctionExpression": { + "beforeOpeningRoundBrace": true + }, + + "requireSpaceAfterKeywords": [ + "if", + "else", + "for", + "while", + "do" + ] +} http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/node_modules/cordova-common/.jshintignore ---------------------------------------------------------------------- diff --git a/node_modules/cordova-common/.jshintignore b/node_modules/cordova-common/.jshintignore new file mode 100644 index 0000000..d606f61 --- /dev/null +++ b/node_modules/cordova-common/.jshintignore @@ -0,0 +1 @@ +spec/fixtures/* http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/node_modules/cordova-common/.npmignore ---------------------------------------------------------------------- diff --git a/node_modules/cordova-common/.npmignore b/node_modules/cordova-common/.npmignore new file mode 100644 index 0000000..5d14118 --- /dev/null +++ b/node_modules/cordova-common/.npmignore @@ -0,0 +1,2 @@ +spec +coverage http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/node_modules/cordova-common/.ratignore ---------------------------------------------------------------------- diff --git a/node_modules/cordova-common/.ratignore b/node_modules/cordova-common/.ratignore new file mode 100644 index 0000000..26f7205 --- /dev/null +++ b/node_modules/cordova-common/.ratignore @@ -0,0 +1,2 @@ +fixtures +coverage http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/node_modules/cordova-common/README.md ---------------------------------------------------------------------- diff --git a/node_modules/cordova-common/README.md b/node_modules/cordova-common/README.md new file mode 100644 index 0000000..f19b59f --- /dev/null +++ b/node_modules/cordova-common/README.md @@ -0,0 +1,149 @@ +<!-- +# +# 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. +# +--> + +# cordova-common +Expoeses shared functionality used by [cordova-lib](https://github.com/apache/cordova-lib/) and Cordova platforms. +## Exposed APIs + +### `events` + +Represents special instance of NodeJS EventEmitter which is intended to be used to post events to cordova-lib and cordova-cli + +Usage: +``` +var events = require('cordova-common').events; +events.emit('warn', 'Some warning message') +``` + +There are the following events supported by cordova-cli: `verbose`, `log`, `info`, `warn`, `error`. + +### `CordovaError` + +An error class used by Cordova to throw cordova-specific errors. The CordovaError class is inherited from Error, so CordovaError instances is also valid Error instances (`instanceof` check succeeds). + +Usage: + +``` +var CordovaError = require('cordova-common').CordovaError; +throw new CordovaError('Some error message', SOME_ERR_CODE); +``` + +See [CordovaError](src/CordovaError/CordovaError.js) for supported error codes. + +### `ConfigParser` + +Exposes functionality to deal with cordova project `config.xml` files. For ConfigParser API reference check [ConfigParser Readme](src/ConfigParser/README.md). + +Usage: +``` +var ConfigParser = require('cordova-common').ConfigParser; +var appConfig = new ConfigParser('path/to/cordova-app/config.xml'); +console.log(appconfig.name() + ':' + appConfig.version()); +``` + +### `PluginInfoProvider` and `PluginInfo` + +`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: +``` +var PluginInfo: require('cordova-common').PluginInfo; +var PluginInfoProvider: require('cordova-common').PluginInfoProvider; + +// The following instances are equal +var plugin1 = new PluginInfo('path/to/plugin_directory'); +var plugin2 = new PluginInfoProvider().get('path/to/plugin_directory'); + +console.log('The plugin ' + plugin1.id + ' has version ' + plugin1.version) +``` + +### `ActionStack` + +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: +``` +var ActionStack = require('cordova-common').ActionStack; +var stack = new ActionStack() + +var action1 = stack.createAction(task1, [<task parameters>], task1_reverter, [<reverter_parameters>]); +var action2 = stack.createAction(task2, [<task parameters>], task2_reverter, [<reverter_parameters>]); + +stack.push(action1); +stack.push(action2); + +stack.process() +.then(function() { + // all actions succeded +}) +.catch(function(error){ + // One of actions failed with error +}) +``` + +### `superspawn` + +Module for spawning child processes with some advanced logic. + +Usage: +``` +var superspawn = require('cordova-common').superspawn; +superspawn.spawn('adb', ['devices']) +.then(function(devices){ + // Do something... +}) +``` + +### `xmlHelpers` + +A set of utility methods for dealing with xml files. + +Usage: +``` +var xml = require('cordova-common').xmlHelpers; + +var xmlDoc1 = xml.parseElementtreeSync('some/xml/file'); +var xmlDoc2 = xml.parseElementtreeSync('another/xml/file'); + +xml.mergeXml(doc1, doc2); // doc2 now contains all the nodes from doc1 +``` + +### Other APIs + +The APIs listed below are also exposed but are intended to be only used internally by cordova plugin installation routines. + +``` +PlatformJson +ConfigChanges +ConfigKeeper +ConfigFile +mungeUtil +``` + +## Setup +* Clone this repository onto your local machine + `git clone https://git-wip-us.apache.org/repos/asf/cordova-lib.git` +* In terminal, navigate to the inner cordova-common directory + `cd cordova-lib/cordova-common` +* Install dependencies and npm-link + `npm install && npm link` +* Navigate to cordova-lib directory and link cordova-common + `cd ../cordova-lib && npm link cordova-common && npm install` http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/node_modules/cordova-common/RELEASENOTES.md ---------------------------------------------------------------------- diff --git a/node_modules/cordova-common/RELEASENOTES.md b/node_modules/cordova-common/RELEASENOTES.md new file mode 100644 index 0000000..5a4cc51 --- /dev/null +++ b/node_modules/cordova-common/RELEASENOTES.md @@ -0,0 +1,34 @@ +<!-- +# +# 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. +# +--> +# Cordova-common Release Notes + +### 1.0.0 (Oct 29, 2015) + +* CB-9890 Documents cordova-common +* CB-9598 Correct cordova-lib -> cordova-common in README +* Pick ConfigParser changes from apache@0c3614e +* CB-9743 Removes system frameworks handling from ConfigChanges +* CB-9598 Cleans out code which has been moved to `cordova-common` +* Pick ConfigParser changes from apache@ddb027b +* Picking CordovaError changes from apache@a3b1fca +* CB-9598 Adds tests and fixtures based on existing cordova-lib ones +* CB-9598 Initial implementation for cordova-common + http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/node_modules/cordova-common/cordova-common.js ---------------------------------------------------------------------- diff --git a/node_modules/cordova-common/cordova-common.js b/node_modules/cordova-common/cordova-common.js new file mode 100644 index 0000000..59b52fc --- /dev/null +++ b/node_modules/cordova-common/cordova-common.js @@ -0,0 +1,42 @@ +/** + 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. +*/ + +/* jshint node:true */ + +// For now expose plugman and cordova just as they were in the old repos +exports = module.exports = { + events: require('./src/events'), + superspawn: require('./src/superspawn'), + + ActionStack: require('./src/ActionStack'), + CordovaError: require('./src/CordovaError/CordovaError'), + CordovaExternalToolErrorContext: require('./src/CordovaError/CordovaExternalToolErrorContext'), + PlatformJson: require('./src/PlatformJson'), + ConfigParser: require('./src/ConfigParser/ConfigParser.js'), + + PluginInfo: require('./src/PluginInfo/PluginInfo.js'), + PluginInfoProvider: require('./src/PluginInfo/PluginInfoProvider.js'), + + ConfigChanges: require('./src/ConfigChanges/ConfigChanges.js'), + ConfigKeeper: require('./src/ConfigChanges/ConfigKeeper.js'), + ConfigFile: require('./src/ConfigChanges/ConfigFile.js'), + mungeUtil: require('./src/ConfigChanges/munge-util.js'), + + xmlHelpers: require('./src/util/xml-helpers') +}; http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/node_modules/cordova-common/node_modules/bplist-parser/.npmignore ---------------------------------------------------------------------- diff --git a/node_modules/cordova-common/node_modules/bplist-parser/.npmignore b/node_modules/cordova-common/node_modules/bplist-parser/.npmignore new file mode 100644 index 0000000..a9b46ea --- /dev/null +++ b/node_modules/cordova-common/node_modules/bplist-parser/.npmignore @@ -0,0 +1,8 @@ +/build/* +node_modules +*.node +*.sh +*.swp +.lock* +npm-debug.log +.idea http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/58047a3d/node_modules/cordova-common/node_modules/bplist-parser/README.md ---------------------------------------------------------------------- diff --git a/node_modules/cordova-common/node_modules/bplist-parser/README.md b/node_modules/cordova-common/node_modules/bplist-parser/README.md new file mode 100644 index 0000000..37e5e1c --- /dev/null +++ b/node_modules/cordova-common/node_modules/bplist-parser/README.md @@ -0,0 +1,47 @@ +bplist-parser +============= + +Binary Mac OS X Plist (property list) parser. + +## Installation + +```bash +$ npm install bplist-parser +``` + +## Quick Examples + +```javascript +var bplist = require('bplist-parser'); + +bplist.parseFile('myPlist.bplist', function(err, obj) { + if (err) throw err; + + console.log(JSON.stringify(obj)); +}); +``` + +## License + +(The MIT License) + +Copyright (c) 2012 Near Infinity Corporation + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +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 OR COPYRIGHT HOLDERS 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. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
