NUEVA BUSQUEDA DE DATOS SRI
This commit is contained in:
8
node_modules/readdirp/README.md
generated
vendored
8
node_modules/readdirp/README.md
generated
vendored
@@ -1,8 +1,7 @@
|
||||
# readdirp [](https://github.com/paulmillr/readdirp)
|
||||
|
||||
> Recursive version of [fs.readdir](https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback). Exposes a **stream API** and a **promise API**.
|
||||
Recursive version of [fs.readdir](https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback). Exposes a **stream API** and a **promise API**.
|
||||
|
||||
[](https://www.npmjs.com/package/readdirp)
|
||||
|
||||
```sh
|
||||
npm install readdirp
|
||||
@@ -79,7 +78,7 @@ First argument is awalys `root`, path in which to start reading and recursing in
|
||||
- `directoryFilter: ['!.git']`: filter to include/exclude directories found and to recurse into. Directories that do not pass a filter will not be recursed into.
|
||||
- `depth: 5`: depth at which to stop recursing even if more subdirectories are found
|
||||
- `type: 'files'`: determines if data events on the stream should be emitted for `'files'` (default), `'directories'`, `'files_directories'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes.
|
||||
- `alwaysStat: false`: always return `stats` property for every file. Setting it to `true` can double readdir execution time - use it only when you need file `size`, `mtime` etc. Cannot be enabled on node <10.10.0.
|
||||
- `alwaysStat: false`: always return `stats` property for every file. Default is `false`, readdirp will return `Dirent` entries. Setting it to `true` can double readdir execution time - use it only when you need file `size`, `mtime` etc. Cannot be enabled on node <10.10.0.
|
||||
- `lstat: false`: include symlink entries in the stream along with files. When `true`, `fs.lstat` would be used instead of `fs.stat`
|
||||
|
||||
### `EntryInfo`
|
||||
@@ -94,6 +93,9 @@ Has the following properties:
|
||||
|
||||
## Changelog
|
||||
|
||||
- 3.5 (Oct 13, 2020) disallows recursive directory-based symlinks.
|
||||
Before, it could have entered infinite loop.
|
||||
- 3.4 (Mar 19, 2020) adds support for directory-based symlinks.
|
||||
- 3.3 (Dec 6, 2019) stabilizes RAM consumption and enables perf management with `highWaterMark` option. Fixes race conditions related to `for-await` looping.
|
||||
- 3.2 (Oct 14, 2019) improves performance by 250% and makes streams implementation more idiomatic.
|
||||
- 3.1 (Jul 7, 2019) brings `bigint` support to `stat` output on Windows. This is backwards-incompatible for some cases. Be careful. It you use it incorrectly, you'll see "TypeError: Cannot mix BigInt and other types, use explicit conversions".
|
||||
|
||||
2
node_modules/readdirp/index.d.ts
generated
vendored
2
node_modules/readdirp/index.d.ts
generated
vendored
@@ -17,7 +17,7 @@ declare namespace readdir {
|
||||
interface ReaddirpOptions {
|
||||
root?: string;
|
||||
fileFilter?: string | string[] | ((entry: EntryInfo) => boolean);
|
||||
directoryFilter?: (entry: EntryInfo) => boolean;
|
||||
directoryFilter?: string | string[] | ((entry: EntryInfo) => boolean);
|
||||
type?: 'files' | 'directories' | 'files_directories' | 'all';
|
||||
lstat?: boolean;
|
||||
depth?: number;
|
||||
|
||||
77
node_modules/readdirp/index.js
generated
vendored
77
node_modules/readdirp/index.js
generated
vendored
@@ -9,6 +9,7 @@ const picomatch = require('picomatch');
|
||||
const readdir = promisify(fs.readdir);
|
||||
const stat = promisify(fs.stat);
|
||||
const lstat = promisify(fs.lstat);
|
||||
const realpath = promisify(fs.realpath);
|
||||
|
||||
/**
|
||||
* @typedef {Object} EntryInfo
|
||||
@@ -20,7 +21,8 @@ const lstat = promisify(fs.lstat);
|
||||
*/
|
||||
|
||||
const BANG = '!';
|
||||
const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP']);
|
||||
const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR';
|
||||
const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]);
|
||||
const FILE_TYPE = 'files';
|
||||
const DIR_TYPE = 'directories';
|
||||
const FILE_DIR_TYPE = 'files_directories';
|
||||
@@ -28,6 +30,8 @@ const EVERYTHING_TYPE = 'all';
|
||||
const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE];
|
||||
|
||||
const isNormalFlowError = error => NORMAL_FLOW_ERRORS.has(error.code);
|
||||
const [maj, min] = process.versions.node.split('.').slice(0, 2).map(n => Number.parseInt(n, 10));
|
||||
const wantBigintFsStats = process.platform === 'win32' && (maj > 10 || (maj === 10 && min >= 5));
|
||||
|
||||
const normalizeFilter = filter => {
|
||||
if (filter === undefined) return;
|
||||
@@ -90,7 +94,7 @@ class ReaddirpStream extends Readable {
|
||||
|
||||
const statMethod = opts.lstat ? lstat : stat;
|
||||
// Use bigint stats if it's windows and stat() supports options (node 10+).
|
||||
if (process.platform === 'win32' && stat.length === 3) {
|
||||
if (wantBigintFsStats) {
|
||||
this._stat = path => statMethod(path, { bigint: true });
|
||||
} else {
|
||||
this._stat = statMethod;
|
||||
@@ -106,11 +110,7 @@ class ReaddirpStream extends Readable {
|
||||
this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent };
|
||||
|
||||
// Launch stream with one parent, the root dir.
|
||||
try {
|
||||
this.parents = [this._exploreDir(root, 1)];
|
||||
} catch (error) {
|
||||
this.destroy(error);
|
||||
}
|
||||
this.parents = [this._exploreDir(root, 1)];
|
||||
this.reading = false;
|
||||
this.parent = undefined;
|
||||
}
|
||||
@@ -126,7 +126,10 @@ class ReaddirpStream extends Readable {
|
||||
if (files.length > 0) {
|
||||
const slice = files.splice(0, batch).map(dirent => this._formatEntry(dirent, path));
|
||||
for (const entry of await Promise.all(slice)) {
|
||||
if (this._isDirAndMatchesFilter(entry)) {
|
||||
if (this.destroyed) return;
|
||||
|
||||
const entryType = await this._getEntryType(entry);
|
||||
if (entryType === 'directory' && this._directoryFilter(entry)) {
|
||||
if (depth <= this._maxDepth) {
|
||||
this.parents.push(this._exploreDir(entry.fullPath, depth + 1));
|
||||
}
|
||||
@@ -135,7 +138,7 @@ class ReaddirpStream extends Readable {
|
||||
this.push(entry);
|
||||
batch--;
|
||||
}
|
||||
} else if (this._isFileAndMatchesFilter(entry)) {
|
||||
} else if ((entryType === 'file' || this._includeAsFile(entry)) && this._fileFilter(entry)) {
|
||||
if (this._wantsFile) {
|
||||
this.push(entry);
|
||||
batch--;
|
||||
@@ -149,6 +152,7 @@ class ReaddirpStream extends Readable {
|
||||
break;
|
||||
}
|
||||
this.parent = await parent;
|
||||
if (this.destroyed) return;
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -165,14 +169,15 @@ class ReaddirpStream extends Readable {
|
||||
} catch (error) {
|
||||
this._onError(error);
|
||||
}
|
||||
return {files, depth, path};
|
||||
return { files, depth, path };
|
||||
}
|
||||
|
||||
async _formatEntry(dirent, path) {
|
||||
const basename = this._isDirent ? dirent.name : dirent;
|
||||
const fullPath = sysPath.resolve(sysPath.join(path, basename));
|
||||
const entry = {path: sysPath.relative(this._root, fullPath), fullPath, basename};
|
||||
let entry;
|
||||
try {
|
||||
const basename = this._isDirent ? dirent.name : dirent;
|
||||
const fullPath = sysPath.resolve(sysPath.join(path, basename));
|
||||
entry = { path: sysPath.relative(this._root, fullPath), fullPath, basename };
|
||||
entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
|
||||
} catch (err) {
|
||||
this._onError(err);
|
||||
@@ -184,24 +189,52 @@ class ReaddirpStream extends Readable {
|
||||
if (isNormalFlowError(err) && !this.destroyed) {
|
||||
this.emit('warn', err);
|
||||
} else {
|
||||
throw err;
|
||||
this.destroy(err);
|
||||
}
|
||||
}
|
||||
|
||||
_isDirAndMatchesFilter(entry) {
|
||||
async _getEntryType(entry) {
|
||||
// entry may be undefined, because a warning or an error were emitted
|
||||
// and the statsProp is undefined
|
||||
const stats = entry && entry[this._statsProp];
|
||||
return stats && stats.isDirectory() && this._directoryFilter(entry);
|
||||
if (!stats) {
|
||||
return;
|
||||
}
|
||||
if (stats.isFile()) {
|
||||
return 'file';
|
||||
}
|
||||
if (stats.isDirectory()) {
|
||||
return 'directory';
|
||||
}
|
||||
if (stats && stats.isSymbolicLink()) {
|
||||
const full = entry.fullPath;
|
||||
try {
|
||||
const entryRealPath = await realpath(full);
|
||||
const entryRealPathStats = await lstat(entryRealPath);
|
||||
if (entryRealPathStats.isFile()) {
|
||||
return 'file';
|
||||
}
|
||||
if (entryRealPathStats.isDirectory()) {
|
||||
const len = entryRealPath.length;
|
||||
if (full.startsWith(entryRealPath) && full.substr(len, 1) === sysPath.sep) {
|
||||
const recursiveError = new Error(
|
||||
`Circular symlink detected: "${full}" points to "${entryRealPath}"`
|
||||
);
|
||||
recursiveError.code = RECURSIVE_ERROR_CODE;
|
||||
return this._onError(recursiveError);
|
||||
}
|
||||
return 'directory';
|
||||
}
|
||||
} catch (error) {
|
||||
this._onError(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_isFileAndMatchesFilter(entry) {
|
||||
_includeAsFile(entry) {
|
||||
const stats = entry && entry[this._statsProp];
|
||||
const isFileType = stats && (
|
||||
(this._wantsEverything && !stats.isDirectory()) ||
|
||||
(stats.isFile() || stats.isSymbolicLink())
|
||||
);
|
||||
return isFileType && this._fileFilter(entry);
|
||||
|
||||
return stats && this._wantsEverything && !stats.isDirectory();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
265
node_modules/readdirp/package.json
generated
vendored
265
node_modules/readdirp/package.json
generated
vendored
@@ -1,185 +1,122 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"readdirp@~3.3.0",
|
||||
"/home/pablinux/Projects/Node/app_sigma/node_modules/chokidar"
|
||||
]
|
||||
],
|
||||
"_from": "readdirp@>=3.3.0 <3.4.0",
|
||||
"_hasShrinkwrap": false,
|
||||
"_id": "readdirp@3.3.0",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/readdirp",
|
||||
"_nodeVersion": "12.13.1",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "s3://npm-registry-packages",
|
||||
"tmp": "tmp/readdirp_3.3.0_1575629798808_0.6718017800899874"
|
||||
},
|
||||
"_npmUser": {
|
||||
"email": "paul@paulmillr.com",
|
||||
"name": "paulmillr"
|
||||
},
|
||||
"_npmVersion": "6.13.1",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "readdirp",
|
||||
"raw": "readdirp@~3.3.0",
|
||||
"rawSpec": "~3.3.0",
|
||||
"scope": null,
|
||||
"spec": ">=3.3.0 <3.4.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/chokidar"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz",
|
||||
"_shasum": "984458d13a1e42e2e9f5841b129e162f369aff17",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "readdirp@~3.3.0",
|
||||
"_where": "/home/pablinux/Projects/Node/app_sigma/node_modules/chokidar",
|
||||
"author": {
|
||||
"email": "thlorenz@gmx.de",
|
||||
"name": "Thorsten Lorenz",
|
||||
"url": "thlorenz.com"
|
||||
"name": "readdirp",
|
||||
"description": "Recursive version of fs.readdir with streaming API.",
|
||||
"version": "3.6.0",
|
||||
"homepage": "https://github.com/paulmillr/readdirp",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/paulmillr/readdirp.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/paulmillr/readdirp/issues"
|
||||
},
|
||||
"author": "Thorsten Lorenz <thlorenz@gmx.de> (thlorenz.com)",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Thorsten Lorenz",
|
||||
"email": "thlorenz@gmx.de",
|
||||
"url": "thlorenz.com"
|
||||
},
|
||||
{
|
||||
"name": "Paul Miller",
|
||||
"url": "https://paulmillr.com"
|
||||
}
|
||||
"Thorsten Lorenz <thlorenz@gmx.de> (thlorenz.com)",
|
||||
"Paul Miller (https://paulmillr.com)"
|
||||
],
|
||||
"dependencies": {
|
||||
"picomatch": "^2.0.7"
|
||||
},
|
||||
"description": "Recursive version of fs.readdir with streaming API.",
|
||||
"devDependencies": {
|
||||
"@types/node": "^12",
|
||||
"chai": "^4.2",
|
||||
"chai-subset": "^1.6",
|
||||
"dtslint": "^2.0.0",
|
||||
"eslint": "^6.6.0",
|
||||
"mocha": "^6.2.2",
|
||||
"nyc": "^14.1.1",
|
||||
"rimraf": "^3.0.0"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"fileCount": 5,
|
||||
"integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==",
|
||||
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6jPnCRA9TVsSAnZWagAA1sYP/R1EmbDs2cTv7FR4DEy1\nbPQGtaKwDHT8kaNEj8L1SuyEs8KxzfoQbOejh2gURoMSLXz3QTIOhT/3rEP8\n/FUrvPaK9NSFUBvbjQzXOwiz1gfsdPhpYlhnhbM5Fl8fyUqpexpwGV0CXBVv\n6aw0vDGb6AccI9rLE6ClK3Kx3+kRXtQJSTMxD5HgoofXV5ZQEtamoWK/XSyN\nwyeKelyVYK+ADvNn7T7kbilKrZ6j3LSGx107/N8liQvxhR1AsN9nzFZWvXsl\nH+UKCkT66YTPUFnr3BkpsEt4BaHn61J1KiGIMxfwTbV636WMFAqBeVCNnG+Q\nNAMQZFS72z60Ck4KqqBdJWSNFq3twyt2750fmPJDx8cm16yuVYNGFlUVDi51\nqbDHw8bO00T25/QzUpKNAi1I9UT+jVat1YB8PNQpKdQN5yLgdPHYoNZ0l751\nneRghmEPogyrJZpD3qIHj83Rhl/lahNuPiDp3onuhow3SPFgALG2ogWaKFX4\nUr4EC/bQd5YyNnH3SOvy3mwK6LFS0NQDoDW5LYHNsvpS/9oVz5Gc2jDeV7M5\nTwj2ndLUTOQgJrZT57M/XDFAKzKVytcIFYnv7TZVBoUlK93wvHCC6DTtIQ/4\npkkl+19PzJrF6uY8xtvupapocUWS8c2GxvrcOvs+FCrpg2a9dOue3od0STuL\nz5Ts\r\n=A6up\r\n-----END PGP SIGNATURE-----\r\n",
|
||||
"shasum": "984458d13a1e42e2e9f5841b129e162f369aff17",
|
||||
"tarball": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz",
|
||||
"unpackedSize": 19047
|
||||
},
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=8.10.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"env": {
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 9,
|
||||
"sourceType": "script"
|
||||
},
|
||||
"root": true,
|
||||
"rules": {
|
||||
"array-callback-return": "error",
|
||||
"no-else-return": [
|
||||
{
|
||||
"allowElseIf": false
|
||||
},
|
||||
"error"
|
||||
],
|
||||
"no-empty": [
|
||||
{
|
||||
"allowEmptyCatch": true
|
||||
},
|
||||
"error"
|
||||
],
|
||||
"no-lonely-if": "error",
|
||||
"no-var": "error",
|
||||
"object-shorthand": "error",
|
||||
"prefer-arrow-callback": [
|
||||
{
|
||||
"allowNamedFunctions": true
|
||||
},
|
||||
"error"
|
||||
],
|
||||
"prefer-const": [
|
||||
{
|
||||
"ignoreReadBeforeAssign": true
|
||||
},
|
||||
"error"
|
||||
],
|
||||
"prefer-destructuring": [
|
||||
{
|
||||
"object": true,
|
||||
"array": false
|
||||
},
|
||||
"error"
|
||||
],
|
||||
"prefer-spread": "error",
|
||||
"prefer-template": "error",
|
||||
"quotes": [
|
||||
"error",
|
||||
"single"
|
||||
],
|
||||
"radix": "error",
|
||||
"semi": "error",
|
||||
"strict": "error"
|
||||
}
|
||||
},
|
||||
"gitHead": "b9376eb2aad7e7f4dc3352ff8d139ba5e4877519",
|
||||
"homepage": "https://github.com/paulmillr/readdirp",
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"filesystem",
|
||||
"filter",
|
||||
"find",
|
||||
"fs",
|
||||
"readdir",
|
||||
"recursive",
|
||||
"fs",
|
||||
"stream",
|
||||
"streams"
|
||||
"streams",
|
||||
"readdir",
|
||||
"filesystem",
|
||||
"find",
|
||||
"filter"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "thlorenz",
|
||||
"email": "thlorenz@gmx.de"
|
||||
}
|
||||
],
|
||||
"name": "readdirp",
|
||||
"scripts": {
|
||||
"dtslint": "dtslint",
|
||||
"nyc": "nyc",
|
||||
"mocha": "mocha --exit",
|
||||
"lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
|
||||
"test": "npm run lint && nyc npm run mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"picomatch": "^2.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^14",
|
||||
"chai": "^4.2",
|
||||
"chai-subset": "^1.6",
|
||||
"dtslint": "^3.3.0",
|
||||
"eslint": "^7.0.0",
|
||||
"mocha": "^7.1.1",
|
||||
"nyc": "^15.0.0",
|
||||
"rimraf": "^3.0.0",
|
||||
"typescript": "^4.0.3"
|
||||
},
|
||||
"nyc": {
|
||||
"reporter": [
|
||||
"html",
|
||||
"text"
|
||||
]
|
||||
},
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/paulmillr/readdirp.git"
|
||||
},
|
||||
"scripts": {
|
||||
"dtslint": "dtslint",
|
||||
"lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
|
||||
"mocha": "mocha --exit",
|
||||
"nyc": "nyc",
|
||||
"test": "npm run lint && nyc npm run mocha"
|
||||
},
|
||||
"version": "3.3.0"
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"extends": "eslint:recommended",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 9,
|
||||
"sourceType": "script"
|
||||
},
|
||||
"env": {
|
||||
"node": true,
|
||||
"es6": true
|
||||
},
|
||||
"rules": {
|
||||
"array-callback-return": "error",
|
||||
"no-empty": [
|
||||
"error",
|
||||
{
|
||||
"allowEmptyCatch": true
|
||||
}
|
||||
],
|
||||
"no-else-return": [
|
||||
"error",
|
||||
{
|
||||
"allowElseIf": false
|
||||
}
|
||||
],
|
||||
"no-lonely-if": "error",
|
||||
"no-var": "error",
|
||||
"object-shorthand": "error",
|
||||
"prefer-arrow-callback": [
|
||||
"error",
|
||||
{
|
||||
"allowNamedFunctions": true
|
||||
}
|
||||
],
|
||||
"prefer-const": [
|
||||
"error",
|
||||
{
|
||||
"ignoreReadBeforeAssign": true
|
||||
}
|
||||
],
|
||||
"prefer-destructuring": [
|
||||
"error",
|
||||
{
|
||||
"object": true,
|
||||
"array": false
|
||||
}
|
||||
],
|
||||
"prefer-spread": "error",
|
||||
"prefer-template": "error",
|
||||
"radix": "error",
|
||||
"semi": "error",
|
||||
"strict": "error",
|
||||
"quotes": [
|
||||
"error",
|
||||
"single"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user