Changeset 79a0317 for imaps-frontend/node_modules/chokidar/esm
- Timestamp:
- 01/21/25 03:08:24 (3 days ago)
- Branches:
- main
- Parents:
- 0c6b92a
- Location:
- imaps-frontend/node_modules/chokidar/esm
- Files:
-
- 4 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/chokidar/esm/handler.d.ts
r0c6b92a r79a0317 11 11 export declare const isMacos: boolean; 12 12 export declare const isLinux: boolean; 13 export declare const isFreeBSD: boolean; 13 14 export declare const isIBMi: boolean; 14 15 export declare const EVENTS: { … … 88 89 _addToNodeFs(path: string, initialAdd: boolean, priorWh: WatchHelper | undefined, depth: number, target?: string): Promise<string | false | undefined>; 89 90 } 90 //# sourceMappingURL=handler.d.ts.map -
imaps-frontend/node_modules/chokidar/esm/handler.js
r0c6b92a r79a0317 12 12 export const isMacos = pl === 'darwin'; 13 13 export const isLinux = pl === 'linux'; 14 export const isFreeBSD = pl === 'freebsd'; 14 15 export const isIBMi = osType() === 'OS400'; 15 16 export const EVENTS = { … … 360 361 this.fsw._emit(EV.CHANGE, file, newStats); 361 362 } 362 if ((isMacos || isLinux ) && prevStats.ino !== newStats.ino) {363 if ((isMacos || isLinux || isFreeBSD) && prevStats.ino !== newStats.ino) { 363 364 this.fsw._closeFile(path); 364 365 prevStats = newStats; … … 627 628 } 628 629 } 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) */ 1 2 import { Stats } from 'fs'; 2 3 import { EventEmitter } from 'events'; 3 4 import { ReaddirpStream, ReaddirpOptions, EntryInfo } from 'readdirp'; 4 import { NodeFsHandler, EventName, Path } from './handler.js';5 import { NodeFsHandler, EventName, Path, EVENTS as EV, WatchHandlers } from './handler.js'; 5 6 type AWF = { 6 7 stabilityThreshold: number; … … 34 35 }; 35 36 export type ThrottleType = 'readdir' | 'watch' | 'add' | 'remove' | 'change'; 36 export type EmitArgs = [EventName, Path | Error, any?, any?, any?]; 37 export type EmitArgs = [path: Path, stats?: Stats]; 38 export type EmitErrorArgs = [error: Error, stats?: Stats]; 39 export type EmitArgsWithName = [event: EventName, ...EmitArgs]; 37 40 export type MatchFunction = (val: string, stats?: Stats) => boolean; 38 41 export interface MatcherObject { … … 68 71 filterDir(entry: EntryInfo): boolean; 69 72 } 73 export interface FSWatcherKnownEventMap { 74 [EV.READY]: []; 75 [EV.RAW]: Parameters<WatchHandlers['rawEmitter']>; 76 [EV.ERROR]: Parameters<WatchHandlers['errHandler']>; 77 [EV.ALL]: [event: EventName, ...EmitArgs]; 78 } 79 export type FSWatcherEventMap = FSWatcherKnownEventMap & { 80 [k in Exclude<EventName, keyof FSWatcherKnownEventMap>]: EmitArgs; 81 }; 70 82 /** 71 83 * Watches files & directories for changes. Emitted events: … … 76 88 * .on('add', path => log('File', path, 'was added')) 77 89 */ 78 export declare class FSWatcher extends EventEmitter {90 export declare class FSWatcher extends EventEmitter<FSWatcherEventMap> { 79 91 closed: boolean; 80 92 options: FSWInstanceOptions; … … 86 98 _watched: Map<string, DirEntry>; 87 99 _pendingWrites: Map<string, any>; 88 _pendingUnlinks: Map<string, EmitArgs >;100 _pendingUnlinks: Map<string, EmitArgsWithName>; 89 101 _readyCount: number; 90 102 _emitReady: () => void; … … 92 104 _userIgnored?: MatchFunction; 93 105 _readyEmitted: boolean; 94 _emitRaw: () => void;106 _emitRaw: WatchHandlers['rawEmitter']; 95 107 _boundRemove: (dir: string, item: string) => void; 96 108 _nodeFsHandler: NodeFsHandler; … … 202 214 }; 203 215 export 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) */ 1 2 import { stat as statcb } from 'fs'; 2 3 import { stat, readdir } from 'fs/promises'; … … 428 429 } 429 430 emitWithAll(event, args) { 430 this.emit( ...args);431 this.emit(event, ...args); 431 432 if (event !== EV.ERROR) 432 this.emit(EV.ALL, ...args);433 this.emit(EV.ALL, event, ...args); 433 434 } 434 435 // Common helpers … … 450 451 if (opts.cwd) 451 452 path = sysPath.relative(opts.cwd, path); 452 const args = [ event,path];453 const args = [path]; 453 454 if (stats != null) 454 455 args.push(stats); … … 461 462 if (opts.atomic) { 462 463 if (event === EV.UNLINK) { 463 this._pendingUnlinks.set(path, args);464 this._pendingUnlinks.set(path, [event, ...args]); 464 465 setTimeout(() => { 465 466 this._pendingUnlinks.forEach((entry, path) => { … … 472 473 } 473 474 if (event === EV.ADD && this._pendingUnlinks.has(path)) { 474 event = args[0] =EV.CHANGE;475 event = EV.CHANGE; 475 476 this._pendingUnlinks.delete(path); 476 477 } … … 479 480 const awfEmit = (err, stats) => { 480 481 if (err) { 481 event = args[0] =EV.ERROR;482 args[ 1] = err;482 event = EV.ERROR; 483 args[0] = err; 483 484 this.emitWithAll(event, args); 484 485 } 485 486 else if (stats) { 486 487 // 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; 489 490 } 490 491 else { … … 796 797 } 797 798 export default { watch, FSWatcher }; 798 //# sourceMappingURL=index.js.map
Note:
See TracChangeset
for help on using the changeset viewer.