initial commit taken from gitlab.lrz.de

This commit is contained in:
privatereese
2018-08-24 18:09:42 +02:00
parent ae54ed4c48
commit fc05486403
28494 changed files with 2159823 additions and 0 deletions

4
node_modules/plist/.jshintrc generated vendored Normal file
View File

@@ -0,0 +1,4 @@
{
"laxbreak": true,
"laxcomma": true
}

34
node_modules/plist/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,34 @@
language: node_js
node_js:
- '0.10'
- '0.11'
- '4.0'
- '4.1'
env:
global:
- secure: xlLmWO7akYQjmDgrv6/b/ZMGILF8FReD+k6A/u8pYRD2JW29hhwvRwIQGcKp9+zmJdn4i5M4D1/qJkCeI3pdhAYBDHvzHOHSEwLJz1ESB2Crv6fa69CtpIufQkWvIxmZoU49tCaLpMBaIroGihJ4DAXdIVOIz6Ur9vXLDhGsE4c=
- secure: aQ46RdxL10xR5ZJJTMUKdH5k4tdrzgZ87nlwHC+pTr6bfRw3UKYC+6Rm7yQpg9wq0Io9O9dYCP007gQGSWstbjr1+jXNu/ubtNG+q5cpWBQZZZ013VHh9QJTf1MnetsZxbv8Yhrjg590s6vruT0oqesOnB2CizO/BsKxnY37Nos=
matrix:
include:
- node_js: '0.10'
env: BROWSER_NAME=chrome BROWSER_VERSION=latest
- node_js: '0.10'
env: BROWSER_NAME=chrome BROWSER_VERSION=29
- node_js: '0.10'
env: BROWSER_NAME=firefox BROWSER_VERSION=latest
- node_js: '0.10'
env: BROWSER_NAME=opera BROWSER_VERSION=latest
- node_js: '0.10'
env: BROWSER_NAME=safari BROWSER_VERSION=latest
- node_js: '0.10'
env: BROWSER_NAME=safari BROWSER_VERSION=7
- node_js: '0.10'
env: BROWSER_NAME=safari BROWSER_VERSION=6
- node_js: '0.10'
env: BROWSER_NAME=safari BROWSER_VERSION=5
- node_js: '0.10'
env: BROWSER_NAME=ie BROWSER_VERSION=11
- node_js: '0.10'
env: BROWSER_NAME=ie BROWSER_VERSION=10
- node_js: '0.10'
env: BROWSER_NAME=ie BROWSER_VERSION=9

122
node_modules/plist/History.md generated vendored Normal file
View File

