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

8
node_modules/uuid/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,8 @@
node_modules
.DS_Store
# VIM temp files
*.sw*
# Mac desktop services store
.DS_Store

5
node_modules/uuid/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,5 @@
language: node_js
node_js:
- "0.12"
- "4"
- "6"

5
node_modules/uuid/AUTHORS generated vendored Normal file
View File

@@ -0,0 +1,5 @@
Robert Kieffer <robert@broofa.com>
Christoph Tavan <dev@tavan.de>
AJ ONeal <coolaj86@gmail.com>
Vincent Voyer <vincent@zeroload.net>
Roman Shtylman <shtylman@gmail.com>

28
node_modules/uuid/HISTORY.md generated vendored Normal file
View File

@@ -0,0 +1,28 @@
# 3.0.1 (2016-11-28)
* split uuid versions into separate files
# 3.0.0 (2016-11-17)
* remove .parse and .unparse
# 2.0.0
* Removed uuid.BufferClass
# 1.4.0
* Improved module context detection
* Removed public RNG functions
# 1.3.2
* Improve tests and handling of v1() options (Issue #24)
* Expose RNG option to allow for perf testing with different generators
# 1.3.0
* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
* Support for node.js crypto API
* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code

21
node_modules/uuid/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2010-2016 Robert Kieffer and other contributors
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.

132
node_modules/uuid/README.md generated vendored Normal file
View File

@@ -0,0 +1,132 @@
# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) #
Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.
Features:
* Generate RFC4122 version 1 or version 4 UUIDs
* Runs in node.js and browsers
* Cryptographically strong random number generation on supporting platforms
* Small footprint (Want something smaller? [Check this out](https://gist.github.com/982883)!)
## Quickstart - CommonJS (Recommended)
```shell
npm install uuid
```
```javascript
// Generate a v1 UUID (time-based)
const uuidV1 = require('uuid/v1');
uuidV1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'
// Generate a v4 UUID (random)
const uuidV4 = require('uuid/v4');
uuidV4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'
```
## Quickstart - Pre-packaged for browsers (Not recommended)
Browser-ready versions of this module are available via [wzrd.in](https://github.com/jfhbrook/wzrd.in).
```html
<script src="http://wzrd.in/standalone/uuid@latest"></script>
<script>
uuid.v1(); // -> v1 UUID
uuid.v4(); // -> v4 UUID
</script>
```
(Note: Do not do this in production. Just don't. wzrd.in is a great service, but if you're deploying a "real" service you should be using a packaging tool like browserify or webpack. If you do go this route you would be well advised to link to a specific version instead of `uuid@latest` to avoid having your code break when we roll out breaking changes.)
## API
### uuid(...)
Generate a V4 uuid. See uuid.v4 documentation below.
### uuid.v1([`options` [, `buffer` [, `offset`]]])
Generate and return a RFC4122 v1 (timestamp-based) UUID.
* `options` - (Object) Optional uuid state to apply. Properties may include:
* `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.
* `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.
* `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.
* `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.
* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
* `offset` - (Number) Starting index in `buffer` at which to begin writing.
Returns `buffer`, if specified, otherwise the string form of the UUID
Notes:
1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)
Example: Generate string UUID with fully-specified options
```javascript
uuid.v1({
node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
clockseq: 0x1234,
msecs: new Date('2011-11-01').getTime(),
nsecs: 5678
}); // -> "710b962e-041c-11e1-9234-0123456789ab"
```
Example: In-place generation of two binary IDs
```javascript
// Generate two ids in an array
const arr = new Array(32); // -> []
uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
```
### uuid.v4([`options` [, `buffer` [, `offset`]]])
Generate and return a RFC4122 v4 UUID.
* `options` - (Object) Optional uuid state to apply. Properties may include:
* `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values
* `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.
* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
* `offset` - (Number) Starting index in `buffer` at which to begin writing.
Returns `buffer`, if specified, otherwise the string form of the UUID
Example: Generate string UUID with fully-specified options
```javascript
uuid.v4({
random: [
0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,
0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36
]
});
// -> "109156be-c4fb-41ea-b1b4-efe1671c5836"
```
Example: Generate two IDs in a single buffer
```javascript
const buffer = new Array(32); // (or 'new Buffer' in node.js)
uuid.v4(null, buffer, 0);
uuid.v4(null, buffer, 16);
```
## Testing
```
npm test
```
## Legacy node-uuid package
The code for the legacy node-uuid package is available in the `node-uuid` branch.

26
node_modules/uuid/bin/uuid generated vendored Executable file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env node
var path = require('path');
var uuid = require(path.join(__dirname, '..'));
var arg = process.argv[2];
if ('--help' === arg) {
console.log('\n USAGE: uuid [version] [options]\n\n');
console.log(' options:\n');
console.log(' --help Display this message and exit\n');
process.exit(0);
}
if (null == arg) {
console.log(uuid());
process.exit(0);
}
if ('v1' !== arg && 'v4' !== arg) {
console.error('Version must be RFC4122 version 1 or version 4, denoted as "v1" or "v4"');
process.exit(1);
}
console.log(uuid[arg]());
process.exit(0);

8
node_modules/uuid/index.js generated vendored Normal file
View File

@@ -0,0 +1,8 @@
var v1 = require('./v1');
var v4 = require('./v4');
var uuid = v4;
uuid.v1 = v1;
uuid.v4 = v4;
module.exports = uuid;

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

@@ -0,0 +1,23 @@
/**
* Convert array of 16 byte values to UUID string format of the form:
* XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
*/
var byteToHex = [];
for (var i = 0; i < 256; ++i) {
byteToHex[i] = (i + 0x100).toString(16).substr(1);
}
function bytesToUuid(buf, offset) {
var i = offset || 0;
var bth = byteToHex;
return bth[buf[i++]] + bth[buf[i++]] +
bth[buf[i++]] + bth[buf[i++]] + '-' +
bth[buf[i++]] + bth[buf[i++]] + '-' +
bth[buf[i++]] + bth[buf[i++]] + '-' +
bth[buf[i++]] + bth[buf[i++]] + '-' +
bth[buf[i++]] + bth[buf[i++]] +
bth[buf[i++]] + bth[buf[i++]] +
bth[buf[i++]] + bth[buf[i++]];
}
module.exports = bytesToUuid;

33
node_modules/uuid/lib/rng-browser.js generated vendored Normal file
View File

@@ -0,0 +1,33 @@
// Unique ID creation requires a high quality random # generator. In the
// browser this is a little complicated due to unknown quality of Math.random()
// and inconsistent support for the `crypto` API. We do the best we can via
// feature-detection
var rng;
var crypto = global.crypto || global.msCrypto; // for IE 11
if (crypto && crypto.getRandomValues) {
// WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
var rnds8 = new Uint8Array(16);
rng = function whatwgRNG() {
crypto.getRandomValues(rnds8);
return rnds8;
};
}
if (!rng) {
// Math.random()-based (RNG)
//
// If all else fails, use Math.random(). It's fast, but is of unspecified
// quality.
var rnds = new Array(16);
rng = function() {
for (var i = 0, r; i < 16; i++) {
if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
}
return rnds;
};
}
module.exports = rng;

10
node_modules/uuid/lib/rng.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
// Unique ID creation requires a high quality random # generator. In node.js
// this is prett straight-forward - we use the crypto API.
var rb = require('crypto').randomBytes;
function rng() {
return rb(16);
};
module.exports = rng;

114
node_modules/uuid/package.json generated vendored Normal file
View File

@@ -0,0 +1,114 @@
{
"_args": [
[
"uuid@3.0.1",
"/home/bernhard/freifunk-app/node_modules/xcode"
]
],
"_from": "uuid@3.0.1",
"_id": "uuid@3.0.1",
"_inCache": true,
"_installable": true,
"_location": "/uuid",
"_nodeVersion": "6.7.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/uuid-3.0.1.tgz_1480403886767_0.2584113120101392"
},
"_npmUser": {
"email": "shtylman@gmail.com",
"name": "defunctzombie"
},
"_npmVersion": "3.10.3",
"_phantomChildren": {},
"_requested": {
"name": "uuid",
"raw": "uuid@3.0.1",
"rawSpec": "3.0.1",
"scope": null,
"spec": "3.0.1",
"type": "version"
},
"_requiredBy": [
"/xcode"
],
"_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz",
"_shasum": "6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1",
"_shrinkwrap": null,
"_spec": "uuid@3.0.1",
"_where": "/home/bernhard/freifunk-app/node_modules/xcode",
"bin": {
"uuid": "./bin/uuid"
},
"browser": {
"./lib/rng.js": "./lib/rng-browser.js"
},
"bugs": {
"url": "https://github.com/kelektiv/node-uuid/issues"
},
"contributors": [
{
"name": "Robert Kieffer",
"email": "robert@broofa.com"
},
{
"name": "Christoph Tavan",
"email": "dev@tavan.de"
},
{
"name": "AJ ONeal",
"email": "coolaj86@gmail.com"
},
{
"name": "Vincent Voyer",
"email": "vincent@zeroload.net"
},
{
"name": "Roman Shtylman",
"email": "shtylman@gmail.com"
}
],
"dependencies": {},
"description": "RFC4122 (v1 and v4) generator",
"devDependencies": {
"mocha": "3.1.2"
},
"directories": {},
"dist": {
"shasum": "6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1",
"tarball": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz"
},
"gitHead": "374de826de71d8997f71b4641f65552e48956ced",
"homepage": "https://github.com/kelektiv/node-uuid#readme",
"keywords": [
"guid",
"rfc4122",
"uuid"
],
"license": "MIT",
"maintainers": [
{
"name": "broofa",
"email": "robert@broofa.com"
},
{
"name": "defunctzombie",
"email": "shtylman@gmail.com"
},
{
"name": "vvo",
"email": "vincent.voyer@gmail.com"
}
],
"name": "uuid",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/kelektiv/node-uuid.git"
},
"scripts": {
"test": "mocha test/test.js"
},
"version": "3.0.1"
}

3
node_modules/uuid/test/mocha.opts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
--ui qunit
--reporter spec
--check-leaks

96
node_modules/uuid/test/test.js generated vendored Normal file
View File

@@ -0,0 +1,96 @@
var assert = require('assert');
var uuid = require('../');
// Verify ordering of v1 ids created with explicit times
var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00
function compare(name, ids) {
test(name, function() {
// avoid .map for older browsers
for (var i=0 ; i<ids.length ; ++i) {
ids[i] = ids[i].split('-').reverse().join('-');
}
ids = ids.sort();
var sorted = ([].concat(ids)).sort();
assert(sorted.toString() == ids.toString(), name + ' have expected order');
});
}
// Verify ordering of v1 ids created using default behavior
compare('uuids with current time', [
uuid.v1(),
uuid.v1(),
uuid.v1(),
uuid.v1(),
uuid.v1()
]);
// Verify ordering of v1 ids created with explicit times
compare('uuids with time option', [
uuid.v1({msecs: TIME - 10*3600*1000}),
uuid.v1({msecs: TIME - 1}),
uuid.v1({msecs: TIME}),
uuid.v1({msecs: TIME + 1}),
uuid.v1({msecs: TIME + 28*24*3600*1000})
]);
test('msec', function() {
assert(
uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}),
'IDs created at same msec are different'
);
});
test('exception thrown when > 10k ids created in 1ms', function() {
// Verify throw if too many ids created
var thrown = false;
try {
uuid.v1({msecs: TIME, nsecs: 10000});
} catch (e) {
thrown = true;
}
assert(thrown, 'Exception thrown when > 10K ids created in 1 ms');
});
test('clock regression by msec', function() {
// Verify clock regression bumps clockseq
var uidt = uuid.v1({msecs: TIME});
var uidtb = uuid.v1({msecs: TIME - 1});
assert(
parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1,
'Clock regression by msec increments the clockseq'
);
});
test('clock regression by nsec', function() {
// Verify clock regression bumps clockseq
var uidtn = uuid.v1({msecs: TIME, nsecs: 10});
var uidtnb = uuid.v1({msecs: TIME, nsecs: 9});
assert(
parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1,
'Clock regression by nsec increments the clockseq'
);
});
test('explicit options product expected id', function() {
// Verify explicit options produce expected id
var id = uuid.v1({
msecs: 1321651533573,
nsecs: 5432,
clockseq: 0x385c,
node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ]
});
assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id');
});
test('ids spanning 1ms boundary are 100ns apart', function() {
// Verify adjacent ids across a msec boundary are 1 time unit apart
var u0 = uuid.v1({msecs: TIME, nsecs: 9999});
var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0});
var before = u0.split('-')[0], after = u1.split('-')[0];
var dt = parseInt(after, 16) - parseInt(before, 16);
assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart');
});

103
node_modules/uuid/v1.js generated vendored Normal file
View File

@@ -0,0 +1,103 @@
// Unique ID creation requires a high quality random # generator. We feature
// detect to determine the best RNG source, normalizing to a function that
// returns 128-bits of randomness, since that's what's usually required
var rng = require('./lib/rng');
var bytesToUuid = require('./lib/bytesToUuid');
// **`v1()` - Generate time-based UUID**
//
// Inspired by https://github.com/LiosK/UUID.js
// and http://docs.python.org/library/uuid.html
// random #'s we need to init node and clockseq
var _seedBytes = rng();
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
var _nodeId = [
_seedBytes[0] | 0x01,
_seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]
];
// Per 4.2.2, randomize (14 bit) clockseq
var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;
// Previous uuid creation time
var _lastMSecs = 0, _lastNSecs = 0;
// See https://github.com/broofa/node-uuid for API details
function v1(options, buf, offset) {
var i = buf && offset || 0;
var b = buf || [];
options = options || {};
var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
// UUID timestamps are 100 nano-second units since the Gregorian epoch,
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
// Per 4.2.1.2, use count of uuid's generated during the current clock
// cycle to simulate higher resolution clock
var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
// Time since last uuid creation (in msecs)
var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
// Per 4.2.1.2, Bump clockseq on clock regression
if (dt < 0 && options.clockseq === undefined) {
clockseq = clockseq + 1 & 0x3fff;
}
// Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
// time interval
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
nsecs = 0;
}
// Per 4.2.1.2 Throw error if too many uuids are requested
if (nsecs >= 10000) {
throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
}
_lastMSecs = msecs;
_lastNSecs = nsecs;
_clockseq = clockseq;
// Per 4.1.4 - Convert from unix epoch to Gregorian epoch
msecs += 12219292800000;
// `time_low`
var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
b[i++] = tl >>> 24 & 0xff;
b[i++] = tl >>> 16 & 0xff;
b[i++] = tl >>> 8 & 0xff;
b[i++] = tl & 0xff;
// `time_mid`
var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
b[i++] = tmh >>> 8 & 0xff;
b[i++] = tmh & 0xff;
// `time_high_and_version`
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
b[i++] = tmh >>> 16 & 0xff;
// `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
b[i++] = clockseq >>> 8 | 0x80;
// `clock_seq_low`
b[i++] = clockseq & 0xff;
// `node`
var node = options.node || _nodeId;
for (var n = 0; n < 6; ++n) {
b[i + n] = node[n];
}
return buf ? buf : bytesToUuid(b);
}
module.exports = v1;

29
node_modules/uuid/v4.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
var rng = require('./lib/rng');
var bytesToUuid = require('./lib/bytesToUuid');
function v4(options, buf, offset) {
var i = buf && offset || 0;
if (typeof(options) == 'string') {
buf = options == 'binary' ? new Array(16) : null;
options = null;
}
options = options || {};
var rnds = options.random || (options.rng || rng)();
// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
rnds[6] = (rnds[6] & 0x0f) | 0x40;
rnds[8] = (rnds[8] & 0x3f) | 0x80;
// Copy bytes to buffer, if provided
if (buf) {
for (var ii = 0; ii < 16; ++ii) {
buf[i + ii] = rnds[ii];
}
}
return buf || bytesToUuid(rnds);
}
module.exports = v4;