Izmjenjena struktura, dodan backand

This commit is contained in:
GotPPay
2017-10-16 11:19:46 +02:00
parent 1ec88afacb
commit 048e32c4aa
37153 changed files with 2975854 additions and 1 deletions

4
web/node_modules/jest-config/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,4 @@
**/__mocks__/**
**/__tests__/**
src
yarn.lock

15
web/node_modules/jest-config/build/constants.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
'use strict'; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
const path = require('path');
exports.NODE_MODULES = path.sep + 'node_modules' + path.sep;
exports.DEFAULT_JS_PATTERN = '^.+\\.jsx?$';
exports.DEFAULT_REPORTER_LABEL = 'default';

67
web/node_modules/jest-config/build/defaults.js generated vendored Normal file
View File

@@ -0,0 +1,67 @@
'use strict';
const os = require('os'); /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/const path = require('path');var _require = require('jest-regex-util');const replacePathSepForRegex = _require.replacePathSepForRegex;const constants = require('./constants');const NODE_MODULES_REGEXP = replacePathSepForRegex(constants.NODE_MODULES);const cacheDirectory = (() => {var _process = process;const getuid = _process.getuid;
if (getuid == null) {
return path.join(os.tmpdir(), 'jest');
}
// On some platforms tmpdir() is `/tmp`, causing conflicts between different
// users and permission issues. Adding an additional subdivision by UID can
// help.
return path.join(os.tmpdir(), 'jest_' + getuid.call(process).toString(36));
})();
module.exports = {
automock: false,
bail: false,
browser: false,
cache: true,
cacheDirectory,
clearMocks: false,
coveragePathIgnorePatterns: [NODE_MODULES_REGEXP],
coverageReporters: ['json', 'text', 'lcov', 'clover'],
expand: false,
globals: {},
haste: {
providesModuleNodeModules: [] },
mapCoverage: false,
moduleDirectories: ['node_modules'],
moduleFileExtensions: ['js', 'json', 'jsx', 'node'],
moduleNameMapper: {},
modulePathIgnorePatterns: [],
noStackTrace: false,
notify: false,
preset: null,
resetMocks: false,
resetModules: false,
snapshotSerializers: [],
testEnvironment: 'jest-environment-jsdom',
testMatch: ['**/__tests__/**/*.js?(x)', '**/?(*.)(spec|test).js?(x)'],
testPathIgnorePatterns: [NODE_MODULES_REGEXP],
testRegex: '',
testResultsProcessor: null,
testURL: 'about:blank',
timers: 'real',
transformIgnorePatterns: [NODE_MODULES_REGEXP],
useStderr: false,
verbose: null,
watch: false,
watchman: true };

50
web/node_modules/jest-config/build/deprecated.js generated vendored Normal file
View File

@@ -0,0 +1,50 @@
'use strict'; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
const chalk = require('chalk');
const format = value => require('pretty-format')(value, { min: true });
const deprecatedOptions = {
preprocessorIgnorePatterns: options =>
` Option ${chalk.bold('"preprocessorIgnorePatterns"')} was replaced by ${chalk.bold('"transformIgnorePatterns"')}, which support multiple preprocessors.
Jest now treats your current configuration as:
{
${chalk.bold('"transformIgnorePatterns"')}: ${chalk.bold(`${format(options.preprocessorIgnorePatterns)}`)}
}
Please update your configuration.`,
scriptPreprocessor: options =>
` Option ${chalk.bold('"scriptPreprocessor"')} was replaced by ${chalk.bold('"transform"')}, which support multiple preprocessors.
Jest now treats your current configuration as:
{
${chalk.bold('"transform"')}: ${chalk.bold(`{".*": ${format(options.scriptPreprocessor)}}`)}
}
Please update your configuration.`,
testPathDirs: options =>
` Option ${chalk.bold('"testPathDirs"')} was replaced by ${chalk.bold('"roots"')}.
Jest now treats your current configuration as:
{
${chalk.bold('"roots"')}: ${chalk.bold(format(options.testPathDirs))}
}
Please update your configuration.
` };
module.exports = deprecatedOptions;

86
web/node_modules/jest-config/build/findConfig.js generated vendored Normal file
View File

@@ -0,0 +1,86 @@
'use strict';
const fs = require('fs'); /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/const path = require('path');const jsonlint = require('./vendor/jsonlint');const JEST_CONFIG = 'jest.config.js';const PACKAGE_JSON = 'package.json';const isFile = filePath => fs.existsSync(filePath) && !fs.lstatSync(filePath).isDirectory();
const findConfig = root => {
// $FlowFixMe
let options = {};
let directory = root;
const isJS = directory.endsWith('.js');
if ((isJS || directory.endsWith('.json')) && isFile(directory)) {
const filePath = path.resolve(process.cwd(), directory);
if (isJS) {
// $FlowFixMe
options = require(filePath);
} else {
let pkg;
try {
// $FlowFixMe
pkg = require(filePath);
} catch (error) {
throw new Error(
`Jest: Failed to parse config file ${filePath}\n` +
` ${jsonlint.errors(fs.readFileSync(filePath, 'utf8'))}`);
}
if (directory.endsWith(PACKAGE_JSON)) {
options = pkg.jest || options;
} else {
options = pkg;
}
}
options.rootDir = options.rootDir ?
path.resolve(path.dirname(directory), options.rootDir) :
path.dirname(directory);
return options;
}
do {
const configJsFilePath = path.resolve(path.join(directory, JEST_CONFIG));
if (isFile(configJsFilePath)) {
// $FlowFixMe
options = require(configJsFilePath);
break;
}
const packageJsonFilePath = path.resolve(
path.join(directory, PACKAGE_JSON));
if (isFile(packageJsonFilePath)) {
// $FlowFixMe
const pkg = require(packageJsonFilePath);
if (pkg.jest) {
options = pkg.jest;
}
// Even if there is no configuration, we stop traveling up the
// tree if we hit a `package.json` file.
break;
}
} while (directory !== (directory = path.dirname(directory)));
options.rootDir = options.rootDir ?
path.resolve(root, options.rootDir) :
path.resolve(directory);
return options;
};
module.exports = findConfig;

129
web/node_modules/jest-config/build/index.js generated vendored Normal file
View File

@@ -0,0 +1,129 @@
'use strict'; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
const path = require('path');var _require =
require('./utils');const getTestEnvironment = _require.getTestEnvironment,isJSONString = _require.isJSONString;
const findConfig = require('./findConfig');
const normalize = require('./normalize');
function readConfig(
argv,
packageRoot)
{
const rawOptions = readOptions(argv, packageRoot);var _normalize =
normalize(rawOptions, argv);const options = _normalize.options,hasDeprecationWarnings = _normalize.hasDeprecationWarnings;var _getConfigs =
getConfigs(options);const globalConfig = _getConfigs.globalConfig,projectConfig = _getConfigs.projectConfig;
return {
config: projectConfig,
globalConfig,
hasDeprecationWarnings };
}
const parseConfig = argv =>
isJSONString(argv.config) ? JSON.parse(argv.config) : argv.config;
const readOptions = (argv, root) => {
const rawOptions = parseConfig(argv);
if (typeof rawOptions === 'object') {
const config = Object.assign({}, rawOptions);
config.rootDir = config.rootDir || root;
return config;
}
if (typeof rawOptions === 'string') {
root = path.resolve(process.cwd(), rawOptions);
}
return findConfig(root);
};
const getConfigs =
options =>
{
return {
globalConfig: Object.freeze({
bail: options.bail,
collectCoverage: options.collectCoverage,
collectCoverageFrom: options.collectCoverageFrom,
collectCoverageOnlyFrom: options.collectCoverageOnlyFrom,
coverageDirectory: options.coverageDirectory,
coverageReporters: options.coverageReporters,
coverageThreshold: options.coverageThreshold,
expand: options.expand,
forceExit: options.forceExit,
logHeapUsage: options.logHeapUsage,
mapCoverage: options.mapCoverage,
noStackTrace: options.noStackTrace,
notify: options.notify,
projects: options.projects,
replname: options.replname,
reporters: options.reporters,
rootDir: options.rootDir,
silent: options.silent,
testNamePattern: options.testNamePattern,
testPathPattern: '',
testResultsProcessor: options.testResultsProcessor,
updateSnapshot: options.updateSnapshot,
useStderr: options.useStderr,
verbose: options.verbose,
watch: options.watch,
watchman: options.watchman }),
projectConfig: Object.freeze({
automock: options.automock,
browser: options.browser,
cache: options.cache,
cacheDirectory: options.cacheDirectory,
clearMocks: options.clearMocks,
coveragePathIgnorePatterns: options.coveragePathIgnorePatterns,
globals: options.globals,
haste: options.haste,
moduleDirectories: options.moduleDirectories,
moduleFileExtensions: options.moduleFileExtensions,
moduleLoader: options.moduleLoader,
moduleNameMapper: options.moduleNameMapper,
modulePathIgnorePatterns: options.modulePathIgnorePatterns,
modulePaths: options.modulePaths,
name: options.name,
resetMocks: options.resetMocks,
resetModules: options.resetModules,
resolver: options.resolver,
rootDir: options.rootDir,
roots: options.roots,
setupFiles: options.setupFiles,
setupTestFrameworkScriptFile: options.setupTestFrameworkScriptFile,
snapshotSerializers: options.snapshotSerializers,
testEnvironment: options.testEnvironment,
testMatch: options.testMatch,
testPathIgnorePatterns: options.testPathIgnorePatterns,
testRegex: options.testRegex,
testRunner: options.testRunner,
testURL: options.testURL,
timers: options.timers,
transform: options.transform,
transformIgnorePatterns: options.transformIgnorePatterns,
unmockedModulePathPatterns: options.unmockedModulePathPatterns }) };
};
module.exports = {
getTestEnvironment,
normalize,
readConfig };

479
web/node_modules/jest-config/build/normalize.js generated vendored Normal file
View File

@@ -0,0 +1,479 @@
'use strict'; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
const crypto = require('crypto');
const path = require('path');var _require =
require('jest-validate');const ValidationError = _require.ValidationError,validate = _require.validate;
const chalk = require('chalk');
const glob = require('glob');
const Resolver = require('jest-resolve');
const utils = require('jest-regex-util');var _require2 =
require('./utils');const BULLET = _require2.BULLET,DOCUMENTATION_NOTE = _require2.DOCUMENTATION_NOTE,_replaceRootDirInPath = _require2._replaceRootDirInPath,_replaceRootDirTags = _require2._replaceRootDirTags,getTestEnvironment = _require2.getTestEnvironment,resolve = _require2.resolve;var _require3 =
require('./constants');const NODE_MODULES = _require3.NODE_MODULES,DEFAULT_JS_PATTERN = _require3.DEFAULT_JS_PATTERN,DEFAULT_REPORTER_LABEL = _require3.DEFAULT_REPORTER_LABEL;var _require4 =
require('./reporterValidationErrors');const validateReporters = _require4.validateReporters;
const DEFAULT_CONFIG = require('./defaults');
const DEPRECATED_CONFIG = require('./deprecated');
const setFromArgv = require('./setFromArgv');
const VALID_CONFIG = require('./validConfig');
const ERROR = `${BULLET}Validation Error`;
const JSON_EXTENSION = '.json';
const PRESET_NAME = 'jest-preset' + JSON_EXTENSION;
const createConfigError = message =>
new ValidationError(ERROR, message, DOCUMENTATION_NOTE);
const setupPreset = (
options,
optionsPreset) =>
{
let preset;
const presetPath = _replaceRootDirInPath(options.rootDir, optionsPreset);
const presetModule = Resolver.findNodeModule(
presetPath.endsWith(JSON_EXTENSION) ?
presetPath :
path.join(presetPath, PRESET_NAME),
{
basedir: options.rootDir });
try {
// $FlowFixMe
preset = require(presetModule);
} catch (error) {
throw createConfigError(` Preset ${chalk.bold(presetPath)} not found.`);
}
if (options.setupFiles) {
options.setupFiles = (preset.setupFiles || []).concat(options.setupFiles);
}
if (options.modulePathIgnorePatterns && preset.modulePathIgnorePatterns) {
options.modulePathIgnorePatterns = preset.modulePathIgnorePatterns.concat(
options.modulePathIgnorePatterns);
}
if (options.moduleNameMapper && preset.moduleNameMapper) {
options.moduleNameMapper = Object.assign(
{},
preset.moduleNameMapper,
options.moduleNameMapper);
}
// $FlowFixMe
return Object.assign({}, preset, options);
};
const setupBabelJest = options => {
const basedir = options.rootDir;
const transform = options.transform;
let babelJest;
if (transform) {
const customJSPattern = Object.keys(transform).find(pattern => {
const regex = new RegExp(pattern);
return regex.test('a.js') || regex.test('a.jsx');
});
if (customJSPattern) {
const jsTransformer = Resolver.findNodeModule(
transform[customJSPattern],
{ basedir });
if (
jsTransformer &&
jsTransformer.includes(NODE_MODULES + 'babel-jest'))
{
babelJest = jsTransformer;
}
}
} else {
babelJest = Resolver.findNodeModule('babel-jest', { basedir });
if (babelJest) {
options.transform = {
[DEFAULT_JS_PATTERN]: 'babel-jest' };
}
}
return babelJest;
};
const normalizeCollectCoverageOnlyFrom = (
options,
key) =>
{
const collectCoverageOnlyFrom = Array.isArray(options[key]) ?
options[key] // passed from argv
: Object.keys(options[key]); // passed from options
return collectCoverageOnlyFrom.reduce((map, filePath) => {
filePath = path.resolve(
options.rootDir,
_replaceRootDirInPath(options.rootDir, filePath));
map[filePath] = true;
return map;
}, Object.create(null));
};
const normalizeCollectCoverageFrom = (options, key) => {
let value;
if (!options[key]) {
value = [];
}
if (!Array.isArray(options[key])) {
try {
value = JSON.parse(options[key]);
} catch (e) {}
Array.isArray(value) || (value = [options[key]]);
} else {
value = options[key];
}
return value;
};
const normalizeUnmockedModulePathPatterns = (
options,
key) =>
{
// _replaceRootDirTags is specifically well-suited for substituting
// <rootDir> in paths (it deals with properly interpreting relative path
// separators, etc).
//
// For patterns, direct global substitution is far more ideal, so we
// special case substitutions for patterns here.
return options[key].map(pattern =>
utils.replacePathSepForRegex(
pattern.replace(/<rootDir>/g, options.rootDir)));
};
const normalizePreprocessor = options => {
if (options.scriptPreprocessor && options.transform) {
throw createConfigError(
` Options: ${chalk.bold('scriptPreprocessor')} and ${chalk.bold('transform')} cannot be used together.
Please change your configuration to only use ${chalk.bold('transform')}.`);
}
if (options.preprocessorIgnorePatterns && options.transformIgnorePatterns) {
throw createConfigError(
` Options ${chalk.bold('preprocessorIgnorePatterns')} and ${chalk.bold('transformIgnorePatterns')} cannot be used together.
Please change your configuration to only use ${chalk.bold('transformIgnorePatterns')}.`);
}
if (options.scriptPreprocessor) {
options.transform = {
'.*': options.scriptPreprocessor };
}
if (options.preprocessorIgnorePatterns) {
options.transformIgnorePatterns = options.preprocessorIgnorePatterns;
}
delete options.scriptPreprocessor;
delete options.preprocessorIgnorePatterns;
return options;
};
const normalizeMissingOptions = options => {
if (!options.name) {
options.name = crypto.
createHash('md5').
update(options.rootDir).
digest('hex');
}
if (!options.setupFiles) {
options.setupFiles = [];
}
return options;
};
const normalizeRootDir = options => {
// Assert that there *is* a rootDir
if (!options.hasOwnProperty('rootDir')) {
throw createConfigError(
` Configuration option ${chalk.bold('rootDir')} must be specified.`);
}
options.rootDir = path.normalize(options.rootDir);
return options;
};
const normalizeReporters = (options, basedir) => {
const reporters = options.reporters;
if (!reporters || !Array.isArray(reporters)) {
return options;
}
validateReporters(reporters);
options.reporters = reporters.map(reporterConfig => {
const normalizedReporterConfig = typeof reporterConfig ===
'string' ?
// if reporter config is a string, we wrap it in an array
// and pass an empty object for options argument, to normalize
// the shape.
[reporterConfig, {}] :
reporterConfig;
const reporterPath = _replaceRootDirInPath(
options.rootDir,
normalizedReporterConfig[0]);
if (reporterPath !== DEFAULT_REPORTER_LABEL) {
const reporter = Resolver.findNodeModule(reporterPath, {
basedir: options.rootDir });
if (!reporter) {
throw new Error(
`Could not resolve a module for a custom reporter.\n` +
` Module name: ${reporterPath}`);
}
normalizedReporterConfig[0] = reporter;
}
return normalizedReporterConfig;
});
return options;
};
function normalize(options, argv) {var _validate =
validate(options, {
comment: DOCUMENTATION_NOTE,
deprecatedConfig: DEPRECATED_CONFIG,
exampleConfig: VALID_CONFIG });const hasDeprecationWarnings = _validate.hasDeprecationWarnings;
options = normalizePreprocessor(
normalizeReporters(
normalizeMissingOptions(normalizeRootDir(setFromArgv(options, argv)))));
if (options.preset) {
options = setupPreset(options, options.preset);
}
if (options.testEnvironment) {
options.testEnvironment = getTestEnvironment(options);
}
if (!options.roots && options.testPathDirs) {
options.roots = options.testPathDirs;
delete options.testPathDirs;
}
if (!options.roots) {
options.roots = [options.rootDir];
}
if (!options.testRunner || options.testRunner === 'jasmine2') {
options.testRunner = require.resolve('jest-jasmine2');
}
const babelJest = setupBabelJest(options);
const newOptions = Object.assign({}, DEFAULT_CONFIG);
// Cast back to exact type
options = options;
Object.keys(options).reduce((newOptions, key) => {
let value;
switch (key) {
case 'collectCoverageOnlyFrom':
value = normalizeCollectCoverageOnlyFrom(options, key);
break;
case 'setupFiles':
case 'snapshotSerializers':
value =
options[key] &&
options[key].map(resolve.bind(null, options.rootDir, key));
break;
case 'modulePaths':
case 'roots':
value =
options[key] &&
options[key].map(filePath =>
path.resolve(
options.rootDir,
_replaceRootDirInPath(options.rootDir, filePath)));
break;
case 'collectCoverageFrom':
value = normalizeCollectCoverageFrom(options, key);
break;
case 'cacheDirectory':
case 'coverageDirectory':
value =
options[key] &&
path.resolve(
options.rootDir,
_replaceRootDirInPath(options.rootDir, options[key]));
break;
case 'moduleLoader':
case 'resolver':
case 'setupTestFrameworkScriptFile':
case 'testResultsProcessor':
case 'testRunner':
value = options[key] && resolve(options.rootDir, key, options[key]);
break;
case 'moduleNameMapper':
const moduleNameMapper = options[key];
value =
moduleNameMapper &&
Object.keys(moduleNameMapper).map(regex => {
const item = moduleNameMapper && moduleNameMapper[regex];
return item && [regex, _replaceRootDirTags(options.rootDir, item)];
});
break;
case 'transform':
const transform = options[key];
value =
transform &&
Object.keys(transform).map(regex => [
regex,
resolve(options.rootDir, key, transform[regex])]);
break;
case 'coveragePathIgnorePatterns':
case 'modulePathIgnorePatterns':
case 'testPathIgnorePatterns':
case 'transformIgnorePatterns':
case 'unmockedModulePathPatterns':
value = normalizeUnmockedModulePathPatterns(options, key);
break;
case 'haste':
value = Object.assign({}, options[key]);
if (value.hasteImplModulePath != null) {
value.hasteImplModulePath = resolve(
options.rootDir,
'haste.hasteImplModulePath',
_replaceRootDirInPath(options.rootDir, value.hasteImplModulePath));
}
break;
case 'projects':
const projects = options[key];
let list = [];
projects &&
projects.forEach(
filePath =>
list = list.concat(
glob.sync(_replaceRootDirInPath(options.rootDir, filePath))));
value = list;
break;
case 'moduleDirectories':
case 'testMatch':
value = _replaceRootDirTags(options.rootDir, options[key]);
break;
case 'automock':
case 'bail':
case 'browser':
case 'cache':
case 'clearMocks':
case 'collectCoverage':
case 'coverageReporters':
case 'coverageThreshold':
case 'expand':
case 'globals':
case 'logHeapUsage':
case 'mapCoverage':
case 'moduleFileExtensions':
case 'name':
case 'noStackTrace':
case 'notify':
case 'replname':
case 'reporters':
case 'resetMocks':
case 'resetModules':
case 'rootDir':
case 'silent':
case 'testEnvironment':
case 'testNamePattern':
case 'testRegex':
case 'testURL':
case 'timers':
case 'useStderr':
case 'verbose':
case 'watch':
case 'watchman':
value = options[key];
break;}
newOptions[key] = value;
return newOptions;
}, newOptions);
newOptions.updateSnapshot = argv.ci && !argv.updateSnapshot ?
'none' :
argv.updateSnapshot ? 'all' : 'new';
if (babelJest) {
const regeneratorRuntimePath = Resolver.findNodeModule(
'regenerator-runtime/runtime',
{ basedir: options.rootDir });
if (regeneratorRuntimePath) {
newOptions.setupFiles.unshift(regeneratorRuntimePath);
}
}
if (options.testRegex && options.testMatch) {
throw createConfigError(
` Configuration options ${chalk.bold('testMatch')} and` +
` ${chalk.bold('testRegex')} cannot be used together.`);
}
if (options.testRegex && !options.testMatch) {
// Prevent the default testMatch conflicting with any explicitly
// configured `testRegex` value
newOptions.testMatch = [];
}
// If argv.json is set, coverageReporters shouldn't print a text report.
if (argv.json) {
newOptions.coverageReporters = (newOptions.coverageReporters || []).
filter(reporter => reporter !== 'text');
}
return {
hasDeprecationWarnings,
options: newOptions };
}
module.exports = normalize;

