Ignore:
Timestamp:
01/21/25 03:08:24 (3 days ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
0c6b92a
Message:

F4 Finalna Verzija

Location:
imaps-frontend/node_modules/chokidar
Files:
8 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/chokidar/README.md

    r0c6b92a r79a0317  
    113113
    114114  awaitWriteFinish: true, // emit single event when chunked writes are completed
    115   atomic: true // emit proper events when "atomic writes" (mv _tmp file) are used
     115  atomic: true, // emit proper events when "atomic writes" (mv _tmp file) are used
    116116
    117117  // The options also allow specifying custom intervals in ms
     
    121121  // },
    122122  // atomic: 100,
     123
    123124  interval: 100,
    124125  binaryInterval: 300,
     
    236237values are arrays of the names of the items contained in each directory.
    237238
    238 ## CLI
    239 
    240 If you need a CLI interface for your file watching, check out
    241 third party [chokidar-cli](https://github.com/open-cli-tools/chokidar-cli), allowing you to
    242 execute a command on each change, or get a stdio stream of change events.
     239### CLI
     240
     241Check out third party [chokidar-cli](https://github.com/open-cli-tools/chokidar-cli),
     242which allows to execute a command on each change, or get a stdio stream of change events.
    243243
    244244## Troubleshooting
    245245
    246 * On Linux, sometimes there's `ENOSP` error:
    247     * `bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell`
    248   `Error: watch /home/ ENOSPC`
    249     * This means Chokidar ran out of file handles and you'll need to increase their count by executing the following command in Terminal:
    250   `echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p`
    251 * If using 3.x, upgrade to latest chokidar to prevent fsevents-related issues:
    252     * `npm WARN optional dep failed, continuing fsevents@n.n.n`
    253     * `TypeError: fsevents is not a constructor`
     246Sometimes, Chokidar runs out of file handles, causing `EMFILE` and `ENOSP` errors:
     247
     248* `bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell`
     249* `Error: watch /home/ ENOSPC`
     250
     251There are two things that can cause it.
     252
     2531. Exhausted file handles for generic fs operations
     254    - Can be solved by using [graceful-fs](https://www.npmjs.com/package/graceful-fs),
     255      which can monkey-patch native `fs` module used by chokidar: `let fs = require('fs'); let grfs = require('graceful-fs'); grfs.gracefulify(fs);`
     256    - Can also be solved by tuning OS: `echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p`.
     2572. Exhausted file handles for `fs.watch`
     258    - Can't seem to be solved by graceful-fs or OS tuning
     259    - It's possible to start using `usePolling: true`, which will switch backend to resource-intensive `fs.watchFile`
     260
     261All fsevents-related issues (`WARN optional dep failed`, `fsevents is not a constructor`) are solved by upgrading to v4+.
    254262
    255263## Changelog
     
    278286// other way
    279287import { glob } from 'node:fs/promises';
    280 const watcher = watch(await glob('**/*.js'));
     288const watcher = watch(await Array.fromAsync(glob('**/*.js')));
    281289
    282290// unwatching
  • imaps-frontend/node_modules/chokidar/esm/handler.d.ts

    r0c6b92a r79a0317  
    1111export declare const isMacos: boolean;
    1212export declare const isLinux: boolean;
     13export declare const isFreeBSD: boolean;
    1314export declare const isIBMi: boolean;
    1415export declare const EVENTS: {
     
    8889    _addToNodeFs(path: string, initialAdd: boolean, priorWh: WatchHelper | undefined, depth: number, target?: string): Promise<string | false | undefined>;
    8990}
    90 //# sourceMappingURL=handler.d.ts.map
  • imaps-frontend/node_modules/chokidar/esm/handler.js

    r0c6b92a r79a0317  
    1212export const isMacos = pl === 'darwin';
    1313export const isLinux = pl === 'linux';
     14export const isFreeBSD = pl === 'freebsd';
    1415export const isIBMi = osType() === 'OS400';
    1516export const EVENTS = {
     
    360361                        this.fsw._emit(EV.CHANGE, file, newStats);
    361362                    }
    362                     if ((isMacos || isLinux) && prevStats.ino !== newStats.ino) {
     363                    if ((isMacos || isLinux || isFreeBSD) && prevStats.ino !== newStats.ino) {
    363364                        this.fsw._closeFile(path);
    364365                        prevStats = newStats;
     
    627628    }
    628629}
    629 //# sourceMappingURL=handler.js.map
  • imaps-frontend/node_modules/chokidar/esm/index.d.ts

    r0c6b92a r79a0317  
     1/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */
    12import { Stats } from 'fs';
    23import { EventEmitter } from 'events';
    34import { ReaddirpStream, ReaddirpOptions, EntryInfo } from 'readdirp';
    4 import { NodeFsHandler, EventName, Path } from './handler.js';
     5import { NodeFsHandler, EventName, Path, EVENTS as EV, WatchHandlers } from './handler.js';
    56type AWF = {
    67    stabilityThreshold: number;
     
    3435};
    3536export type ThrottleType = 'readdir' | 'watch' | 'add' | 'remove' | 'change';
    36 export type EmitArgs = [EventName, Path | Error, any?, any?, any?];
     37export type EmitArgs = [path: Path, stats?: Stats];
     38export type EmitErrorArgs = [error: Error, stats?: Stats];
     39export type EmitArgsWithName = [event: EventName, ...EmitArgs];
    3740export type MatchFunction = (val: string, stats?: Stats) => boolean;
    3841export interface MatcherObject {
     
    6871    filterDir(entry: EntryInfo): boolean;
    6972}
     73export interface FSWatcherKnownEventMap {
     74    [EV.READY]: [];
     75    [EV.RAW]: Parameters<WatchHandlers['rawEmitter']>;
     76    [EV.ERROR]: Parameters<WatchHandlers['errHandler']>;
     77    [EV.ALL]: [event: EventName, ...EmitArgs];
     78}
     79export type FSWatcherEventMap = FSWatcherKnownEventMap & {
     80    [k in Exclude<EventName, keyof FSWatcherKnownEventMap>]: EmitArgs;
     81};
    7082/**
    7183 * Watches files & directories for changes. Emitted events:
     
    7688 *       .on('add', path => log('File', path, 'was added'))
    7789 */
    78 export declare class FSWatcher extends EventEmitter {
     90export declare class FSWatcher extends EventEmitter<FSWatcherEventMap> {
    7991    closed: boolean;
    8092    options: FSWInstanceOptions;
     
    8698    _watched: Map<string, DirEntry>;
    8799    _pendingWrites: Map<string, any>;
    88     _pendingUnlinks: Map<string, EmitArgs>;
     100    _pendingUnlinks: Map<string, EmitArgsWithName>;
    89101    _readyCount: number;
    90102    _emitReady: () => void;
     
    92104    _userIgnored?: MatchFunction;
    93105    _readyEmitted: boolean;
    94     _emitRaw: () => void;
     106    _emitRaw: WatchHandlers['rawEmitter'];
    95107    _boundRemove: (dir: string, item: string) => void;
    96108    _nodeFsHandler: NodeFsHandler;
     
    202214};
    203215export default _default;
    204 //# sourceMappingURL=index.d.ts.map
  • imaps-frontend/node_modules/chokidar/esm/index.js

    r0c6b92a r79a0317  
     1/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */
    12import { stat as statcb } from 'fs';
    23import { stat, readdir } from 'fs/promises';
     
    428429    }
    429430    emitWithAll(event, args) {
    430         this.emit(...args);
     431        this.emit(event, ...args);
    431432        if (event !== EV.ERROR)
    432             this.emit(EV.ALL, ...args);
     433            this.emit(EV.ALL, event, ...args);
    433434    }
    434435    // Common helpers
     
    450451        if (opts.cwd)
    451452            path = sysPath.relative(opts.cwd, path);
    452         const args = [event, path];
     453        const args = [path];
    453454        if (stats != null)
    454455            args.push(stats);
     
    461462        if (opts.atomic) {
    462463            if (event === EV.UNLINK) {
    463                 this._pendingUnlinks.set(path, args);
     464                this._pendingUnlinks.set(path, [event, ...args]);
    464465                setTimeout(() => {
    465466                    this._pendingUnlinks.forEach((entry, path) => {
     
    472473            }
    473474            if (event === EV.ADD && this._pendingUnlinks.has(path)) {
    474                 event = args[0] = EV.CHANGE;
     475                event = EV.CHANGE;
    475476                this._pendingUnlinks.delete(path);
    476477            }
     
    479480            const awfEmit = (err, stats) => {
    480481                if (err) {
    481                     event = args[0] = EV.ERROR;
    482                     args[1] = err;
     482                    event = EV.ERROR;
     483                    args[0] = err;
    483484                    this.emitWithAll(event, args);
    484485                }
    485486                else if (stats) {
    486487                    // if stats doesn't exist the file must have been deleted
    487                     if (args.length > 2) {
    488                         args[2] = stats;
     488                    if (args.length > 1) {
     489                        args[1] = stats;
    489490                    }
    490491                    else {
     
    796797}
    797798export default { watch, FSWatcher };
    798 //# sourceMappingURL=index.js.map
  • imaps-frontend/node_modules/chokidar/handler.d.ts

    r0c6b92a r79a0317  
    1111export declare const isMacos: boolean;
    1212export declare const isLinux: boolean;
     13export declare const isFreeBSD: boolean;
    1314export declare const isIBMi: boolean;
    1415export declare const EVENTS: {
     
    8889    _addToNodeFs(path: string, initialAdd: boolean, priorWh: WatchHelper | undefined, depth: number, target?: string): Promise<string | false | undefined>;
    8990}
    90 //# sourceMappingURL=handler.d.ts.map
  • imaps-frontend/node_modules/chokidar/handler.js

    r0c6b92a r79a0317  
    11"use strict";
    22Object.defineProperty(exports, "__esModule", { value: true });
    3 exports.NodeFsHandler = exports.EVENTS = exports.isIBMi = exports.isLinux = exports.isMacos = exports.isWindows = exports.IDENTITY_FN = exports.EMPTY_FN = exports.STR_CLOSE = exports.STR_END = exports.STR_DATA = void 0;
     3exports.NodeFsHandler = exports.EVENTS = exports.isIBMi = exports.isFreeBSD = exports.isLinux = exports.isMacos = exports.isWindows = exports.IDENTITY_FN = exports.EMPTY_FN = exports.STR_CLOSE = exports.STR_END = exports.STR_DATA = void 0;
    44const fs_1 = require("fs");
    55const promises_1 = require("fs/promises");
     
    1717exports.isMacos = pl === 'darwin';
    1818exports.isLinux = pl === 'linux';
     19exports.isFreeBSD = pl === 'freebsd';
    1920exports.isIBMi = (0, os_1.type)() === 'OS400';
    2021exports.EVENTS = {
     
    365366                        this.fsw._emit(EV.CHANGE, file, newStats);
    366367                    }
    367                     if ((exports.isMacos || exports.isLinux) && prevStats.ino !== newStats.ino) {
     368                    if ((exports.isMacos || exports.isLinux || exports.isFreeBSD) && prevStats.ino !== newStats.ino) {
    368369                        this.fsw._closeFile(path);
    369370                        prevStats = newStats;
     
    633634}
    634635exports.NodeFsHandler = NodeFsHandler;
    635 //# sourceMappingURL=handler.js.map
  • imaps-frontend/node_modules/chokidar/index.d.ts

    r0c6b92a r79a0317  
     1/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */
    12import { Stats } from 'fs';
    23import { EventEmitter } from 'events';
    34import { ReaddirpStream, ReaddirpOptions, EntryInfo } from 'readdirp';
    4 import { NodeFsHandler, EventName, Path } from './handler.js';
     5import { NodeFsHandler, EventName, Path, EVENTS as EV, WatchHandlers } from './handler.js';
    56type AWF = {
    67    stabilityThreshold: number;
     
    3435};
    3536export type ThrottleType = 'readdir' | 'watch' | 'add' | 'remove' | 'change';
    36 export type EmitArgs = [EventName, Path | Error, any?, any?, any?];
     37export type EmitArgs = [path: Path, stats?: Stats];
     38export type EmitErrorArgs = [error: Error, stats?: Stats];
     39export type EmitArgsWithName = [event: EventName, ...EmitArgs];
    3740export type MatchFunction = (val: string, stats?: Stats) => boolean;
    3841export interface MatcherObject {
     
    6871    filterDir(entry: EntryInfo): boolean;
    6972}
     73export interface FSWatcherKnownEventMap {
     74    [EV.READY]: [];
     75    [EV.RAW]: Parameters<WatchHandlers['rawEmitter']>;
     76    [EV.ERROR]: Parameters<WatchHandlers['errHandler']>;
     77    [EV.ALL]: [event: EventName, ...EmitArgs];
     78}
     79export type FSWatcherEventMap = FSWatcherKnownEventMap & {
     80    [k in Exclude<EventName, keyof FSWatcherKnownEventMap>]: EmitArgs;
     81};
    7082/**
    7183 * Watches files & directories for changes. Emitted events:
     
    7688 *       .on('add', path => log('File', path, 'was added'))
    7789 */
    78 export declare class FSWatcher extends EventEmitter {
     90export declare class FSWatcher extends EventEmitter<FSWatcherEventMap> {
    7991    closed: boolean;
    8092    options: FSWInstanceOptions;
     
    8698    _watched: Map<string, DirEntry>;
    8799    _pendingWrites: Map<string, any>;
    88     _pendingUnlinks: Map<string, EmitArgs>;
     100    _pendingUnlinks: Map<string, EmitArgsWithName>;
    89101    _readyCount: number;
    90102    _emitReady: () => void;
     
    92104    _userIgnored?: MatchFunction;
    93105    _readyEmitted: boolean;
    94     _emitRaw: () => void;
     106    _emitRaw: WatchHandlers['rawEmitter'];
    95107    _boundRemove: (dir: string, item: string) => void;
    96108    _nodeFsHandler: NodeFsHandler;
     
    202214};
    203215export default _default;
    204 //# sourceMappingURL=index.d.ts.map
  • imaps-frontend/node_modules/chokidar/index.js

    r0c6b92a r79a0317  
    33exports.FSWatcher = exports.WatchHelper = void 0;
    44exports.watch = watch;
     5/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */
    56const fs_1 = require("fs");
    67const promises_1 = require("fs/promises");
     
    433434    }
    434435    emitWithAll(event, args) {
    435         this.emit(...args);
     436        this.emit(event, ...args);
    436437        if (event !== handler_js_1.EVENTS.ERROR)
    437             this.emit(handler_js_1.EVENTS.ALL, ...args);
     438            this.emit(handler_js_1.EVENTS.ALL, event, ...args);
    438439    }
    439440    // Common helpers
     
    455456        if (opts.cwd)
    456457            path = sysPath.relative(opts.cwd, path);
    457         const args = [event, path];
     458        const args = [path];
    458459        if (stats != null)
    459460            args.push(stats);
     
    466467        if (opts.atomic) {
    467468            if (event === handler_js_1.EVENTS.UNLINK) {
    468                 this._pendingUnlinks.set(path, args);
     469                this._pendingUnlinks.set(path, [event, ...args]);
    469470                setTimeout(() => {
    470471                    this._pendingUnlinks.forEach((entry, path) => {
     
    477478            }
    478479            if (event === handler_js_1.EVENTS.ADD && this._pendingUnlinks.has(path)) {
    479                 event = args[0] = handler_js_1.EVENTS.CHANGE;
     480                event = handler_js_1.EVENTS.CHANGE;
    480481                this._pendingUnlinks.delete(path);
    481482            }
     
    484485            const awfEmit = (err, stats) => {
    485486                if (err) {
    486                     event = args[0] = handler_js_1.EVENTS.ERROR;
    487                     args[1] = err;
     487                    event = handler_js_1.EVENTS.ERROR;
     488                    args[0] = err;
    488489                    this.emitWithAll(event, args);
    489490                }
    490491                else if (stats) {
    491492                    // if stats doesn't exist the file must have been deleted
    492                     if (args.length > 2) {
    493                         args[2] = stats;
     493                    if (args.length > 1) {
     494                        args[1] = stats;
    494495                    }
    495496                    else {
     
    802803}
    803804exports.default = { watch, FSWatcher };
    804 //# sourceMappingURL=index.js.map
  • imaps-frontend/node_modules/chokidar/package.json

    r0c6b92a r79a0317  
    11{
    2   "name": "chokidar",
    3   "description": "Minimal and efficient cross-platform file watching library",
    4   "version": "4.0.1",
    5   "homepage": "https://github.com/paulmillr/chokidar",
    6   "author": "Paul Miller (https://paulmillr.com)",
    7   "files": [
    8     "index.js",
    9     "index.d.ts",
    10     "index.d.ts.map",
    11     "index.js.map",
    12     "handler.js",
    13     "handler.d.ts",
    14     "handler.d.ts.map",
    15     "handler.js.map",
    16     "esm"
     2  "_from": "chokidar@4.0.3",
     3  "_id": "chokidar@4.0.3",
     4  "_inBundle": false,
     5  "_integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==",
     6  "_location": "/chokidar",
     7  "_phantomChildren": {},
     8  "_requested": {
     9    "type": "version",
     10    "registry": true,
     11    "raw": "chokidar@4.0.3",
     12    "name": "chokidar",
     13    "escapedName": "chokidar",
     14    "rawSpec": "4.0.3",
     15    "saveSpec": null,
     16    "fetchSpec": "4.0.3"
     17  },
     18  "_requiredBy": [
     19    "/sass"
    1720  ],
    18   "main": "./index.js",
    19   "module": "./esm/index.js",
    20   "types": "./index.d.ts",
    21   "exports": {
    22     ".": {
    23       "import": "./esm/index.js",
    24       "require": "./index.js"
    25     },
    26     "./handler.js": {
    27       "import": "./esm/handler.js",
    28       "require": "./handler.js"
    29     }
     21  "_resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz",
     22  "_shasum": "7be37a4c03c9aee1ecfe862a4a23b2c70c205d30",
     23  "_spec": "chokidar@4.0.3",
     24  "_where": "/home/stevetosak/Proekt/IMaps/imaps-frontend/node_modules/sass",
     25  "author": {
     26    "name": "Paul Miller",
     27    "url": "https://paulmillr.com"
    3028  },
     29  "bugs": {
     30    "url": "https://github.com/paulmillr/chokidar/issues"
     31  },
     32  "bundleDependencies": false,
    3133  "dependencies": {
    3234    "readdirp": "^4.0.1"
    3335  },
     36  "deprecated": false,
     37  "description": "Minimal and efficient cross-platform file watching library",
    3438  "devDependencies": {
    3539    "@paulmillr/jsbt": "0.2.1",
     
    4347    "upath": "2.0.1"
    4448  },
    45   "sideEffects": false,
    4649  "engines": {
    4750    "node": ">= 14.16.0"
    4851  },
    49   "repository": {
    50     "type": "git",
    51     "url": "git+https://github.com/paulmillr/chokidar.git"
     52  "exports": {
     53    ".": {
     54      "import": "./esm/index.js",
     55      "require": "./index.js"
     56    },
     57    "./handler.js": {
     58      "import": "./esm/handler.js",
     59      "require": "./handler.js"
     60    }
    5261  },
    53   "bugs": {
    54     "url": "https://github.com/paulmillr/chokidar/issues"
    55   },
    56   "license": "MIT",
    57   "scripts": {
    58     "build": "tsc && tsc -p tsconfig.esm.json",
    59     "lint": "prettier --check src",
    60     "format": "prettier --write src",
    61     "test": "node --test"
    62   },
     62  "files": [
     63    "index.js",
     64    "index.d.ts",
     65    "handler.js",
     66    "handler.d.ts",
     67    "esm"
     68  ],
     69  "funding": "https://paulmillr.com/funding/",
     70  "homepage": "https://github.com/paulmillr/chokidar",
    6371  "keywords": [
    6472    "fs",
     
    7078    "fsevents"
    7179  ],
    72   "funding": "https://paulmillr.com/funding/"
     80  "license": "MIT",
     81  "main": "./index.js",
     82  "module": "./esm/index.js",
     83  "name": "chokidar",
     84  "repository": {
     85    "type": "git",
     86    "url": "git+https://github.com/paulmillr/chokidar.git"
     87  },
     88  "scripts": {
     89    "build": "tsc && tsc -p tsconfig.esm.json",
     90    "format": "prettier --write src",
     91    "lint": "prettier --check src",
     92    "test": "node --test"
     93  },
     94  "sideEffects": false,
     95  "types": "./index.d.ts",
     96  "version": "4.0.3"
    7397}
Note: See TracChangeset for help on using the changeset viewer.