mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore: undeclared versions/updates (#19649)
This commit is contained in:
parent
a5c431fbf5
commit
db0415bbcc
11 changed files with 477 additions and 282 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import archiver from 'archiver';
|
||||
import chokidar, { WatchOptions } from 'chokidar';
|
||||
import chokidar, { ChokidarOptions } from 'chokidar';
|
||||
import { escapePath, glob, globStream } from 'fast-glob';
|
||||
import { constants, createReadStream, createWriteStream, existsSync, mkdirSync } from 'node:fs';
|
||||
import fs from 'node:fs/promises';
|
||||
|
|
@ -219,14 +219,14 @@ export class StorageRepository {
|
|||
}
|
||||
}
|
||||
|
||||
watch(paths: string[], options: WatchOptions, events: Partial<WatchEvents>) {
|
||||
watch(paths: string[], options: ChokidarOptions, events: Partial<WatchEvents>) {
|
||||
const watcher = chokidar.watch(paths, options);
|
||||
|
||||
watcher.on('ready', () => events.onReady?.());
|
||||
watcher.on('add', (path) => events.onAdd?.(path));
|
||||
watcher.on('change', (path) => events.onChange?.(path));
|
||||
watcher.on('unlink', (path) => events.onUnlink?.(path));
|
||||
watcher.on('error', (error) => events.onError?.(error));
|
||||
watcher.on('error', (error) => events.onError?.(error as Error));
|
||||
|
||||
return () => watcher.close();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue