mirror of
https://kevinblog.sytes.net/Code/Jibo-Revival-Group/RoboCommander.git
synced 2026-06-15 10:26:04 +00:00
Initial commit
This commit is contained in:
21
node_modules/fast-glob/LICENSE
generated
vendored
Normal file
21
node_modules/fast-glob/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Denis Malinochkin
|
||||
|
||||
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.
|
||||
10
node_modules/fast-glob/index.js
generated
vendored
Normal file
10
node_modules/fast-glob/index.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
const pkg = require('./out/index');
|
||||
|
||||
module.exports = pkg.async;
|
||||
module.exports.default = pkg.async;
|
||||
|
||||
module.exports.async = pkg.async;
|
||||
module.exports.sync = pkg.sync;
|
||||
module.exports.stream = pkg.stream;
|
||||
|
||||
module.exports.generateTasks = pkg.generateTasks;
|
||||
15
node_modules/fast-glob/node_modules/glob-parent/LICENSE
generated
vendored
Normal file
15
node_modules/fast-glob/node_modules/glob-parent/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
The ISC License
|
||||
|
||||
Copyright (c) 2015 Elan Shanker
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
24
node_modules/fast-glob/node_modules/glob-parent/index.js
generated
vendored
Normal file
24
node_modules/fast-glob/node_modules/glob-parent/index.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
var path = require('path');
|
||||
var isglob = require('is-glob');
|
||||
var pathDirname = require('path-dirname');
|
||||
var isWin32 = require('os').platform() === 'win32';
|
||||
|
||||
module.exports = function globParent(str) {
|
||||
// flip windows path separators
|
||||
if (isWin32 && str.indexOf('/') < 0) str = str.split('\\').join('/');
|
||||
|
||||
// special case for strings ending in enclosure containing path separator
|
||||
if (/[\{\[].*[\/]*.*[\}\]]$/.test(str)) str += '/';
|
||||
|
||||
// preserves full path in case of trailing path separator
|
||||
str += 'a';
|
||||
|
||||
// remove path parts that are globby
|
||||
do {str = pathDirname.posix(str)}
|
||||
while (isglob(str) || /(^|[^\\])([\{\[]|\([^\)]+$)/.test(str));
|
||||
|
||||
// remove escape chars and return result
|
||||
return str.replace(/\\([\*\?\|\[\]\(\)\{\}])/g, '$1');
|
||||
};
|
||||
21
node_modules/fast-glob/node_modules/glob-parent/node_modules/is-glob/LICENSE
generated
vendored
Normal file
21
node_modules/fast-glob/node_modules/glob-parent/node_modules/is-glob/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2016, Jon Schlinkert.
|
||||
|
||||
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.
|
||||
25
node_modules/fast-glob/node_modules/glob-parent/node_modules/is-glob/index.js
generated
vendored
Normal file
25
node_modules/fast-glob/node_modules/glob-parent/node_modules/is-glob/index.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
/*!
|
||||
* is-glob <https://github.com/jonschlinkert/is-glob>
|
||||
*
|
||||
* Copyright (c) 2014-2016, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
var isExtglob = require('is-extglob');
|
||||
|
||||
module.exports = function isGlob(str) {
|
||||
if (typeof str !== 'string' || str === '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isExtglob(str)) return true;
|
||||
|
||||
var regex = /(\\).|([*?]|\[.*\]|\{.*\}|\(.*\|.*\)|^!)/;
|
||||
var match;
|
||||
|
||||
while ((match = regex.exec(str))) {
|
||||
if (match[2]) return true;
|
||||
str = str.slice(match.index + match[0].length);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
51
node_modules/fast-glob/node_modules/glob-parent/node_modules/is-glob/package.json
generated
vendored
Normal file
51
node_modules/fast-glob/node_modules/glob-parent/node_modules/is-glob/package.json
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"name": "is-glob",
|
||||
"description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.",
|
||||
"version": "3.1.0",
|
||||
"homepage": "https://github.com/jonschlinkert/is-glob",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"repository": "jonschlinkert/is-glob",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-extglob": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^0.1.10",
|
||||
"mocha": "^3.0.2"
|
||||
},
|
||||
"verb": {
|
||||
"layout": "default",
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"assemble",
|
||||
"base",
|
||||
"update",
|
||||
"verb"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"assemble",
|
||||
"bach",
|
||||
"base",
|
||||
"composer",
|
||||
"gulp",
|
||||
"has-glob",
|
||||
"is-valid-glob",
|
||||
"micromatch",
|
||||
"npm",
|
||||
"scaffold",
|
||||
"verb",
|
||||
"vinyl"
|
||||
]
|
||||
}
|
||||
}
|
||||
25
node_modules/fast-glob/node_modules/glob-parent/package.json
generated
vendored
Normal file
25
node_modules/fast-glob/node_modules/glob-parent/package.json
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "glob-parent",
|
||||
"version": "3.1.0",
|
||||
"description": "Strips glob magic from a string to provide the parent directory path",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/es128/glob-parent"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"author": "Elan Shanker (https://github.com/es128)",
|
||||
"license": "ISC",
|
||||
"homepage": "https://github.com/es128/glob-parent",
|
||||
"dependencies": {
|
||||
"is-glob": "^3.1.0",
|
||||
"path-dirname": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"coveralls": "^2.11.2",
|
||||
"istanbul": "^0.3.5",
|
||||
"mocha": "^2.1.0"
|
||||
}
|
||||
}
|
||||
21
node_modules/fast-glob/node_modules/is-extglob/LICENSE
generated
vendored
Normal file
21
node_modules/fast-glob/node_modules/is-extglob/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2016, Jon Schlinkert
|
||||
|
||||
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.
|
||||
20
node_modules/fast-glob/node_modules/is-extglob/index.js
generated
vendored
Normal file
20
node_modules/fast-glob/node_modules/is-extglob/index.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/*!
|
||||
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
||||
*
|
||||
* Copyright (c) 2014-2016, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
module.exports = function isExtglob(str) {
|
||||
if (typeof str !== 'string' || str === '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
var match;
|
||||
while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) {
|
||||
if (match[2]) return true;
|
||||
str = str.slice(match.index + match[0].length);
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
44
node_modules/fast-glob/node_modules/is-extglob/package.json
generated
vendored
Normal file
44
node_modules/fast-glob/node_modules/is-extglob/package.json
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "is-extglob",
|
||||
"description": "Returns true if a string has an extglob.",
|
||||
"version": "2.1.1",
|
||||
"homepage": "https://github.com/jonschlinkert/is-extglob",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"repository": "jonschlinkert/is-extglob",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^0.1.10",
|
||||
"mocha": "^3.0.2"
|
||||
},
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"has-glob",
|
||||
"is-glob",
|
||||
"micromatch"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"verb",
|
||||
"verb-generate-readme"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
||||
21
node_modules/fast-glob/node_modules/is-glob/LICENSE
generated
vendored
Normal file
21
node_modules/fast-glob/node_modules/is-glob/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
|
||||
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.
|
||||
46
node_modules/fast-glob/node_modules/is-glob/index.js
generated
vendored
Normal file
46
node_modules/fast-glob/node_modules/is-glob/index.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
/*!
|
||||
* is-glob <https://github.com/jonschlinkert/is-glob>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
var isExtglob = require('is-extglob');
|
||||
var chars = { '{': '}', '(': ')', '[': ']'};
|
||||
|
||||
module.exports = function isGlob(str, options) {
|
||||
if (typeof str !== 'string' || str === '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isExtglob(str)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var regex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
|
||||
var match;
|
||||
|
||||
// optionally relax regex
|
||||
if (options && options.strict === false) {
|
||||
regex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/;
|
||||
}
|
||||
|
||||
while ((match = regex.exec(str))) {
|
||||
if (match[2]) return true;
|
||||
var idx = match.index + match[0].length;
|
||||
|
||||
// if an open bracket/brace/paren is escaped,
|
||||
// set the index to the next closing character
|
||||
var open = match[1];
|
||||
var close = open ? chars[open] : null;
|
||||
if (open && close) {
|
||||
var n = str.indexOf(close, idx);
|
||||
if (n !== -1) {
|
||||
idx = n + 1;
|
||||
}
|
||||
}
|
||||
|
||||
str = str.slice(idx);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
51
node_modules/fast-glob/node_modules/is-glob/package.json
generated
vendored
Normal file
51
node_modules/fast-glob/node_modules/is-glob/package.json
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"name": "is-glob",
|
||||
"description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.",
|
||||
"version": "4.0.0",
|
||||
"homepage": "https://github.com/jonschlinkert/is-glob",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"repository": "jonschlinkert/is-glob",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-extglob": "^2.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^0.1.10",
|
||||
"mocha": "^3.0.2"
|
||||
},
|
||||
"verb": {
|
||||
"layout": "default",
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"assemble",
|
||||
"base",
|
||||
"update",
|
||||
"verb"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"assemble",
|
||||
"bach",
|
||||
"base",
|
||||
"composer",
|
||||
"gulp",
|
||||
"has-glob",
|
||||
"is-valid-glob",
|
||||
"micromatch",
|
||||
"npm",
|
||||
"scaffold",
|
||||
"verb",
|
||||
"vinyl"
|
||||
]
|
||||
}
|
||||
}
|
||||
61
node_modules/fast-glob/out/adapters/fs-stream.js
generated
vendored
Normal file
61
node_modules/fast-glob/out/adapters/fs-stream.js
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var stream = require("stream");
|
||||
var fsStat = require("@nodelib/fs.stat");
|
||||
var fs_1 = require("./fs");
|
||||
var FileSystemStream = /** @class */ (function (_super) {
|
||||
__extends(FileSystemStream, _super);
|
||||
function FileSystemStream() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
/**
|
||||
* Use stream API to read entries for Task.
|
||||
*/
|
||||
FileSystemStream.prototype.read = function (patterns, filter) {
|
||||
var _this = this;
|
||||
var filepaths = patterns.map(this.getFullEntryPath, this);
|
||||
var transform = new stream.Transform({ objectMode: true });
|
||||
transform._transform = function (index, _enc, done) {
|
||||
return _this.getEntry(filepaths[index], patterns[index]).then(function (entry) {
|
||||
if (entry !== null && filter(entry)) {
|
||||
transform.push(entry);
|
||||
}
|
||||
if (index === filepaths.length - 1) {
|
||||
transform.end();
|
||||
}
|
||||
done();
|
||||
});
|
||||
};
|
||||
for (var i = 0; i < filepaths.length; i++) {
|
||||
transform.write(i);
|
||||
}
|
||||
return transform;
|
||||
};
|
||||
/**
|
||||
* Return entry for the provided path.
|
||||
*/
|
||||
FileSystemStream.prototype.getEntry = function (filepath, pattern) {
|
||||
var _this = this;
|
||||
return this.getStat(filepath)
|
||||
.then(function (stat) { return _this.makeEntry(stat, pattern); })
|
||||
.catch(function () { return null; });
|
||||
};
|
||||
/**
|
||||
* Return fs.Stats for the provided path.
|
||||
*/
|
||||
FileSystemStream.prototype.getStat = function (filepath) {
|
||||
return fsStat.stat(filepath, { throwErrorOnBrokenSymlinks: false });
|
||||
};
|
||||
return FileSystemStream;
|
||||
}(fs_1.default));
|
||||
exports.default = FileSystemStream;
|
||||
56
node_modules/fast-glob/out/adapters/fs-sync.js
generated
vendored
Normal file
56
node_modules/fast-glob/out/adapters/fs-sync.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var fsStat = require("@nodelib/fs.stat");
|
||||
var fs_1 = require("./fs");
|
||||
var FileSystemSync = /** @class */ (function (_super) {
|
||||
__extends(FileSystemSync, _super);
|
||||
function FileSystemSync() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
/**
|
||||
* Use sync API to read entries for Task.
|
||||
*/
|
||||
FileSystemSync.prototype.read = function (patterns, filter) {
|
||||
var _this = this;
|
||||
var entries = [];
|
||||
patterns.forEach(function (pattern) {
|
||||
var filepath = _this.getFullEntryPath(pattern);
|
||||
var entry = _this.getEntry(filepath, pattern);
|
||||
if (entry === null || !filter(entry)) {
|
||||
return;
|
||||
}
|
||||
entries.push(entry);
|
||||
});
|
||||
return entries;
|
||||
};
|
||||
/**
|
||||
* Return entry for the provided path.
|
||||
*/
|
||||
FileSystemSync.prototype.getEntry = function (filepath, pattern) {
|
||||
try {
|
||||
var stat = this.getStat(filepath);
|
||||
return this.makeEntry(stat, pattern);
|
||||
}
|
||||
catch (err) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Return fs.Stats for the provided path.
|
||||
*/
|
||||
FileSystemSync.prototype.getStat = function (filepath) {
|
||||
return fsStat.statSync(filepath, { throwErrorOnBrokenSymlinks: false });
|
||||
};
|
||||
return FileSystemSync;
|
||||
}(fs_1.default));
|
||||
exports.default = FileSystemSync;
|
||||
25
node_modules/fast-glob/out/adapters/fs.js
generated
vendored
Normal file
25
node_modules/fast-glob/out/adapters/fs.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var path = require("path");
|
||||
var FileSystem = /** @class */ (function () {
|
||||
function FileSystem(options) {
|
||||
this.options = options;
|
||||
}
|
||||
/**
|
||||
* Return full path to entry.
|
||||
*/
|
||||
FileSystem.prototype.getFullEntryPath = function (filepath) {
|
||||
return path.resolve(this.options.cwd, filepath);
|
||||
};
|
||||
/**
|
||||
* Return an implementation of the Entry interface.
|
||||
*/
|
||||
FileSystem.prototype.makeEntry = function (stat, pattern) {
|
||||
return Object.assign(stat, {
|
||||
path: pattern,
|
||||
depth: pattern.split('/').length
|
||||
});
|
||||
};
|
||||
return FileSystem;
|
||||
}());
|
||||
exports.default = FileSystem;
|
||||
52
node_modules/fast-glob/out/index.js
generated
vendored
Normal file
52
node_modules/fast-glob/out/index.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var merge2 = require("merge2");
|
||||
var optionsManager = require("./managers/options");
|
||||
var taskManager = require("./managers/tasks");
|
||||
var reader_async_1 = require("./providers/reader-async");
|
||||
var reader_stream_1 = require("./providers/reader-stream");
|
||||
var reader_sync_1 = require("./providers/reader-sync");
|
||||
var arrayUtils = require("./utils/array");
|
||||
/**
|
||||
* Synchronous API.
|
||||
*/
|
||||
function sync(source, opts) {
|
||||
var works = getWorks(source, reader_sync_1.default, opts);
|
||||
return arrayUtils.flatten(works);
|
||||
}
|
||||
exports.sync = sync;
|
||||
/**
|
||||
* Asynchronous API.
|
||||
*/
|
||||
function async(source, opts) {
|
||||
var works = getWorks(source, reader_async_1.default, opts);
|
||||
return Promise.all(works).then(arrayUtils.flatten);
|
||||
}
|
||||
exports.async = async;
|
||||
/**
|
||||
* Stream API.
|
||||
*/
|
||||
function stream(source, opts) {
|
||||
var works = getWorks(source, reader_stream_1.default, opts);
|
||||
return merge2(works);
|
||||
}
|
||||
exports.stream = stream;
|
||||
/**
|
||||
* Return a set of tasks based on provided patterns.
|
||||
*/
|
||||
function generateTasks(source, opts) {
|
||||
var patterns = [].concat(source);
|
||||
var options = optionsManager.prepare(opts);
|
||||
return taskManager.generate(patterns, options);
|
||||
}
|
||||
exports.generateTasks = generateTasks;
|
||||
/**
|
||||
* Returns a set of works based on provided tasks and class of the reader.
|
||||
*/
|
||||
function getWorks(source, _Reader, opts) {
|
||||
var patterns = [].concat(source);
|
||||
var options = optionsManager.prepare(opts);
|
||||
var tasks = taskManager.generate(patterns, options);
|
||||
var reader = new _Reader(options);
|
||||
return tasks.map(reader.read, reader);
|
||||
}
|
||||
42
node_modules/fast-glob/out/managers/options.js
generated
vendored
Normal file
42
node_modules/fast-glob/out/managers/options.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
function prepare(options) {
|
||||
var opts = Object.assign({
|
||||
cwd: process.cwd(),
|
||||
deep: true,
|
||||
ignore: [],
|
||||
dot: false,
|
||||
stats: false,
|
||||
onlyFiles: true,
|
||||
onlyDirectories: false,
|
||||
followSymlinkedDirectories: true,
|
||||
unique: true,
|
||||
markDirectories: false,
|
||||
absolute: false,
|
||||
nobrace: false,
|
||||
brace: true,
|
||||
noglobstar: false,
|
||||
globstar: true,
|
||||
noext: false,
|
||||
extension: true,
|
||||
nocase: false,
|
||||
case: true,
|
||||
matchBase: false,
|
||||
transform: null
|
||||
}, options);
|
||||
if (opts.onlyDirectories) {
|
||||
opts.onlyFiles = false;
|
||||
}
|
||||
opts.brace = !opts.nobrace;
|
||||
opts.globstar = !opts.noglobstar;
|
||||
opts.extension = !opts.noext;
|
||||
opts.case = !opts.nocase;
|
||||
if (options) {
|
||||
opts.brace = ('brace' in options ? options.brace : opts.brace);
|
||||
opts.globstar = ('globstar' in options ? options.globstar : opts.globstar);
|
||||
opts.extension = ('extension' in options ? options.extension : opts.extension);
|
||||
opts.case = ('case' in options ? options.case : opts.case);
|
||||
}
|
||||
return opts;
|
||||
}
|
||||
exports.prepare = prepare;
|
||||
122
node_modules/fast-glob/out/managers/tasks.js
generated
vendored
Normal file
122
node_modules/fast-glob/out/managers/tasks.js
generated
vendored
Normal file
@@ -0,0 +1,122 @@
|
||||
"use strict";
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spread = (this && this.__spread) || function () {
|
||||
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
||||
return ar;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var patternUtils = require("../utils/pattern");
|
||||
/**
|
||||
* Generate tasks based on parent directory of each pattern.
|
||||
*/
|
||||
function generate(patterns, options) {
|
||||
var unixPatterns = patterns.map(patternUtils.unixifyPattern);
|
||||
var unixIgnore = options.ignore.map(patternUtils.unixifyPattern);
|
||||
var positivePatterns = getPositivePatterns(unixPatterns);
|
||||
var negativePatterns = getNegativePatternsAsPositive(unixPatterns, unixIgnore);
|
||||
var staticPatterns = positivePatterns.filter(patternUtils.isStaticPattern);
|
||||
var dynamicPatterns = positivePatterns.filter(patternUtils.isDynamicPattern);
|
||||
var staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false);
|
||||
var dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true);
|
||||
return staticTasks.concat(dynamicTasks);
|
||||
}
|
||||
exports.generate = generate;
|
||||
/**
|
||||
* Convert patterns to tasks based on parent directory of each pattern.
|
||||
*/
|
||||
function convertPatternsToTasks(positive, negative, dynamic) {
|
||||
var positivePatternsGroup = groupPatternsByBaseDirectory(positive);
|
||||
var negativePatternsGroup = groupPatternsByBaseDirectory(negative);
|
||||
// When we have a global group – there is no reason to divide the patterns into independent tasks.
|
||||
// In this case, the global task covers the rest.
|
||||
if ('.' in positivePatternsGroup) {
|
||||
var task = convertPatternGroupToTask('.', positive, negative, dynamic);
|
||||
return [task];
|
||||
}
|
||||
return convertPatternGroupsToTasks(positivePatternsGroup, negativePatternsGroup, dynamic);
|
||||
}
|
||||
exports.convertPatternsToTasks = convertPatternsToTasks;
|
||||
/**
|
||||
* Return only positive patterns.
|
||||
*/
|
||||
function getPositivePatterns(patterns) {
|
||||
return patternUtils.getPositivePatterns(patterns);
|
||||
}
|
||||
exports.getPositivePatterns = getPositivePatterns;
|
||||
/**
|
||||
* Return only negative patterns.
|
||||
*/
|
||||
function getNegativePatternsAsPositive(patterns, ignore) {
|
||||
var negative = patternUtils.getNegativePatterns(patterns).concat(ignore);
|
||||
var positive = negative.map(patternUtils.convertToPositivePattern);
|
||||
return positive;
|
||||
}
|
||||
exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
|
||||
/**
|
||||
* Group patterns by base directory of each pattern.
|
||||
*/
|
||||
function groupPatternsByBaseDirectory(patterns) {
|
||||
return patterns.reduce(function (collection, pattern) {
|
||||
var base = patternUtils.getBaseDirectory(pattern);
|
||||
if (base in collection) {
|
||||
collection[base].push(pattern);
|
||||
}
|
||||
else {
|
||||
collection[base] = [pattern];
|
||||
}
|
||||
return collection;
|
||||
}, {});
|
||||
}
|
||||
exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
|
||||
/**
|
||||
* Convert group of patterns to tasks.
|
||||
*/
|
||||
function convertPatternGroupsToTasks(positive, negative, dynamic) {
|
||||
var globalNegative = '.' in negative ? negative['.'] : [];
|
||||
return Object.keys(positive).map(function (base) {
|
||||
var localNegative = findLocalNegativePatterns(base, negative);
|
||||
var fullNegative = localNegative.concat(globalNegative);
|
||||
return convertPatternGroupToTask(base, positive[base], fullNegative, dynamic);
|
||||
});
|
||||
}
|
||||
exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
|
||||
/**
|
||||
* Returns those negative patterns whose base paths includes positive base path.
|
||||
*/
|
||||
function findLocalNegativePatterns(positiveBase, negative) {
|
||||
return Object.keys(negative).reduce(function (collection, base) {
|
||||
if (base.startsWith(positiveBase)) {
|
||||
collection.push.apply(collection, __spread(negative[base]));
|
||||
}
|
||||
return collection;
|
||||
}, []);
|
||||
}
|
||||
exports.findLocalNegativePatterns = findLocalNegativePatterns;
|
||||
/**
|
||||
* Create a task for positive and negative patterns.
|
||||
*/
|
||||
function convertPatternGroupToTask(base, positive, negative, dynamic) {
|
||||
return {
|
||||
base: base,
|
||||
dynamic: dynamic,
|
||||
patterns: [].concat(positive, negative.map(patternUtils.convertToNegativePattern)),
|
||||
positive: positive,
|
||||
negative: negative
|
||||
};
|
||||
}
|
||||
exports.convertPatternGroupToTask = convertPatternGroupToTask;
|
||||
88
node_modules/fast-glob/out/providers/filters/deep.js
generated
vendored
Normal file
88
node_modules/fast-glob/out/providers/filters/deep.js
generated
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var arrayUtils = require("../../utils/array");
|
||||
var pathUtils = require("../../utils/path");
|
||||
var patternUtils = require("../../utils/pattern");
|
||||
var DeepFilter = /** @class */ (function () {
|
||||
function DeepFilter(options, micromatchOptions) {
|
||||
this.options = options;
|
||||
this.micromatchOptions = micromatchOptions;
|
||||
}
|
||||
/**
|
||||
* Returns filter for directories.
|
||||
*/
|
||||
DeepFilter.prototype.getFilter = function (positive, negative) {
|
||||
var _this = this;
|
||||
var maxPatternDepth = this.getMaxPatternDepth(positive);
|
||||
var negativeRe = this.getNegativePatternsRe(negative);
|
||||
return function (entry) { return _this.filter(entry, negativeRe, maxPatternDepth); };
|
||||
};
|
||||
/**
|
||||
* Returns max depth of the provided patterns.
|
||||
*/
|
||||
DeepFilter.prototype.getMaxPatternDepth = function (patterns) {
|
||||
var globstar = patterns.some(patternUtils.hasGlobStar);
|
||||
var patternDepths = patterns.map(patternUtils.getDepth);
|
||||
return globstar ? Infinity : arrayUtils.max(patternDepths);
|
||||
};
|
||||
/**
|
||||
* Returns RegExp's for patterns that can affect the depth of reading.
|
||||
*/
|
||||
DeepFilter.prototype.getNegativePatternsRe = function (patterns) {
|
||||
var affectDepthOfReadingPatterns = patterns.filter(patternUtils.isAffectDepthOfReadingPattern);
|
||||
return patternUtils.convertPatternsToRe(affectDepthOfReadingPatterns, this.micromatchOptions);
|
||||
};
|
||||
/**
|
||||
* Returns «true» for directory that should be readed.
|
||||
*/
|
||||
DeepFilter.prototype.filter = function (entry, negativeRe, maxPatternDepth) {
|
||||
if (this.isSkippedByNestingLevel(entry.depth, maxPatternDepth)) {
|
||||
return false;
|
||||
}
|
||||
if (this.isSkippedSymlinkedDirectory(entry)) {
|
||||
return false;
|
||||
}
|
||||
if (this.isSkippedDotDirectory(entry)) {
|
||||
return false;
|
||||
}
|
||||
return this.isSkippedByNegativePatterns(entry, negativeRe);
|
||||
};
|
||||
/**
|
||||
* Returns «true» when the directory can be skipped by nesting level.
|
||||
*/
|
||||
DeepFilter.prototype.isSkippedByNestingLevel = function (entryDepth, maxPatternDepth) {
|
||||
return this.isSkippedByDeepOption(entryDepth) || this.isSkippedByMaxPatternDepth(entryDepth, maxPatternDepth);
|
||||
};
|
||||
/**
|
||||
* Returns «true» when the «deep» option is disabled or number and depth of the entry is greater that the option value.
|
||||
*/
|
||||
DeepFilter.prototype.isSkippedByDeepOption = function (entryDepth) {
|
||||
return !this.options.deep || (typeof this.options.deep === 'number' && entryDepth > this.options.deep);
|
||||
};
|
||||
/**
|
||||
* Returns «true» when depth parameter is not an Infinity and entry depth greater that the parameter value.
|
||||
*/
|
||||
DeepFilter.prototype.isSkippedByMaxPatternDepth = function (entryDepth, maxPatternDepth) {
|
||||
return maxPatternDepth !== Infinity && entryDepth > maxPatternDepth;
|
||||
};
|
||||
/**
|
||||
* Returns «true» for symlinked directory if the «followSymlinkedDirectories» option is disabled.
|
||||
*/
|
||||
DeepFilter.prototype.isSkippedSymlinkedDirectory = function (entry) {
|
||||
return !this.options.followSymlinkedDirectories && entry.isSymbolicLink();
|
||||
};
|
||||
/**
|
||||
* Returns «true» for a directory whose name starts with a period if «dot» option is disabled.
|
||||
*/
|
||||
DeepFilter.prototype.isSkippedDotDirectory = function (entry) {
|
||||
return !this.options.dot && pathUtils.isDotDirectory(entry.path);
|
||||
};
|
||||
/**
|
||||
* Returns «true» for a directory whose path math to any negative pattern.
|
||||
*/
|
||||
DeepFilter.prototype.isSkippedByNegativePatterns = function (entry, negativeRe) {
|
||||
return !patternUtils.matchAny(entry.path, negativeRe);
|
||||
};
|
||||
return DeepFilter;
|
||||
}());
|
||||
exports.default = DeepFilter;
|
||||
71
node_modules/fast-glob/out/providers/filters/entry.js
generated
vendored
Normal file
71
node_modules/fast-glob/out/providers/filters/entry.js
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var patternUtils = require("../../utils/pattern");
|
||||
var DeepFilter = /** @class */ (function () {
|
||||
function DeepFilter(options, micromatchOptions) {
|
||||
this.options = options;
|
||||
this.micromatchOptions = micromatchOptions;
|
||||
this.index = new Map();
|
||||
}
|
||||
/**
|
||||
* Returns filter for directories.
|
||||
*/
|
||||
DeepFilter.prototype.getFilter = function (positive, negative) {
|
||||
var _this = this;
|
||||
var positiveRe = patternUtils.convertPatternsToRe(positive, this.micromatchOptions);
|
||||
var negativeRe = patternUtils.convertPatternsToRe(negative, this.micromatchOptions);
|
||||
return function (entry) { return _this.filter(entry, positiveRe, negativeRe); };
|
||||
};
|
||||
/**
|
||||
* Returns true if entry must be added to result.
|
||||
*/
|
||||
DeepFilter.prototype.filter = function (entry, positiveRe, negativeRe) {
|
||||
// Exclude duplicate results
|
||||
if (this.options.unique) {
|
||||
if (this.isDuplicateEntry(entry)) {
|
||||
return false;
|
||||
}
|
||||
this.createIndexRecord(entry);
|
||||
}
|
||||
// Filter files and directories by options
|
||||
if (this.onlyFileFilter(entry) || this.onlyDirectoryFilter(entry)) {
|
||||
return false;
|
||||
}
|
||||
return this.isMatchToPatterns(entry, positiveRe) && !this.isMatchToPatterns(entry, negativeRe);
|
||||
};
|
||||
/**
|
||||
* Return true if the entry already has in the cross reader index.
|
||||
*/
|
||||
DeepFilter.prototype.isDuplicateEntry = function (entry) {
|
||||
return this.index.has(entry.path);
|
||||
};
|
||||
/**
|
||||
* Create record in the cross reader index.
|
||||
*/
|
||||
DeepFilter.prototype.createIndexRecord = function (entry) {
|
||||
this.index.set(entry.path, undefined);
|
||||
};
|
||||
/**
|
||||
* Returns true for non-files if the «onlyFiles» option is enabled.
|
||||
*/
|
||||
DeepFilter.prototype.onlyFileFilter = function (entry) {
|
||||
return this.options.onlyFiles && !entry.isFile();
|
||||
};
|
||||
/**
|
||||
* Returns true for non-directories if the «onlyDirectories» option is enabled.
|
||||
*/
|
||||
DeepFilter.prototype.onlyDirectoryFilter = function (entry) {
|
||||
return this.options.onlyDirectories && !entry.isDirectory();
|
||||
};
|
||||
/**
|
||||
* Return true when entry match to provided patterns.
|
||||
*
|
||||
* First, just trying to apply patterns to the path.
|
||||
* Second, trying to apply patterns to the path with final slash (need to micromatch to support «directory/**» patterns).
|
||||
*/
|
||||
DeepFilter.prototype.isMatchToPatterns = function (entry, patternsRe) {
|
||||
return patternUtils.matchAny(entry.path, patternsRe) || patternUtils.matchAny(entry.path + '/', patternsRe);
|
||||
};
|
||||
return DeepFilter;
|
||||
}());
|
||||
exports.default = DeepFilter;
|
||||
72
node_modules/fast-glob/out/providers/reader-async.js
generated
vendored
Normal file
72
node_modules/fast-glob/out/providers/reader-async.js
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var readdir = require("@mrmlnc/readdir-enhanced");
|
||||
var reader_1 = require("./reader");
|
||||
var fs_stream_1 = require("../adapters/fs-stream");
|
||||
var ReaderAsync = /** @class */ (function (_super) {
|
||||
__extends(ReaderAsync, _super);
|
||||
function ReaderAsync() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
Object.defineProperty(ReaderAsync.prototype, "fsAdapter", {
|
||||
/**
|
||||
* Returns FileSystem adapter.
|
||||
*/
|
||||
get: function () {
|
||||
return new fs_stream_1.default(this.options);
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
/**
|
||||
* Use async API to read entries for Task.
|
||||
*/
|
||||
ReaderAsync.prototype.read = function (task) {
|
||||
var _this = this;
|
||||
var root = this.getRootDirectory(task);
|
||||
var options = this.getReaderOptions(task);
|
||||
var entries = [];
|
||||
return new Promise(function (resolve, reject) {
|
||||
var stream = _this.api(root, task, options);
|
||||
stream.on('error', function (err) {
|
||||
_this.isEnoentCodeError(err) ? resolve([]) : reject(err);
|
||||
stream.pause();
|
||||
});
|
||||
stream.on('data', function (entry) { return entries.push(_this.transform(entry)); });
|
||||
stream.on('end', function () { return resolve(entries); });
|
||||
});
|
||||
};
|
||||
/**
|
||||
* Returns founded paths.
|
||||
*/
|
||||
ReaderAsync.prototype.api = function (root, task, options) {
|
||||
if (task.dynamic) {
|
||||
return this.dynamicApi(root, options);
|
||||
}
|
||||
return this.staticApi(task, options);
|
||||
};
|
||||
/**
|
||||
* Api for dynamic tasks.
|
||||
*/
|
||||
ReaderAsync.prototype.dynamicApi = function (root, options) {
|
||||
return readdir.readdirStreamStat(root, options);
|
||||
};
|
||||
/**
|
||||
* Api for static tasks.
|
||||
*/
|
||||
ReaderAsync.prototype.staticApi = function (task, options) {
|
||||
return this.fsAdapter.read(task.patterns, options.filter);
|
||||
};
|
||||
return ReaderAsync;
|
||||
}(reader_1.default));
|
||||
exports.default = ReaderAsync;
|
||||
80
node_modules/fast-glob/out/providers/reader-stream.js
generated
vendored
Normal file
80
node_modules/fast-glob/out/providers/reader-stream.js
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var stream = require("stream");
|
||||
var readdir = require("@mrmlnc/readdir-enhanced");
|
||||
var reader_1 = require("./reader");
|
||||
var fs_stream_1 = require("../adapters/fs-stream");
|
||||
var TransformStream = /** @class */ (function (_super) {
|
||||
__extends(TransformStream, _super);
|
||||
function TransformStream(reader) {
|
||||
var _this = _super.call(this, { objectMode: true }) || this;
|
||||
_this.reader = reader;
|
||||
return _this;
|
||||
}
|
||||
TransformStream.prototype._transform = function (entry, _encoding, callback) {
|
||||
callback(null, this.reader.transform(entry));
|
||||
};
|
||||
return TransformStream;
|
||||
}(stream.Transform));
|
||||
var ReaderStream = /** @class */ (function (_super) {
|
||||
__extends(ReaderStream, _super);
|
||||
function ReaderStream() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
Object.defineProperty(ReaderStream.prototype, "fsAdapter", {
|
||||
/**
|
||||
* Returns FileSystem adapter.
|
||||
*/
|
||||
get: function () {
|
||||
return new fs_stream_1.default(this.options);
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
/**
|
||||
* Use stream API to read entries for Task.
|
||||
*/
|
||||
ReaderStream.prototype.read = function (task) {
|
||||
var _this = this;
|
||||
var root = this.getRootDirectory(task);
|
||||
var options = this.getReaderOptions(task);
|
||||
var transform = new TransformStream(this);
|
||||
var readable = this.api(root, task, options);
|
||||
return readable
|
||||
.once('error', function (err) { return _this.isEnoentCodeError(err) ? null : transform.emit('error', err); })
|
||||
.pipe(transform);
|
||||
};
|
||||
/**
|
||||
* Returns founded paths.
|
||||
*/
|
||||
ReaderStream.prototype.api = function (root, task, options) {
|
||||
if (task.dynamic) {
|
||||
return this.dynamicApi(root, options);
|
||||
}
|
||||
return this.staticApi(task, options);
|
||||
};
|
||||
/**
|
||||
* Api for dynamic tasks.
|
||||
*/
|
||||
ReaderStream.prototype.dynamicApi = function (root, options) {
|
||||
return readdir.readdirStreamStat(root, options);
|
||||
};
|
||||
/**
|
||||
* Api for static tasks.
|
||||
*/
|
||||
ReaderStream.prototype.staticApi = function (task, options) {
|
||||
return this.fsAdapter.read(task.patterns, options.filter);
|
||||
};
|
||||
return ReaderStream;
|
||||
}(reader_1.default));
|
||||
exports.default = ReaderStream;
|
||||
71
node_modules/fast-glob/out/providers/reader-sync.js
generated
vendored
Normal file
71
node_modules/fast-glob/out/providers/reader-sync.js
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var readdir = require("@mrmlnc/readdir-enhanced");
|
||||
var reader_1 = require("./reader");
|
||||
var fs_sync_1 = require("../adapters/fs-sync");
|
||||
var ReaderSync = /** @class */ (function (_super) {
|
||||
__extends(ReaderSync, _super);
|
||||
function ReaderSync() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
Object.defineProperty(ReaderSync.prototype, "fsAdapter", {
|
||||
/**
|
||||
* Returns FileSystem adapter.
|
||||
*/
|
||||
get: function () {
|
||||
return new fs_sync_1.default(this.options);
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
/**
|
||||
* Use sync API to read entries for Task.
|
||||
*/
|
||||
ReaderSync.prototype.read = function (task) {
|
||||
var root = this.getRootDirectory(task);
|
||||
var options = this.getReaderOptions(task);
|
||||
try {
|
||||
var entries = this.api(root, task, options);
|
||||
return entries.map(this.transform, this);
|
||||
}
|
||||
catch (err) {
|
||||
if (this.isEnoentCodeError(err)) {
|
||||
return [];
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Returns founded paths.
|
||||
*/
|
||||
ReaderSync.prototype.api = function (root, task, options) {
|
||||
if (task.dynamic) {
|
||||
return this.dynamicApi(root, options);
|
||||
}
|
||||
return this.staticApi(task, options);
|
||||
};
|
||||
/**
|
||||
* Api for dynamic tasks.
|
||||
*/
|
||||
ReaderSync.prototype.dynamicApi = function (root, options) {
|
||||
return readdir.readdirSyncStat(root, options);
|
||||
};
|
||||
/**
|
||||
* Api for static tasks.
|
||||
*/
|
||||
ReaderSync.prototype.staticApi = function (task, options) {
|
||||
return this.fsAdapter.read(task.patterns, options.filter);
|
||||
};
|
||||
return ReaderSync;
|
||||
}(reader_1.default));
|
||||
exports.default = ReaderSync;
|
||||
69
node_modules/fast-glob/out/providers/reader.js
generated
vendored
Normal file
69
node_modules/fast-glob/out/providers/reader.js
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var path = require("path");
|
||||
var deep_1 = require("./filters/deep");
|
||||
var entry_1 = require("./filters/entry");
|
||||
var pathUtil = require("../utils/path");
|
||||
var Reader = /** @class */ (function () {
|
||||
function Reader(options) {
|
||||
this.options = options;
|
||||
this.micromatchOptions = this.getMicromatchOptions();
|
||||
this.entryFilter = new entry_1.default(options, this.micromatchOptions);
|
||||
this.deepFilter = new deep_1.default(options, this.micromatchOptions);
|
||||
}
|
||||
/**
|
||||
* Returns root path to scanner.
|
||||
*/
|
||||
Reader.prototype.getRootDirectory = function (task) {
|
||||
return path.resolve(this.options.cwd, task.base);
|
||||
};
|
||||
/**
|
||||
* Returns options for reader.
|
||||
*/
|
||||
Reader.prototype.getReaderOptions = function (task) {
|
||||
return {
|
||||
basePath: task.base === '.' ? '' : task.base,
|
||||
filter: this.entryFilter.getFilter(task.positive, task.negative),
|
||||
deep: this.deepFilter.getFilter(task.positive, task.negative),
|
||||
sep: '/'
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Returns options for micromatch.
|
||||
*/
|
||||
Reader.prototype.getMicromatchOptions = function () {
|
||||
return {
|
||||
dot: this.options.dot,
|
||||
nobrace: !this.options.brace,
|
||||
noglobstar: !this.options.globstar,
|
||||
noext: !this.options.extension,
|
||||
nocase: !this.options.case,
|
||||
matchBase: this.options.matchBase
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Returns transformed entry.
|
||||
*/
|
||||
Reader.prototype.transform = function (entry) {
|
||||
if (this.options.markDirectories && entry.isDirectory()) {
|
||||
entry.path += '/';
|
||||
}
|
||||
if (this.options.absolute && !path.isAbsolute(entry.path)) {
|
||||
entry.path = pathUtil.resolve(this.options.cwd, entry.path);
|
||||
entry.path = pathUtil.normalize(entry.path);
|
||||
}
|
||||
var item = this.options.stats ? entry : entry.path;
|
||||
if (this.options.transform === null) {
|
||||
return item;
|
||||
}
|
||||
return this.options.transform(item);
|
||||
};
|
||||
/**
|
||||
* Returns true if error has ENOENT code.
|
||||
*/
|
||||
Reader.prototype.isEnoentCodeError = function (err) {
|
||||
return err.code === 'ENOENT';
|
||||
};
|
||||
return Reader;
|
||||
}());
|
||||
exports.default = Reader;
|
||||
2
node_modules/fast-glob/out/types/entries.js
generated
vendored
Normal file
2
node_modules/fast-glob/out/types/entries.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
2
node_modules/fast-glob/out/types/patterns.js
generated
vendored
Normal file
2
node_modules/fast-glob/out/types/patterns.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
16
node_modules/fast-glob/out/utils/array.js
generated
vendored
Normal file
16
node_modules/fast-glob/out/utils/array.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
/**
|
||||
* Flatten nested arrays (max depth is 2) into a non-nested array of non-array items.
|
||||
*/
|
||||
function flatten(items) {
|
||||
return items.reduce(function (collection, item) { return [].concat(collection, item); }, []);
|
||||
}
|
||||
exports.flatten = flatten;
|
||||
/**
|
||||
* Returns max number from array.
|
||||
*/
|
||||
function max(items) {
|
||||
return Math.max.apply(null, items);
|
||||
}
|
||||
exports.max = max;
|
||||
31
node_modules/fast-glob/out/utils/path.js
generated
vendored
Normal file
31
node_modules/fast-glob/out/utils/path.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var path = require("path");
|
||||
/**
|
||||
* Returns «true» if the last partial of the path starting with a period.
|
||||
*/
|
||||
function isDotDirectory(filepath) {
|
||||
return path.basename(filepath).startsWith('.');
|
||||
}
|
||||
exports.isDotDirectory = isDotDirectory;
|
||||
/**
|
||||
* Return naive depth of provided filepath.
|
||||
*/
|
||||
function getDepth(filepath) {
|
||||
return filepath.split('/').length;
|
||||
}
|
||||
exports.getDepth = getDepth;
|
||||
/**
|
||||
* Return resolved a sequence of paths segments into an absolute path.
|
||||
*/
|
||||
function resolve(from, to) {
|
||||
return path.resolve(from, to);
|
||||
}
|
||||
exports.resolve = resolve;
|
||||
/**
|
||||
* Convert a windows-like path to a unix-style path.
|
||||
*/
|
||||
function normalize(filepath) {
|
||||
return filepath.replace(/\\/g, '/');
|
||||
}
|
||||
exports.normalize = normalize;
|
||||
153
node_modules/fast-glob/out/utils/pattern.js
generated
vendored
Normal file
153
node_modules/fast-glob/out/utils/pattern.js
generated
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
"use strict";
|
||||
var __values = (this && this.__values) || function (o) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
|
||||
if (m) return m.call(o);
|
||||
return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var path = require("path");
|
||||
var globParent = require("glob-parent");
|
||||
var isGlob = require("is-glob");
|
||||
var micromatch = require("micromatch");
|
||||
var GLOBSTAR = '**';
|
||||
/**
|
||||
* Return true for static pattern.
|
||||
*/
|
||||
function isStaticPattern(pattern) {
|
||||
return !isDynamicPattern(pattern);
|
||||
}
|
||||
exports.isStaticPattern = isStaticPattern;
|
||||
/**
|
||||
* Return true for pattern that looks like glob.
|
||||
*/
|
||||
function isDynamicPattern(pattern) {
|
||||
return isGlob(pattern);
|
||||
}
|
||||
exports.isDynamicPattern = isDynamicPattern;
|
||||
/**
|
||||
* Convert a windows «path» to a unix-style «path».
|
||||
*/
|
||||
function unixifyPattern(pattern) {
|
||||
return pattern.replace(/\\/g, '/');
|
||||
}
|
||||
exports.unixifyPattern = unixifyPattern;
|
||||
/**
|
||||
* Returns negative pattern as positive pattern.
|
||||
*/
|
||||
function convertToPositivePattern(pattern) {
|
||||
return isNegativePattern(pattern) ? pattern.slice(1) : pattern;
|
||||
}
|
||||
exports.convertToPositivePattern = convertToPositivePattern;
|
||||
/**
|
||||
* Returns positive pattern as negative pattern.
|
||||
*/
|
||||
function convertToNegativePattern(pattern) {
|
||||
return '!' + pattern;
|
||||
}
|
||||
exports.convertToNegativePattern = convertToNegativePattern;
|
||||
/**
|
||||
* Return true if provided pattern is negative pattern.
|
||||
*/
|
||||
function isNegativePattern(pattern) {
|
||||
return pattern.startsWith('!') && pattern[1] !== '(';
|
||||
}
|
||||
exports.isNegativePattern = isNegativePattern;
|
||||
/**
|
||||
* Return true if provided pattern is positive pattern.
|
||||
*/
|
||||
function isPositivePattern(pattern) {
|
||||
return !isNegativePattern(pattern);
|
||||
}
|
||||
exports.isPositivePattern = isPositivePattern;
|
||||
/**
|
||||
* Extracts negative patterns from array of patterns.
|
||||
*/
|
||||
function getNegativePatterns(patterns) {
|
||||
return patterns.filter(isNegativePattern);
|
||||
}
|
||||
exports.getNegativePatterns = getNegativePatterns;
|
||||
/**
|
||||
* Extracts positive patterns from array of patterns.
|
||||
*/
|
||||
function getPositivePatterns(patterns) {
|
||||
return patterns.filter(isPositivePattern);
|
||||
}
|
||||
exports.getPositivePatterns = getPositivePatterns;
|
||||
/**
|
||||
* Extract base directory from provided pattern.
|
||||
*/
|
||||
function getBaseDirectory(pattern) {
|
||||
return globParent(pattern);
|
||||
}
|
||||
exports.getBaseDirectory = getBaseDirectory;
|
||||
/**
|
||||
* Return true if provided pattern has globstar.
|
||||
*/
|
||||
function hasGlobStar(pattern) {
|
||||
return pattern.indexOf(GLOBSTAR) !== -1;
|
||||
}
|
||||
exports.hasGlobStar = hasGlobStar;
|
||||
/**
|
||||
* Return true if provided pattern ends with slash and globstar.
|
||||
*/
|
||||
function endsWithSlashGlobStar(pattern) {
|
||||
return pattern.endsWith('/' + GLOBSTAR);
|
||||
}
|
||||
exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
||||
/**
|
||||
* Returns «true» when pattern ends with a slash and globstar or the last partial of the pattern is static pattern.
|
||||
*/
|
||||
function isAffectDepthOfReadingPattern(pattern) {
|
||||
var basename = path.basename(pattern);
|
||||
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
||||
}
|
||||
exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
|
||||
/**
|
||||
* Return naive depth of provided pattern.
|
||||
*/
|
||||
function getDepth(pattern) {
|
||||
return pattern.split('/').length;
|
||||
}
|
||||
exports.getDepth = getDepth;
|
||||
/**
|
||||
* Make RegExp for provided pattern.
|
||||
*/
|
||||
function makeRe(pattern, options) {
|
||||
return micromatch.makeRe(pattern, options);
|
||||
}
|
||||
exports.makeRe = makeRe;
|
||||
/**
|
||||
* Convert patterns to regexps.
|
||||
*/
|
||||
function convertPatternsToRe(patterns, options) {
|
||||
return patterns.map(function (pattern) { return makeRe(pattern, options); });
|
||||
}
|
||||
exports.convertPatternsToRe = convertPatternsToRe;
|
||||
/**
|
||||
* Returns true if the entry match any of the given RegExp's.
|
||||
*/
|
||||
function matchAny(entry, patternsRe) {
|
||||
try {
|
||||
for (var patternsRe_1 = __values(patternsRe), patternsRe_1_1 = patternsRe_1.next(); !patternsRe_1_1.done; patternsRe_1_1 = patternsRe_1.next()) {
|
||||
var regexp = patternsRe_1_1.value;
|
||||
if (regexp.test(entry)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (patternsRe_1_1 && !patternsRe_1_1.done && (_a = patternsRe_1.return)) _a.call(patternsRe_1);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
return false;
|
||||
var e_1, _a;
|
||||
}
|
||||
exports.matchAny = matchAny;
|
||||
55
node_modules/fast-glob/package.json
generated
vendored
Normal file
55
node_modules/fast-glob/package.json
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"name": "fast-glob",
|
||||
"version": "2.2.2",
|
||||
"description": "Is a faster `node-glob` alternative",
|
||||
"license": "MIT",
|
||||
"repository": "mrmlnc/fast-glob",
|
||||
"author": {
|
||||
"name": "Denis Malinochkin",
|
||||
"url": "canonium.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
},
|
||||
"main": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"devDependencies": {
|
||||
"@types/bash-glob": "^2.0.0",
|
||||
"@types/compute-stdev": "^1.0.0",
|
||||
"@types/easy-table": "0.0.31",
|
||||
"@types/execa": "^0.9.0",
|
||||
"@types/glob": "^5.0.35",
|
||||
"@types/glob-parent": "^3.1.0",
|
||||
"@types/glob-stream": "^6.1.0",
|
||||
"@types/globby": "^6.1.0",
|
||||
"@types/is-glob": "^4.0.0",
|
||||
"@types/merge2": "^1.1.4",
|
||||
"@types/micromatch": "^3.1.0",
|
||||
"@types/minimist": "^1.2.0",
|
||||
"@types/mocha": "^5.2.0",
|
||||
"@types/node": "^9.6.6",
|
||||
"@types/rimraf": "2.0.2",
|
||||
"bash-glob": "^2.0.0",
|
||||
"compute-stdev": "^1.0.0",
|
||||
"easy-table": "^1.1.1",
|
||||
"execa": "^0.10.0",
|
||||
"fast-glob": "^2.2.0",
|
||||
"glob": "^7.1.2",
|
||||
"glob-stream": "^6.1.0",
|
||||
"globby": "^8.0.1",
|
||||
"minimist": "^1.2.0",
|
||||
"mocha": "^5.1.1",
|
||||
"rimraf": "^2.6.2",
|
||||
"tslint": "^5.9.1",
|
||||
"tslint-config-mrmlnc": "^1.0.0",
|
||||
"typescript": "^2.8.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mrmlnc/readdir-enhanced": "^2.2.1",
|
||||
"@nodelib/fs.stat": "^1.0.1",
|
||||
"glob-parent": "^3.1.0",
|
||||
"is-glob": "^4.0.0",
|
||||
"merge2": "^1.2.1",
|
||||
"micromatch": "^3.1.10"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user