@@ -0,0 +1,122 @@
1.2.0 / 2015-11-10
* package: update "browserify" to v12.0.1
* package: update "zuul" to v3.7.2
* package: update "xmlbuilder" to v4.0.0
* package: update "util-deprecate" to v1.0.2
* package: update "mocha" to v2.3.3
* package: update "base64-js" to v0.0.8
* build: omit undefined values
* travis: add node 4.0 and 4.1 to test matrix
1.1.0 / 2014-08-27
==================
* package: update "browserify" to v5.10.1
* package: update "zuul" to v1.10.2
* README: add "Sauce Test Status" build badge
* travis: use new "plistjs" sauce credentials
* travis: set up zuul saucelabs automated testing
1.0.1 / 2014-06-25
==================
* add .zuul.yml file for browser testing
* remove Testling stuff
* build: fix global variable `val` leak
* package: use --check-leaks when running mocha tests
* README: update examples to use preferred API
* package: add "browser" keyword
1.0.0 / 2014-05-20
==================
* package: remove "android-browser"
* test: add <dict> build() test
* test: re-add the empty string build() test
* test: remove "fixtures" and legacy "tests" dir
* test: add some more build() tests
* test: add a parse() CDATA test
* test: starting on build() tests
* test: more parse() tests
* package: attempt to fix "android-browser" testling
* parse: better <data> with newline handling
* README: add Testling badge
* test: add <data> node tests
* test: add a <date> parse() test
* travis: don't test node v0.6 or v0.8
* test: some more parse() tests
* test: add simple <string> parsing test
* build: add support for an optional "opts" object
* package: test mobile devices
* test: use multiline to inline the XML
* package: beautify
* package: fix "mocha" harness
* package: more testling browsers
* build: add the "version=1.0" attribute
* beginnings of "mocha" tests
* build: more JSDocs
* tests: add test that ensures that empty string conversion works
* build: update "xmlbuilder" to v2.2.1
* parse: ignore comment and cdata nodes
* tests: make the "Newlines" test actually contain a newline
* parse: lint
* test travis
* README: add Travis CI badge
* add .travis.yml file
* build: updated DTD to reflect name change
* parse: return falsey values in an Array plist
* build: fix encoding a typed array in the browser
* build: add support for Typed Arrays and ArrayBuffers
* build: more lint
* build: slight cleanup and optimizations
* build: use .txt() for the "date" value
* parse: always return a Buffer for <data> nodes
* build: don't interpret Strings as base64
* dist: commit prebuilt plist*.js files
* parse: fix typo in deprecate message
* parse: fix parse() return value
* parse: add jsdoc comments for the deprecated APIs
* parse: add `parse()` function
* node, parse: use `util-deprecate` module
* re-implemented parseFile to be asynchronous
* node: fix jsdoc comment
* Makefile: fix "node" require stubbing
* examples: add "browser" example
* package: tweak "main"
* package: remove "engines" field
* Makefile: fix --exclude command for browserify
* package: update "description"
* lib: more styling
* Makefile: add -build.js and -parse.js dist files
* lib: separate out the parse and build logic into their own files
* Makefile: add makefile with browserify build rules
* package: add "browserify" as a dev dependency
* plist: tabs to spaces (again)
* add a .jshintrc file
* LICENSE: update
* node-webkit support
* Ignore tests/ in .npmignore file
* Remove duplicate devDependencies key
* Remove trailing whitespace
* adding recent contributors. Bumping npm package number (patch release)
* Fixed node.js string handling
* bumping version number
* Fixed global variable plist leak
* patch release 0.4.1
* removed temporary debug output file
* flipping the cases for writing data and string elements in build(). removed the 125 length check. Added validation of base64 encoding for data fields when parsing. added unit tests.
* fixed syntax errors in README examples (issue #20)
* added Sync versions of calls. added deprecation warnings for old method calls. updated documentation. If the resulting object from parseStringSync is an array with 1 element, return just the element. If a plist string or file doesnt have a <plist> tag as the document root element, fail noisily (issue #15)
* incrementing package version
* added cross platform base64 encode/decode for data elements (issue #17.) Comments and hygiene.
* refactored the code to use a DOM parser instead of SAX. closes issues #5 and #16
* rolling up package version
* updated base64 detection regexp. updated README. hygiene.
* refactored the build function. Fixes issue #14
* refactored tests. Modified tests from issue #9. thanks @sylvinus
* upgrade xmlbuilder package version. this is why .end() was needed in last commit; breaking change to xmlbuilder lib. :/
* bug fix in build function, forgot to call .end() Refactored tests to use nodeunit
* Implemented support for real, identity tests
* Refactored base64 detection - still sloppy, fixed date building. Passing tests OK.
* Implemented basic plist builder that turns an existing JS object into plist XML. date, real and data types still need to be implemented.

24
node_modules/plist/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,24 @@
(The MIT License)
Copyright (c) 2010-2014 Nathan Rajlich <nathan@tootallnate.net>
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.

76
node_modules/plist/Makefile generated vendored Normal file
View File

@@ -0,0 +1,76 @@
# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
# BIN directory
BIN := $(THIS_DIR)/node_modules/.bin
# applications
NODE ?= node
NPM ?= $(NODE) $(shell which npm)
BROWSERIFY ?= $(NODE) $(BIN)/browserify
MOCHA ?= $(NODE) $(BIN)/mocha
ZUUL ?= $(NODE) $(BIN)/zuul
REPORTER ?= spec
all: dist/plist.js dist/plist-build.js dist/plist-parse.js
install: node_modules
clean:
@rm -rf node_modules dist
dist:
@mkdir -p $@
dist/plist-build.js: node_modules lib/build.js dist
@$(BROWSERIFY) \
--standalone plist \
lib/build.js > $@
dist/plist-parse.js: node_modules lib/parse.js dist
@$(BROWSERIFY) \
--standalone plist \
lib/parse.js > $@
dist/plist.js: node_modules lib/*.js dist
@$(BROWSERIFY) \
--standalone plist \
--ignore lib/node.js \
lib/plist.js > $@
node_modules: package.json
@NODE_ENV= $(NPM) install
@touch node_modules
test:
@if [ "x$(BROWSER_NAME)" = "x" ]; then \
$(MAKE) test-node; \
else \
$(MAKE) test-zuul; \
fi
test-node:
@$(MOCHA) \
--reporter $(REPORTER) \
test/*.js
test-zuul:
@if [ "x$(BROWSER_PLATFORM)" = "x" ]; then \
$(ZUUL) \
--ui mocha-bdd \
--browser-name $(BROWSER_NAME) \
--browser-version $(BROWSER_VERSION) \
test/*.js; \
else \
$(ZUUL) \
--ui mocha-bdd \
--browser-name $(BROWSER_NAME) \
--browser-version $(BROWSER_VERSION) \
--browser-platform "$(BROWSER_PLATFORM)" \
test/*.js; \
fi
.PHONY: all install clean test test-node test-zuul

113
node_modules/plist/README.md generated vendored Normal file
View File

@@ -0,0 +1,113 @@
plist.js
========
### Mac OS X Plist parser/builder for Node.js and browsers
[![Sauce Test Status](https://saucelabs.com/browser-matrix/plistjs.svg)](https://saucelabs.com/u/plistjs)
[![Build Status](https://travis-ci.org/TooTallNate/plist.js.svg?branch=master)](https://travis-ci.org/TooTallNate/plist.js)
Provides facilities for reading and writing Mac OS X Plist (property list)
files. These are often used in programming OS X and iOS applications, as
well as the iTunes configuration XML file.
Plist files represent stored programming "object"s. They are very similar
to JSON. A valid Plist file is representable as a native JavaScript Object
and vice-versa.
## Usage
### Node.js
Install using `npm`:
``` bash
$ npm install --save plist
```
Then `require()` the _plist_ module in your file:
``` js
var plist = require('plist');
// now use the `parse()` and `build()` functions
var val = plist.parse('<plist><string>Hello World!</string></plist>');
console.log(val); // "Hello World!"
```
### Browser
Include the `dist/plist.js` in a `<script>` tag in your HTML file:
``` html
<script src="plist.js"></script>
<script>
// now use the `parse()` and `build()` functions
var val = plist.parse('<plist><string>Hello World!</string></plist>');
console.log(val); // "Hello World!"
</script>
```
## API
### Parsing
Parsing a plist from filename:
``` javascript
var fs = require('fs');
var plist = require('plist');
var obj = plist.parse(fs.readFileSync('myPlist.plist', 'utf8'));
console.log(JSON.stringify(obj));
```
Parsing a plist from string payload:
``` javascript
var plist = require('plist');
var obj = plist.parse('<plist><string>Hello World!</string></plist>');
console.log(obj); // Hello World!
```
### Building
Given an existing JavaScript Object, you can turn it into an XML document
that complies with the plist DTD:
``` javascript
var plist = require('plist');
console.log(plist.build({ foo: 'bar' }));
```
## License
(The MIT License)
Copyright (c) 2010-2014 Nathan Rajlich <nathan@tootallnate.net>
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.

3982
node_modules/plist/dist/plist-build.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

4055
node_modules/plist/dist/plist-parse.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

7987
node_modules/plist/dist/plist.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

14
node_modules/plist/examples/browser/index.html generated vendored Normal file
View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>plist.js browser example</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<script src="../../dist/plist.js"></script>
<script>
// TODO: add <input type=file> drag and drop example
console.log(plist);
</script>
</body>
</html>

138
node_modules/plist/lib/build.js generated vendored Normal file
View File

@@ -0,0 +1,138 @@
/**
* Module dependencies.
*/
var base64 = require('base64-js');
var xmlbuilder = require('xmlbuilder');
/**
* Module exports.
*/
exports.build = build;
/**
* Accepts a `Date` instance and returns an ISO date string.
*
* @param {Date} d - Date instance to serialize
* @returns {String} ISO date string representation of `d`
* @api private
*/
function ISODateString(d){
function pad(n){
return n < 10 ? '0' + n : n;
}
return d.getUTCFullYear()+'-'
+ pad(d.getUTCMonth()+1)+'-'
+ pad(d.getUTCDate())+'T'
+ pad(d.getUTCHours())+':'
+ pad(d.getUTCMinutes())+':'
+ pad(d.getUTCSeconds())+'Z';
}
/**
* Returns the internal "type" of `obj` via the
* `Object.prototype.toString()` trick.
*
* @param {Mixed} obj - any value
* @returns {String} the internal "type" name
* @api private
*/
var toString = Object.prototype.toString;
function type (obj) {
var m = toString.call(obj).match(/\[object (.*)\]/);
return m ? m[1] : m;
}
/**
* Generate an XML plist string from the input object `obj`.
*
* @param {Object} obj - the object to convert
* @param {Object} [opts] - optional options object
* @returns {String} converted plist XML string
* @api public
*/
function build (obj, opts) {
var XMLHDR = {
version: '1.0',
encoding: 'UTF-8'
};
var XMLDTD = {
pubid: '-//Apple//DTD PLIST 1.0//EN',
sysid: 'http://www.apple.com/DTDs/PropertyList-1.0.dtd'
};
var doc = xmlbuilder.create('plist');
doc.dec(XMLHDR.version, XMLHDR.encoding, XMLHDR.standalone);
doc.dtd(XMLDTD.pubid, XMLDTD.sysid);
doc.att('version', '1.0');
walk_obj(obj, doc);
if (!opts) opts = {};
// default `pretty` to `true`
opts.pretty = opts.pretty !== false;
return doc.end(opts);
}
/**
* depth first, recursive traversal of a javascript object. when complete,
* next_child contains a reference to the build XML object.
*
* @api private
*/
function walk_obj(next, next_child) {
var tag_type, i, prop;
var name = type(next);
if ('Undefined' == name) {
return;
} else if (Array.isArray(next)) {
next_child = next_child.ele('array');
for (i = 0; i < next.length; i++) {
walk_obj(next[i], next_child);
}
} else if (Buffer.isBuffer(next)) {
next_child.ele('data').raw(next.toString('base64'));
} else if ('Object' == name) {
next_child = next_child.ele('dict');
for (prop in next) {
if (next.hasOwnProperty(prop)) {
next_child.ele('key').txt(prop);
walk_obj(next[prop], next_child);
}
}
} else if ('Number' == name) {
// detect if this is an integer or real
// TODO: add an ability to force one way or another via a "cast"
tag_type = (next % 1 === 0) ? 'integer' : 'real';
next_child.ele(tag_type).txt(next.toString());
} else if ('Date' == name) {
next_child.ele('date').txt(ISODateString(new Date(next)));
} else if ('Boolean' == name) {
next_child.ele(next ? 'true' : 'false');
} else if ('String' == name) {
next_child.ele('string').txt(next);
} else if ('ArrayBuffer' == name) {
next_child.ele('data').raw(base64.fromByteArray(next));
} else if (next && next.buffer && 'ArrayBuffer' == type(next.buffer)) {
// a typed array
next_child.ele('data').raw(base64.fromByteArray(new Uint8Array(next.buffer), next_child));
}
}

49
node_modules/plist/lib/node.js generated vendored Normal file
View File

@@ -0,0 +1,49 @@
/**
* Module dependencies.
*/
var fs = require('fs');
var parse = require('./parse');
var deprecate = require('util-deprecate');
/**
* Module exports.
*/
exports.parseFile = deprecate(parseFile, '`parseFile()` is deprecated. ' +
'Use `parseString()` instead.');
exports.parseFileSync = deprecate(parseFileSync, '`parseFileSync()` is deprecated. ' +
'Use `parseStringSync()` instead.');
/**
* Parses file `filename` as a .plist file.
* Invokes `fn` callback function when done.
*
* @param {String} filename - name of the file to read
* @param {Function} fn - callback function
* @api public
* @deprecated use parseString() instead
*/
function parseFile (filename, fn) {
fs.readFile(filename, { encoding: 'utf8' }, onread);
function onread (err, inxml) {
if (err) return fn(err);
parse.parseString(inxml, fn);
}
}
/**
* Parses file `filename` as a .plist file.
* Returns a when done.
*
* @param {String} filename - name of the file to read
* @param {Function} fn - callback function
* @api public
* @deprecated use parseStringSync() instead
*/
function parseFileSync (filename) {
var inxml = fs.readFileSync(filename, 'utf8');
return parse.parseStringSync(inxml);
}

200
node_modules/plist/lib/parse.js generated vendored Normal file
View File

@@ -0,0 +1,200 @@
/**
* Module dependencies.
*/
var deprecate = require('util-deprecate');
var DOMParser = require('xmldom').DOMParser;
/**
* Module exports.
*/
exports.parse = parse;
exports.parseString = deprecate(parseString, '`parseString()` is deprecated. ' +
'It\'s not actually async. Use `parse()` instead.');
exports.parseStringSync = deprecate(parseStringSync, '`parseStringSync()` is ' +
'deprecated. Use `parse()` instead.');
/**
* We ignore raw text (usually whitespace), <!-- xml comments -->,
* and raw CDATA nodes.
*
* @param {Element} node
* @returns {Boolean}
* @api private
*/
function shouldIgnoreNode (node) {
return node.nodeType === 3 // text
|| node.nodeType === 8 // comment
|| node.nodeType === 4; // cdata
}
/**
* Parses a Plist XML string. Returns an Object.
*
* @param {String} xml - the XML String to decode
* @returns {Mixed} the decoded value from the Plist XML
* @api public
*/
function parse (xml) {
var doc = new DOMParser().parseFromString(xml);
if (doc.documentElement.nodeName !== 'plist') {
throw new Error('malformed document. First element should be <plist>');
}
var plist = parsePlistXML(doc.documentElement);
// the root <plist> node gets interpreted as an Array,
// so pull out the inner data first
if (plist.length == 1) plist = plist[0];
return plist;
}
/**
* Parses a Plist XML string. Returns an Object. Takes a `callback` function.
*
* @param {String} xml - the XML String to decode
* @param {Function} callback - callback function
* @returns {Mixed} the decoded value from the Plist XML
* @api public
* @deprecated not actually async. use parse() instead
*/
function parseString (xml, callback) {
var doc, error, plist;
try {
doc = new DOMParser().parseFromString(xml);
plist = parsePlistXML(doc.documentElement);
} catch(e) {
error = e;
}
callback(error, plist);
}
/**
* Parses a Plist XML string. Returns an Object.
*
* @param {String} xml - the XML String to decode
* @param {Function} callback - callback function
* @returns {Mixed} the decoded value from the Plist XML
* @api public
* @deprecated use parse() instead
*/
function parseStringSync (xml) {
var doc = new DOMParser().parseFromString(xml);
var plist;
if (doc.documentElement.nodeName !== 'plist') {
throw new Error('malformed document. First element should be <plist>');
}
plist = parsePlistXML(doc.documentElement);
// if the plist is an array with 1 element, pull it out of the array
if (plist.length == 1) {
plist = plist[0];
}
return plist;
}
/**
* Convert an XML based plist document into a JSON representation.
*
* @param {Object} xml_node - current XML node in the plist
* @returns {Mixed} built up JSON object
* @api private
*/
function parsePlistXML (node) {
var i, new_obj, key, val, new_arr, res, d;
if (!node)
return null;
if (node.nodeName === 'plist') {
new_arr = [];
for (i=0; i < node.childNodes.length; i++) {
// ignore comment nodes (text)
if (!shouldIgnoreNode(node.childNodes[i])) {
new_arr.push( parsePlistXML(node.childNodes[i]));
}
}
return new_arr;
} else if (node.nodeName === 'dict') {
new_obj = {};
key = null;
for (i=0; i < node.childNodes.length; i++) {
// ignore comment nodes (text)
if (!shouldIgnoreNode(node.childNodes[i])) {
if (key === null) {
key = parsePlistXML(node.childNodes[i]);
} else {
new_obj[key] = parsePlistXML(node.childNodes[i]);
key = null;
}
}
}
return new_obj;
} else if (node.nodeName === 'array') {
new_arr = [];
for (i=0; i < node.childNodes.length; i++) {
// ignore comment nodes (text)
if (!shouldIgnoreNode(node.childNodes[i])) {
res = parsePlistXML(node.childNodes[i]);
if (null != res) new_arr.push(res);
}
}
return new_arr;
} else if (node.nodeName === '#text') {
// TODO: what should we do with text types? (CDATA sections)
} else if (node.nodeName === 'key') {
return node.childNodes[0].nodeValue;
} else if (node.nodeName === 'string') {
res = '';
for (d=0; d < node.childNodes.length; d++) {
res += node.childNodes[d].nodeValue;
}
return res;
} else if (node.nodeName === 'integer') {
// parse as base 10 integer
return parseInt(node.childNodes[0].nodeValue, 10);
} else if (node.nodeName === 'real') {
res = '';
for (d=0; d < node.childNodes.length; d++) {
if (node.childNodes[d].nodeType === 3) {
res += node.childNodes[d].nodeValue;
}
}
return parseFloat(res);
} else if (node.nodeName === 'data') {
res = '';
for (d=0; d < node.childNodes.length; d++) {
if (node.childNodes[d].nodeType === 3) {
res += node.childNodes[d].nodeValue.replace(/\s+/g, '');
}
}
// decode base64 data to a Buffer instance
return new Buffer(res, 'base64');
} else if (node.nodeName === 'date') {
return new Date(node.childNodes[0].nodeValue);
} else if (node.nodeName === 'true') {
return true;
} else if (node.nodeName === 'false') {
return false;
}
}

23
node_modules/plist/lib/plist.js generated vendored Normal file
View File

@@ -0,0 +1,23 @@
var i;
/**
* Parser functions.
*/
var parserFunctions = require('./parse');
for (i in parserFunctions) exports[i] = parserFunctions[i];
/**
* Builder functions.
*/
var builderFunctions = require('./build');
for (i in builderFunctions) exports[i] = builderFunctions[i];
/**
* Add Node.js-specific functions (they're deprecated…).
*/
var nodeFunctions = require('./node');
for (i in nodeFunctions) exports[i] = nodeFunctions[i];

View File

@@ -0,0 +1,5 @@
language: node_js
node_js:
- "0.8"
- "0.10"
- "0.11"

21
node_modules/plist/node_modules/base64-js/LICENSE.MIT generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014
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.

31
node_modules/plist/node_modules/base64-js/README.md generated vendored Normal file
View File

@@ -0,0 +1,31 @@
base64-js
=========
`base64-js` does basic base64 encoding/decoding in pure JS.
[![build status](https://secure.travis-ci.org/beatgammit/base64-js.png)](http://travis-ci.org/beatgammit/base64-js)
[![testling badge](https://ci.testling.com/beatgammit/base64-js.png)](https://ci.testling.com/beatgammit/base64-js)
Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data.
Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does.
## install
With [npm](https://npmjs.org) do:
`npm install base64-js`
## methods
`var base64 = require('base64-js')`
`base64` has two exposed functions, `toByteArray` and `fromByteArray`, which both take a single argument.
* `toByteArray` - Takes a base64 string and returns a byte array
* `fromByteArray` - Takes a byte array and returns a base64 string
## license
MIT

View File

@@ -0,0 +1,19 @@
var random = require('crypto').pseudoRandomBytes
var b64 = require('../')
var fs = require('fs')
var path = require('path')
var data = random(1e6).toString('base64')
//fs.readFileSync(path.join(__dirname, 'example.b64'), 'ascii').split('\n').join('')
var start = Date.now()
var raw = b64.toByteArray(data)
var middle = Date.now()
var data = b64.fromByteArray(raw)
var end = Date.now()
console.log('decode ms, decode ops/ms, encode ms, encode ops/ms')
console.log(
middle - start, data.length / (middle - start),
end - middle, data.length / (end - middle))
//console.log(data)

124
node_modules/plist/node_modules/base64-js/lib/b64.js generated vendored Normal file
View File

@@ -0,0 +1,124 @@
var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
;(function (exports) {
'use strict';
var Arr = (typeof Uint8Array !== 'undefined')
? Uint8Array
: Array
var PLUS = '+'.charCodeAt(0)
var SLASH = '/'.charCodeAt(0)
var NUMBER = '0'.charCodeAt(0)
var LOWER = 'a'.charCodeAt(0)
var UPPER = 'A'.charCodeAt(0)
var PLUS_URL_SAFE = '-'.charCodeAt(0)
var SLASH_URL_SAFE = '_'.charCodeAt(0)
function decode (elt) {
var code = elt.charCodeAt(0)
if (code === PLUS ||
code === PLUS_URL_SAFE)
return 62 // '+'
if (code === SLASH ||
code === SLASH_URL_SAFE)
return 63 // '/'
if (code < NUMBER)
return -1 //no match
if (code < NUMBER + 10)
return code - NUMBER + 26 + 26
if (code < UPPER + 26)
return code - UPPER
if (code < LOWER + 26)
return code - LOWER + 26
}
function b64ToByteArray (b64) {
var i, j, l, tmp, placeHolders, arr
if (b64.length % 4 > 0) {
throw new Error('Invalid string. Length must be a multiple of 4')
}
// the number of equal signs (place holders)
// if there are two placeholders, than the two characters before it
// represent one byte
// if there is only one, then the three characters before it represent 2 bytes
// this is just a cheap hack to not do indexOf twice
var len = b64.length
placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0
// base64 is 4/3 + up to two characters of the original data
arr = new Arr(b64.length * 3 / 4 - placeHolders)
// if there are placeholders, only get up to the last complete 4 chars
l = placeHolders > 0 ? b64.length - 4 : b64.length
var L = 0
function push (v) {
arr[L++] = v
}
for (i = 0, j = 0; i < l; i += 4, j += 3) {
tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3))
push((tmp & 0xFF0000) >> 16)
push((tmp & 0xFF00) >> 8)
push(tmp & 0xFF)
}
if (placeHolders === 2) {
tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4)
push(tmp & 0xFF)
} else if (placeHolders === 1) {
tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2)
push((tmp >> 8) & 0xFF)
push(tmp & 0xFF)
}
return arr
}
function uint8ToBase64 (uint8) {
var i,
extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes
output = "",
temp, length
function encode (num) {
return lookup.charAt(num)
}
function tripletToBase64 (num) {
return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F)
}
// go through the array every three bytes, we'll deal with trailing stuff later
for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) {
temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
output += tripletToBase64(temp)
}
// pad the end with zeros, but make sure to not forget the extra bytes
switch (extraBytes) {
case 1:
temp = uint8[uint8.length - 1]
output += encode(temp >> 2)
output += encode((temp << 4) & 0x3F)
output += '=='
break
case 2:
temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1])
output += encode(temp >> 10)
output += encode((temp >> 4) & 0x3F)
output += encode((temp << 2) & 0x3F)
output += '='
break
}
return output
}
exports.toByteArray = b64ToByteArray
exports.fromByteArray = uint8ToBase64
}(typeof exports === 'undefined' ? (this.base64js = {}) : exports))

