mirror of
https://github.com/HeyPuter/puter.git
synced 2026-01-06 05:00:29 -06:00
fix: move dependency in LocalDiskStorageController
LocalDiskStorageController was dependent on putility for TeePromise, but since putility is a workspace module it's difficult for extensions to access it (Puter backend core would need to expose it). Since TeePromise itself is very small and will rarely (if ever) be changed I decided to move it to a separate package on npm.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
"main": "main.js",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"teepromise": "^0.1.1",
|
||||
"uuid": "^13.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import putility from '@heyputer/putility';
|
||||
import fs from 'node:fs';
|
||||
import path_ from 'node:path';
|
||||
import { TeePromise } from 'teepromise';
|
||||
|
||||
const {
|
||||
progress_stream,
|
||||
@@ -40,7 +40,7 @@ export default class LocalDiskStorageController {
|
||||
limit: file.size,
|
||||
});
|
||||
|
||||
const writePromise = new putility.libs.promise.TeePromise();
|
||||
const writePromise = new TeePromise();
|
||||
const path = this.#getPath(uid);
|
||||
const write_stream = fs.createWriteStream(path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user