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

69
node_modules/istanbul-lib-hook/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,69 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="1.2.1"></a>
## [1.2.1](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-hook@1.2.0...istanbul-lib-hook@1.2.1) (2018-06-06)
### Bug Fixes
* pass correct args to tranformer ([#153](https://github.com/istanbuljs/istanbuljs/issues/153)) ([#154](https://github.com/istanbuljs/istanbuljs/issues/154)) ([2b2250f](https://github.com/istanbuljs/istanbuljs/commit/2b2250f))
<a name="1.2.0"></a>
# [1.2.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-hook@1.1.0...istanbul-lib-hook@1.2.0) (2018-03-04)
### Features
* hookRunInThisContext now takes options object rather than filename ([#99](https://github.com/istanbuljs/istanbuljs/issues/99)) ([1504374](https://github.com/istanbuljs/istanbuljs/commit/1504374))
<a name="1.1.0"></a>
# [1.1.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-hook@1.0.7...istanbul-lib-hook@1.1.0) (2017-10-21)
### Features
* hook vm.runInContext ([#90](https://github.com/istanbuljs/istanbuljs/issues/90)) ([9659936](https://github.com/istanbuljs/istanbuljs/commit/9659936))
<a name="1.0.7"></a>
## [1.0.7](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-hook@1.0.6...istanbul-lib-hook@1.0.7) (2017-05-27)
<a name="1.0.6"></a>
## [1.0.6](https://github.com/istanbuljs/istanbul-lib-hook/compare/istanbul-lib-hook@1.0.5...istanbul-lib-hook@1.0.6) (2017-04-29)
<a name="1.0.5"></a>
## [1.0.5](https://github.com/istanbuljs/istanbul-lib-hook/compare/istanbul-lib-hook@1.0.4...istanbul-lib-hook@1.0.5) (2017-03-27)
<a name="1.0.4"></a>
## [1.0.4](https://github.com/istanbuljs/istanbul-lib-hook/compare/istanbul-lib-hook@1.0.3...istanbul-lib-hook@1.0.4) (2017-03-21)
<a name="1.0.3"></a>
## [1.0.3](https://github.com/istanbuljs/istanbul-lib-hook/compare/istanbul-lib-hook@1.0.2...istanbul-lib-hook@1.0.3) (2017-03-21)
<a name="1.0.2"></a>
## [1.0.2](https://github.com/istanbuljs/istanbul-lib-hook/compare/istanbul-lib-hook@1.0.0...istanbul-lib-hook@1.0.2) (2017-03-21)
<a name="1.0.0"></a>
# [1.0.0](https://github.com/istanbuljs/istanbul-lib-hook/compare/v1.0.0-alpha.3...v1.0.0) (2017-01-17)
### Bug Fixes
* update append-transform to version that fixes issues run into by ts-node ([f4aaf79](https://github.com/istanbuljs/istanbul-lib-hook/commit/f4aaf79))

24
node_modules/istanbul-lib-hook/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,24 @@
Copyright 2012-2015 Yahoo! Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Yahoo! Inc. nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL YAHOO! INC. BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

7
node_modules/istanbul-lib-hook/README.md generated vendored Normal file
View File

@@ -0,0 +1,7 @@
istanbul-lib-hook
=================
[![Greenkeeper badge](https://badges.greenkeeper.io/istanbuljs/istanbul-lib-hook.svg)](https://greenkeeper.io/)
[![Build Status](https://travis-ci.org/istanbuljs/istanbul-lib-hook.svg?branch=master)](https://travis-ci.org/istanbuljs/istanbul-lib-hook)
Hooks for require, vm and script used in istanbul

5
node_modules/istanbul-lib-hook/index.js generated vendored Normal file
View File

@@ -0,0 +1,5 @@
/*
Copyright 2012-2015, Yahoo Inc.
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
module.exports = require('./lib/hook');

228
node_modules/istanbul-lib-hook/lib/hook.js generated vendored Normal file
View File

@@ -0,0 +1,228 @@
/*
Copyright 2012-2015, Yahoo Inc.
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
var path = require('path'),
vm = require('vm'),
appendTransform = require('append-transform'),
originalCreateScript = vm.createScript,
originalRunInThisContext = vm.runInThisContext,
originalRunInContext = vm.runInContext;
function transformFn(matcher, transformer, verbose) {
return function (code, options) {
options = options || {};
if (typeof options === 'string') {
options = { filename: options };
}
var shouldHook = typeof options.filename === 'string' && matcher(path.resolve(options.filename)),
transformed,
changed = false;
if (shouldHook) {
if (verbose) {
console.error('Module load hook: transform [' + options.filename + ']');
}
try {
transformed = transformer(code, options);
changed = true;
} catch (ex) {
console.error('Transformation error for', options.filename, '; return original code');
console.error(ex.message || String(ex));
if (verbose) {
console.error(ex.stack);
}
transformed = code;
}
} else {
transformed = code;
}
return { code: transformed, changed: changed };
};
}
/**
* unloads the required caches, removing all files that would have matched
* the supplied matcher.
* @param {Function} matcher - the match function that accepts a file name and
* returns if that file should be unloaded from the cache.
*/
function unloadRequireCache(matcher) {
/* istanbul ignore else: impossible to test */
if (matcher && typeof require !== 'undefined' && require && require.cache) {
Object.keys(require.cache).forEach(function (filename) {
if (matcher(filename)) {
delete require.cache[filename];
}
});
}
}
/**
* hooks `require` to return transformed code to the node module loader.
* Exceptions in the transform result in the original code being used instead.
* @method hookRequire
* @static
* @param matcher {Function(filePath)} a function that is called with the absolute path to the file being
* `require`-d. Should return a truthy value when transformations need to be applied to the code, a falsy value otherwise
* @param transformer {Function(code, filePath)} a function called with the original code and the associated path of the file
* from where the code was loaded. Should return the transformed code.
* @param options {Object} options Optional.
* @param {Boolean} [options.verbose] write a line to standard error every time the transformer is called
* @param {Function} [options.postLoadHook] a function that is called with the name of the file being
* required. This is called after the require is processed irrespective of whether it was transformed.
* @returns {Function} a reset function that can be called to remove the hook
*/
function hookRequire(matcher, transformer, options) {
options = options || {};
var extensions,
disable = false,
fn = transformFn(matcher, transformer, options.verbose),
postLoadHook = options.postLoadHook &&
typeof options.postLoadHook === 'function' ? options.postLoadHook : null;
extensions = options.extensions || ['.js'];
extensions.forEach(function(ext){
appendTransform(function (code, filename) {
if (disable) {
return code;
}
var ret = fn(code, filename);
if (postLoadHook) {
postLoadHook(filename);
}
return ret.code;
}, ext);
});
return function () {
disable = true;
};
}
/**
* hooks `vm.createScript` to return transformed code out of which a `Script` object will be created.
* Exceptions in the transform result in the original code being used instead.
* @method hookCreateScript
* @static
* @param matcher {Function(filePath)} a function that is called with the filename passed to `vm.createScript`
* Should return a truthy value when transformations need to be applied to the code, a falsy value otherwise
* @param transformer {Function(code, filePath)} a function called with the original code and the filename passed to
* `vm.createScript`. Should return the transformed code.
* @param options {Object} options Optional.
* @param {Boolean} [options.verbose] write a line to standard error every time the transformer is called
*/
function hookCreateScript(matcher, transformer, opts) {
opts = opts || {};
var fn = transformFn(matcher, transformer, opts.verbose);
vm.createScript = function (code, file) {
var ret = fn(code, file);
return originalCreateScript(ret.code, file);
};
}
/**
* unhooks vm.createScript, restoring it to its original state.
* @method unhookCreateScript
* @static
*/
function unhookCreateScript() {
vm.createScript = originalCreateScript;
}
/**
* hooks `vm.runInThisContext` to return transformed code.
* @method hookRunInThisContext
* @static
* @param matcher {Function(filePath)} a function that is called with the filename passed to `vm.runInThisContext`
* Should return a truthy value when transformations need to be applied to the code, a falsy value otherwise
* @param transformer {Function(code, options)} a function called with the original code and the filename passed to
* `vm.runInThisContext`. Should return the transformed code.
* @param opts {Object} [opts={}] options
* @param {Boolean} [opts.verbose] write a line to standard error every time the transformer is called
*/
function hookRunInThisContext(matcher, transformer, opts) {
opts = opts || {};
var fn = transformFn(matcher, transformer, opts.verbose);
vm.runInThisContext = function (code, options) {
var ret = fn(code, options);
return originalRunInThisContext(ret.code, options);
};
}
/**
* unhooks vm.runInThisContext, restoring it to its original state.
* @method unhookRunInThisContext
* @static
*/
function unhookRunInThisContext() {
vm.runInThisContext = originalRunInThisContext;
}
/**
* hooks `vm.runInContext` to return transformed code.
* @method hookRunInContext
* @static
* @param matcher {Function(filePath)} a function that is called with the filename passed to `vm.createScript`
* Should return a truthy value when transformations need to be applied to the code, a falsy value otherwise
* @param transformer {Function(code, filePath)} a function called with the original code and the filename passed to
* `vm.createScript`. Should return the transformed code.
* @param opts {Object} [opts={}] options
* @param {Boolean} [options.verbose] write a line to standard error every time the transformer is called
*/
function hookRunInContext(matcher, transformer, opts) {
opts = opts || {};
var fn = transformFn(matcher, transformer, opts.verbose);
vm.runInContext = function (code, context, file) {
var ret = fn(code, file);
var coverageVariable = opts.coverageVariable || '__coverage__';
// Refer coverage variable in context to global coverage variable.
// So that coverage data will be written in global coverage variable for unit tests run in vm.runInContext.
// If all unit tests are run in vm.runInContext, no global coverage variable will be generated.
// Thus initialize a global coverage variable here.
if (!global[coverageVariable]) {
global[coverageVariable] = {};
}
context[coverageVariable] = global[coverageVariable];
return originalRunInContext(ret.code, context, file);
};
}
/**
* unhooks vm.runInContext, restoring it to its original state.
* @method unhookRunInContext
* @static
*/
function unhookRunInContext() {
vm.runInContext = originalRunInContext;
}
/**
* istanbul-lib-hook provides mechanisms to transform code in the scope of `require`,
* `vm.createScript`, `vm.runInThisContext` etc.
*
* This mechanism is general and relies on a user-supplied `matcher` function that
* determines when transformations should be performed and a user-supplied `transformer`
* function that performs the actual transform. Instrumenting code for coverage is
* one specific example of useful hooking.
*
* Note that both the `matcher` and `transformer` must execute synchronously.
*
* @module Exports
* @example
* var hook = require('istanbul-lib-hook'),
* myMatcher = function (file) { return file.match(/foo/); },
* myTransformer = function (code, file) {
* return 'console.log("' + file + '");' + code;
* };
*
* hook.hookRequire(myMatcher, myTransformer);
* var foo = require('foo'); //will now print foo's module path to console
*/
module.exports = {
hookRequire: hookRequire,
hookCreateScript: hookCreateScript,
unhookCreateScript: unhookCreateScript,
hookRunInThisContext : hookRunInThisContext,
unhookRunInThisContext : unhookRunInThisContext,
hookRunInContext : hookRunInContext,
unhookRunInContext : unhookRunInContext,
unloadRequireCache: unloadRequireCache
};

100
node_modules/istanbul-lib-hook/package.json generated vendored Normal file
View File

@@ -0,0 +1,100 @@
{
"_args": [
[
"istanbul-lib-hook@^1.2.0",
"/home/bernhard/freifunk-app/node_modules/istanbul-api"
]
],
"_from": "istanbul-lib-hook@>=1.2.0 <2.0.0",
"_id": "istanbul-lib-hook@1.2.1",
"_inCache": true,
"_installable": true,
"_location": "/istanbul-lib-hook",
"_nodeVersion": "10.2.1",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/istanbul-lib-hook_1.2.1_1528246207464_0.03227727781366729"
},
"_npmUser": {
"email": "ben@npmjs.com",
"name": "bcoe"
},
"_npmVersion": "6.1.0",
"_phantomChildren": {},
"_requested": {
"name": "istanbul-lib-hook",
"raw": "istanbul-lib-hook@^1.2.0",
"rawSpec": "^1.2.0",
"scope": null,
"spec": ">=1.2.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/istanbul-api"
],
"_resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz",
"_shasum": "f614ec45287b2a8fc4f07f5660af787575601805",
"_shrinkwrap": null,
"_spec": "istanbul-lib-hook@^1.2.0",
"_where": "/home/bernhard/freifunk-app/node_modules/istanbul-api",
"author": {
"email": "kananthmail-github@yahoo.com",
"name": "Krishnan Anantheswaran"
},
"bugs": {
"url": "https://github.com/istanbuljs/istanbuljs/issues"
},
"dependencies": {
"append-transform": "^1.0.0"
},
"deprecated": "1.2.0 should have been a major version bump",
"description": "Hooks for require, vm and script used in istanbul",
"devDependencies": {
"chai": "^4.1.2",
"jshint": "^2.9.5",
"mocha": "^5.2.0"
},
"directories": {},
"dist": {
"fileCount": 6,
"integrity": "sha512-eLAMkPG9FU0v5L02lIkcj/2/Zlz9OuluaXikdr5iStk8FDbSwAixTK9TkYxbF0eNnzAJTwM2fkV2A1tpsIp4Jg==",
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbFy+/CRA9TVsSAnZWagAAIMsP/2wpmWYIiDIEpHgoTs9O\n97RBXRUk8GAOcqaJE5Vv7GNBIWjGmtyuT5UJegF/jRmUIzlvhL2rbdUIC5cI\neStdmEWAljTfxJ3zON/Sn0XL/ymYZohMozGkc3pM+esePBND6FwdXW+6nMg+\nmLj4TbkmiKjbrpCcE8M7Kc7e+FYwDx+egUqoBBHnVNXSUmmy0mSP4VlRfCT/\nHxst3lxRsYF7cxsk8/aSvHYM+7l78kUnJbKn1ymVQqZYeDaucwZO9G14Sx2Y\nS6sF8VVucYddL6/nqP78Zu2naEH0sKdCW3ie1VnUITwoBk9mDpQARPCQGPDA\n0K0vspRzxBmJX4B/aaFXSF/cWTtri76DJmQsFyv/Ur4ms2cqCWUCGhlLfJZ6\nRLpwVBGpRFhOr29ykTQcMVpw5lznZhXrT6GJ/EM1EQOyLcBb89ty5iv6Hpfr\nrXZr+qy2gl5c1pbnrZK/mV3ZQz3lyROocXi6qn+NpBdcLFda3lkN1ObpbA0A\ntj0jJXYWHXdqO0HG9Io4S0ramBMHMDzU8Hl+jL9m1R11W0FTMpQoMnoLM1u4\n8EH835knbuZ3CP1ly7tF/I63fWybeUhf0ZbUor8jEycNWHaYWvxJnwc2UPVe\nG8vRhTLlogn5cId+k+1qYvWXDfA4DK2/QcrQXLRGbXcqGiNWDnrainFhfwE6\nr0+l\r\n=NLVu\r\n-----END PGP SIGNATURE-----\r\n",
"shasum": "f614ec45287b2a8fc4f07f5660af787575601805",
"tarball": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz",
"unpackedSize": 14621
},
"files": [
"index.js",
"lib"
],
"homepage": "https://github.com/istanbuljs/istanbuljs#readme",
"keywords": [
"hook",
"istanbul"
],
"license": "BSD-3-Clause",
"main": "index.js",
"maintainers": [
{
"name": "bcoe",
"email": "ben@npmjs.com"
},
{
"name": "gotwarlost",
"email": "kananthmail-github@yahoo.com"
}
],
"name": "istanbul-lib-hook",
"optionalDependencies": {},
"readme": "istanbul-lib-hook\n=================\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/istanbuljs/istanbul-lib-hook.svg)](https://greenkeeper.io/)\n[![Build Status](https://travis-ci.org/istanbuljs/istanbul-lib-hook.svg?branch=master)](https://travis-ci.org/istanbuljs/istanbul-lib-hook)\n\nHooks for require, vm and script used in istanbul\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/istanbuljs/istanbuljs.git"
},
"scripts": {
"pretest": "jshint index.js lib/ test/",
"test": "mocha"
},
"version": "1.2.1"
}