fix: move dependency in LocalDiskStorageController
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
test / backend (node env, api-test) (22.x) (push) Has been cancelled
test / puterjs (browser env, playwright) (22.x) (push) Has been cancelled
test / puterjs (node env, vitest) (22.x) (push) Has been cancelled

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:
KernelDeimos
2025-11-19 16:54:29 -05:00
committed by Eric Dubé
parent 03db975e3e
commit bb90595431
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -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);