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

15
node_modules/npmlog/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,15 @@
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

195
node_modules/npmlog/README.md generated vendored Normal file
View File

@@ -0,0 +1,195 @@
# npmlog
The logger util that npm uses.
This logger is very basic. It does the logging for npm. It supports
custom levels and colored output.
By default, logs are written to stderr. If you want to send log messages
to outputs other than streams, then you can change the `log.stream`
member, or you can just listen to the events that it emits, and do
whatever you want with them.
# Basic Usage
```
var log = require('npmlog')
// additional stuff ---------------------------+
// message ----------+ |
// prefix ----+ | |
// level -+ | | |
// v v v v
log.info('fyi', 'I have a kitty cat: %j', myKittyCat)
```
## log.level
* {String}
The level to display logs at. Any logs at or above this level will be
displayed. The special level `silent` will prevent anything from being
displayed ever.
## log.record
* {Array}
An array of all the log messages that have been entered.
## log.maxRecordSize
* {Number}
The maximum number of records to keep. If log.record gets bigger than
10% over this value, then it is sliced down to 90% of this value.
The reason for the 10% window is so that it doesn't have to resize a
large array on every log entry.
## log.prefixStyle
* {Object}
A style object that specifies how prefixes are styled. (See below)
## log.headingStyle
* {Object}
A style object that specifies how the heading is styled. (See below)
## log.heading
* {String} Default: ""
If set, a heading that is printed at the start of every line.
## log.stream
* {Stream} Default: `process.stderr`
The stream where output is written.
## log.enableColor()
Force colors to be used on all messages, regardless of the output
stream.
## log.disableColor()
Disable colors on all messages.
## log.enableProgress()
Enable the display of log activity spinner and progress bar
## log.disableProgress()
Disable the display of a progress bar
## log.enableUnicode()
Force the unicode theme to be used for the progress bar.
## log.disableUnicode()
Disable the use of unicode in the progress bar.
## log.setGaugeTemplate(template)
Overrides the default gauge template.
## log.pause()
Stop emitting messages to the stream, but do not drop them.
## log.resume()
Emit all buffered messages that were written while paused.
## log.log(level, prefix, message, ...)
* `level` {String} The level to emit the message at
* `prefix` {String} A string prefix. Set to "" to skip.
* `message...` Arguments to `util.format`
Emit a log message at the specified level.
## log\[level](prefix, message, ...)
For example,
* log.silly(prefix, message, ...)
* log.verbose(prefix, message, ...)
* log.info(prefix, message, ...)
* log.http(prefix, message, ...)
* log.warn(prefix, message, ...)
* log.error(prefix, message, ...)
Like `log.log(level, prefix, message, ...)`. In this way, each level is
given a shorthand, so you can do `log.info(prefix, message)`.
## log.addLevel(level, n, style, disp)
* `level` {String} Level indicator
* `n` {Number} The numeric level
* `style` {Object} Object with fg, bg, inverse, etc.
* `disp` {String} Optional replacement for `level` in the output.
Sets up a new level with a shorthand function and so forth.
Note that if the number is `Infinity`, then setting the level to that
will cause all log messages to be suppressed. If the number is
`-Infinity`, then the only way to show it is to enable all log messages.
## log.newItem(name, todo, weight)
* `name` {String} Optional; progress item name.
* `todo` {Number} Optional; total amount of work to be done. Default 0.
* `weight` {Number} Optional; the weight of this item relative to others. Default 1.
This adds a new `are-we-there-yet` item tracker to the progress tracker. The
object returned has the `log[level]` methods but is otherwise an
`are-we-there-yet` `Tracker` object.
## log.newStream(name, todo, weight)
This adds a new `are-we-there-yet` stream tracker to the progress tracker. The
object returned has the `log[level]` methods but is otherwise an
`are-we-there-yet` `TrackerStream` object.
## log.newGroup(name, weight)
This adds a new `are-we-there-yet` tracker group to the progress tracker. The
object returned has the `log[level]` methods but is otherwise an
`are-we-there-yet` `TrackerGroup` object.
# Events
Events are all emitted with the message object.
* `log` Emitted for all messages
* `log.<level>` Emitted for all messages with the `<level>` level.
* `<prefix>` Messages with prefixes also emit their prefix as an event.
# Style Objects
Style objects can have the following fields:
* `fg` {String} Color for the foreground text
* `bg` {String} Color for the background
* `bold`, `inverse`, `underline` {Boolean} Set the associated property
* `bell` {Boolean} Make a noise (This is pretty annoying, probably.)
# Message Objects
Every log event is emitted with a message object, and the `log.record`
list contains all of them that have been created. They have the
following fields:
* `id` {Number}
* `level` {String}
* `prefix` {String}
* `message` {String} Result of `util.format()`
* `messageRaw` {Array} Arguments to `util.format()`

251
node_modules/npmlog/log.js generated vendored Normal file
View File

@@ -0,0 +1,251 @@
'use strict'
var Progress = require('are-we-there-yet')
var Gauge = require('gauge')
var EE = require('events').EventEmitter
var log = exports = module.exports = new EE
var util = require('util')
var ansi = require('ansi')
log.cursor = ansi(process.stderr)
log.stream = process.stderr
// by default, let ansi decide based on tty-ness.
var colorEnabled = undefined
log.enableColor = function () {
colorEnabled = true
this.cursor.enabled = true
}
log.disableColor = function () {
colorEnabled = false
this.cursor.enabled = false
}
// default level
log.level = 'info'
log.gauge = new Gauge(log.cursor)
log.tracker = new Progress.TrackerGroup()
// no progress bars unless asked
log.progressEnabled = false
var gaugeTheme = undefined
log.enableUnicode = function () {
gaugeTheme = Gauge.unicode
log.gauge.setTheme(gaugeTheme)
}
log.disableUnicode = function () {
gaugeTheme = Gauge.ascii
log.gauge.setTheme(gaugeTheme)
}
var gaugeTemplate = undefined
log.setGaugeTemplate = function (template) {
gaugeTemplate = template
log.gauge.setTemplate(gaugeTemplate)
}
log.enableProgress = function () {
if (this.progressEnabled) return
this.progressEnabled = true
if (this._pause) return
this.tracker.on('change', this.showProgress)
this.gauge.enable()
this.showProgress()
}
log.disableProgress = function () {
if (!this.progressEnabled) return
this.clearProgress()
this.progressEnabled = false
this.tracker.removeListener('change', this.showProgress)
this.gauge.disable()
}
var trackerConstructors = ['newGroup', 'newItem', 'newStream']
var mixinLog = function (tracker) {
// mixin the public methods from log into the tracker
// (except: conflicts and one's we handle specially)
Object.keys(log).forEach(function (P) {
if (P[0] === '_') return
if (trackerConstructors.filter(function (C) { return C === P }).length) return
if (tracker[P]) return
if (typeof log[P] !== 'function') return
var func = log[P]
tracker[P] = function () {
return func.apply(log, arguments)
}
})
// if the new tracker is a group, make sure any subtrackers get
// mixed in too
if (tracker instanceof Progress.TrackerGroup) {
trackerConstructors.forEach(function (C) {
var func = tracker[C]
tracker[C] = function () { return mixinLog(func.apply(tracker, arguments)) }
})
}
return tracker
}
// Add tracker constructors to the top level log object
trackerConstructors.forEach(function (C) {
log[C] = function () { return mixinLog(this.tracker[C].apply(this.tracker, arguments)) }
})
log.clearProgress = function () {
if (!this.progressEnabled) return
this.gauge.hide()
}
log.showProgress = function (name, completed) {
if (!this.progressEnabled) return
if (completed == null) completed = this.tracker.completed()
this.gauge.show(name, completed)
}.bind(log) // bind for use in tracker's on-change listener
// temporarily stop emitting, but don't drop
log.pause = function () {
this._paused = true
}
log.resume = function () {
if (!this._paused) return
this._paused = false
var b = this._buffer
this._buffer = []
b.forEach(function (m) {
this.emitLog(m)
}, this)
if (this.progressEnabled) this.enableProgress()
}
log._buffer = []
var id = 0
log.record = []
log.maxRecordSize = 10000
log.log = function (lvl, prefix, message) {
var l = this.levels[lvl]
if (l === undefined) {
return this.emit('error', new Error(util.format(
'Undefined log level: %j', lvl)))
}
var a = new Array(arguments.length - 2)
var stack = null
for (var i = 2; i < arguments.length; i ++) {
var arg = a[i-2] = arguments[i]
// resolve stack traces to a plain string.
if (typeof arg === 'object' && arg &&
(arg instanceof Error) && arg.stack) {
arg.stack = stack = arg.stack + ''
}
}
if (stack) a.unshift(stack + '\n')
message = util.format.apply(util, a)
var m = { id: id++,
level: lvl,
prefix: String(prefix || ''),
message: message,
messageRaw: a }
this.emit('log', m)
this.emit('log.' + lvl, m)
if (m.prefix) this.emit(m.prefix, m)
this.record.push(m)
var mrs = this.maxRecordSize
var n = this.record.length - mrs
if (n > mrs / 10) {
var newSize = Math.floor(mrs * 0.9)
this.record = this.record.slice(-1 * newSize)
}
this.emitLog(m)
}.bind(log)
log.emitLog = function (m) {
if (this._paused) {
this._buffer.push(m)
return
}
if (this.progressEnabled) this.gauge.pulse(m.prefix)
var l = this.levels[m.level]
if (l === undefined) return
if (l < this.levels[this.level]) return
if (l > 0 && !isFinite(l)) return
var style = log.style[m.level]
var disp = log.disp[m.level] || m.level
this.clearProgress()
m.message.split(/\r?\n/).forEach(function (line) {
if (this.heading) {
this.write(this.heading, this.headingStyle)
this.write(' ')
}
this.write(disp, log.style[m.level])
var p = m.prefix || ''
if (p) this.write(' ')
this.write(p, this.prefixStyle)
this.write(' ' + line + '\n')
}, this)
this.showProgress()
}
log.write = function (msg, style) {
if (!this.cursor) return
if (this.stream !== this.cursor.stream) {
this.cursor = ansi(this.stream, { enabled: colorEnabled })
var options = {}
if (gaugeTheme != null) options.theme = gaugeTheme
if (gaugeTemplate != null) options.template = gaugeTemplate
this.gauge = new Gauge(options, this.cursor)
}
style = style || {}
if (style.fg) this.cursor.fg[style.fg]()
if (style.bg) this.cursor.bg[style.bg]()
if (style.bold) this.cursor.bold()
if (style.underline) this.cursor.underline()
if (style.inverse) this.cursor.inverse()
if (style.beep) this.cursor.beep()
this.cursor.write(msg).reset()
}
log.addLevel = function (lvl, n, style, disp) {
if (!disp) disp = lvl
this.levels[lvl] = n
this.style[lvl] = style
if (!this[lvl]) this[lvl] = function () {
var a = new Array(arguments.length + 1)
a[0] = lvl
for (var i = 0; i < arguments.length; i ++) {
a[i + 1] = arguments[i]
}
return this.log.apply(this, a)
}.bind(this)
this.disp[lvl] = disp
}
log.prefixStyle = { fg: 'magenta' }
log.headingStyle = { fg: 'white', bg: 'black' }
log.style = {}
log.levels = {}
log.disp = {}
log.addLevel('silly', -Infinity, { inverse: true }, 'sill')
log.addLevel('verbose', 1000, { fg: 'blue', bg: 'black' }, 'verb')
log.addLevel('info', 2000, { fg: 'green' })
log.addLevel('http', 3000, { fg: 'green', bg: 'black' })
log.addLevel('warn', 4000, { fg: 'black', bg: 'yellow' }, 'WARN')
log.addLevel('error', 5000, { fg: 'red', bg: 'black' }, 'ERR!')
log.addLevel('silent', Infinity)
// allow 'error' prefix
log.on('error', function(){})

98
node_modules/npmlog/package.json generated vendored Normal file
View File

@@ -0,0 +1,98 @@
{
"_args": [
[
"npmlog@^2.0.4",
"/home/bernhard/freifunk-app/node_modules/react-native"
]
],
"_from": "npmlog@>=2.0.4 <3.0.0",
"_id": "npmlog@2.0.4",
"_inCache": true,
"_installable": true,
"_location": "/npmlog",
"_nodeVersion": "5.10.1",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/npmlog-2.0.4.tgz_1463616637725_0.461703865788877"
},
"_npmUser": {
"email": "kat@sykosomatic.org",
"name": "zkat"
},
"_npmVersion": "3.9.1",
"_phantomChildren": {},
"_requested": {
"name": "npmlog",
"raw": "npmlog@^2.0.4",
"rawSpec": "^2.0.4",
"scope": null,
"spec": ">=2.0.4 <3.0.0",
"type": "range"
},
"_requiredBy": [
"/react-native"
],
"_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-2.0.4.tgz",
"_shasum": "98b52530f2514ca90d09ec5b22c8846722375692",
"_shrinkwrap": null,
"_spec": "npmlog@^2.0.4",
"_where": "/home/bernhard/freifunk-app/node_modules/react-native",
"author": {
"email": "i@izs.me",
"name": "Isaac Z. Schlueter",
"url": "http://blog.izs.me/"
},
"bugs": {
"url": "https://github.com/npm/npmlog/issues"
},
"dependencies": {
"ansi": "~0.3.1",
"are-we-there-yet": "~1.1.2",
"gauge": "~1.2.5"
},
"description": "logger for npm",
"devDependencies": {
"tap": "~5.7.0"
},
"directories": {},
"dist": {
"shasum": "98b52530f2514ca90d09ec5b22c8846722375692",
"tarball": "https://registry.npmjs.org/npmlog/-/npmlog-2.0.4.tgz"
},
"files": [
"log.js"
],
"gitHead": "3732fd4ba1ca2d47c6102343e6c3fb7e66df7fe5",
"homepage": "https://github.com/npm/npmlog#readme",
"license": "ISC",
"main": "log.js",
"maintainers": [
{
"name": "iarna",
"email": "me@re-becca.org"
},
{
"name": "isaacs",
"email": "i@izs.me"
},
{
"name": "othiym23",
"email": "ogd@aoaioxxysz.net"
},
{
"name": "zkat",
"email": "kat@sykosomatic.org"
}
],
"name": "npmlog",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/npmlog.git"
},
"scripts": {
"test": "tap test/*.js"
},
"version": "2.0.4"
}