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

20
node_modules/jest-validate/build/condition.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = validationCondition;
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
const toString = Object.prototype.toString;
function validationCondition(option, validOption) {
return option === null || option === undefined || toString.call(option) === toString.call(validOption);
}

65
node_modules/jest-validate/build/default_config.js generated vendored Normal file
View File

@@ -0,0 +1,65 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _deprecated;
function _load_deprecated() {
return _deprecated = require('./deprecated');
}
var _warnings;
function _load_warnings() {
return _warnings = require('./warnings');
}
var _errors;
function _load_errors() {
return _errors = require('./errors');
}
var _example_config;
function _load_example_config() {
return _example_config = _interopRequireDefault(require('./example_config'));
}
var _condition;
function _load_condition() {
return _condition = _interopRequireDefault(require('./condition'));
}
var _utils;
function _load_utils() {
return _utils = require('./utils');
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = {
comment: '',
condition: (_condition || _load_condition()).default,
deprecate: (_deprecated || _load_deprecated()).deprecationWarning,
deprecatedConfig: {},
error: (_errors || _load_errors()).errorMessage,
exampleConfig: (_example_config || _load_example_config()).default,
title: {
deprecation: (_utils || _load_utils()).DEPRECATION,
error: (_utils || _load_utils()).ERROR,
warning: (_utils || _load_utils()).WARNING
},
unknown: (_warnings || _load_warnings()).unknownOptionWarning
}; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/

38
node_modules/jest-validate/build/deprecated.js generated vendored Normal file
View File

@@ -0,0 +1,38 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.deprecationWarning = undefined;
var _utils;
function _load_utils() {
return _utils = require('./utils');
}
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
const deprecationMessage = (message, options) => {
const comment = options.comment;
const name = options.title && options.title.deprecation || (_utils || _load_utils()).DEPRECATION;
(0, (_utils || _load_utils()).logValidationWarning)(name, message, comment);
};
const deprecationWarning = exports.deprecationWarning = (config, option, deprecatedOptions, options) => {
if (option in deprecatedOptions) {
deprecationMessage(deprecatedOptions[option](config), options);
return true;
}
return false;
};

52
node_modules/jest-validate/build/errors.js generated vendored Normal file
View File

@@ -0,0 +1,52 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.errorMessage = undefined;
var _chalk;
function _load_chalk() {
return _chalk = _interopRequireDefault(require('chalk'));
}
var _jestGetType;
function _load_jestGetType() {
return _jestGetType = _interopRequireDefault(require('jest-get-type'));
}
var _utils;
function _load_utils() {
return _utils = require('./utils');
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
const errorMessage = exports.errorMessage = (option, received, defaultValue, options) => {
const message = ` Option ${(_chalk || _load_chalk()).default.bold(`"${option}"`)} must be of type:
${(_chalk || _load_chalk()).default.bold.green((0, (_jestGetType || _load_jestGetType()).default)(defaultValue))}
but instead received:
${(_chalk || _load_chalk()).default.bold.red((0, (_jestGetType || _load_jestGetType()).default)(received))}
Example:
{
${(_chalk || _load_chalk()).default.bold(`"${option}"`)}: ${(_chalk || _load_chalk()).default.bold((0, (_utils || _load_utils()).format)(defaultValue))}
}`;
const comment = options.comment;
const name = options.title && options.title.error || (_utils || _load_utils()).ERROR;
throw new (_utils || _load_utils()).ValidationError(name, message, comment);
};

32
node_modules/jest-validate/build/example_config.js generated vendored Normal file
View File

@@ -0,0 +1,32 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
const config = {
comment: ' A comment',
condition: (option, validOption) => true,
deprecate: (config, option, deprecatedOptions, options) => false,
deprecatedConfig: {
key: config => {}
},
error: (option, received, defaultValue, options) => {},
exampleConfig: { key: 'value', test: 'case' },
title: {
deprecation: 'Deprecation Warning',
error: 'Validation Error',
warning: 'Validation Warning'
},
unknown: (config, option, options) => {}
}; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
exports.default = config;

37
node_modules/jest-validate/build/index.js generated vendored Normal file
View File

@@ -0,0 +1,37 @@
'use strict';
var _utils;
function _load_utils() {
return _utils = require('./utils');
}
var _validate;
function _load_validate() {
return _validate = _interopRequireDefault(require('./validate'));
}
var _validate_cli_options;
function _load_validate_cli_options() {
return _validate_cli_options = _interopRequireDefault(require('./validate_cli_options'));
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
module.exports = {
ValidationError: (_utils || _load_utils()).ValidationError,
createDidYouMeanMessage: (_utils || _load_utils()).createDidYouMeanMessage,
format: (_utils || _load_utils()).format,
logValidationWarning: (_utils || _load_utils()).logValidationWarning,
validate: (_validate || _load_validate()).default,
validateCLIOptions: (_validate_cli_options || _load_validate_cli_options()).default
}; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/

1
node_modules/jest-validate/build/types.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";

67
node_modules/jest-validate/build/utils.js generated vendored Normal file
View File

@@ -0,0 +1,67 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createDidYouMeanMessage = exports.logValidationWarning = exports.ValidationError = exports.format = exports.WARNING = exports.ERROR = exports.DEPRECATION = undefined;
var _chalk;
function _load_chalk() {
return _chalk = _interopRequireDefault(require('chalk'));
}
var _prettyFormat;
function _load_prettyFormat() {
return _prettyFormat = _interopRequireDefault(require('pretty-format'));
}
var _leven;
function _load_leven() {
return _leven = _interopRequireDefault(require('leven'));
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const BULLET = (_chalk || _load_chalk()).default.bold('\u25cf'); /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
const DEPRECATION = exports.DEPRECATION = `${BULLET} Deprecation Warning`;
const ERROR = exports.ERROR = `${BULLET} Validation Error`;
const WARNING = exports.WARNING = `${BULLET} Validation Warning`;
const format = exports.format = value => typeof value === 'function' ? value.toString() : (0, (_prettyFormat || _load_prettyFormat()).default)(value, { min: true });
class ValidationError extends Error {
constructor(name, message, comment) {
super();
comment = comment ? '\n\n' + comment : '\n';
this.name = '';
this.message = (_chalk || _load_chalk()).default.red((_chalk || _load_chalk()).default.bold(name) + ':\n\n' + message + comment);
Error.captureStackTrace(this, () => {});
}
}
exports.ValidationError = ValidationError;
const logValidationWarning = exports.logValidationWarning = (name, message, comment) => {
comment = comment ? '\n\n' + comment : '\n';
console.warn((_chalk || _load_chalk()).default.yellow((_chalk || _load_chalk()).default.bold(name) + ':\n\n' + message + comment));
};
const createDidYouMeanMessage = exports.createDidYouMeanMessage = (unrecognized, allowedOptions) => {
const suggestion = allowedOptions.find(option => {
const steps = (0, (_leven || _load_leven()).default)(option, unrecognized);
return steps < 3;
});
return suggestion ? `Did you mean ${(_chalk || _load_chalk()).default.bold(format(suggestion))}?` : '';
};

60
node_modules/jest-validate/build/validate.js generated vendored Normal file
View File

@@ -0,0 +1,60 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _default_config;
function _load_default_config() {
return _default_config = _interopRequireDefault(require('./default_config'));
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
const _validate = (config, options) => {
let hasDeprecationWarnings = false;
for (const key in config) {
if (options.deprecatedConfig && key in options.deprecatedConfig && typeof options.deprecate === 'function') {
const isDeprecatedKey = options.deprecate(config, key, options.deprecatedConfig, options);
hasDeprecationWarnings = hasDeprecationWarnings || isDeprecatedKey;
} else if (hasOwnProperty.call(options.exampleConfig, key)) {
if (typeof options.condition === 'function' && typeof options.error === 'function' && !options.condition(config[key], options.exampleConfig[key])) {
options.error(key, config[key], options.exampleConfig[key], options);
}
} else {
options.unknown && options.unknown(config, options.exampleConfig, key, options);
}
}
return { hasDeprecationWarnings };
};
const validate = (config, options) => {
_validate(options, (_default_config || _load_default_config()).default); // validate against jest-validate config
const defaultedOptions = Object.assign({}, (_default_config || _load_default_config()).default, options, { title: Object.assign({}, (_default_config || _load_default_config()).default.title, options.title) });
var _validate2 = _validate(config, defaultedOptions);
const hasDeprecationWarnings = _validate2.hasDeprecationWarnings;
return {
hasDeprecationWarnings,
isValid: true
};
};
exports.default = validate;

View File

@@ -0,0 +1,106 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DOCUMENTATION_NOTE = undefined;
exports.default = validateCLIOptions;
var _chalk;
function _load_chalk() {
return _chalk = _interopRequireDefault(require('chalk'));
}
var _jestConfig;
function _load_jestConfig() {
return _jestConfig = require('jest-config');
}
var _utils;
function _load_utils() {
return _utils = require('./utils');
}
var _deprecated;
function _load_deprecated() {
return _deprecated = require('./deprecated');
}
var _default_config;
function _load_default_config() {
return _default_config = _interopRequireDefault(require('./default_config'));
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
const BULLET = (_chalk || _load_chalk()).default.bold('\u25cf');
const DOCUMENTATION_NOTE = exports.DOCUMENTATION_NOTE = ` ${(_chalk || _load_chalk()).default.bold('CLI Options Documentation:')}
https://facebook.github.io/jest/docs/en/cli.html
`;
const createCLIValidationError = (unrecognizedOptions, allowedOptions) => {
let title = `${BULLET} Unrecognized CLI Parameter`;
let message;
const comment = ` ${(_chalk || _load_chalk()).default.bold('CLI Options Documentation')}:\n` + ` https://facebook.github.io/jest/docs/en/cli.html\n`;
if (unrecognizedOptions.length === 1) {
const unrecognized = unrecognizedOptions[0];
const didYouMeanMessage = (0, (_utils || _load_utils()).createDidYouMeanMessage)(unrecognized, Array.from(allowedOptions));
message = ` Unrecognized option ${(_chalk || _load_chalk()).default.bold((0, (_utils || _load_utils()).format)(unrecognized))}.` + (didYouMeanMessage ? ` ${didYouMeanMessage}` : '');
} else {
title += 's';
message = ` Following options were not recognized:\n` + ` ${(_chalk || _load_chalk()).default.bold((0, (_utils || _load_utils()).format)(unrecognizedOptions))}`;
}
return new (_utils || _load_utils()).ValidationError(title, message, comment);
};
const logDeprecatedOptions = (deprecatedOptions, deprecationEntries, argv) => {
deprecatedOptions.forEach(opt => {
(0, (_deprecated || _load_deprecated()).deprecationWarning)(argv, opt, deprecationEntries, Object.assign({}, (_default_config || _load_default_config()).default, {
comment: DOCUMENTATION_NOTE
}));
});
};
function validateCLIOptions(argv, options) {
const yargsSpecialOptions = ['$0', '_', 'help', 'h'];
const allowedOptions = Object.keys(options).reduce((acc, option) => acc.add(option).add(options[option].alias || option), new Set(yargsSpecialOptions));
const unrecognizedOptions = Object.keys(argv).filter(arg => !allowedOptions.has(arg));
if (unrecognizedOptions.length) {
throw createCLIValidationError(unrecognizedOptions, allowedOptions);
}
const CLIDeprecations = Object.keys((_jestConfig || _load_jestConfig()).deprecationEntries).reduce((acc, entry) => {
if (options[entry]) {
acc[entry] = (_jestConfig || _load_jestConfig()).deprecationEntries[entry];
if (options[entry].alias) {
acc[options[entry].alias] = (_jestConfig || _load_jestConfig()).deprecationEntries[entry];
}
}
return acc;
}, {});
const deprecations = new Set(Object.keys(CLIDeprecations));
const deprecatedOptions = Object.keys(argv).filter(arg => deprecations.has(arg) && argv[arg] != null);
if (deprecatedOptions.length) {
logDeprecatedOptions(deprecatedOptions, CLIDeprecations, argv);
}
return true;
}

37
node_modules/jest-validate/build/warnings.js generated vendored Normal file
View File

@@ -0,0 +1,37 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.unknownOptionWarning = undefined;
var _chalk;
function _load_chalk() {
return _chalk = _interopRequireDefault(require('chalk'));
}
var _utils;
function _load_utils() {
return _utils = require('./utils');
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const unknownOptionWarning = exports.unknownOptionWarning = (config, exampleConfig, option, options) => {
const didYouMean = (0, (_utils || _load_utils()).createDidYouMeanMessage)(option, Object.keys(exampleConfig));
const message = ` Unknown option ${(_chalk || _load_chalk()).default.bold(`"${option}"`)} with value ${(_chalk || _load_chalk()).default.bold((0, (_utils || _load_utils()).format)(config[option]))} was found.` + (didYouMean && ` ${didYouMean}`) + `\n This is probably a typing mistake. Fixing it will remove this message.`;
const comment = options.comment;
const name = options.title && options.title.warning || (_utils || _load_utils()).WARNING;
(0, (_utils || _load_utils()).logValidationWarning)(name, message, comment);
}; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/