mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 03:01:21 -04:00
update kbn/pm dist
This commit is contained in:
parent
5a3c75721b
commit
68e24f0fad
1 changed files with 64 additions and 26 deletions
88
packages/kbn-pm/dist/index.js
vendored
88
packages/kbn-pm/dist/index.js
vendored
|
@ -40239,6 +40239,7 @@ module.exports = FastGlob;
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
|
||||||
const utils = __webpack_require__(292);
|
const utils = __webpack_require__(292);
|
||||||
function generate(patterns, settings) {
|
function generate(patterns, settings) {
|
||||||
const positivePatterns = getPositivePatterns(patterns);
|
const positivePatterns = getPositivePatterns(patterns);
|
||||||
|
@ -40310,6 +40311,7 @@ exports.convertPatternGroupToTask = convertPatternGroupToTask;
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0;
|
||||||
const array = __webpack_require__(293);
|
const array = __webpack_require__(293);
|
||||||
exports.array = array;
|
exports.array = array;
|
||||||
const errno = __webpack_require__(294);
|
const errno = __webpack_require__(294);
|
||||||
|
@ -40333,6 +40335,7 @@ exports.string = string;
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.splitWhen = exports.flatten = void 0;
|
||||||
function flatten(items) {
|
function flatten(items) {
|
||||||
return items.reduce((collection, item) => [].concat(collection, item), []);
|
return items.reduce((collection, item) => [].concat(collection, item), []);
|
||||||
}
|
}
|
||||||
|
@ -40361,6 +40364,7 @@ exports.splitWhen = splitWhen;
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.isEnoentCodeError = void 0;
|
||||||
function isEnoentCodeError(error) {
|
function isEnoentCodeError(error) {
|
||||||
return error.code === 'ENOENT';
|
return error.code === 'ENOENT';
|
||||||
}
|
}
|
||||||
|
@ -40374,6 +40378,7 @@ exports.isEnoentCodeError = isEnoentCodeError;
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.createDirentFromStats = void 0;
|
||||||
class DirentFromStats {
|
class DirentFromStats {
|
||||||
constructor(name, stats) {
|
constructor(name, stats) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
@ -40399,6 +40404,7 @@ exports.createDirentFromStats = createDirentFromStats;
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.removeLeadingDotSegment = exports.escape = exports.makeAbsolute = exports.unixify = void 0;
|
||||||
const path = __webpack_require__(4);
|
const path = __webpack_require__(4);
|
||||||
const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
|
const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
|
||||||
const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
|
const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
|
||||||
|
@ -40438,6 +40444,7 @@ exports.removeLeadingDotSegment = removeLeadingDotSegment;
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
|
||||||
const path = __webpack_require__(4);
|
const path = __webpack_require__(4);
|
||||||
const globParent = __webpack_require__(298);
|
const globParent = __webpack_require__(298);
|
||||||
const micromatch = __webpack_require__(301);
|
const micromatch = __webpack_require__(301);
|
||||||
|
@ -40454,6 +40461,14 @@ function isStaticPattern(pattern, options = {}) {
|
||||||
}
|
}
|
||||||
exports.isStaticPattern = isStaticPattern;
|
exports.isStaticPattern = isStaticPattern;
|
||||||
function isDynamicPattern(pattern, options = {}) {
|
function isDynamicPattern(pattern, options = {}) {
|
||||||
|
/**
|
||||||
|
* A special case with an empty string is necessary for matching patterns that start with a forward slash.
|
||||||
|
* An empty string cannot be a dynamic pattern.
|
||||||
|
* For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'.
|
||||||
|
*/
|
||||||
|
if (pattern === '') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
|
* When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
|
||||||
* filepath directly (without read directory).
|
* filepath directly (without read directory).
|
||||||
|
@ -40528,12 +40543,23 @@ function expandBraceExpansion(pattern) {
|
||||||
}
|
}
|
||||||
exports.expandBraceExpansion = expandBraceExpansion;
|
exports.expandBraceExpansion = expandBraceExpansion;
|
||||||
function getPatternParts(pattern, options) {
|
function getPatternParts(pattern, options) {
|
||||||
const info = picomatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true }));
|
let { parts } = picomatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true }));
|
||||||
// See micromatch/picomatch#58 for more details
|
/**
|
||||||
if (info.parts.length === 0) {
|
* The scan method returns an empty array in some cases.
|
||||||
return [pattern];
|
* See micromatch/picomatch#58 for more details.
|
||||||
|
*/
|
||||||
|
if (parts.length === 0) {
|
||||||
|
parts = [pattern];
|
||||||
}
|
}
|
||||||
return info.parts;
|
/**
|
||||||
|
* The scan method does not return an empty part for the pattern with a forward slash.
|
||||||
|
* This is another part of micromatch/picomatch#58.
|
||||||
|
*/
|
||||||
|
if (parts[0].startsWith('/')) {
|
||||||
|
parts[0] = parts[0].slice(1);
|
||||||
|
parts.unshift('');
|
||||||
|
}
|
||||||
|
return parts;
|
||||||
}
|
}
|
||||||
exports.getPatternParts = getPatternParts;
|
exports.getPatternParts = getPatternParts;
|
||||||
function makeRe(pattern, options) {
|
function makeRe(pattern, options) {
|
||||||
|
@ -44746,6 +44772,7 @@ module.exports = parse;
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.merge = void 0;
|
||||||
const merge2 = __webpack_require__(284);
|
const merge2 = __webpack_require__(284);
|
||||||
function merge(streams) {
|
function merge(streams) {
|
||||||
const mergedStream = merge2(streams);
|
const mergedStream = merge2(streams);
|
||||||
|
@ -44769,6 +44796,7 @@ function propagateCloseEventToSources(streams) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.isEmpty = exports.isString = void 0;
|
||||||
function isString(input) {
|
function isString(input) {
|
||||||
return typeof input === 'string';
|
return typeof input === 'string';
|
||||||
}
|
}
|
||||||
|
@ -46097,8 +46125,7 @@ class DeepFilter {
|
||||||
return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
|
return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
|
||||||
}
|
}
|
||||||
_filter(basePath, entry, matcher, negativeRe) {
|
_filter(basePath, entry, matcher, negativeRe) {
|
||||||
const depth = this._getEntryLevel(basePath, entry.path);
|
if (this._isSkippedByDeep(basePath, entry.path)) {
|
||||||
if (this._isSkippedByDeep(depth)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this._isSkippedSymbolicLink(entry)) {
|
if (this._isSkippedSymbolicLink(entry)) {
|
||||||
|
@ -46110,22 +46137,31 @@ class DeepFilter {
|
||||||
}
|
}
|
||||||
return this._isSkippedByNegativePatterns(filepath, negativeRe);
|
return this._isSkippedByNegativePatterns(filepath, negativeRe);
|
||||||
}
|
}
|
||||||
_isSkippedByDeep(entryDepth) {
|
_isSkippedByDeep(basePath, entryPath) {
|
||||||
return entryDepth >= this._settings.deep;
|
/**
|
||||||
|
* Avoid unnecessary depth calculations when it doesn't matter.
|
||||||
|
*/
|
||||||
|
if (this._settings.deep === Infinity) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;
|
||||||
|
}
|
||||||
|
_getEntryLevel(basePath, entryPath) {
|
||||||
|
const entryPathDepth = entryPath.split('/').length;
|
||||||
|
if (basePath === '') {
|
||||||
|
return entryPathDepth;
|
||||||
|
}
|
||||||
|
const basePathDepth = basePath.split('/').length;
|
||||||
|
return entryPathDepth - basePathDepth;
|
||||||
}
|
}
|
||||||
_isSkippedSymbolicLink(entry) {
|
_isSkippedSymbolicLink(entry) {
|
||||||
return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
|
return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
|
||||||
}
|
}
|
||||||
_getEntryLevel(basePath, entryPath) {
|
|
||||||
const basePathDepth = basePath.split('/').length;
|
|
||||||
const entryPathDepth = entryPath.split('/').length;
|
|
||||||
return entryPathDepth - (basePath === '' ? 0 : basePathDepth);
|
|
||||||
}
|
|
||||||
_isSkippedByPositivePatterns(entryPath, matcher) {
|
_isSkippedByPositivePatterns(entryPath, matcher) {
|
||||||
return !this._settings.baseNameMatch && !matcher.match(entryPath);
|
return !this._settings.baseNameMatch && !matcher.match(entryPath);
|
||||||
}
|
}
|
||||||
_isSkippedByNegativePatterns(entryPath, negativeRe) {
|
_isSkippedByNegativePatterns(entryPath, patternsRe) {
|
||||||
return !utils.pattern.matchAny(entryPath, negativeRe);
|
return !utils.pattern.matchAny(entryPath, patternsRe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.default = DeepFilter;
|
exports.default = DeepFilter;
|
||||||
|
@ -46253,20 +46289,21 @@ class EntryFilter {
|
||||||
return (entry) => this._filter(entry, positiveRe, negativeRe);
|
return (entry) => this._filter(entry, positiveRe, negativeRe);
|
||||||
}
|
}
|
||||||
_filter(entry, positiveRe, negativeRe) {
|
_filter(entry, positiveRe, negativeRe) {
|
||||||
if (this._settings.unique) {
|
if (this._settings.unique && this._isDuplicateEntry(entry)) {
|
||||||
if (this._isDuplicateEntry(entry)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this._createIndexRecord(entry);
|
|
||||||
}
|
|
||||||
if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
|
if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this._isSkippedByAbsoluteNegativePatterns(entry, negativeRe)) {
|
if (this._isSkippedByAbsoluteNegativePatterns(entry.path, negativeRe)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const filepath = this._settings.baseNameMatch ? entry.name : entry.path;
|
const filepath = this._settings.baseNameMatch ? entry.name : entry.path;
|
||||||
return this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe);
|
const isMatched = this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe);
|
||||||
|
if (this._settings.unique && isMatched) {
|
||||||
|
this._createIndexRecord(entry);
|
||||||
|
}
|
||||||
|
return isMatched;
|
||||||
}
|
}
|
||||||
_isDuplicateEntry(entry) {
|
_isDuplicateEntry(entry) {
|
||||||
return this.index.has(entry.path);
|
return this.index.has(entry.path);
|
||||||
|
@ -46280,12 +46317,12 @@ class EntryFilter {
|
||||||
_onlyDirectoryFilter(entry) {
|
_onlyDirectoryFilter(entry) {
|
||||||
return this._settings.onlyDirectories && !entry.dirent.isDirectory();
|
return this._settings.onlyDirectories && !entry.dirent.isDirectory();
|
||||||
}
|
}
|
||||||
_isSkippedByAbsoluteNegativePatterns(entry, negativeRe) {
|
_isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) {
|
||||||
if (!this._settings.absolute) {
|
if (!this._settings.absolute) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const fullpath = utils.path.makeAbsolute(this._settings.cwd, entry.path);
|
const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath);
|
||||||
return this._isMatchToPatterns(fullpath, negativeRe);
|
return utils.pattern.matchAny(fullpath, patternsRe);
|
||||||
}
|
}
|
||||||
_isMatchToPatterns(entryPath, patternsRe) {
|
_isMatchToPatterns(entryPath, patternsRe) {
|
||||||
const filepath = utils.path.removeLeadingDotSegment(entryPath);
|
const filepath = utils.path.removeLeadingDotSegment(entryPath);
|
||||||
|
@ -46475,6 +46512,7 @@ exports.default = ReaderSync;
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
||||||
const fs = __webpack_require__(132);
|
const fs = __webpack_require__(132);
|
||||||
const os = __webpack_require__(121);
|
const os = __webpack_require__(121);
|
||||||
const CPU_COUNT = os.cpus().length;
|
const CPU_COUNT = os.cpus().length;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue