Add node modules and compiled JavaScript from main (#57)
Co-authored-by: Oliver King <oking3@uncc.edu>
This commit is contained in:
parent
d893f27da9
commit
7f7e5ba5ea
6750 changed files with 1745644 additions and 10860 deletions
21
node_modules/@jest/console/LICENSE
generated
vendored
Normal file
21
node_modules/@jest/console/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Facebook, Inc. and its affiliates.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
34
node_modules/@jest/console/build/BufferedConsole.d.ts
generated
vendored
Normal file
34
node_modules/@jest/console/build/BufferedConsole.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. 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.
|
||||
*/
|
||||
import { Console } from 'console';
|
||||
import type { ConsoleBuffer, LogMessage, LogType } from './types';
|
||||
export default class BufferedConsole extends Console {
|
||||
private _buffer;
|
||||
private _counters;
|
||||
private _timers;
|
||||
private _groupDepth;
|
||||
constructor();
|
||||
static write(buffer: ConsoleBuffer, type: LogType, message: LogMessage, level?: number | null): ConsoleBuffer;
|
||||
private _log;
|
||||
assert(value: unknown, message?: string | Error): void;
|
||||
count(label?: string): void;
|
||||
countReset(label?: string): void;
|
||||
debug(firstArg: unknown, ...rest: Array<unknown>): void;
|
||||
dir(firstArg: unknown, ...rest: Array<unknown>): void;
|
||||
dirxml(firstArg: unknown, ...rest: Array<unknown>): void;
|
||||
error(firstArg: unknown, ...rest: Array<unknown>): void;
|
||||
group(title?: string, ...rest: Array<unknown>): void;
|
||||
groupCollapsed(title?: string, ...rest: Array<unknown>): void;
|
||||
groupEnd(): void;
|
||||
info(firstArg: unknown, ...rest: Array<unknown>): void;
|
||||
log(firstArg: unknown, ...rest: Array<unknown>): void;
|
||||
time(label?: string): void;
|
||||
timeEnd(label?: string): void;
|
||||
timeLog(label?: string, ...data: Array<unknown>): void;
|
||||
warn(firstArg: unknown, ...rest: Array<unknown>): void;
|
||||
getBuffer(): ConsoleBuffer | undefined;
|
||||
}
|
260
node_modules/@jest/console/build/BufferedConsole.js
generated
vendored
Normal file
260
node_modules/@jest/console/build/BufferedConsole.js
generated
vendored
Normal file
|
@ -0,0 +1,260 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _assert() {
|
||||
const data = _interopRequireDefault(require('assert'));
|
||||
|
||||
_assert = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _console() {
|
||||
const data = require('console');
|
||||
|
||||
_console = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _util() {
|
||||
const data = require('util');
|
||||
|
||||
_util = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestUtil() {
|
||||
const data = require('jest-util');
|
||||
|
||||
_jestUtil = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
class BufferedConsole extends _console().Console {
|
||||
constructor() {
|
||||
const buffer = [];
|
||||
super({
|
||||
write: message => {
|
||||
BufferedConsole.write(buffer, 'log', message, null);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
_defineProperty(this, '_buffer', void 0);
|
||||
|
||||
_defineProperty(this, '_counters', void 0);
|
||||
|
||||
_defineProperty(this, '_timers', void 0);
|
||||
|
||||
_defineProperty(this, '_groupDepth', void 0);
|
||||
|
||||
this._buffer = buffer;
|
||||
this._counters = {};
|
||||
this._timers = {};
|
||||
this._groupDepth = 0;
|
||||
}
|
||||
|
||||
static write(buffer, type, message, level) {
|
||||
const stackLevel = level != null ? level : 2;
|
||||
const rawStack = new (_jestUtil().ErrorWithStack)(
|
||||
undefined,
|
||||
BufferedConsole.write
|
||||
).stack;
|
||||
invariant(rawStack, 'always have a stack trace');
|
||||
const origin = rawStack
|
||||
.split('\n')
|
||||
.slice(stackLevel)
|
||||
.filter(Boolean)
|
||||
.join('\n');
|
||||
buffer.push({
|
||||
message,
|
||||
origin,
|
||||
type
|
||||
});
|
||||
return buffer;
|
||||
}
|
||||
|
||||
_log(type, message) {
|
||||
BufferedConsole.write(
|
||||
this._buffer,
|
||||
type,
|
||||
' '.repeat(this._groupDepth) + message,
|
||||
3
|
||||
);
|
||||
}
|
||||
|
||||
assert(value, message) {
|
||||
try {
|
||||
(0, _assert().default)(value, message);
|
||||
} catch (error) {
|
||||
this._log('assert', error.toString());
|
||||
}
|
||||
}
|
||||
|
||||
count(label = 'default') {
|
||||
if (!this._counters[label]) {
|
||||
this._counters[label] = 0;
|
||||
}
|
||||
|
||||
this._log(
|
||||
'count',
|
||||
(0, _util().format)(`${label}: ${++this._counters[label]}`)
|
||||
);
|
||||
}
|
||||
|
||||
countReset(label = 'default') {
|
||||
this._counters[label] = 0;
|
||||
}
|
||||
|
||||
debug(firstArg, ...rest) {
|
||||
this._log('debug', (0, _util().format)(firstArg, ...rest));
|
||||
}
|
||||
|
||||
dir(firstArg, ...rest) {
|
||||
this._log('dir', (0, _util().format)(firstArg, ...rest));
|
||||
}
|
||||
|
||||
dirxml(firstArg, ...rest) {
|
||||
this._log('dirxml', (0, _util().format)(firstArg, ...rest));
|
||||
}
|
||||
|
||||
error(firstArg, ...rest) {
|
||||
this._log('error', (0, _util().format)(firstArg, ...rest));
|
||||
}
|
||||
|
||||
group(title, ...rest) {
|
||||
this._groupDepth++;
|
||||
|
||||
if (title || rest.length > 0) {
|
||||
this._log(
|
||||
'group',
|
||||
_chalk().default.bold((0, _util().format)(title, ...rest))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
groupCollapsed(title, ...rest) {
|
||||
this._groupDepth++;
|
||||
|
||||
if (title || rest.length > 0) {
|
||||
this._log(
|
||||
'groupCollapsed',
|
||||
_chalk().default.bold((0, _util().format)(title, ...rest))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
groupEnd() {
|
||||
if (this._groupDepth > 0) {
|
||||
this._groupDepth--;
|
||||
}
|
||||
}
|
||||
|
||||
info(firstArg, ...rest) {
|
||||
this._log('info', (0, _util().format)(firstArg, ...rest));
|
||||
}
|
||||
|
||||
log(firstArg, ...rest) {
|
||||
this._log('log', (0, _util().format)(firstArg, ...rest));
|
||||
}
|
||||
|
||||
time(label = 'default') {
|
||||
if (this._timers[label]) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._timers[label] = new Date();
|
||||
}
|
||||
|
||||
timeEnd(label = 'default') {
|
||||
const startTime = this._timers[label];
|
||||
|
||||
if (startTime) {
|
||||
const endTime = new Date();
|
||||
const time = endTime.getTime() - startTime.getTime();
|
||||
|
||||
this._log(
|
||||
'time',
|
||||
(0, _util().format)(`${label}: ${(0, _jestUtil().formatTime)(time)}`)
|
||||
);
|
||||
|
||||
delete this._timers[label];
|
||||
}
|
||||
}
|
||||
|
||||
timeLog(label = 'default', ...data) {
|
||||
const startTime = this._timers[label];
|
||||
|
||||
if (startTime) {
|
||||
const endTime = new Date();
|
||||
const time = endTime.getTime() - startTime.getTime();
|
||||
|
||||
this._log(
|
||||
'time',
|
||||
(0, _util().format)(
|
||||
`${label}: ${(0, _jestUtil().formatTime)(time)}`,
|
||||
...data
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
warn(firstArg, ...rest) {
|
||||
this._log('warn', (0, _util().format)(firstArg, ...rest));
|
||||
}
|
||||
|
||||
getBuffer() {
|
||||
return this._buffer.length ? this._buffer : undefined;
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = BufferedConsole;
|
||||
|
||||
function invariant(condition, message) {
|
||||
if (!condition) {
|
||||
throw new Error(message);
|
||||
}
|
||||
}
|
39
node_modules/@jest/console/build/CustomConsole.d.ts
generated
vendored
Normal file
39
node_modules/@jest/console/build/CustomConsole.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. 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.
|
||||
*/
|
||||
/// <reference types="node" />
|
||||
import { Console } from 'console';
|
||||
import type { LogMessage, LogType } from './types';
|
||||
declare type Formatter = (type: LogType, message: LogMessage) => string;
|
||||
export default class CustomConsole extends Console {
|
||||
private _stdout;
|
||||
private _stderr;
|
||||
private _formatBuffer;
|
||||
private _counters;
|
||||
private _timers;
|
||||
private _groupDepth;
|
||||
constructor(stdout: NodeJS.WriteStream, stderr: NodeJS.WriteStream, formatBuffer?: Formatter);
|
||||
private _log;
|
||||
private _logError;
|
||||
assert(value: unknown, message?: string | Error): asserts value;
|
||||
count(label?: string): void;
|
||||
countReset(label?: string): void;
|
||||
debug(firstArg: unknown, ...args: Array<unknown>): void;
|
||||
dir(firstArg: unknown, ...args: Array<unknown>): void;
|
||||
dirxml(firstArg: unknown, ...args: Array<unknown>): void;
|
||||
error(firstArg: unknown, ...args: Array<unknown>): void;
|
||||
group(title?: string, ...args: Array<unknown>): void;
|
||||
groupCollapsed(title?: string, ...args: Array<unknown>): void;
|
||||
groupEnd(): void;
|
||||
info(firstArg: unknown, ...args: Array<unknown>): void;
|
||||
log(firstArg: unknown, ...args: Array<unknown>): void;
|
||||
time(label?: string): void;
|
||||
timeEnd(label?: string): void;
|
||||
timeLog(label?: string, ...data: Array<unknown>): void;
|
||||
warn(firstArg: unknown, ...args: Array<unknown>): void;
|
||||
getBuffer(): undefined;
|
||||
}
|
||||
export {};
|
239
node_modules/@jest/console/build/CustomConsole.js
generated
vendored
Normal file
239
node_modules/@jest/console/build/CustomConsole.js
generated
vendored
Normal file
|
@ -0,0 +1,239 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _assert() {
|
||||
const data = _interopRequireDefault(require('assert'));
|
||||
|
||||
_assert = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _util() {
|
||||
const data = require('util');
|
||||
|
||||
_util = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _console() {
|
||||
const data = require('console');
|
||||
|
||||
_console = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestUtil() {
|
||||
const data = require('jest-util');
|
||||
|
||||
_jestUtil = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
class CustomConsole extends _console().Console {
|
||||
constructor(stdout, stderr, formatBuffer = (_type, message) => message) {
|
||||
super(stdout, stderr);
|
||||
|
||||
_defineProperty(this, '_stdout', void 0);
|
||||
|
||||
_defineProperty(this, '_stderr', void 0);
|
||||
|
||||
_defineProperty(this, '_formatBuffer', void 0);
|
||||
|
||||
_defineProperty(this, '_counters', void 0);
|
||||
|
||||
_defineProperty(this, '_timers', void 0);
|
||||
|
||||
_defineProperty(this, '_groupDepth', void 0);
|
||||
|
||||
this._stdout = stdout;
|
||||
this._stderr = stderr;
|
||||
this._formatBuffer = formatBuffer;
|
||||
this._counters = {};
|
||||
this._timers = {};
|
||||
this._groupDepth = 0;
|
||||
}
|
||||
|
||||
_log(type, message) {
|
||||
(0, _jestUtil().clearLine)(this._stdout);
|
||||
super.log(
|
||||
this._formatBuffer(type, ' '.repeat(this._groupDepth) + message)
|
||||
);
|
||||
}
|
||||
|
||||
_logError(type, message) {
|
||||
(0, _jestUtil().clearLine)(this._stderr);
|
||||
super.error(
|
||||
this._formatBuffer(type, ' '.repeat(this._groupDepth) + message)
|
||||
);
|
||||
}
|
||||
|
||||
assert(value, message) {
|
||||
try {
|
||||
(0, _assert().default)(value, message);
|
||||
} catch (error) {
|
||||
this._logError('assert', error.toString());
|
||||
}
|
||||
}
|
||||
|
||||
count(label = 'default') {
|
||||
if (!this._counters[label]) {
|
||||
this._counters[label] = 0;
|
||||
}
|
||||
|
||||
this._log(
|
||||
'count',
|
||||
(0, _util().format)(`${label}: ${++this._counters[label]}`)
|
||||
);
|
||||
}
|
||||
|
||||
countReset(label = 'default') {
|
||||
this._counters[label] = 0;
|
||||
}
|
||||
|
||||
debug(firstArg, ...args) {
|
||||
this._log('debug', (0, _util().format)(firstArg, ...args));
|
||||
}
|
||||
|
||||
dir(firstArg, ...args) {
|
||||
this._log('dir', (0, _util().format)(firstArg, ...args));
|
||||
}
|
||||
|
||||
dirxml(firstArg, ...args) {
|
||||
this._log('dirxml', (0, _util().format)(firstArg, ...args));
|
||||
}
|
||||
|
||||
error(firstArg, ...args) {
|
||||
this._logError('error', (0, _util().format)(firstArg, ...args));
|
||||
}
|
||||
|
||||
group(title, ...args) {
|
||||
this._groupDepth++;
|
||||
|
||||
if (title || args.length > 0) {
|
||||
this._log(
|
||||
'group',
|
||||
_chalk().default.bold((0, _util().format)(title, ...args))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
groupCollapsed(title, ...args) {
|
||||
this._groupDepth++;
|
||||
|
||||
if (title || args.length > 0) {
|
||||
this._log(
|
||||
'groupCollapsed',
|
||||
_chalk().default.bold((0, _util().format)(title, ...args))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
groupEnd() {
|
||||
if (this._groupDepth > 0) {
|
||||
this._groupDepth--;
|
||||
}
|
||||
}
|
||||
|
||||
info(firstArg, ...args) {
|
||||
this._log('info', (0, _util().format)(firstArg, ...args));
|
||||
}
|
||||
|
||||
log(firstArg, ...args) {
|
||||
this._log('log', (0, _util().format)(firstArg, ...args));
|
||||
}
|
||||
|
||||
time(label = 'default') {
|
||||
if (this._timers[label]) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._timers[label] = new Date();
|
||||
}
|
||||
|
||||
timeEnd(label = 'default') {
|
||||
const startTime = this._timers[label];
|
||||
|
||||
if (startTime) {
|
||||
const endTime = new Date().getTime();
|
||||
const time = endTime - startTime.getTime();
|
||||
|
||||
this._log(
|
||||
'time',
|
||||
(0, _util().format)(`${label}: ${(0, _jestUtil().formatTime)(time)}`)
|
||||
);
|
||||
|
||||
delete this._timers[label];
|
||||
}
|
||||
}
|
||||
|
||||
timeLog(label = 'default', ...data) {
|
||||
const startTime = this._timers[label];
|
||||
|
||||
if (startTime) {
|
||||
const endTime = new Date();
|
||||
const time = endTime.getTime() - startTime.getTime();
|
||||
|
||||
this._log(
|
||||
'time',
|
||||
(0, _util().format)(
|
||||
`${label}: ${(0, _jestUtil().formatTime)(time)}`,
|
||||
...data
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
warn(firstArg, ...args) {
|
||||
this._logError('warn', (0, _util().format)(firstArg, ...args));
|
||||
}
|
||||
|
||||
getBuffer() {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = CustomConsole;
|
23
node_modules/@jest/console/build/NullConsole.d.ts
generated
vendored
Normal file
23
node_modules/@jest/console/build/NullConsole.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. 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.
|
||||
*/
|
||||
import CustomConsole from './CustomConsole';
|
||||
export default class NullConsole extends CustomConsole {
|
||||
assert(): void;
|
||||
debug(): void;
|
||||
dir(): void;
|
||||
error(): void;
|
||||
info(): void;
|
||||
log(): void;
|
||||
time(): void;
|
||||
timeEnd(): void;
|
||||
timeLog(): void;
|
||||
trace(): void;
|
||||
warn(): void;
|
||||
group(): void;
|
||||
groupCollapsed(): void;
|
||||
groupEnd(): void;
|
||||
}
|
50
node_modules/@jest/console/build/NullConsole.js
generated
vendored
Normal file
50
node_modules/@jest/console/build/NullConsole.js
generated
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _CustomConsole = _interopRequireDefault(require('./CustomConsole'));
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. 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.
|
||||
*/
|
||||
class NullConsole extends _CustomConsole.default {
|
||||
assert() {}
|
||||
|
||||
debug() {}
|
||||
|
||||
dir() {}
|
||||
|
||||
error() {}
|
||||
|
||||
info() {}
|
||||
|
||||
log() {}
|
||||
|
||||
time() {}
|
||||
|
||||
timeEnd() {}
|
||||
|
||||
timeLog() {}
|
||||
|
||||
trace() {}
|
||||
|
||||
warn() {}
|
||||
|
||||
group() {}
|
||||
|
||||
groupCollapsed() {}
|
||||
|
||||
groupEnd() {}
|
||||
}
|
||||
|
||||
exports.default = NullConsole;
|
11
node_modules/@jest/console/build/getConsoleOutput.d.ts
generated
vendored
Normal file
11
node_modules/@jest/console/build/getConsoleOutput.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. 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.
|
||||
*/
|
||||
import { StackTraceConfig } from 'jest-message-util';
|
||||
import type { Config } from '@jest/types';
|
||||
import type { ConsoleBuffer } from './types';
|
||||
declare const _default: (root: string, verbose: boolean, buffer: ConsoleBuffer, config?: StackTraceConfig, globalConfig?: Config.GlobalConfig | undefined) => string;
|
||||
export default _default;
|
112
node_modules/@jest/console/build/getConsoleOutput.js
generated
vendored
Normal file
112
node_modules/@jest/console/build/getConsoleOutput.js
generated
vendored
Normal file
|
@ -0,0 +1,112 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestMessageUtil() {
|
||||
const data = require('jest-message-util');
|
||||
|
||||
_jestMessageUtil = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. 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.
|
||||
*/
|
||||
var _default = (
|
||||
root,
|
||||
verbose,
|
||||
buffer, // TODO: make mandatory and take Config.ProjectConfig in 27
|
||||
config = {
|
||||
rootDir: root,
|
||||
testMatch: []
|
||||
},
|
||||
globalConfig
|
||||
) => {
|
||||
const TITLE_INDENT = verbose ? ' ' : ' ';
|
||||
const CONSOLE_INDENT = TITLE_INDENT + ' ';
|
||||
const logEntries = buffer.reduce((output, {type, message, origin}) => {
|
||||
message = message
|
||||
.split(/\n/)
|
||||
.map(line => CONSOLE_INDENT + line)
|
||||
.join('\n');
|
||||
let typeMessage = 'console.' + type;
|
||||
let noStackTrace = true;
|
||||
let noCodeFrame = true;
|
||||
|
||||
if (type === 'warn') {
|
||||
var _globalConfig$noStack;
|
||||
|
||||
message = _chalk().default.yellow(message);
|
||||
typeMessage = _chalk().default.yellow(typeMessage);
|
||||
noStackTrace =
|
||||
(_globalConfig$noStack =
|
||||
globalConfig === null || globalConfig === void 0
|
||||
? void 0
|
||||
: globalConfig.noStackTrace) !== null &&
|
||||
_globalConfig$noStack !== void 0
|
||||
? _globalConfig$noStack
|
||||
: false;
|
||||
noCodeFrame = false;
|
||||
} else if (type === 'error') {
|
||||
var _globalConfig$noStack2;
|
||||
|
||||
message = _chalk().default.red(message);
|
||||
typeMessage = _chalk().default.red(typeMessage);
|
||||
noStackTrace =
|
||||
(_globalConfig$noStack2 =
|
||||
globalConfig === null || globalConfig === void 0
|
||||
? void 0
|
||||
: globalConfig.noStackTrace) !== null &&
|
||||
_globalConfig$noStack2 !== void 0
|
||||
? _globalConfig$noStack2
|
||||
: false;
|
||||
noCodeFrame = false;
|
||||
}
|
||||
|
||||
const options = {
|
||||
noCodeFrame,
|
||||
noStackTrace
|
||||
};
|
||||
const formattedStackTrace = (0, _jestMessageUtil().formatStackTrace)(
|
||||
origin,
|
||||
config,
|
||||
options
|
||||
);
|
||||
return (
|
||||
output +
|
||||
TITLE_INDENT +
|
||||
_chalk().default.dim(typeMessage) +
|
||||
'\n' +
|
||||
message.trimRight() +
|
||||
'\n' +
|
||||
_chalk().default.dim(formattedStackTrace.trimRight()) +
|
||||
'\n\n'
|
||||
);
|
||||
}, '');
|
||||
return logEntries.trimRight() + '\n';
|
||||
};
|
||||
|
||||
exports.default = _default;
|
11
node_modules/@jest/console/build/index.d.ts
generated
vendored
Normal file
11
node_modules/@jest/console/build/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. 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.
|
||||
*/
|
||||
export { default as BufferedConsole } from './BufferedConsole';
|
||||
export { default as CustomConsole } from './CustomConsole';
|
||||
export { default as NullConsole } from './NullConsole';
|
||||
export { default as getConsoleOutput } from './getConsoleOutput';
|
||||
export type { ConsoleBuffer, LogMessage, LogType } from './types';
|
41
node_modules/@jest/console/build/index.js
generated
vendored
Normal file
41
node_modules/@jest/console/build/index.js
generated
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, 'BufferedConsole', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _BufferedConsole.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'CustomConsole', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _CustomConsole.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'NullConsole', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _NullConsole.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'getConsoleOutput', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _getConsoleOutput.default;
|
||||
}
|
||||
});
|
||||
|
||||
var _BufferedConsole = _interopRequireDefault(require('./BufferedConsole'));
|
||||
|
||||
var _CustomConsole = _interopRequireDefault(require('./CustomConsole'));
|
||||
|
||||
var _NullConsole = _interopRequireDefault(require('./NullConsole'));
|
||||
|
||||
var _getConsoleOutput = _interopRequireDefault(require('./getConsoleOutput'));
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
20
node_modules/@jest/console/build/types.d.ts
generated
vendored
Normal file
20
node_modules/@jest/console/build/types.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. 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.
|
||||
*/
|
||||
export declare type LogMessage = string;
|
||||
export declare type LogEntry = {
|
||||
message: LogMessage;
|
||||
origin: string;
|
||||
type: LogType;
|
||||
};
|
||||
export declare type LogCounters = {
|
||||
[label: string]: number;
|
||||
};
|
||||
export declare type LogTimers = {
|
||||
[label: string]: Date;
|
||||
};
|
||||
export declare type LogType = 'assert' | 'count' | 'debug' | 'dir' | 'dirxml' | 'error' | 'group' | 'groupCollapsed' | 'info' | 'log' | 'time' | 'warn';
|
||||
export declare type ConsoleBuffer = Array<LogEntry>;
|
1
node_modules/@jest/console/build/types.js
generated
vendored
Normal file
1
node_modules/@jest/console/build/types.js
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
'use strict';
|
30
node_modules/@jest/console/package.json
generated
vendored
Normal file
30
node_modules/@jest/console/package.json
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"name": "@jest/console",
|
||||
"version": "26.3.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/facebook/jest.git",
|
||||
"directory": "packages/jest-console"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
"dependencies": {
|
||||
"@jest/types": "^26.3.0",
|
||||
"@types/node": "*",
|
||||
"chalk": "^4.0.0",
|
||||
"jest-message-util": "^26.3.0",
|
||||
"jest-util": "^26.3.0",
|
||||
"slash": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10.14.2"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "3a7e06fe855515a848241bb06a6f6e117847443d"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue