This commit is contained in:
eric sciple 2020-01-24 12:21:24 -05:00
parent fc725ba36b
commit 422b9fdb15
7395 changed files with 1786235 additions and 3476 deletions

26
node_modules/jest-watcher/build/lib/Prompt.d.ts generated vendored Normal file
View file

@ -0,0 +1,26 @@
/**
* 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 { ScrollOptions } from '../types';
export default class Prompt {
private _entering;
private _value;
private _onChange;
private _onSuccess;
private _onCancel;
private _offset;
private _promptLength;
private _selection;
constructor();
private _onResize;
enter(onChange: (pattern: string, options: ScrollOptions) => void, onSuccess: (pattern: string) => void, onCancel: () => void): void;
setPromptLength(length: number): void;
setPromptSelection(selected: string): void;
put(key: string): void;
abort(): void;
isEntering(): boolean;
}
//# sourceMappingURL=Prompt.d.ts.map

1
node_modules/jest-watcher/build/lib/Prompt.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"Prompt.d.ts","sourceRoot":"","sources":["../../src/lib/Prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAGvC,MAAM,CAAC,OAAO,OAAO,MAAM;IACzB,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,UAAU,CAA0B;IAC5C,OAAO,CAAC,SAAS,CAA0B;IAC3C,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,UAAU,CAAgB;;IAelC,OAAO,CAAC,SAAS,CAEf;IAEF,KAAK,CACH,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,KAAK,IAAI,EAC3D,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EACpC,QAAQ,EAAE,MAAM,IAAI;IAoBtB,eAAe,CAAC,MAAM,EAAE,MAAM;IAI9B,kBAAkB,CAAC,QAAQ,EAAE,MAAM;IAInC,GAAG,CAAC,GAAG,EAAE,MAAM;IAiCf,KAAK;IAML,UAAU;CAGX"}

149
node_modules/jest-watcher/build/lib/Prompt.js generated vendored Normal file
View file

@ -0,0 +1,149 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.default = void 0;
var _constants = require('../constants');
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 Prompt {
constructor() {
_defineProperty(this, '_entering', void 0);
_defineProperty(this, '_value', void 0);
_defineProperty(this, '_onChange', void 0);
_defineProperty(this, '_onSuccess', void 0);
_defineProperty(this, '_onCancel', void 0);
_defineProperty(this, '_offset', void 0);
_defineProperty(this, '_promptLength', void 0);
_defineProperty(this, '_selection', void 0);
_defineProperty(this, '_onResize', () => {
this._onChange();
});
// Copied from `enter` to satisfy TS
this._entering = true;
this._value = '';
this._selection = null;
this._offset = -1;
this._promptLength = 0;
this._onChange = () => {};
this._onSuccess = () => {};
this._onCancel = () => {};
}
enter(onChange, onSuccess, onCancel) {
this._entering = true;
this._value = '';
this._onSuccess = onSuccess;
this._onCancel = onCancel;
this._selection = null;
this._offset = -1;
this._promptLength = 0;
this._onChange = () =>
onChange(this._value, {
max: 10,
offset: this._offset
});
this._onChange();
process.stdout.on('resize', this._onResize);
}
setPromptLength(length) {
this._promptLength = length;
}
setPromptSelection(selected) {
this._selection = selected;
}
put(key) {
switch (key) {
case _constants.KEYS.ENTER:
this._entering = false;
this._onSuccess(this._selection || this._value);
this.abort();
break;
case _constants.KEYS.ESCAPE:
this._entering = false;
this._onCancel(this._value);
this.abort();
break;
case _constants.KEYS.ARROW_DOWN:
this._offset = Math.min(this._offset + 1, this._promptLength - 1);
this._onChange();
break;
case _constants.KEYS.ARROW_UP:
this._offset = Math.max(this._offset - 1, -1);
this._onChange();
break;
case _constants.KEYS.ARROW_LEFT:
case _constants.KEYS.ARROW_RIGHT:
break;
default:
this._value =
key === _constants.KEYS.BACKSPACE
? this._value.slice(0, -1)
: this._value + key;
this._offset = -1;
this._selection = null;
this._onChange();
break;
}
}
abort() {
this._entering = false;
this._value = '';
process.stdout.removeListener('resize', this._onResize);
}
isEntering() {
return this._entering;
}
}
exports.default = Prompt;

9
node_modules/jest-watcher/build/lib/colorize.d.ts generated vendored Normal file
View file

@ -0,0 +1,9 @@
/**
* 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.
*/
declare const _default: (str: string, start: number, end: number) => string;
export default _default;
//# sourceMappingURL=colorize.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"colorize.d.ts","sourceRoot":"","sources":["../../src/lib/colorize.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAIH,wBAG4B"}

33
node_modules/jest-watcher/build/lib/colorize.js generated vendored Normal file
View file

@ -0,0 +1,33 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.default = void 0;
function _chalk() {
const data = _interopRequireDefault(require('chalk'));
_chalk = function _chalk() {
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 = (str, start, end) =>
_chalk().default.dim(str.slice(0, start)) +
_chalk().default.reset(str.slice(start, end)) +
_chalk().default.dim(str.slice(end));
exports.default = _default;

View file

@ -0,0 +1,9 @@
/**
* 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.
*/
declare const _default: (testName: string, pattern: string, width: number) => string;
export default _default;
//# sourceMappingURL=formatTestNameByPattern.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"formatTestNameByPattern.d.ts","sourceRoot":"","sources":["../../src/lib/formatTestNameByPattern.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AASH,wBA2CE"}

View file

@ -0,0 +1,83 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.default = void 0;
function _chalk() {
const data = _interopRequireDefault(require('chalk'));
_chalk = function _chalk() {
return data;
};
return data;
}
var _colorize = _interopRequireDefault(require('./colorize'));
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.
*/
const DOTS = '...';
const ENTER = '⏎';
var _default = (testName, pattern, width) => {
const inlineTestName = testName.replace(/(\r\n|\n|\r)/gm, ENTER);
let regexp;
try {
regexp = new RegExp(pattern, 'i');
} catch (e) {
return _chalk().default.dim(inlineTestName);
}
const match = inlineTestName.match(regexp);
if (!match) {
return _chalk().default.dim(inlineTestName);
}
const startPatternIndex = Math.max(match.index || 0, 0);
const endPatternIndex = startPatternIndex + match[0].length;
if (inlineTestName.length <= width) {
return (0, _colorize.default)(
inlineTestName,
startPatternIndex,
endPatternIndex
);
}
const slicedTestName = inlineTestName.slice(0, width - DOTS.length);
if (startPatternIndex < slicedTestName.length) {
if (endPatternIndex > slicedTestName.length) {
return (0, _colorize.default)(
slicedTestName + DOTS,
startPatternIndex,
slicedTestName.length + DOTS.length
);
} else {
return (0, _colorize.default)(
slicedTestName + DOTS,
Math.min(startPatternIndex, slicedTestName.length),
endPatternIndex
);
}
}
return `${_chalk().default.dim(slicedTestName)}${_chalk().default.reset(
DOTS
)}`;
};
exports.default = _default;

View file

@ -0,0 +1,10 @@
/**
* 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" />
export declare const printPatternCaret: (pattern: string, pipe: NodeJS.WritableStream) => void;
export declare const printRestoredPatternCaret: (pattern: string, currentUsageRows: number, pipe: NodeJS.WritableStream) => void;
//# sourceMappingURL=patternModeHelpers.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"patternModeHelpers.d.ts","sourceRoot":"","sources":["../../src/lib/patternModeHelpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAMH,eAAO,MAAM,iBAAiB,wDAS7B,CAAC;AAEF,eAAO,MAAM,yBAAyB,kFAWrC,CAAC"}

View file

@ -0,0 +1,68 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.printRestoredPatternCaret = exports.printPatternCaret = void 0;
function _chalk() {
const data = _interopRequireDefault(require('chalk'));
_chalk = function _chalk() {
return data;
};
return data;
}
function _ansiEscapes() {
const data = _interopRequireDefault(require('ansi-escapes'));
_ansiEscapes = function _ansiEscapes() {
return data;
};
return data;
}
function _stringLength() {
const data = _interopRequireDefault(require('string-length'));
_stringLength = function _stringLength() {
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.
*/
const printPatternCaret = (pattern, pipe) => {
const inputText = `${_chalk().default.dim(' pattern \u203A')} ${pattern}`;
pipe.write(_ansiEscapes().default.eraseDown);
pipe.write(inputText);
pipe.write(_ansiEscapes().default.cursorSavePosition);
};
exports.printPatternCaret = printPatternCaret;
const printRestoredPatternCaret = (pattern, currentUsageRows, pipe) => {
const inputText = `${_chalk().default.dim(' pattern \u203A')} ${pattern}`;
pipe.write(
_ansiEscapes().default.cursorTo(
(0, _stringLength().default)(inputText),
currentUsageRows - 1
)
);
pipe.write(_ansiEscapes().default.cursorRestorePosition);
};
exports.printRestoredPatternCaret = printRestoredPatternCaret;

13
node_modules/jest-watcher/build/lib/scroll.d.ts generated vendored Normal file
View file

@ -0,0 +1,13 @@
/**
* 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 { ScrollOptions } from '../types';
export default function scroll(size: number, { offset, max }: ScrollOptions): {
end: number;
index: number;
start: number;
};
//# sourceMappingURL=scroll.d.ts.map

1
node_modules/jest-watcher/build/lib/scroll.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"scroll.d.ts","sourceRoot":"","sources":["../../src/lib/scroll.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAC,MAAM,EAAE,GAAG,EAAC,EAAE,aAAa;;;;EAoBxE"}

34
node_modules/jest-watcher/build/lib/scroll.js generated vendored Normal file
View file

@ -0,0 +1,34 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.default = scroll;
/**
* 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.
*/
function scroll(size, {offset, max}) {
let start = 0;
let index = Math.min(offset, size);
const halfScreen = max / 2;
if (index <= halfScreen) {
start = 0;
} else {
if (size >= max) {
start = Math.min(index - halfScreen - 1, size - max);
}
index = Math.min(index - start, size);
}
return {
end: Math.min(size, start + max),
index,
start
};
}