You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2016/08/01 22:23:04 UTC
[45/61] [abbrv] [partial] cordova-create git commit: gitignore node
modules
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-creator/bplistCreator.js
----------------------------------------------------------------------
diff --git a/node_modules/bplist-creator/bplistCreator.js b/node_modules/bplist-creator/bplistCreator.js
deleted file mode 100644
index b480826..0000000
--- a/node_modules/bplist-creator/bplistCreator.js
+++ /dev/null
@@ -1,404 +0,0 @@
-'use strict';
-
-// adapted from http://code.google.com/p/plist/source/browse/trunk/src/main/java/com/dd/plist/BinaryPropertyListWriter.java
-
-var streamBuffers = require("stream-buffers");
-
-var debug = false;
-
-function Real(value) {
- this.value = value;
-}
-
-module.exports = function(dicts) {
- var buffer = new streamBuffers.WritableStreamBuffer();
- buffer.write(new Buffer("bplist00"));
-
- if (debug) {
- console.log('create', require('util').inspect(dicts, false, 10));
- }
-
- if (dicts instanceof Array && dicts.length === 1) {
- dicts = dicts[0];
- }
-
- var entries = toEntries(dicts);
- if (debug) {
- console.log('entries', entries);
- }
- var idSizeInBytes = computeIdSizeInBytes(entries.length);
- var offsets = [];
- var offsetSizeInBytes;
- var offsetTableOffset;
-
- updateEntryIds();
-
- entries.forEach(function(entry, entryIdx) {
- offsets[entryIdx] = buffer.size();
- if (!entry) {
- buffer.write(0x00);
- } else {
- write(entry);
- }
- });
-
- writeOffsetTable();
- writeTrailer();
- return buffer.getContents();
-
- function updateEntryIds() {
- var strings = {};
- var entryId = 0;
- entries.forEach(function(entry) {
- if (entry.id) {
- return;
- }
- if (entry.type === 'string') {
- if (!entry.bplistOverride && strings.hasOwnProperty(entry.value)) {
- entry.type = 'stringref';
- entry.id = strings[entry.value];
- } else {
- strings[entry.value] = entry.id = entryId++;
- }
- } else {
- entry.id = entryId++;
- }
- });
-
- entries = entries.filter(function(entry) {
- return (entry.type !== 'stringref');
- });
- }
-
- function writeTrailer() {
- if (debug) {
- console.log('0x' + buffer.size().toString(16), 'writeTrailer');
- }
- // 6 null bytes
- buffer.write(new Buffer([0, 0, 0, 0, 0, 0]));
-
- // size of an offset
- if (debug) {
- console.log('0x' + buffer.size().toString(16), 'writeTrailer(offsetSizeInBytes):', offsetSizeInBytes);
- }
- writeByte(offsetSizeInBytes);
-
- // size of a ref
- if (debug) {
- console.log('0x' + buffer.size().toString(16), 'writeTrailer(offsetSizeInBytes):', idSizeInBytes);
- }
- writeByte(idSizeInBytes);
-
- // number of objects
- if (debug) {
- console.log('0x' + buffer.size().toString(16), 'writeTrailer(number of objects):', entries.length);
- }
- writeLong(entries.length);
-
- // top object
- if (debug) {
- console.log('0x' + buffer.size().toString(16), 'writeTrailer(top object)');
- }
- writeLong(0);
-
- // offset table offset
- if (debug) {
- console.log('0x' + buffer.size().toString(16), 'writeTrailer(offset table offset):', offsetTableOffset);
- }
- writeLong(offsetTableOffset);
- }
-
- function writeOffsetTable() {
- if (debug) {
- console.log('0x' + buffer.size().toString(16), 'writeOffsetTable');
- }
- offsetTableOffset = buffer.size();
- offsetSizeInBytes = computeOffsetSizeInBytes(offsetTableOffset);
- offsets.forEach(function(offset) {
- writeBytes(offset, offsetSizeInBytes);
- });
- }
-
- function write(entry) {
- switch (entry.type) {
- case 'dict':
- writeDict(entry);
- break;
- case 'number':
- case 'double':
- writeNumber(entry);
- break;
- case 'array':
- writeArray(entry);
- break;
- case 'boolean':
- writeBoolean(entry);
- break;
- case 'string':
- case 'string-utf16':
- writeString(entry);
- break;
- case 'data':
- writeData(entry);
- break;
- default:
- throw new Error("unhandled entry type: " + entry.type);
- }
- }
-
- function writeDict(entry) {
- if (debug) {
- var keysStr = entry.entryKeys.map(function(k) {return k.id;});
- var valsStr = entry.entryValues.map(function(k) {return k.id;});
- console.log('0x' + buffer.size().toString(16), 'writeDict', '(id: ' + entry.id + ')', '(keys: ' + keysStr + ')', '(values: ' + valsStr + ')');
- }
- writeIntHeader(0xD, entry.entryKeys.length);
- entry.entryKeys.forEach(function(entry) {
- writeID(entry.id);
- });
- entry.entryValues.forEach(function(entry) {
- writeID(entry.id);
- });
- }
-
- function writeNumber(entry) {
- if (debug) {
- console.log('0x' + buffer.size().toString(16), 'writeNumber', entry.value, ' (type: ' + entry.type + ')', '(id: ' + entry.id + ')');
- }
-
- if (entry.type !== 'double' && parseFloat(entry.value.toFixed()) == entry.value) {
- if (entry.value < 0) {
- writeByte(0x13);
- writeBytes(entry.value, 8);
- } else if (entry.value <= 0xff) {
- writeByte(0x10);
- writeBytes(entry.value, 1);
- } else if (entry.value <= 0xffff) {
- writeByte(0x11);
- writeBytes(entry.value, 2);
- } else if (entry.value <= 0xffffffff) {
- writeByte(0x12);
- writeBytes(entry.value, 4);
- } else {
- writeByte(0x13);
- writeBytes(entry.value, 8);
- }
- } else {
- writeByte(0x23);
- writeDouble(entry.value);
- }
- }
-
- function writeArray(entry) {
- if (debug) {
- console.log('0x' + buffer.size().toString(16), 'writeArray (length: ' + entry.entries.length + ')', '(id: ' + entry.id + ')');
- }
- writeIntHeader(0xA, entry.entries.length);
- entry.entries.forEach(function(e) {
- writeID(e.id);
- });
- }
-
- function writeBoolean(entry) {
- if (debug) {
- console.log('0x' + buffer.size().toString(16), 'writeBoolean', entry.value, '(id: ' + entry.id + ')');
- }
- writeByte(entry.value ? 0x09 : 0x08);
- }
-
- function writeString(entry) {
- if (debug) {
- console.log('0x' + buffer.size().toString(16), 'writeString', entry.value, '(id: ' + entry.id + ')');
- }
- if (entry.type === 'string-utf16') {
- var utf16 = new Buffer(entry.value, 'ucs2');
- writeIntHeader(0x6, utf16.length / 2);
- // needs to be big endian so swap the bytes
- for (var i = 0; i < utf16.length; i += 2) {
- var t = utf16[i + 0];
- utf16[i + 0] = utf16[i + 1];
- utf16[i + 1] = t;
- }
- buffer.write(utf16);
- } else {
- var utf8 = new Buffer(entry.value, 'utf8');
- writeIntHeader(0x5, utf8.length);
- buffer.write(utf8);
- }
- }
-
- function writeData(entry) {
- if (debug) {
- console.log('0x' + buffer.size().toString(16), 'writeData', entry.value, '(id: ' + entry.id + ')');
- }
- writeIntHeader(0x4, entry.value.length);
- buffer.write(entry.value);
- }
-
- function writeLong(l) {
- writeBytes(l, 8);
- }
-
- function writeByte(b) {
- buffer.write(new Buffer([b]));
- }
-
- function writeDouble(v) {
- var buf = new Buffer(8);
- buf.writeDoubleBE(v, 0);
- buffer.write(buf);
- }
-
- function writeIntHeader(kind, value) {
- if (value < 15) {
- writeByte((kind << 4) + value);
- } else if (value < 256) {
- writeByte((kind << 4) + 15);
- writeByte(0x10);
- writeBytes(value, 1);
- } else if (value < 65536) {
- writeByte((kind << 4) + 15);
- writeByte(0x11);
- writeBytes(value, 2);
- } else {
- writeByte((kind << 4) + 15);
- writeByte(0x12);
- writeBytes(value, 4);
- }
- }
-
- function writeID(id) {
- writeBytes(id, idSizeInBytes);
- }
-
- function writeBytes(value, bytes) {
- // write low-order bytes big-endian style
- var buf = new Buffer(bytes);
- var z = 0;
- // javascript doesn't handle large numbers
- while (bytes > 4) {
- buf[z++] = 0;
- bytes--;
- }
- for (var i = bytes - 1; i >= 0; i--) {
- buf[z++] = value >> (8 * i);
- }
- buffer.write(buf);
- }
-};
-
-function toEntries(dicts) {
- if (dicts.bplistOverride) {
- return [dicts];
- }
-
- if (dicts instanceof Array) {
- return toEntriesArray(dicts);
- } else if (dicts instanceof Buffer) {
- return [
- {
- type: 'data',
- value: dicts
- }
- ];
- } else if (dicts instanceof Real) {
- return [
- {
- type: 'double',
- value: dicts.value
- }
- ];
- } else if (typeof(dicts) === 'object') {
- return toEntriesObject(dicts);
- } else if (typeof(dicts) === 'string') {
- return [
- {
- type: 'string',
- value: dicts
- }
- ];
- } else if (typeof(dicts) === 'number') {
- return [
- {
- type: 'number',
- value: dicts
- }
- ];
- } else if (typeof(dicts) === 'boolean') {
- return [
- {
- type: 'boolean',
- value: dicts
- }
- ];
- } else {
- throw new Error('unhandled entry: ' + dicts);
- }
-}
-
-function toEntriesArray(arr) {
- if (debug) {
- console.log('toEntriesArray');
- }
- var results = [
- {
- type: 'array',
- entries: []
- }
- ];
- arr.forEach(function(v) {
- var entry = toEntries(v);
- results[0].entries.push(entry[0]);
- results = results.concat(entry);
- });
- return results;
-}
-
-function toEntriesObject(dict) {
- if (debug) {
- console.log('toEntriesObject');
- }
- var results = [
- {
- type: 'dict',
- entryKeys: [],
- entryValues: []
- }
- ];
- Object.keys(dict).forEach(function(key) {
- var entryKey = toEntries(key);
- results[0].entryKeys.push(entryKey[0]);
- results = results.concat(entryKey[0]);
- });
- Object.keys(dict).forEach(function(key) {
- var entryValue = toEntries(dict[key]);
- results[0].entryValues.push(entryValue[0]);
- results = results.concat(entryValue);
- });
- return results;
-}
-
-function computeOffsetSizeInBytes(maxOffset) {
- if (maxOffset < 256) {
- return 1;
- }
- if (maxOffset < 65536) {
- return 2;
- }
- if (maxOffset < 4294967296) {
- return 4;
- }
- return 8;
-}
-
-function computeIdSizeInBytes(numberOfIds) {
- if (numberOfIds < 256) {
- return 1;
- }
- if (numberOfIds < 65536) {
- return 2;
- }
- return 4;
-}
-
-module.exports.Real = Real;
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-creator/package.json
----------------------------------------------------------------------
diff --git a/node_modules/bplist-creator/package.json b/node_modules/bplist-creator/package.json
deleted file mode 100644
index 634df6a..0000000
--- a/node_modules/bplist-creator/package.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "_args": [
- [
- {
- "name": "bplist-creator",
- "raw": "bplist-creator@0.0.4",
- "rawSpec": "0.0.4",
- "scope": null,
- "spec": "0.0.4",
- "type": "version"
- },
- "/Users/ctran/cordova/cordova-lib/cordova-create/node_modules/simple-plist"
- ]
- ],
- "_from": "bplist-creator@0.0.4",
- "_id": "bplist-creator@0.0.4",
- "_inCache": true,
- "_installable": true,
- "_location": "/bplist-creator",
- "_npmUser": {
- "email": "joe@fernsroth.com",
- "name": "joeferner"
- },
- "_npmVersion": "1.4.10",
- "_phantomChildren": {},
- "_requested": {
- "name": "bplist-creator",
- "raw": "bplist-creator@0.0.4",
- "rawSpec": "0.0.4",
- "scope": null,
- "spec": "0.0.4",
- "type": "version"
- },
- "_requiredBy": [
- "/simple-plist"
- ],
- "_resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.4.tgz",
- "_shasum": "4ac0496782e127a85c1d2026a4f5eb22a7aff991",
- "_shrinkwrap": null,
- "_spec": "bplist-creator@0.0.4",
- "_where": "/Users/ctran/cordova/cordova-lib/cordova-create/node_modules/simple-plist",
- "author": {
- "name": "https://github.com/nearinfinity/node-bplist-parser.git"
- },
- "bugs": {
- "url": "https://github.com/nearinfinity/node-bplist-creator/issues"
- },
- "dependencies": {
- "stream-buffers": "~0.2.3"
- },
- "description": "Binary Mac OS X Plist (property list) creator.",
- "devDependencies": {
- "bplist-parser": "0.0.4",
- "nodeunit": "0.7.4"
- },
- "directories": {},
- "dist": {
- "shasum": "4ac0496782e127a85c1d2026a4f5eb22a7aff991",
- "tarball": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.4.tgz"
- },
- "homepage": "https://github.com/nearinfinity/node-bplist-creator",
- "keywords": [
- "bplist",
- "plist",
- "creator"
- ],
- "license": "MIT",
- "main": "bplistCreator.js",
- "maintainers": [
- {
- "email": "joe@fernsroth.com",
- "name": "joeferner"
- }
- ],
- "name": "bplist-creator",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/nearinfinity/node-bplist-creator.git"
- },
- "scripts": {
- "test": "./node_modules/nodeunit/bin/nodeunit test"
- },
- "version": "0.0.4"
-}
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-creator/test/airplay.bplist
----------------------------------------------------------------------
diff --git a/node_modules/bplist-creator/test/airplay.bplist b/node_modules/bplist-creator/test/airplay.bplist
deleted file mode 100644
index 931adea..0000000
Binary files a/node_modules/bplist-creator/test/airplay.bplist and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-creator/test/binaryData.bplist
----------------------------------------------------------------------
diff --git a/node_modules/bplist-creator/test/binaryData.bplist b/node_modules/bplist-creator/test/binaryData.bplist
deleted file mode 100644
index 4c03581..0000000
Binary files a/node_modules/bplist-creator/test/binaryData.bplist and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-creator/test/creatorTest.js
----------------------------------------------------------------------
diff --git a/node_modules/bplist-creator/test/creatorTest.js b/node_modules/bplist-creator/test/creatorTest.js
deleted file mode 100644
index af427a1..0000000
--- a/node_modules/bplist-creator/test/creatorTest.js
+++ /dev/null
@@ -1,197 +0,0 @@
-'use strict';
-
-var fs = require('fs');
-var path = require('path');
-var nodeunit = require('nodeunit');
-var bplistParser = require('bplist-parser');
-var bplistCreator = require('../');
-
-module.exports = {
-// 'iTunes Small': function(test) {
-// var file = path.join(__dirname, "iTunes-small.bplist");
-// testFile(test, file);
-// },
-
- 'sample1': function(test) {
- var file = path.join(__dirname, "sample1.bplist");
- testFile(test, file);
- },
-
- 'sample2': function(test) {
- var file = path.join(__dirname, "sample2.bplist");
- testFile(test, file);
- },
-
- 'binary data': function(test) {
- var file = path.join(__dirname, "binaryData.bplist");
- testFile(test, file);
- },
-
- 'airplay': function(test) {
- var file = path.join(__dirname, "airplay.bplist");
- testFile(test, file);
- },
-
-// 'utf16': function(test) {
-// var file = path.join(__dirname, "utf16.bplist");
-// testFile(test, file);
-// },
-
-// 'uid': function(test) {
-// var file = path.join(__dirname, "uid.bplist");
-// testFile(test, file);
-// }
-};
-
-function testFile(test, file) {
- fs.readFile(file, function(err, fileData) {
- if (err) {
- return test.done(err);
- }
-
- bplistParser.parseFile(file, function(err, dicts) {
- if (err) {
- return test.done(err);
- }
-
- // airplay overrides
- if (dicts && dicts[0] && dicts[0].loadedTimeRanges && dicts[0].loadedTimeRanges[0] && dicts[0].loadedTimeRanges[0].hasOwnProperty('start')) {
- dicts[0].loadedTimeRanges[0].start = {
- bplistOverride: true,
- type: 'double',
- value: dicts[0].loadedTimeRanges[0].start
- };
- }
- if (dicts && dicts[0] && dicts[0].loadedTimeRanges && dicts[0].seekableTimeRanges[0] && dicts[0].seekableTimeRanges[0].hasOwnProperty('start')) {
- dicts[0].seekableTimeRanges[0].start = {
- bplistOverride: true,
- type: 'double',
- value: dicts[0].seekableTimeRanges[0].start
- };
- }
- if (dicts && dicts[0] && dicts[0].hasOwnProperty('rate')) {
- dicts[0].rate = {
- bplistOverride: true,
- type: 'double',
- value: dicts[0].rate
- };
- }
-
- // utf16
- if (dicts && dicts[0] && dicts[0].hasOwnProperty('NSHumanReadableCopyright')) {
- dicts[0].NSHumanReadableCopyright = {
- bplistOverride: true,
- type: 'string-utf16',
- value: dicts[0].NSHumanReadableCopyright
- };
- }
- if (dicts && dicts[0] && dicts[0].hasOwnProperty('CFBundleExecutable')) {
- dicts[0].CFBundleExecutable = {
- bplistOverride: true,
- type: 'string',
- value: dicts[0].CFBundleExecutable
- };
- }
- if (dicts && dicts[0] && dicts[0].CFBundleURLTypes && dicts[0].CFBundleURLTypes[0] && dicts[0].CFBundleURLTypes[0].hasOwnProperty('CFBundleURLSchemes')) {
- dicts[0].CFBundleURLTypes[0].CFBundleURLSchemes[0] = {
- bplistOverride: true,
- type: 'string',
- value: dicts[0].CFBundleURLTypes[0].CFBundleURLSchemes[0]
- };
- }
- if (dicts && dicts[0] && dicts[0].hasOwnProperty('CFBundleDisplayName')) {
- dicts[0].CFBundleDisplayName = {
- bplistOverride: true,
- type: 'string',
- value: dicts[0].CFBundleDisplayName
- };
- }
- if (dicts && dicts[0] && dicts[0].hasOwnProperty('DTPlatformBuild')) {
- dicts[0].DTPlatformBuild = {
- bplistOverride: true,
- type: 'string',
- value: dicts[0].DTPlatformBuild
- };
- }
-
- var buf = bplistCreator(dicts);
- compareBuffers(test, buf, fileData);
- return test.done();
- });
- });
-}
-
-function compareBuffers(test, buf1, buf2) {
- if (buf1.length !== buf2.length) {
- printBuffers(buf1, buf2);
- return test.fail("buffer size mismatch. found: " + buf1.length + ", expected: " + buf2.length + ".");
- }
- for (var i = 0; i < buf1.length; i++) {
- if (buf1[i] !== buf2[i]) {
- printBuffers(buf1, buf2);
- return test.fail("buffer mismatch at offset 0x" + i.toString(16) + ". found: 0x" + buf1[i].toString(16) + ", expected: 0x" + buf2[i].toString(16) + ".");
- }
- }
-}
-
-function printBuffers(buf1, buf2) {
- var i, t;
- for (var lineOffset = 0; lineOffset < buf1.length || lineOffset < buf2.length; lineOffset += 16) {
- var line = '';
-
- t = ('000000000' + lineOffset.toString(16));
- line += t.substr(t.length - 8) + ': ';
-
- for (i = 0; i < 16; i++) {
- if (i == 8) {
- line += ' ';
- }
- if (lineOffset + i < buf1.length) {
- t = ('00' + buf1[lineOffset + i].toString(16));
- line += t.substr(t.length - 2) + ' ';
- } else {
- line += ' ';
- }
- }
- line += ' ';
- for (i = 0; i < 16; i++) {
- if (lineOffset + i < buf1.length) {
- t = String.fromCharCode(buf1[lineOffset + i]);
- if (t < ' ' || t > '~') {
- t = '.';
- }
- line += t;
- } else {
- line += ' ';
- }
- }
-
- line += ' - ';
-
- for (i = 0; i < 16; i++) {
- if (i == 8) {
- line += ' ';
- }
- if (lineOffset + i < buf2.length) {
- t = ('00' + buf2[lineOffset + i].toString(16));
- line += t.substr(t.length - 2) + ' ';
- } else {
- line += ' ';
- }
- }
- line += ' ';
- for (i = 0; i < 16; i++) {
- if (lineOffset + i < buf2.length) {
- t = String.fromCharCode(buf2[lineOffset + i]);
- if (t < ' ' || t > '~') {
- t = '.';
- }
- line += t;
- } else {
- line += ' ';
- }
- }
-
- console.log(line);
- }
-}
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-creator/test/iTunes-small.bplist
----------------------------------------------------------------------
diff --git a/node_modules/bplist-creator/test/iTunes-small.bplist b/node_modules/bplist-creator/test/iTunes-small.bplist
deleted file mode 100644
index b7edb14..0000000
Binary files a/node_modules/bplist-creator/test/iTunes-small.bplist and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-creator/test/sample1.bplist
----------------------------------------------------------------------
diff --git a/node_modules/bplist-creator/test/sample1.bplist b/node_modules/bplist-creator/test/sample1.bplist
deleted file mode 100644
index 5b808ff..0000000
Binary files a/node_modules/bplist-creator/test/sample1.bplist and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-creator/test/sample2.bplist
----------------------------------------------------------------------
diff --git a/node_modules/bplist-creator/test/sample2.bplist b/node_modules/bplist-creator/test/sample2.bplist
deleted file mode 100644
index fc42979..0000000
Binary files a/node_modules/bplist-creator/test/sample2.bplist and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-creator/test/uid.bplist
----------------------------------------------------------------------
diff --git a/node_modules/bplist-creator/test/uid.bplist b/node_modules/bplist-creator/test/uid.bplist
deleted file mode 100644
index 59f341e..0000000
Binary files a/node_modules/bplist-creator/test/uid.bplist and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-creator/test/utf16.bplist
----------------------------------------------------------------------
diff --git a/node_modules/bplist-creator/test/utf16.bplist b/node_modules/bplist-creator/test/utf16.bplist
deleted file mode 100644
index ba4bcfa..0000000
Binary files a/node_modules/bplist-creator/test/utf16.bplist and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-parser/.npmignore
----------------------------------------------------------------------
diff --git a/node_modules/bplist-parser/.npmignore b/node_modules/bplist-parser/.npmignore
deleted file mode 100644
index a9b46ea..0000000
--- a/node_modules/bplist-parser/.npmignore
+++ /dev/null
@@ -1,8 +0,0 @@
-/build/*
-node_modules
-*.node
-*.sh
-*.swp
-.lock*
-npm-debug.log
-.idea
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-parser/README.md
----------------------------------------------------------------------
diff --git a/node_modules/bplist-parser/README.md b/node_modules/bplist-parser/README.md
deleted file mode 100644
index 37e5e1c..0000000
--- a/node_modules/bplist-parser/README.md
+++ /dev/null
@@ -1,47 +0,0 @@
-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.
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-parser/bplistParser.js
----------------------------------------------------------------------
diff --git a/node_modules/bplist-parser/bplistParser.js b/node_modules/bplist-parser/bplistParser.js
deleted file mode 100644
index f8335bc..0000000
--- a/node_modules/bplist-parser/bplistParser.js
+++ /dev/null
@@ -1,357 +0,0 @@
-'use strict';
-
-// adapted from http://code.google.com/p/plist/source/browse/trunk/src/com/dd/plist/BinaryPropertyListParser.java
-
-var fs = require('fs');
-var bigInt = require("big-integer");
-var debug = false;
-
-exports.maxObjectSize = 100 * 1000 * 1000; // 100Meg
-exports.maxObjectCount = 32768;
-
-// EPOCH = new SimpleDateFormat("yyyy MM dd zzz").parse("2001 01 01 GMT").getTime();
-// ...but that's annoying in a static initializer because it can throw exceptions, ick.
-// So we just hardcode the correct value.
-var EPOCH = 978307200000;
-
-// UID object definition
-var UID = exports.UID = function(id) {
- this.UID = id;
-}
-
-var parseFile = exports.parseFile = function (fileNameOrBuffer, callback) {
- function tryParseBuffer(buffer) {
- var err = null;
- var result;
- try {
- result = parseBuffer(buffer);
- } catch (ex) {
- err = ex;
- }
- callback(err, result);
- }
-
- if (Buffer.isBuffer(fileNameOrBuffer)) {
- return tryParseBuffer(fileNameOrBuffer);
- } else {
- fs.readFile(fileNameOrBuffer, function (err, data) {
- if (err) { return callback(err); }
- tryParseBuffer(data);
- });
- }
-};
-
-var parseBuffer = exports.parseBuffer = function (buffer) {
- var result = {};
-
- // check header
- var header = buffer.slice(0, 'bplist'.length).toString('utf8');
- if (header !== 'bplist') {
- throw new Error("Invalid binary plist. Expected 'bplist' at offset 0.");
- }
-
- // Handle trailer, last 32 bytes of the file
- var trailer = buffer.slice(buffer.length - 32, buffer.length);
- // 6 null bytes (index 0 to 5)
- var offsetSize = trailer.readUInt8(6);
- if (debug) {
- console.log("offsetSize: " + offsetSize);
- }
- var objectRefSize = trailer.readUInt8(7);
- if (debug) {
- console.log("objectRefSize: " + objectRefSize);
- }
- var numObjects = readUInt64BE(trailer, 8);
- if (debug) {
- console.log("numObjects: " + numObjects);
- }
- var topObject = readUInt64BE(trailer, 16);
- if (debug) {
- console.log("topObject: " + topObject);
- }
- var offsetTableOffset = readUInt64BE(trailer, 24);
- if (debug) {
- console.log("offsetTableOffset: " + offsetTableOffset);
- }
-
- if (numObjects > exports.maxObjectCount) {
- throw new Error("maxObjectCount exceeded");
- }
-
- // Handle offset table
- var offsetTable = [];
-
- for (var i = 0; i < numObjects; i++) {
- var offsetBytes = buffer.slice(offsetTableOffset + i * offsetSize, offsetTableOffset + (i + 1) * offsetSize);
- offsetTable[i] = readUInt(offsetBytes, 0);
- if (debug) {
- console.log("Offset for Object #" + i + " is " + offsetTable[i] + " [" + offsetTable[i].toString(16) + "]");
- }
- }
-
- // Parses an object inside the currently parsed binary property list.
- // For the format specification check
- // <a href="http://www.opensource.apple.com/source/CF/CF-635/CFBinaryPList.c">
- // Apple's binary property list parser implementation</a>.
- function parseObject(tableOffset) {
- var offset = offsetTable[tableOffset];
- var type = buffer[offset];
- var objType = (type & 0xF0) >> 4; //First 4 bits
- var objInfo = (type & 0x0F); //Second 4 bits
- switch (objType) {
- case 0x0:
- return parseSimple();
- case 0x1:
- return parseInteger();
- case 0x8:
- return parseUID();
- case 0x2:
- return parseReal();
- case 0x3:
- return parseDate();
- case 0x4:
- return parseData();
- case 0x5: // ASCII
- return parsePlistString();
- case 0x6: // UTF-16
- return parsePlistString(true);
- case 0xA:
- return parseArray();
- case 0xD:
- return parseDictionary();
- default:
- throw new Error("Unhandled type 0x" + objType.toString(16));
- }
-
- function parseSimple() {
- //Simple
- switch (objInfo) {
- case 0x0: // null
- return null;
- case 0x8: // false
- return false;
- case 0x9: // true
- return true;
- case 0xF: // filler byte
- return null;
- default:
- throw new Error("Unhandled simple type 0x" + objType.toString(16));
- }
- }
-
- function bufferToHexString(buffer) {
- var str = '';
- var i;
- for (i = 0; i < buffer.length; i++) {
- if (buffer[i] != 0x00) {
- break;
- }
- }
- for (; i < buffer.length; i++) {
- var part = '00' + buffer[i].toString(16);
- str += part.substr(part.length - 2);
- }
- return str;
- }
-
- function parseInteger() {
- var length = Math.pow(2, objInfo);
- if (length > 4) {
- var data = buffer.slice(offset + 1, offset + 1 + length);
- var str = bufferToHexString(data);
- return bigInt(str, 16);
- } if (length < exports.maxObjectSize) {
- return readUInt(buffer.slice(offset + 1, offset + 1 + length));
- } else {
- throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available.");
- }
- }
-
- function parseUID() {
- var length = objInfo + 1;
- if (length < exports.maxObjectSize) {
- return new UID(readUInt(buffer.slice(offset + 1, offset + 1 + length)));
- } else {
- throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available.");
- }
- }
-
- function parseReal() {
- var length = Math.pow(2, objInfo);
- if (length < exports.maxObjectSize) {
- var realBuffer = buffer.slice(offset + 1, offset + 1 + length);
- if (length === 4) {
- return realBuffer.readFloatBE(0);
- }
- else if (length === 8) {
- return realBuffer.readDoubleBE(0);
- }
- } else {
- throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available.");
- }
- }
-
- function parseDate() {
- if (objInfo != 0x3) {
- console.error("Unknown date type :" + objInfo + ". Parsing anyway...");
- }
- var dateBuffer = buffer.slice(offset + 1, offset + 9);
- return new Date(EPOCH + (1000 * dateBuffer.readDoubleBE(0)));
- }
-
- function parseData() {
- var dataoffset = 1;
- var length = objInfo;
- if (objInfo == 0xF) {
- var int_type = buffer[offset + 1];
- var intType = (int_type & 0xF0) / 0x10;
- if (intType != 0x1) {
- console.error("0x4: UNEXPECTED LENGTH-INT TYPE! " + intType);
- }
- var intInfo = int_type & 0x0F;
- var intLength = Math.pow(2, intInfo);
- dataoffset = 2 + intLength;
- if (intLength < 3) {
- length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength));
- } else {
- length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength));
- }
- }
- if (length < exports.maxObjectSize) {
- return buffer.slice(offset + dataoffset, offset + dataoffset + length);
- } else {
- throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available.");
- }
- }
-
- function parsePlistString (isUtf16) {
- isUtf16 = isUtf16 || 0;
- var enc = "utf8";
- var length = objInfo;
- var stroffset = 1;
- if (objInfo == 0xF) {
- var int_type = buffer[offset + 1];
- var intType = (int_type & 0xF0) / 0x10;
- if (intType != 0x1) {
- console.err("UNEXPECTED LENGTH-INT TYPE! " + intType);
- }
- var intInfo = int_type & 0x0F;
- var intLength = Math.pow(2, intInfo);
- var stroffset = 2 + intLength;
- if (intLength < 3) {
- length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength));
- } else {
- length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength));
- }
- }
- // length is String length -> to get byte length multiply by 2, as 1 character takes 2 bytes in UTF-16
- length *= (isUtf16 + 1);
- if (length < exports.maxObjectSize) {
- var plistString = new Buffer(buffer.slice(offset + stroffset, offset + stroffset + length));
- if (isUtf16) {
- plistString = swapBytes(plistString);
- enc = "ucs2";
- }
- return plistString.toString(enc);
- } else {
- throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available.");
- }
- }
-
- function parseArray() {
- var length = objInfo;
- var arrayoffset = 1;
- if (objInfo == 0xF) {
- var int_type = buffer[offset + 1];
- var intType = (int_type & 0xF0) / 0x10;
- if (intType != 0x1) {
- console.error("0xa: UNEXPECTED LENGTH-INT TYPE! " + intType);
- }
- var intInfo = int_type & 0x0F;
- var intLength = Math.pow(2, intInfo);
- arrayoffset = 2 + intLength;
- if (intLength < 3) {
- length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength));
- } else {
- length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength));
- }
- }
- if (length * objectRefSize > exports.maxObjectSize) {
- throw new Error("To little heap space available!");
- }
- var array = [];
- for (var i = 0; i < length; i++) {
- var objRef = readUInt(buffer.slice(offset + arrayoffset + i * objectRefSize, offset + arrayoffset + (i + 1) * objectRefSize));
- array[i] = parseObject(objRef);
- }
- return array;
- }
-
- function parseDictionary() {
- var length = objInfo;
- var dictoffset = 1;
- if (objInfo == 0xF) {
- var int_type = buffer[offset + 1];
- var intType = (int_type & 0xF0) / 0x10;
- if (intType != 0x1) {
- console.error("0xD: UNEXPECTED LENGTH-INT TYPE! " + intType);
- }
- var intInfo = int_type & 0x0F;
- var intLength = Math.pow(2, intInfo);
- dictoffset = 2 + intLength;
- if (intLength < 3) {
- length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength));
- } else {
- length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength));
- }
- }
- if (length * 2 * objectRefSize > exports.maxObjectSize) {
- throw new Error("To little heap space available!");
- }
- if (debug) {
- console.log("Parsing dictionary #" + tableOffset);
- }
- var dict = {};
- for (var i = 0; i < length; i++) {
- var keyRef = readUInt(buffer.slice(offset + dictoffset + i * objectRefSize, offset + dictoffset + (i + 1) * objectRefSize));
- var valRef = readUInt(buffer.slice(offset + dictoffset + (length * objectRefSize) + i * objectRefSize, offset + dictoffset + (length * objectRefSize) + (i + 1) * objectRefSize));
- var key = parseObject(keyRef);
- var val = parseObject(valRef);
- if (debug) {
- console.log(" DICT #" + tableOffset + ": Mapped " + key + " to " + val);
- }
- dict[key] = val;
- }
- return dict;
- }
- }
-
- return [ parseObject(topObject) ];
-};
-
-function readUInt(buffer, start) {
- start = start || 0;
-
- var l = 0;
- for (var i = start; i < buffer.length; i++) {
- l <<= 8;
- l |= buffer[i] & 0xFF;
- }
- return l;
-}
-
-// we're just going to toss the high order bits because javascript doesn't have 64-bit ints
-function readUInt64BE(buffer, start) {
- var data = buffer.slice(start, start + 8);
- return data.readUInt32BE(4, 8);
-}
-
-function swapBytes(buffer) {
- var len = buffer.length;
- for (var i = 0; i < len; i += 2) {
- var a = buffer[i];
- buffer[i] = buffer[i+1];
- buffer[i+1] = a;
- }
- return buffer;
-}
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-parser/package.json
----------------------------------------------------------------------
diff --git a/node_modules/bplist-parser/package.json b/node_modules/bplist-parser/package.json
deleted file mode 100644
index 19e2900..0000000
--- a/node_modules/bplist-parser/package.json
+++ /dev/null
@@ -1,88 +0,0 @@
-{
- "_args": [
- [
- {
- "name": "bplist-parser",
- "raw": "bplist-parser@^0.1.0",
- "rawSpec": "^0.1.0",
- "scope": null,
- "spec": ">=0.1.0 <0.2.0",
- "type": "range"
- },
- "/Users/ctran/cordova/cordova-lib/cordova-create/node_modules/cordova-common"
- ]
- ],
- "_from": "bplist-parser@>=0.1.0 <0.2.0",
- "_id": "bplist-parser@0.1.1",
- "_inCache": true,
- "_installable": true,
- "_location": "/bplist-parser",
- "_nodeVersion": "5.1.0",
- "_npmUser": {
- "email": "joe@fernsroth.com",
- "name": "joeferner"
- },
- "_npmVersion": "3.4.0",
- "_phantomChildren": {},
- "_requested": {
- "name": "bplist-parser",
- "raw": "bplist-parser@^0.1.0",
- "rawSpec": "^0.1.0",
- "scope": null,
- "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",
- "_shasum": "d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6",
- "_shrinkwrap": null,
- "_spec": "bplist-parser@^0.1.0",
- "_where": "/Users/ctran/cordova/cordova-lib/cordova-create/node_modules/cordova-common",
- "author": {
- "email": "joe.ferner@nearinfinity.com",
- "name": "Joe Ferner"
- },
- "bugs": {
- "url": "https://github.com/nearinfinity/node-bplist-parser/issues"
- },
- "dependencies": {
- "big-integer": "^1.6.7"
- },
- "description": "Binary plist parser.",
- "devDependencies": {
- "nodeunit": "~0.9.1"
- },
- "directories": {},
- "dist": {
- "shasum": "d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6",
- "tarball": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz"
- },
- "gitHead": "c4f22650de2cc95edd21a6e609ff0654a2b951bd",
- "homepage": "https://github.com/nearinfinity/node-bplist-parser#readme",
- "keywords": [
- "bplist",
- "plist",
- "parser"
- ],
- "license": "MIT",
- "main": "bplistParser.js",
- "maintainers": [
- {
- "email": "joe@fernsroth.com",
- "name": "joeferner"
- }
- ],
- "name": "bplist-parser",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/nearinfinity/node-bplist-parser.git"
- },
- "scripts": {
- "test": "./node_modules/nodeunit/bin/nodeunit test"
- },
- "version": "0.1.1"
-}
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-parser/test/airplay.bplist
----------------------------------------------------------------------
diff --git a/node_modules/bplist-parser/test/airplay.bplist b/node_modules/bplist-parser/test/airplay.bplist
deleted file mode 100644
index 931adea..0000000
Binary files a/node_modules/bplist-parser/test/airplay.bplist and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-parser/test/iTunes-small.bplist
----------------------------------------------------------------------
diff --git a/node_modules/bplist-parser/test/iTunes-small.bplist b/node_modules/bplist-parser/test/iTunes-small.bplist
deleted file mode 100644
index b7edb14..0000000
Binary files a/node_modules/bplist-parser/test/iTunes-small.bplist and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-parser/test/int64.bplist
----------------------------------------------------------------------
diff --git a/node_modules/bplist-parser/test/int64.bplist b/node_modules/bplist-parser/test/int64.bplist
deleted file mode 100644
index 6da9c04..0000000
Binary files a/node_modules/bplist-parser/test/int64.bplist and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-parser/test/int64.xml
----------------------------------------------------------------------
diff --git a/node_modules/bplist-parser/test/int64.xml b/node_modules/bplist-parser/test/int64.xml
deleted file mode 100644
index cc6cb03..0000000
--- a/node_modules/bplist-parser/test/int64.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
- <dict>
- <key>zero</key>
- <integer>0</integer>
- <key>int64item</key>
- <integer>12345678901234567890</integer>
- </dict>
-</plist>
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-parser/test/parseTest.js
----------------------------------------------------------------------
diff --git a/node_modules/bplist-parser/test/parseTest.js b/node_modules/bplist-parser/test/parseTest.js
deleted file mode 100644
index 67e7bfa..0000000
--- a/node_modules/bplist-parser/test/parseTest.js
+++ /dev/null
@@ -1,159 +0,0 @@
-'use strict';
-
-// tests are adapted from https://github.com/TooTallNate/node-plist
-
-var path = require('path');
-var nodeunit = require('nodeunit');
-var bplist = require('../');
-
-module.exports = {
- 'iTunes Small': function (test) {
- var file = path.join(__dirname, "iTunes-small.bplist");
- var startTime1 = new Date();
-
- bplist.parseFile(file, function (err, dicts) {
- if (err) {
- throw err;
- }
-
- var endTime = new Date();
- console.log('Parsed "' + file + '" in ' + (endTime - startTime1) + 'ms');
- var dict = dicts[0];
- test.equal(dict['Application Version'], "9.0.3");
- test.equal(dict['Library Persistent ID'], "6F81D37F95101437");
- test.done();
- });
- },
-
- 'sample1': function (test) {
- var file = path.join(__dirname, "sample1.bplist");
- var startTime = new Date();
-
- bplist.parseFile(file, function (err, dicts) {
- if (err) {
- throw err;
- }
-
- var endTime = new Date();
- console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms');
- var dict = dicts[0];
- test.equal(dict['CFBundleIdentifier'], 'com.apple.dictionary.MySample');
- test.done();
- });
- },
-
- 'sample2': function (test) {
- var file = path.join(__dirname, "sample2.bplist");
- var startTime = new Date();
-
- bplist.parseFile(file, function (err, dicts) {
- if (err) {
- throw err;
- }
-
- var endTime = new Date();
- console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms');
- var dict = dicts[0];
- test.equal(dict['PopupMenu'][2]['Key'], "\n #import <Cocoa/Cocoa.h>\n\n#import <MacRuby/MacRuby.h>\n\nint main(int argc, char *argv[])\n{\n return macruby_main(\"rb_main.rb\", argc, argv);\n}\n");
- test.done();
- });
- },
-
- 'airplay': function (test) {
- var file = path.join(__dirname, "airplay.bplist");
- var startTime = new Date();
-
- bplist.parseFile(file, function (err, dicts) {
- if (err) {
- throw err;
- }
-
- var endTime = new Date();
- console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms');
-
- var dict = dicts[0];
- test.equal(dict['duration'], 5555.0495000000001);
- test.equal(dict['position'], 4.6269989039999997);
- test.done();
- });
- },
-
- 'utf16': function (test) {
- var file = path.join(__dirname, "utf16.bplist");
- var startTime = new Date();
-
- bplist.parseFile(file, function (err, dicts) {
- if (err) {
- throw err;
- }
-
- var endTime = new Date();
- console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms');
-
- var dict = dicts[0];
- test.equal(dict['CFBundleName'], 'sellStuff');
- test.equal(dict['CFBundleShortVersionString'], '2.6.1');
- test.equal(dict['NSHumanReadableCopyright'], '�2008-2012, sellStuff, Inc.');
- test.done();
- });
- },
-
- 'utf16chinese': function (test) {
- var file = path.join(__dirname, "utf16_chinese.plist");
- var startTime = new Date();
-
- bplist.parseFile(file, function (err, dicts) {
- if (err) {
- throw err;
- }
-
- var endTime = new Date();
- console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms');
-
- var dict = dicts[0];
- test.equal(dict['CFBundleName'], '\u5929\u7ffc\u9605\u8bfb');
- test.equal(dict['CFBundleDisplayName'], '\u5929\u7ffc\u9605\u8bfb');
- test.done();
- });
- },
-
-
-
- 'uid': function (test) {
- var file = path.join(__dirname, "uid.bplist");
- var startTime = new Date();
-
- bplist.parseFile(file, function (err, dicts) {
- if (err) {
- throw err;
- }
-
- var endTime = new Date();
- console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms');
-
- var dict = dicts[0];
- test.deepEqual(dict['$objects'][1]['NS.keys'], [{UID:2}, {UID:3}, {UID:4}]);
- test.deepEqual(dict['$objects'][1]['NS.objects'], [{UID: 5}, {UID:6}, {UID:7}]);
- test.deepEqual(dict['$top']['root'], {UID:1});
- test.done();
- });
- },
-
- 'int64': function (test) {
- var file = path.join(__dirname, "int64.bplist");
- var startTime = new Date();
-
- bplist.parseFile(file, function (err, dicts) {
- if (err) {
- throw err;
- }
-
- var endTime = new Date();
- console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms');
- var dict = dicts[0];
- test.equal(dict['zero'], '0');
- test.equal(dict['int64item'], '12345678901234567890');
- test.done();
- });
- }
-};
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-parser/test/sample1.bplist
----------------------------------------------------------------------
diff --git a/node_modules/bplist-parser/test/sample1.bplist b/node_modules/bplist-parser/test/sample1.bplist
deleted file mode 100644
index 5b808ff..0000000
Binary files a/node_modules/bplist-parser/test/sample1.bplist and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-parser/test/sample2.bplist
----------------------------------------------------------------------
diff --git a/node_modules/bplist-parser/test/sample2.bplist b/node_modules/bplist-parser/test/sample2.bplist
deleted file mode 100644
index fc42979..0000000
Binary files a/node_modules/bplist-parser/test/sample2.bplist and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-parser/test/uid.bplist
----------------------------------------------------------------------
diff --git a/node_modules/bplist-parser/test/uid.bplist b/node_modules/bplist-parser/test/uid.bplist
deleted file mode 100644
index 59f341e..0000000
Binary files a/node_modules/bplist-parser/test/uid.bplist and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-parser/test/utf16.bplist
----------------------------------------------------------------------
diff --git a/node_modules/bplist-parser/test/utf16.bplist b/node_modules/bplist-parser/test/utf16.bplist
deleted file mode 100644
index ba4bcfa..0000000
Binary files a/node_modules/bplist-parser/test/utf16.bplist and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/bplist-parser/test/utf16_chinese.plist
----------------------------------------------------------------------
diff --git a/node_modules/bplist-parser/test/utf16_chinese.plist b/node_modules/bplist-parser/test/utf16_chinese.plist
deleted file mode 100755
index ba1e2d7..0000000
Binary files a/node_modules/bplist-parser/test/utf16_chinese.plist and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/brace-expansion/README.md
----------------------------------------------------------------------
diff --git a/node_modules/brace-expansion/README.md b/node_modules/brace-expansion/README.md
deleted file mode 100644
index 1793929..0000000
--- a/node_modules/brace-expansion/README.md
+++ /dev/null
@@ -1,122 +0,0 @@
-# brace-expansion
-
-[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
-as known from sh/bash, in JavaScript.
-
-[](http://travis-ci.org/juliangruber/brace-expansion)
-[](https://www.npmjs.org/package/brace-expansion)
-
-[](https://ci.testling.com/juliangruber/brace-expansion)
-
-## Example
-
-```js
-var expand = require('brace-expansion');
-
-expand('file-{a,b,c}.jpg')
-// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
-
-expand('-v{,,}')
-// => ['-v', '-v', '-v']
-
-expand('file{0..2}.jpg')
-// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
-
-expand('file-{a..c}.jpg')
-// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
-
-expand('file{2..0}.jpg')
-// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
-
-expand('file{0..4..2}.jpg')
-// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
-
-expand('file-{a..e..2}.jpg')
-// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
-
-expand('file{00..10..5}.jpg')
-// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
-
-expand('{{A..C},{a..c}}')
-// => ['A', 'B', 'C', 'a', 'b', 'c']
-
-expand('ppp{,config,oe{,conf}}')
-// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
-```
-
-## API
-
-```js
-var expand = require('brace-expansion');
-```
-
-### var expanded = expand(str)
-
-Return an array of all possible and valid expansions of `str`. If none are
-found, `[str]` is returned.
-
-Valid expansions are:
-
-```js
-/^(.*,)+(.+)?$/
-// {a,b,...}
-```
-
-A comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
-
-```js
-/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
-// {x..y[..incr]}
-```
-
-A numeric sequence from `x` to `y` inclusive, with optional increment.
-If `x` or `y` start with a leading `0`, all the numbers will be padded
-to have equal length. Negative numbers and backwards iteration work too.
-
-```js
-/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
-// {x..y[..incr]}
-```
-
-An alphabetic sequence from `x` to `y` inclusive, with optional increment.
-`x` and `y` must be exactly one character, and if given, `incr` must be a
-number.
-
-For compatibility reasons, the string `${` is not eligible for brace expansion.
-
-## Installation
-
-With [npm](https://npmjs.org) do:
-
-```bash
-npm install brace-expansion
-```
-
-## Contributors
-
-- [Julian Gruber](https://github.com/juliangruber)
-- [Isaac Z. Schlueter](https://github.com/isaacs)
-
-## License
-
-(MIT)
-
-Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
-
-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.
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/brace-expansion/index.js
----------------------------------------------------------------------
diff --git a/node_modules/brace-expansion/index.js b/node_modules/brace-expansion/index.js
deleted file mode 100644
index 932718f..0000000
--- a/node_modules/brace-expansion/index.js
+++ /dev/null
@@ -1,191 +0,0 @@
-var concatMap = require('concat-map');
-var balanced = require('balanced-match');
-
-module.exports = expandTop;
-
-var escSlash = '\0SLASH'+Math.random()+'\0';
-var escOpen = '\0OPEN'+Math.random()+'\0';
-var escClose = '\0CLOSE'+Math.random()+'\0';
-var escComma = '\0COMMA'+Math.random()+'\0';
-var escPeriod = '\0PERIOD'+Math.random()+'\0';
-
-function numeric(str) {
- return parseInt(str, 10) == str
- ? parseInt(str, 10)
- : str.charCodeAt(0);
-}
-
-function escapeBraces(str) {
- return str.split('\\\\').join(escSlash)
- .split('\\{').join(escOpen)
- .split('\\}').join(escClose)
- .split('\\,').join(escComma)
- .split('\\.').join(escPeriod);
-}
-
-function unescapeBraces(str) {
- return str.split(escSlash).join('\\')
- .split(escOpen).join('{')
- .split(escClose).join('}')
- .split(escComma).join(',')
- .split(escPeriod).join('.');
-}
-
-
-// Basically just str.split(","), but handling cases
-// where we have nested braced sections, which should be
-// treated as individual members, like {a,{b,c},d}
-function parseCommaParts(str) {
- if (!str)
- return [''];
-
- var parts = [];
- var m = balanced('{', '}', str);
-
- if (!m)
- return str.split(',');
-
- var pre = m.pre;
- var body = m.body;
- var post = m.post;
- var p = pre.split(',');
-
- p[p.length-1] += '{' + body + '}';
- var postParts = parseCommaParts(post);
- if (post.length) {
- p[p.length-1] += postParts.shift();
- p.push.apply(p, postParts);
- }
-
- parts.push.apply(parts, p);
-
- return parts;
-}
-
-function expandTop(str) {
- if (!str)
- return [];
-
- return expand(escapeBraces(str), true).map(unescapeBraces);
-}
-
-function identity(e) {
- return e;
-}
-
-function embrace(str) {
- return '{' + str + '}';
-}
-function isPadded(el) {
- return /^-?0\d/.test(el);
-}
-
-function lte(i, y) {
- return i <= y;
-}
-function gte(i, y) {
- return i >= y;
-}
-
-function expand(str, isTop) {
- var expansions = [];
-
- var m = balanced('{', '}', str);
- if (!m || /\$$/.test(m.pre)) return [str];
-
- var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
- var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
- var isSequence = isNumericSequence || isAlphaSequence;
- var isOptions = /^(.*,)+(.+)?$/.test(m.body);
- if (!isSequence && !isOptions) {
- // {a},b}
- if (m.post.match(/,.*\}/)) {
- str = m.pre + '{' + m.body + escClose + m.post;
- return expand(str);
- }
- return [str];
- }
-
- var n;
- if (isSequence) {
- n = m.body.split(/\.\./);
- } else {
- n = parseCommaParts(m.body);
- if (n.length === 1) {
- // x{{a,b}}y ==> x{a}y x{b}y
- n = expand(n[0], false).map(embrace);
- if (n.length === 1) {
- var post = m.post.length
- ? expand(m.post, false)
- : [''];
- return post.map(function(p) {
- return m.pre + n[0] + p;
- });
- }
- }
- }
-
- // at this point, n is the parts, and we know it's not a comma set
- // with a single entry.
-
- // no need to expand pre, since it is guaranteed to be free of brace-sets
- var pre = m.pre;
- var post = m.post.length
- ? expand(m.post, false)
- : [''];
-
- var N;
-
- if (isSequence) {
- var x = numeric(n[0]);
- var y = numeric(n[1]);
- var width = Math.max(n[0].length, n[1].length)
- var incr = n.length == 3
- ? Math.abs(numeric(n[2]))
- : 1;
- var test = lte;
- var reverse = y < x;
- if (reverse) {
- incr *= -1;
- test = gte;
- }
- var pad = n.some(isPadded);
-
- N = [];
-
- for (var i = x; test(i, y); i += incr) {
- var c;
- if (isAlphaSequence) {
- c = String.fromCharCode(i);
- if (c === '\\')
- c = '';
- } else {
- c = String(i);
- if (pad) {
- var need = width - c.length;
- if (need > 0) {
- var z = new Array(need + 1).join('0');
- if (i < 0)
- c = '-' + z + c.slice(1);
- else
- c = z + c;
- }
- }
- }
- N.push(c);
- }
- } else {
- N = concatMap(n, function(el) { return expand(el, false) });
- }
-
- for (var j = 0; j < N.length; j++) {
- for (var k = 0; k < post.length; k++) {
- var expansion = pre + N[j] + post[k];
- if (!isTop || isSequence || expansion)
- expansions.push(expansion);
- }
- }
-
- return expansions;
-}
-
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/brace-expansion/package.json
----------------------------------------------------------------------
diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json
deleted file mode 100644
index 0676640..0000000
--- a/node_modules/brace-expansion/package.json
+++ /dev/null
@@ -1,112 +0,0 @@
-{
- "_args": [
- [
- {
- "name": "brace-expansion",
- "raw": "brace-expansion@^1.0.0",
- "rawSpec": "^1.0.0",
- "scope": null,
- "spec": ">=1.0.0 <2.0.0",
- "type": "range"
- },
- "/Users/ctran/cordova/cordova-lib/cordova-create/node_modules/cordova-common/node_modules/minimatch"
- ]
- ],
- "_from": "brace-expansion@>=1.0.0 <2.0.0",
- "_id": "brace-expansion@1.1.5",
- "_inCache": true,
- "_installable": true,
- "_location": "/brace-expansion",
- "_nodeVersion": "4.4.5",
- "_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/brace-expansion-1.1.5.tgz_1465989660138_0.34528115345165133"
- },
- "_npmUser": {
- "email": "julian@juliangruber.com",
- "name": "juliangruber"
- },
- "_npmVersion": "2.15.5",
- "_phantomChildren": {},
- "_requested": {
- "name": "brace-expansion",
- "raw": "brace-expansion@^1.0.0",
- "rawSpec": "^1.0.0",
- "scope": null,
- "spec": ">=1.0.0 <2.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/cordova-common/minimatch",
- "/cordova-fetch/minimatch"
- ],
- "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.5.tgz",
- "_shasum": "f5b4ad574e2cb7ccc1eb83e6fe79b8ecadf7a526",
- "_shrinkwrap": null,
- "_spec": "brace-expansion@^1.0.0",
- "_where": "/Users/ctran/cordova/cordova-lib/cordova-create/node_modules/cordova-common/node_modules/minimatch",
- "author": {
- "email": "mail@juliangruber.com",
- "name": "Julian Gruber",
- "url": "http://juliangruber.com"
- },
- "bugs": {
- "url": "https://github.com/juliangruber/brace-expansion/issues"
- },
- "dependencies": {
- "balanced-match": "^0.4.1",
- "concat-map": "0.0.1"
- },
- "description": "Brace expansion as known from sh/bash",
- "devDependencies": {
- "tape": "4.5.1"
- },
- "directories": {},
- "dist": {
- "shasum": "f5b4ad574e2cb7ccc1eb83e6fe79b8ecadf7a526",
- "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.5.tgz"
- },
- "gitHead": "ff31acab078f1bb696ac4c55ca56ea24e6495fb6",
- "homepage": "https://github.com/juliangruber/brace-expansion",
- "keywords": [],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "email": "julian@juliangruber.com",
- "name": "juliangruber"
- },
- {
- "email": "isaacs@npmjs.com",
- "name": "isaacs"
- }
- ],
- "name": "brace-expansion",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/juliangruber/brace-expansion.git"
- },
- "scripts": {
- "gentest": "bash test/generate.sh",
- "test": "tape test/*.js"
- },
- "testling": {
- "browsers": [
- "ie/8..latest",
- "firefox/20..latest",
- "firefox/nightly",
- "chrome/25..latest",
- "chrome/canary",
- "opera/12..latest",
- "opera/next",
- "safari/5.1..latest",
- "ipad/6.0..latest",
- "iphone/6.0..latest",
- "android-browser/4.2..latest"
- ],
- "files": "test/*.js"
- },
- "version": "1.1.5"
-}
http://git-wip-us.apache.org/repos/asf/cordova-create/blob/9fb2883e/node_modules/cli/README.md
----------------------------------------------------------------------
diff --git a/node_modules/cli/README.md b/node_modules/cli/README.md
deleted file mode 100644
index 6dd8dd5..0000000
--- a/node_modules/cli/README.md
+++ /dev/null
@@ -1,196 +0,0 @@
-**cli is a toolkit for rapidly building command line apps - it includes:**
-
-- Full featured opts/args parser
-- Plugin support for adding common options and switches
-- Helper methods for working with input/output and spawning child processes
-- Output colored/styled messages, [progress bars](https://github.com/chriso/cli/blob/master/examples/progress.js) or [spinners](https://github.com/chriso/cli/blob/master/examples/spinner.js)
-- Command [auto-completion](https://github.com/chriso/cli/blob/master/examples/command.js) and [glob support](https://github.com/chriso/cli/blob/master/examples/glob.js)
-
-Install using `npm install cli` or just bundle [cli.js](https://github.com/chriso/cli/raw/master/cli.js) with your app.
-
-## Example apps
-
-### sort.js
-
-```javascript
-#!/usr/bin/env node
-require('cli').withStdinLines(function(lines, newline) {
- this.output(lines.sort().join(newline));
-});
-```
-
-Try it out
-
-```bash
-$ ./sort.js < input.txt
-```
-
-Let's add support for an `-n` switch to use a numeric sort, and a `-r` switch to reverse output - only 5 extra lines of code (!)
-
-```javascript
-var cli = require('cli'), options = cli.parse();
-
-cli.withStdinLines(function(lines, newline) {
- lines.sort(!options.n ? null : function(a, b) {
- return parseInt(a) > parseInt(b);
- });
- if (options.r) lines.reverse();
- this.output(lines.join(newline));
-});
-```
-
-### static.js
-
-Let's create a static file server with daemon support to see the opts parser + plugins in use - note: this requires `npm install creationix daemon`
-
-```javascript
-var cli = require('cli').enable('daemon', 'status'); //Enable 2 plugins
-
-cli.parse({
- log: ['l', 'Enable logging'],
- port: ['p', 'Listen on this port', 'number', 8080],
- serve: [false, 'Serve static files from PATH', 'path', './public']
-});
-
-cli.main(function(args, options) {
- var server, middleware = [];
-
- if (options.log) {
- this.debug('Enabling logging');
- middleware.push(require('creationix/log')());
- }
-
- this.debug('Serving files from ' + options.serve);
- middleware.push(require('creationix/static')('/', options.serve, 'index.html'));
-
- server = this.createServer(middleware).listen(options.port);
-
- this.ok('Listening on port ' + options.port);
-});
-```
-
-To output usage information
-
-```bash
-$ ./static.js --help
-```
-
-To create a daemon that serves files from */tmp*, run
-
-```bash
-$ ./static.js -ld --serve=/tmp
-```
-
-For more examples, see [./examples](https://github.com/chriso/cli/tree/master/examples)
-
-## Helper methods
-
-cli has methods that collect stdin (newline is autodetected as \n or \r\n)
-
-```javascript
-cli.withStdin(callback); //callback receives stdin as a string
-cli.withStdinLines(callback); //callback receives stdin split into an array of lines (lines, newline)
-```
-
-cli also has a lower level method for working with input line by line (see [./examples/cat.js](https://github.com/chriso/cli/blob/master/examples/cat.js) for an example).
-
-```javascript
-cli.withInput(file, function (line, newline, eof) {
- if (!eof) {
- this.output(line + newline);
- }
-});
-```
-
-*Note: `file` can be omitted if you want to work with stdin*
-
-To output a progress bar, call
-
-```javascript
-cli.progress(progress); //Where 0 <= progress <= 1
-```
-
-To spawn a child process, use
-
-```javascript
-cli.exec(cmd, callback); //callback receives the output of the process (split into lines)
-```
-
-cli also comes bundled with kof's [node-natives](https://github.com/kof/node-natives) (access with cli.native) and creationix' [stack](https://github.com/creationix/stack) (access with cli.createServer)
-
-## Plugins
-
-Plugins are a way of adding common opts and can be enabled using
-
-```javascript
-cli.enable(plugin1, [plugin2, ...]); //To disable, use the equivalent disable() method
-```
-
-**help** - *enabled by default*
-
-Adds `-h,--help` to output auto-generated usage information
-
-**version**
-
-Adds `-v,--version` to output version information for the app. cli will attempt to locate and parse a nearby *package.json*
-
-To set your own app name and version, use `cli.setApp(app_name, version)`
-
-**status**
-
-Adds options to show/hide the stylized status messages that are output to the console when using one of these methods
-
-```javascript
-cli.debug(msg); //Only shown when using --debug
-cli.error(msg);
-cli.fatal(msg); //Exits the process after outputting msg
-cli.info(msg);
-cli.ok(msg);
-```
-
-`-k,--no-color` will omit ANSI color escapes from the output
-
-**glob** - *requires* `npm install glob`
-
-Enables glob matching of arguments
-
-**daemon** - *requires* `npm install daemon`
-
-Adds `-d,--daemon ARG` for daemonizing the process and controlling the resulting daemon
-
-`ARG` can be either start (default), stop, restart, pid (outputs the daemon's pid if it's running), or log (output the daemon's stdout+stderr)
-
-**timeout**
-
-Adds `-t,--timeout N` to exit the process after N seconds with an error
-
-**catchall**
-
-Adds `-c,--catch` to catch and output uncaughtExceptions and resume execution
-
-*Note: Plugins are automatically disabled if an option or switch of the same name is already defined*
-
-## LICENSE
-
-(MIT license)
-
-Copyright (c) 2010 Chris O'Hara <co...@gmail.com>
-
-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: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org