Commit graph

11 commits

Author SHA1 Message Date
Norm e814fdc7d1
backend: fix lints in services/drive 2022-10-16 18:20:20 -04:00
Johann150 7a80015225
fix lint "no-param-reassign" 2022-08-10 16:36:54 +02:00
Johann150 c8f49bae76
fix lint "object-shorthand" 2022-08-03 14:58:24 +02:00
Johann150 37e47a257e
fix lints "import/order" and "import/no-duplicate"
Also simplified some import paths by replacing relative with absolute paths.
2022-08-03 14:05:50 +02:00
Johann150 e27c6abaea
refactor: temporary files (#8713)
* simplify temporary files for thumbnails

Because only a single file will be written to the directory, creating a
separate directory seems unnecessary. If only a temporary file is created,
the code from `createTemp` can be reused here as well.

* refactor: deduplicate code for temporary files/directories

To follow the DRY principle, the same code should not be duplicated
across different files. Instead an already existing function is used.

Because temporary directories are also create in multiple locations,
a function for this is also newly added to reduce duplication.

* fix: clean up identicon temp files

The temporary files for identicons are not reused and can be deleted
after they are fully read. This condition is met when the stream is closed
and so the file can be cleaned up using the events API of the stream.

* fix: ensure cleanup is called when download fails

* fix: ensure cleanup is called in error conditions

This covers import/export queue jobs and is mostly just wrapping all
code in a try...finally statement where the finally runs the cleanup.

* fix: use correct type instead of `any`
2022-05-25 16:50:22 +09:00
syuilo 41c2aed7dc chore: fix lint 2022-04-03 15:33:22 +09:00
syuilo d071d18dd7
refactor: Use ESM (#8358)
* wip

* wip

* fix

* clean up

* Update tsconfig.json

* Update activitypub.ts

* wip
2022-02-27 11:07:39 +09:00
MeiMei 7aecf15f94
refactor, enhance: ドライブ引数のオブジェクト化, 追加時のcomment指定 (#8180)
* refactor: ドライブの引数をオブジェクト化する Resolve #8177

* Resolve #8181

* fix

* archivePath
2022-01-23 22:52:35 +09:00
syuilo 59520c31fd refactor(server): use named export 2022-01-20 02:43:13 +09:00
syuilo c69b72e199 fix lint 2021-12-09 23:58:30 +09:00
syuilo 0e4a111f81 refactoring
Resolve #7779
2021-11-12 02:02:25 +09:00
Renamed from src/services/drive/upload-from-url.ts (Browse further)