View File

@@ -0,0 +1,108 @@
'use strict';var _slicedToArray = function () {function sliceIterator(arr, i) {var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"]) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}return function (arr, i) {if (Array.isArray(arr)) {return arr;} else if (Symbol.iterator in Object(arr)) {return sliceIterator(arr, i);} else {throw new TypeError("Invalid attempt to destructure non-iterable instance");}};}();var _require =
require('jest-validate');const ValidationError = _require.ValidationError; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/const chalk = require('chalk');var _require2 = require('jest-matcher-utils');const getType = _require2.getType;var _require3 = require('./utils');const DOCUMENTATION_NOTE = _require3.DOCUMENTATION_NOTE,BULLET = _require3.BULLET;const validReporterTypes = ['array', 'string'];const ERROR = `${BULLET}Reporter Validation Error`;
/**
* Reporter Validation Error is thrown if the given arguments
* within the reporter are not valid.
*
* This is a highly specific reporter error and in the future will be
* merged with jest-validate. Till then, we can make use of it. It works
* and that's what counts most at this time.
*/
function createReporterError(
reporterIndex,
reporterValue)
{
const errorMessage =
` Reporter at index ${reporterIndex} must be of type:\n` +
` ${chalk.bold.green(validReporterTypes.join(' or '))}\n` +
` but instead received:\n` +
` ${chalk.bold.red(getType(reporterValue))}`;
return new ValidationError(ERROR, errorMessage, DOCUMENTATION_NOTE);
}
function createArrayReporterError(
arrayReporter,
reporterIndex,
valueIndex,
value,
expectedType,
valueName)
{
const errorMessage =
` Unexpected value for ${valueName} ` +
`at index ${valueIndex} of reporter at index ${reporterIndex}\n` +
' Expected:\n' +
` ${chalk.bold.red(expectedType)}\n` +
' Got:\n' +
` ${chalk.bold.green(getType(value))}\n` +
` Reporter configuration:\n` +
` ${chalk.bold.green(JSON.stringify(arrayReporter, null, 2).
split('\n').
join('\n '))}`;
return new ValidationError(ERROR, errorMessage, DOCUMENTATION_NOTE);
}
function validateReporters(
reporterConfig)
{
return reporterConfig.every((reporter, index) => {
if (Array.isArray(reporter)) {
validateArrayReporter(reporter, index);
} else if (typeof reporter !== 'string') {
throw createReporterError(index, reporter);
}
return true;
});
}
function validateArrayReporter(
arrayReporter,
reporterIndex)
{var _arrayReporter = _slicedToArray(
arrayReporter, 2);const path = _arrayReporter[0],options = _arrayReporter[1];
if (typeof path !== 'string') {
throw createArrayReporterError(
arrayReporter,
reporterIndex,
0,
path,
'string',
'Path');
} else if (typeof options !== 'object') {
throw createArrayReporterError(
arrayReporter,
reporterIndex,
1,
options,
'object',
'Reporter Configuration');
}
}
module.exports = {
createArrayReporterError,
createReporterError,
validateReporters };

59
web/node_modules/jest-config/build/setFromArgv.js generated vendored Normal file
View File

@@ -0,0 +1,59 @@
'use strict'; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
const specialArgs = ['_', '$0', 'h', 'help', 'config'];var _require =
require('./utils');const isJSONString = _require.isJSONString;
function setFromArgv(options, argv) {
const argvToOptions = Object.keys(argv).
filter(key => argv[key] !== undefined && specialArgs.indexOf(key) === -1).
reduce((options, key) => {
switch (key) {
case 'coverage':
options.collectCoverage = argv[key];
break;
case 'json':
options.useStderr = argv[key];
break;
case 'watchAll':
options.watch = argv[key];
break;
case 'env':
options.testEnvironment = argv[key];
break;
case 'config':
break;
case 'coverageThreshold':
case 'globals':
case 'moduleNameMapper':
case 'transform':
case 'haste':
if (isJSONString(argv[key])) {
options[key] = JSON.parse(argv[key]);
}
break;
default:
options[key] = argv[key];}
return options;
}, {});
return Object.assign(
{},
options,
isJSONString(argv.config) ? JSON.parse(argv.config) : null,
argvToOptions);
}
module.exports = setFromArgv;

135
web/node_modules/jest-config/build/utils.js generated vendored Normal file
View File

@@ -0,0 +1,135 @@
'use strict';
const path = require('path'); /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/var _require = require('jest-validate');const ValidationError = _require.ValidationError;const Resolver = require('jest-resolve');const chalk = require('chalk');const BULLET = chalk.bold('\u25cf ');const DOCUMENTATION_NOTE = ` ${chalk.bold('Configuration Documentation:')}
https://facebook.github.io/jest/docs/configuration.html
`;const createValidationError = message => {return new ValidationError(
`${BULLET}Validation Error`,
message,
DOCUMENTATION_NOTE);
};
const resolve = (rootDir, key, filePath) => {
const module = Resolver.findNodeModule(
_replaceRootDirInPath(rootDir, filePath),
{
basedir: rootDir });
if (!module) {
throw createValidationError(
` Module ${chalk.bold(filePath)} in the ${chalk.bold(key)} option was not found.`);
}
return module;
};
const _replaceRootDirInPath = (rootDir, filePath) => {
if (!/^<rootDir>/.test(filePath)) {
return filePath;
}
return path.resolve(
rootDir,
path.normalize('./' + filePath.substr('<rootDir>'.length)));
};
const _replaceRootDirInObject = (rootDir, config) => {
if (config !== null) {
const newConfig = {};
for (const configKey in config) {
newConfig[configKey] = configKey === 'rootDir' ?
config[configKey] :
_replaceRootDirTags(rootDir, config[configKey]);
}
return newConfig;
}
return config;
};
const _replaceRootDirTags = (rootDir, config) => {
switch (typeof config) {
case 'object':
if (Array.isArray(config)) {
return config.map(item => _replaceRootDirTags(rootDir, item));
}
if (config instanceof RegExp) {
return config;
}
return _replaceRootDirInObject(rootDir, config);
case 'string':
return _replaceRootDirInPath(rootDir, config);}
return config;
};
/**
* Finds the test environment to use:
*
* 1. looks for jest-environment-<name> relative to project.
* 1. looks for jest-environment-<name> relative to Jest.
* 1. looks for <name> relative to project.
* 1. looks for <name> relative to Jest.
*/
const getTestEnvironment = config => {
const env = config.testEnvironment;
let module = Resolver.findNodeModule(`jest-environment-${env}`, {
basedir: config.rootDir });
if (module) {
return module;
}
try {
return require.resolve(`jest-environment-${env}`);
} catch (e) {}
module = Resolver.findNodeModule(env, { basedir: config.rootDir });
if (module) {
return module;
}
try {
return require.resolve(env);
} catch (e) {}
throw createValidationError(
` Test environment ${chalk.bold(env)} cannot be found. Make sure the ${chalk.bold('testEnvironment')} configuration option points to an existing node module.`);
};
const isJSONString = text =>
text &&
typeof text === 'string' &&
text.startsWith('{') &&
text.endsWith('}');
module.exports = {
BULLET,
DOCUMENTATION_NOTE,
_replaceRootDirInPath,
_replaceRootDirTags,
getTestEnvironment,
isJSONString,
resolve };

91
web/node_modules/jest-config/build/validConfig.js generated vendored Normal file
View File

@@ -0,0 +1,91 @@
'use strict';var _require =
require('jest-regex-util');const replacePathSepForRegex = _require.replacePathSepForRegex; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/const constants = require('./constants');const NODE_MODULES_REGEXP = replacePathSepForRegex(constants.NODE_MODULES);module.exports = { automock: false, bail: false, browser: false,
cache: true,
cacheDirectory: '/tmp/user/jest',
clearMocks: false,
collectCoverage: true,
collectCoverageFrom: ['src', '!public'],
collectCoverageOnlyFrom: {
'<rootDir>/this-directory-is-covered/covered.js': true },
coverageDirectory: 'coverage',
coveragePathIgnorePatterns: [NODE_MODULES_REGEXP],
coverageReporters: ['json', 'text', 'lcov', 'clover'],
coverageThreshold: {
global: {
branches: 50 } },
expand: false,
forceExit: false,
globals: {},
haste: {
providesModuleNodeModules: ['react', 'react-native'] },
logHeapUsage: true,
mapCoverage: false,
moduleDirectories: ['node_modules'],
moduleFileExtensions: ['js', 'json', 'jsx', 'node'],
moduleLoader: '<rootDir>',
moduleNameMapper: {
'^React$': '<rootDir>/node_modules/react' },
modulePathIgnorePatterns: ['<rootDir>/build/'],
modulePaths: ['/shared/vendor/modules'],
name: 'string',
noStackTrace: false,
notify: false,
preset: 'react-native',
projects: ['project-a', 'project-b/'],
reporters: [
'default',
'custom-reporter-1',
['custom-reporter-2', { configValue: true }]],
resetMocks: false,
resetModules: false,
resolver: '<rootDir>/resolver.js',
rootDir: '/',
roots: ['<rootDir>'],
setupFiles: ['<rootDir>/setup.js'],
setupTestFrameworkScriptFile: '<rootDir>/testSetupFile.js',
silent: true,
snapshotSerializers: ['my-serializer-module'],
testEnvironment: 'jest-environment-jsdom',
testMatch: ['**/__tests__/**/*.js?(x)', '**/?(*.)(spec|test).js?(x)'],
testNamePattern: 'test signature',
testPathIgnorePatterns: [NODE_MODULES_REGEXP],
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.jsx?$',
testResultsProcessor: 'processor-node-module',
testRunner: 'jasmine2',
testURL: 'about:blank',
timers: 'real',
transform: {
'^.+\\.js$': '<rootDir>/preprocessor.js' },
transformIgnorePatterns: [NODE_MODULES_REGEXP],
unmockedModulePathPatterns: ['mock'],
updateSnapshot: true,
useStderr: false,
verbose: false,
watch: false,
watchman: true };

734
web/node_modules/jest-config/build/vendor/jsonlint.js generated vendored Normal file
View File

@@ -0,0 +1,734 @@
'use strict'; // From: https://github.com/zaach/jsonlint
// Vendored in Jest to avoid jsonlint's transitive dependencies.
/* eslint-disable */
var jsonlint = function () {
var parser = {
trace: function trace() {},
yy: {},
symbols_: {
error: 2,
JSONString: 3,
STRING: 4,
JSONNumber: 5,
NUMBER: 6,
JSONNullLiteral: 7,
NULL: 8,
JSONBooleanLiteral: 9,
TRUE: 10,
FALSE: 11,
JSONText: 12,
JSONValue: 13,
EOF: 14,
JSONObject: 15,
JSONArray: 16,
'{': 17,
'}': 18,
JSONMemberList: 19,
JSONMember: 20,
':': 21,
',': 22,
'[': 23,
']': 24,
JSONElementList: 25,
$accept: 0,
$end: 1 },
terminals_: {
2: 'error',
4: 'STRING',
6: 'NUMBER',
8: 'NULL',
10: 'TRUE',
11: 'FALSE',
14: 'EOF',
17: '{',
18: '}',
21: ':',
22: ',',
23: '[',
24: ']' },
productions_: [
0,
[3, 1],
[5, 1],
[7, 1],
[9, 1],
[9, 1],
[12, 2],
[13, 1],
[13, 1],
[13, 1],
[13, 1],
[13, 1],
[13, 1],
[15, 2],
[15, 3],
[20, 3],
[19, 1],
[19, 3],
[16, 2],
[16, 3],
[25, 1],
[25, 3]],
performAction: function anonymous(
yytext,
yyleng,
yylineno,
yy,
yystate,
$$,
_$)
{
var $0 = $$.length - 1;
switch (yystate) {
case 1: // replace escaped characters with actual character
this.$ = yytext.
replace(/\\(\\|")/g, '$' + '1').
replace(/\\n/g, '\n').
replace(/\\r/g, '\r').
replace(/\\t/g, '\t').
replace(/\\v/g, '\v').
replace(/\\f/g, '\f').
replace(/\\b/g, '\b');
break;
case 2:
this.$ = Number(yytext);
break;
case 3:
this.$ = null;
break;
case 4:
this.$ = true;
break;
case 5:
this.$ = false;
break;
case 6:
return this.$ = $$[$0 - 1];
break;
case 13:
this.$ = {};
break;
case 14:
this.$ = $$[$0 - 1];
break;
case 15:
this.$ = [$$[$0 - 2], $$[$0]];
break;
case 16:
this.$ = {};
this.$[$$[$0][0]] = $$[$0][1];
break;
case 17:
this.$ = $$[$0 - 2];
$$[$0 - 2][$$[$0][0]] = $$[$0][1];
break;
case 18:
this.$ = [];
break;
case 19:
this.$ = $$[$0 - 1];
break;
case 20:
this.$ = [$$[$0]];
break;
case 21:
this.$ = $$[$0 - 2];
$$[$0 - 2].push($$[$0]);
break;}
},
table: [
{
3: 5,
4: [1, 12],
5: 6,
6: [1, 13],
7: 3,
8: [1, 9],
9: 4,
10: [1, 10],
11: [1, 11],
12: 1,
13: 2,
15: 7,
16: 8,
17: [1, 14],
23: [1, 15] },
{ 1: [3] },
{ 14: [1, 16] },
{ 14: [2, 7], 18: [2, 7], 22: [2, 7], 24: [2, 7] },
{ 14: [2, 8], 18: [2, 8], 22: [2, 8], 24: [2, 8] },
{ 14: [2, 9], 18: [2, 9], 22: [2, 9], 24: [2, 9] },
{ 14: [2, 10], 18: [2, 10], 22: [2, 10], 24: [2, 10] },
{ 14: [2, 11], 18: [2, 11], 22: [2, 11], 24: [2, 11] },
{ 14: [2, 12], 18: [2, 12], 22: [2, 12], 24: [2, 12] },
{ 14: [2, 3], 18: [2, 3], 22: [2, 3], 24: [2, 3] },
{ 14: [2, 4], 18: [2, 4], 22: [2, 4], 24: [2, 4] },
{ 14: [2, 5], 18: [2, 5], 22: [2, 5], 24: [2, 5] },
{ 14: [2, 1], 18: [2, 1], 21: [2, 1], 22: [2, 1], 24: [2, 1] },
{ 14: [2, 2], 18: [2, 2], 22: [2, 2], 24: [2, 2] },
{ 3: 20, 4: [1, 12], 18: [1, 17], 19: 18, 20: 19 },
{
3: 5,
4: [1, 12],
5: 6,
6: [1, 13],
7: 3,
8: [1, 9],
9: 4,
10: [1, 10],
11: [1, 11],
13: 23,
15: 7,
16: 8,
17: [1, 14],
23: [1, 15],
24: [1, 21],
25: 22 },
{ 1: [2, 6] },
{ 14: [2, 13], 18: [2, 13], 22: [2, 13], 24: [2, 13] },
{ 18: [1, 24], 22: [1, 25] },
{ 18: [2, 16], 22: [2, 16] },
{ 21: [1, 26] },
{ 14: [2, 18], 18: [2, 18], 22: [2, 18], 24: [2, 18] },
{ 22: [1, 28], 24: [1, 27] },
{ 22: [2, 20], 24: [2, 20] },
{ 14: [2, 14], 18: [2, 14], 22: [2, 14], 24: [2, 14] },
{ 3: 20, 4: [1, 12], 20: 29 },
{
3: 5,
4: [1, 12],
5: 6,
6: [1, 13],
7: 3,
8: [1, 9],
9: 4,
10: [1, 10],
11: [1, 11],
13: 30,
15: 7,
16: 8,
17: [1, 14],
23: [1, 15] },
{ 14: [2, 19], 18: [2, 19], 22: [2, 19], 24: [2, 19] },
{
3: 5,
4: [1, 12],
5: 6,
6: [1, 13],
7: 3,
8: [1, 9],
9: 4,
10: [1, 10],
11: [1, 11],
13: 31,
15: 7,
16: 8,
17: [1, 14],
23: [1, 15] },
{ 18: [2, 17], 22: [2, 17] },
{ 18: [2, 15], 22: [2, 15] },
{ 22: [2, 21], 24: [2, 21] }],
defaultActions: { 16: [2, 6] },
parseError: function parseError(str, hash) {
throw new Error(str);
},
parse: function parse(input) {
var self = this,
stack = [0],
vstack = [null], // semantic value stack
lstack = [], // location stack
table = this.table,
yytext = '',
yylineno = 0,
yyleng = 0,
recovering = 0,
TERROR = 2,
EOF = 1;
//this.reductionCount = this.shiftCount = 0;
this.lexer.setInput(input);
this.lexer.yy = this.yy;
this.yy.lexer = this.lexer;
if (typeof this.lexer.yylloc == 'undefined') this.lexer.yylloc = {};
var yyloc = this.lexer.yylloc;
lstack.push(yyloc);
if (typeof this.yy.parseError === 'function')
this.parseError = this.yy.parseError;
function popStack(n) {
stack.length = stack.length - 2 * n;
vstack.length = vstack.length - n;
lstack.length = lstack.length - n;
}
function lex() {
var token;
token = self.lexer.lex() || 1; // $end = 1
// if token isn't its numeric value, convert
if (typeof token !== 'number') {
token = self.symbols_[token] || token;
}
return token;
}
var symbol,
preErrorSymbol,
state,
action,
a,
r,
yyval = {},
p,
len,
newState,
expected;
while (true) {
// retrieve state number from top of stack
state = stack[stack.length - 1];
// use default actions if available
if (this.defaultActions[state]) {
action = this.defaultActions[state];
} else {
if (symbol == null) symbol = lex();
// read action for current state and first input
action = table[state] && table[state][symbol];
}
// handle parse error
_handle_error: if (
typeof action === 'undefined' ||
!action.length ||
!action[0])
{
if (!recovering) {
// Report error
expected = [];
for (p in table[state])
if (this.terminals_[p] && p > 2) {
expected.push("'" + this.terminals_[p] + "'");
}
var errStr = '';
if (this.lexer.showPosition) {
errStr =
'Parse error on line ' + (
yylineno + 1) +
':\n' +
this.lexer.showPosition() +
'\nExpecting ' +
expected.join(', ') +
", got '" +
this.terminals_[symbol] +
"'";
} else {
errStr =
'Parse error on line ' + (
yylineno + 1) +
': Unexpected ' + (
symbol == 1 /*EOF*/ ?
'end of input' :
"'" + (this.terminals_[symbol] || symbol) + "'");
}
this.parseError(errStr, {
text: this.lexer.match,
token: this.terminals_[symbol] || symbol,
line: this.lexer.yylineno,
loc: yyloc,
expected: expected });
}
// just recovered from another error
if (recovering == 3) {
if (symbol == EOF) {
throw new Error(errStr || 'Parsing halted.');
}
// discard current lookahead and grab another
yyleng = this.lexer.yyleng;
yytext = this.lexer.yytext;
yylineno = this.lexer.yylineno;
yyloc = this.lexer.yylloc;
symbol = lex();
}
// try to recover from error
while (1) {
// check for error recovery rule in this state
if (TERROR.toString() in table[state]) {
break;
}
if (state == 0) {
throw new Error(errStr || 'Parsing halted.');
}
popStack(1);
state = stack[stack.length - 1];
}
preErrorSymbol = symbol; // save the lookahead token
symbol = TERROR; // insert generic error symbol as new lookahead
state = stack[stack.length - 1];
action = table[state] && table[state][TERROR];
recovering = 3; // allow 3 real symbols to be shifted before reporting a new error
}
// this shouldn't happen, unless resolve defaults are off
if (action[0] instanceof Array && action.length > 1) {
throw new Error(
'Parse Error: multiple actions possible at state: ' +
state +
', token: ' +
symbol);
}
switch (action[0]) {
case 1: // shift
//this.shiftCount++;
stack.push(symbol);
vstack.push(this.lexer.yytext);
lstack.push(this.lexer.yylloc);
stack.push(action[1]); // push state
symbol = null;
if (!preErrorSymbol) {
// normal execution/no error
yyleng = this.lexer.yyleng;
yytext = this.lexer.yytext;
yylineno = this.lexer.yylineno;
yyloc = this.lexer.yylloc;
if (recovering > 0) recovering--;
} else {
// error just occurred, resume old lookahead f/ before error
symbol = preErrorSymbol;
preErrorSymbol = null;
}
break;
case 2: // reduce
//this.reductionCount++;
len = this.productions_[action[1]][1];
// perform semantic action
yyval.$ = vstack[vstack.length - len]; // default to $$ = $1
// default location, uses first token for firsts, last for lasts
yyval._$ = {
first_line: lstack[lstack.length - (len || 1)].first_line,
last_line: lstack[lstack.length - 1].last_line,
first_column: lstack[lstack.length - (len || 1)].first_column,
last_column: lstack[lstack.length - 1].last_column };
r = this.performAction.call(
yyval,
yytext,
yyleng,
yylineno,
this.yy,
action[1],
vstack,
lstack);
if (typeof r !== 'undefined') {
return r;
}
// pop off stack
if (len) {
stack = stack.slice(0, -1 * len * 2);
vstack = vstack.slice(0, -1 * len);
lstack = lstack.slice(0, -1 * len);
}
stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce)
vstack.push(yyval.$);
lstack.push(yyval._$);
// goto new state = table[STATE][NONTERMINAL]
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
stack.push(newState);
break;
case 3: // accept
return true;}
}
return true;
} };
/* Jison generated lexer */
var lexer = function () {
var lexer = {
EOF: 1,
parseError: function parseError(str, hash) {
if (this.yy.parseError) {
this.yy.parseError(str, hash);
} else {
throw new Error(str);
}
},
setInput: function (input) {
this._input = input;
this._more = this._less = this.done = false;
this.yylineno = this.yyleng = 0;
this.yytext = this.matched = this.match = '';
this.conditionStack = ['INITIAL'];
this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0 };
return this;
},
input: function () {
var ch = this._input[0];
this.yytext += ch;
this.yyleng++;
this.match += ch;
this.matched += ch;
var lines = ch.match(/\n/);
if (lines) this.yylineno++;
this._input = this._input.slice(1);
return ch;
},
unput: function (ch) {
this._input = ch + this._input;
return this;
},
more: function () {
this._more = true;
return this;
},
less: function (n) {
this._input = this.match.slice(n) + this._input;
},
pastInput: function () {
var past = this.matched.substr(
0,
this.matched.length - this.match.length);
return (
(past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, ''));
},
upcomingInput: function () {
var next = this.match;
if (next.length < 20) {
next += this._input.substr(0, 20 - next.length);
}
return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(
/\n/g,
'');
},
showPosition: function () {
var pre = this.pastInput();
var c = new Array(pre.length + 1).join('-');
return pre + this.upcomingInput() + '\n' + c + '^';
},
next: function () {
if (this.done) {
return this.EOF;
}
if (!this._input) this.done = true;
var token, match, tempMatch, index, col, lines;
if (!this._more) {
this.yytext = '';
this.match = '';
}
var rules = this._currentRules();
for (var i = 0; i < rules.length; i++) {
tempMatch = this._input.match(this.rules[rules[i]]);
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
match = tempMatch;
index = i;
if (!this.options.flex) break;
}
}
if (match) {
lines = match[0].match(/\n.*/g);
if (lines) this.yylineno += lines.length;
this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: lines ?
lines[lines.length - 1].length - 1 :
this.yylloc.last_column + match[0].length };
this.yytext += match[0];
this.match += match[0];
this.yyleng = this.yytext.length;
this._more = false;
this._input = this._input.slice(match[0].length);
this.matched += match[0];
token = this.performAction.call(
this,
this.yy,
this,
rules[index],
this.conditionStack[this.conditionStack.length - 1]);
if (this.done && this._input) this.done = false;
if (token) return token;else
return;
}
if (this._input === '') {
return this.EOF;
} else {
this.parseError(
'Lexical error on line ' + (
this.yylineno + 1) +
'. Unrecognized text.\n' +
this.showPosition(),
{ text: '', token: null, line: this.yylineno });
}
},
lex: function lex() {
var r = this.next();
if (typeof r !== 'undefined') {
return r;
} else {
return this.lex();
}
},
begin: function begin(condition) {
this.conditionStack.push(condition);
},
popState: function popState() {
return this.conditionStack.pop();
},
_currentRules: function _currentRules() {
return this.conditions[
this.conditionStack[this.conditionStack.length - 1]].
rules;
},
topState: function () {
return this.conditionStack[this.conditionStack.length - 2];
},
pushState: function begin(condition) {
this.begin(condition);
} };
lexer.options = {};
lexer.performAction = function anonymous(
yy,
yy_,
$avoiding_name_collisions,
YY_START)
{
var YYSTATE = YY_START;
switch ($avoiding_name_collisions) {
case 0 /* skip whitespace */:
break;
case 1:
return 6;
break;
case 2:
yy_.yytext = yy_.yytext.substr(1, yy_.yyleng - 2);
return 4;
break;
case 3:
return 17;
break;
case 4:
return 18;
break;
case 5:
return 23;
break;
case 6:
return 24;
break;
case 7:
return 22;
break;
case 8:
return 21;
break;
case 9:
return 10;
break;
case 10:
return 11;
break;
case 11:
return 8;
break;
case 12:
return 14;
break;
case 13:
return 'INVALID';
break;}
};
lexer.rules = [
/^(?:\s+)/,
/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,
/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,
/^(?:\{)/,
/^(?:\})/,
/^(?:\[)/,
/^(?:\])/,
/^(?:,)/,
/^(?::)/,
/^(?:true\b)/,
/^(?:false\b)/,
/^(?:null\b)/,
/^(?:$)/,
/^(?:.)/];
lexer.conditions = {
INITIAL: {
rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
inclusive: true } };
return lexer;
}();
parser.lexer = lexer;
return parser;
}();
exports.parser = jsonlint;
exports.errors = function (input) {
try {
this.parse(input);
} catch (e) {
return e.stack;
}
};
exports.parse = function () {
return jsonlint.parse.apply(jsonlint, arguments);
};
exports.main = function commonjsMain(args) {
if (!args[1]) throw new Error('Usage: ' + args[0] + ' FILE');
if (typeof process !== 'undefined') {
var source = require('fs').readFileSync(
require('path').join(process.cwd(), args[1]),
'utf8');
} else {
var cwd = require('file').path(require('file').cwd());
var source = cwd.join(args[1]).read({ charset: 'utf-8' });
}
return exports.parser.parse(source);
};

