This commit is contained in:
Jonasz Bigda
2023-03-25 21:51:42 +01:00
parent 0db1d5117e
commit b332e9ceb0
1044 changed files with 37502 additions and 63938 deletions

9
node_modules/chokidar/README.md generated vendored
View File

@@ -13,6 +13,7 @@ Node.js `fs.watch`:
* Often reports events twice.
* Emits most changes as `rename`.
* Does not provide an easy way to recursively watch file trees.
* Does not support recursive watching on Linux.
Node.js `fs.watchFile`:
@@ -46,7 +47,7 @@ On MacOS, chokidar by default uses a native extension exposing the Darwin
implementations like `kqueue` available on most \*nix platforms. Chokidar still
does have to do some work to normalize the events received that way as well.
On other platforms, the `fs.watch`-based implementation is the default, which
On most other platforms, the `fs.watch`-based implementation is the default, which
avoids polling and keeps CPU usage down. Be advised that chokidar will initiate
watchers recursively for everything within scope of the paths that have been
specified, so be judicious about not wasting system resources by watching much
@@ -254,8 +255,8 @@ Available events: `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `ready`,
Additionally `all` is available which gets emitted with the underlying event
name and path for every event other than `ready`, `raw`, and `error`. `raw` is internal, use it carefully.
* `.unwatch(path / paths)`: Stop watching files, directories, or glob patterns.
Takes an array of strings or just one string. Use with `await` to ensure bugs don't happen.
* `.close()`: **async** Removes all listeners from watched files. Asynchronous, returns Promise.
Takes an array of strings or just one string.
* `.close()`: **async** Removes all listeners from watched files. Asynchronous, returns Promise. Use with `await` to ensure bugs don't happen.
* `.getWatched()`: Returns an object representing all the paths on the file
system being watched by this `FSWatcher` instance. The object's keys are all the
directories (using absolute paths unless the `cwd` option was used), and the
@@ -264,7 +265,7 @@ values are arrays of the names of the items contained in each directory.
## CLI
If you need a CLI interface for your file watching, check out
[chokidar-cli](https://github.com/kimmobrunfeldt/chokidar-cli), allowing you to
[chokidar-cli](https://github.com/open-cli-tools/chokidar-cli), allowing you to
execute a command on each change, or get a stdio stream of change events.
## Install Troubleshooting

8
node_modules/chokidar/index.js generated vendored
View File

@@ -48,7 +48,8 @@ const {
EMPTY_FN,
isWindows,
isMacos
isMacos,
isIBMi
} = require('./lib/constants');
const stat = promisify(fs.stat);
@@ -330,6 +331,11 @@ constructor(_opts) {
opts.usePolling = isMacos;
}
// Always default to polling on IBM i because fs.watch() is not available on IBM i.
if(isIBMi) {
opts.usePolling = true;
}
// Global override (useful for end-developers that need to force polling for all
// instances of chokidar, regardless of usage/dependency depth)
const envPoll = process.env.CHOKIDAR_USEPOLLING;

View File

@@ -2,6 +2,7 @@
const {sep} = require('path');
const {platform} = process;
const os = require('os');
exports.EV_ALL = 'all';
exports.EV_READY = 'ready';
@@ -61,3 +62,4 @@ exports.IDENTITY_FN = val => val;
exports.isWindows = platform === 'win32';
exports.isMacos = platform === 'darwin';
exports.isLinux = platform === 'linux';
exports.isIBMi = os.type() === 'OS400';

View File

@@ -104,7 +104,8 @@ const createFSEventsInstance = (path, callback) => {
* @returns {Function} closer
*/
function setFSEventsListener(path, realPath, listener, rawEmitter) {
let watchPath = sysPath.extname(path) ? sysPath.dirname(path) : path;
let watchPath = sysPath.extname(realPath) ? sysPath.dirname(realPath) : realPath;
const parentPath = sysPath.dirname(watchPath);
let cont = FSEventsWatchers.get(watchPath);

View File

@@ -421,7 +421,15 @@ async _handleSymlink(entry, directory, path, item) {
if (!this.fsw.options.followSymlinks) {
// watch symlink directly (don't follow) and detect changes
this.fsw._incrReadyCount();
const linkPath = await fsrealpath(path);
let linkPath;
try {
linkPath = await fsrealpath(path);
} catch (e) {
this.fsw._emitReady();
return true;
}
if (this.fsw.closed) return;
if (dir.has(item)) {
if (this.fsw._symlinkPaths.get(full) !== linkPath) {

107
node_modules/chokidar/package.json generated vendored
View File

@@ -1,59 +1,32 @@
{
"_from": "chokidar@^3.2.2",
"_id": "chokidar@3.5.1",
"_inBundle": false,
"_integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==",
"_location": "/chokidar",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "chokidar@^3.2.2",
"name": "chokidar",
"escapedName": "chokidar",
"rawSpec": "^3.2.2",
"saveSpec": null,
"fetchSpec": "^3.2.2"
},
"_requiredBy": [
"/nodemon"
],
"_resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz",
"_shasum": "ee9ce7bbebd2b79f49f304799d5468e31e14e68a",
"_spec": "chokidar@^3.2.2",
"_where": "C:\\Users\\Jonasz\\Desktop\\Menui\\menui_backend\\node_modules\\nodemon",
"author": {
"name": "Paul Miller",
"url": "https://paulmillr.com"
},
"bugs": {
"url": "https://github.com/paulmillr/chokidar/issues"
},
"bundleDependencies": false,
"name": "chokidar",
"description": "Minimal and efficient cross-platform file watching library",
"version": "3.5.3",
"homepage": "https://github.com/paulmillr/chokidar",
"author": "Paul Miller (https://paulmillr.com)",
"contributors": [
{
"name": "Paul Miller",
"url": "https://paulmillr.com"
},
{
"name": "Elan Shanker"
}
"Paul Miller (https://paulmillr.com)",
"Elan Shanker"
],
"engines": {
"node": ">= 8.10.0"
},
"main": "index.js",
"dependencies": {
"anymatch": "~3.1.1",
"anymatch": "~3.1.2",
"braces": "~3.0.2",
"fsevents": "~2.3.1",
"glob-parent": "~5.1.0",
"glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.5.0"
"readdirp": "~3.6.0"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
},
"deprecated": false,
"description": "Minimal and efficient cross-platform file watching library",
"devDependencies": {
"@types/node": "^14",
"chai": "^4.2",
"chai": "^4.3",
"dtslint": "^3.3.0",
"eslint": "^7.0.0",
"mocha": "^7.0.0",
@@ -61,17 +34,28 @@
"rimraf": "^3.0.0",
"sinon": "^9.0.1",
"sinon-chai": "^3.3.0",
"typescript": "~4.4.3",
"upath": "^1.2.0"
},
"engines": {
"node": ">= 8.10.0"
},
"files": [
"index.js",
"lib/*.js",
"types/index.d.ts"
],
"homepage": "https://github.com/paulmillr/chokidar",
"repository": {
"type": "git",
"url": "git+https://github.com/paulmillr/chokidar.git"
},
"bugs": {
"url": "https://github.com/paulmillr/chokidar/issues"
},
"license": "MIT",
"scripts": {
"dtslint": "dtslint types",
"lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
"mocha": "mocha --exit --timeout 90000",
"test": "npm run lint && npm run mocha"
},
"keywords": [
"fs",
"watch",
@@ -81,9 +65,7 @@
"file",
"fsevents"
],
"license": "MIT",
"main": "index.js",
"name": "chokidar",
"types": "./types/index.d.ts",
"nyc": {
"include": [
"index.js",
@@ -94,19 +76,10 @@
"text"
]
},
"optionalDependencies": {
"fsevents": "~2.3.1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/paulmillr/chokidar.git"
},
"scripts": {
"dtslint": "dtslint types",
"lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
"mocha": "mocha --exit --timeout 60000",
"test": "npm run lint && npm run mocha"
},
"types": "./types/index.d.ts",
"version": "3.5.1"
"funding": [
{
"type": "individual",
"url": "https://paulmillr.com/funding/"
}
]
}

View File

@@ -4,6 +4,7 @@
import * as fs from "fs";
import { EventEmitter } from "events";
import { Matcher } from 'anymatch';
export class FSWatcher extends EventEmitter implements fs.FSWatcher {
options: WatchOptions;
@@ -17,13 +18,13 @@ export class FSWatcher extends EventEmitter implements fs.FSWatcher {
* Add files, directories, or glob patterns for tracking. Takes an array of strings or just one
* string.
*/
add(paths: string | ReadonlyArray<string>): void;
add(paths: string | ReadonlyArray<string>): this;
/**
* Stop watching files, directories, or glob patterns. Takes an array of strings or just one
* string.
*/
unwatch(paths: string | ReadonlyArray<string>): void;
unwatch(paths: string | ReadonlyArray<string>): this;
/**
* Returns an object representing all the paths on the file system being watched by this
@@ -79,7 +80,7 @@ export interface WatchOptions {
* (the path), second time with two arguments (the path and the
* [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object of that path).
*/
ignored?: any;
ignored?: Matcher;
/**
* If set to `false` then `add`/`addDir` events are also emitted for matching paths while