93
node_modules/plist/node_modules/base64-js/package.json generated vendored Normal file
View File

@@ -0,0 +1,93 @@
{
"_args": [
[
"base64-js@0.0.8",
"/home/bernhard/freifunk-app/node_modules/plist"
]
],
"_from": "base64-js@0.0.8",
"_id": "base64-js@0.0.8",
"_inCache": true,
"_installable": true,
"_location": "/plist/base64-js",
"_nodeVersion": "0.10.35",
"_npmUser": {
"email": "feross@feross.org",
"name": "feross"
},
"_npmVersion": "2.1.16",
"_phantomChildren": {},
"_requested": {
"name": "base64-js",
"raw": "base64-js@0.0.8",
"rawSpec": "0.0.8",
"scope": null,
"spec": "0.0.8",
"type": "version"
},
"_requiredBy": [
"/plist"
],
"_resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz",
"_shasum": "1101e9544f4a76b1bc3b26d452ca96d7a35e7978",
"_shrinkwrap": null,
"_spec": "base64-js@0.0.8",
"_where": "/home/bernhard/freifunk-app/node_modules/plist",
"author": {
"email": "t.jameson.little@gmail.com",
"name": "T. Jameson Little"
},
"bugs": {
"url": "https://github.com/beatgammit/base64-js/issues"
},
"dependencies": {},
"description": "Base64 encoding/decoding in pure JS",
"devDependencies": {
"tape": "~2.3.2"
},
"directories": {},
"dist": {
"shasum": "1101e9544f4a76b1bc3b26d452ca96d7a35e7978",
"tarball": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz"
},
"engines": {
"node": ">= 0.4"
},
"gitHead": "b4a8a5fa9b0caeddb5ad94dd1108253d8f2a315f",
"homepage": "https://github.com/beatgammit/base64-js",
"license": "MIT",
"main": "lib/b64.js",
"maintainers": [
{
"name": "beatgammit",
"email": "t.jameson.little@gmail.com"
},
{
"name": "feross",
"email": "feross@feross.org"
}
],
"name": "base64-js",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git://github.com/beatgammit/base64-js.git"
},
"scripts": {
"test": "tape test/*.js"
},
"testling": {
"browsers": [
"chrome/4..latest",
"firefox/3..latest",
"ie/6..latest",
"ipad/6",
"iphone/6",
"opera/11.0..latest",
"safari/5.1..latest"
],
"files": "test/*.js"
},
"version": "0.0.8"
}

View File

@@ -0,0 +1,51 @@
var test = require('tape'),
b64 = require('../lib/b64'),
checks = [
'a',
'aa',
'aaa',
'hi',
'hi!',
'hi!!',
'sup',
'sup?',
'sup?!'
];
test('convert to base64 and back', function (t) {
t.plan(checks.length);
for (var i = 0; i < checks.length; i++) {
var check = checks[i],
b64Str,
arr,
str;
b64Str = b64.fromByteArray(map(check, function (char) { return char.charCodeAt(0); }));
arr = b64.toByteArray(b64Str);
str = map(arr, function (byte) { return String.fromCharCode(byte); }).join('');
t.equal(check, str, 'Checked ' + check);
}
});
function map (arr, callback) {
var res = [],
kValue,
mappedValue;
for (var k = 0, len = arr.length; k < len; k++) {
if ((typeof arr === 'string' && !!arr.charAt(k))) {
kValue = arr.charAt(k);
mappedValue = callback(kValue, k, arr);
res[k] = mappedValue;
} else if (typeof arr !== 'string' && k in arr) {
kValue = arr[k];
mappedValue = callback(kValue, k, arr);
res[k] = mappedValue;
}
}
return res;
}

View File

@@ -0,0 +1,18 @@
var test = require('tape'),
b64 = require('../lib/b64');
test('decode url-safe style base64 strings', function (t) {
var expected = [0xff, 0xff, 0xbe, 0xff, 0xef, 0xbf, 0xfb, 0xef, 0xff];
var actual = b64.toByteArray('//++/++/++//');
for (var i = 0; i < actual.length; i++) {
t.equal(actual[i], expected[i])
}
actual = b64.toByteArray('__--_--_--__');
for (var i = 0; i < actual.length; i++) {
t.equal(actual[i], expected[i])
}
t.end();
});

117
node_modules/plist/package.json generated vendored Normal file
View File

@@ -0,0 +1,117 @@
{
"_args": [
[
"plist@^1.2.0",
"/home/bernhard/freifunk-app/node_modules/react-native"
]
],
"_from": "plist@>=1.2.0 <2.0.0",
"_id": "plist@1.2.0",
"_inCache": true,
"_installable": true,
"_location": "/plist",
"_nodeVersion": "5.0.0",
"_npmUser": {
"email": "reinstein.mike@gmail.com",
"name": "mreinstein"
},
"_npmVersion": "3.3.11",
"_phantomChildren": {},
"_requested": {
"name": "plist",
"raw": "plist@^1.2.0",
"rawSpec": "^1.2.0",
"scope": null,
"spec": ">=1.2.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/react-native"
],
"_resolved": "https://registry.npmjs.org/plist/-/plist-1.2.0.tgz",
"_shasum": "084b5093ddc92506e259f874b8d9b1afb8c79593",
"_shrinkwrap": null,
"_spec": "plist@^1.2.0",
"_where": "/home/bernhard/freifunk-app/node_modules/react-native",
"author": {
"email": "nathan@tootallnate.net",
"name": "Nathan Rajlich"
},
"bugs": {
"url": "https://github.com/TooTallNate/node-plist/issues"
},
"contributors": [
{
"name": "Hans Huebner",
"email": "hans.huebner@gmail.com"
},
{
"name": "Pierre Metrailler"
},
{
"name": "Mike Reinstein",
"email": "reinstein.mike@gmail.com"
},
{
"name": "Vladimir Tsvang"
},
{
"name": "Mathieu D'Amours"
}
],
"dependencies": {
"base64-js": "0.0.8",
"util-deprecate": "1.0.2",
"xmlbuilder": "4.0.0",
"xmldom": "0.1.x"
},
"description": "Mac OS X Plist parser/builder for Node.js and browsers",
"devDependencies": {
"browserify": "12.0.1",
"mocha": "2.3.3",
"multiline": "1.0.2",
"zuul": "3.7.2"
},
"directories": {},
"dist": {
"shasum": "084b5093ddc92506e259f874b8d9b1afb8c79593",
"tarball": "https://registry.npmjs.org/plist/-/plist-1.2.0.tgz"
},
"gitHead": "69520574f27864145192338b72e608fbe1bda6f7",
"homepage": "https://github.com/TooTallNate/node-plist#readme",
"keywords": [
"apple",
"browser",
"mac",
"parser",
"plist",
"xml"
],
"license": "MIT",
"main": "lib/plist.js",
"maintainers": [
{
"name": "TooTallNate",
"email": "nathan@tootallnate.net"
},
{
"name": "tootallnate",
"email": "nathan@tootallnate.net"
},
{
"name": "mreinstein",
"email": "reinstein.mike@gmail.com"
}
],
"name": "plist",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git://github.com/TooTallNate/node-plist.git"
},
"scripts": {
"test": "make test"
},
"version": "1.2.0"
}