52
web/node_modules/jest-config/package.json generated vendored Normal file
View File

@@ -0,0 +1,52 @@
{
"_from": "jest-config@^20.0.4",
"_id": "jest-config@20.0.4",
"_inBundle": false,
"_integrity": "sha1-43kwqyIXyRNgXv8T5712PsSPruo=",
"_location": "/jest-config",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "jest-config@^20.0.4",
"name": "jest-config",
"escapedName": "jest-config",
"rawSpec": "^20.0.4",
"saveSpec": null,
"fetchSpec": "^20.0.4"
},
"_requiredBy": [
"/jest-runtime",
"/jest/jest-cli"
],
"_resolved": "https://registry.npmjs.org/jest-config/-/jest-config-20.0.4.tgz",
"_shasum": "e37930ab2217c913605eff13e7bd763ec48faeea",
"_spec": "jest-config@^20.0.4",
"_where": "/home/bilal/Saburly/slucajna-televizija/node_modules/jest/node_modules/jest-cli",
"bugs": {
"url": "https://github.com/facebook/jest/issues"
},
"bundleDependencies": false,
"dependencies": {
"chalk": "^1.1.3",
"glob": "^7.1.1",
"jest-environment-jsdom": "^20.0.3",
"jest-environment-node": "^20.0.3",
"jest-jasmine2": "^20.0.4",
"jest-matcher-utils": "^20.0.3",
"jest-regex-util": "^20.0.3",
"jest-resolve": "^20.0.4",
"jest-validate": "^20.0.3",
"pretty-format": "^20.0.3"
},
"deprecated": false,
"homepage": "https://github.com/facebook/jest#readme",
"license": "BSD-3-Clause",
"main": "build/index.js",
"name": "jest-config",
"repository": {
"type": "git",
"url": "git+https://github.com/facebook/jest.git"
},
"version": "20.0.4"
}