fix(core): update

This commit is contained in:
2024-04-02 20:53:02 +02:00
parent 1311039127
commit d08cc0f350
12 changed files with 188 additions and 92 deletions

View File

@@ -1,7 +1,7 @@
/*
This file contains logic for streaming things from and to the filesystem
*/
import * as plugins from './smartfile.plugins.js';
import * as plugins from './plugins.js';
export const createReadStream = (pathArg: string) => {
return plugins.fs.createReadStream(pathArg);
@@ -97,7 +97,7 @@ export const waitForFileToBeReadyForStreaming = (filePathArg: string): Promise<v
});
};
class SmartReadStream extends plugins.stream.Readable {
export class SmartReadStream extends plugins.stream.Readable {
private watcher: plugins.fs.FSWatcher | null = null;
private lastReadSize: number = 0;
private endTimeout: NodeJS.Timeout | null = null;