Changes:
- Adds a map for `profiles`
- Changes `onBeforeSaveCallbacks` to be Promises
- Changes `SaveMD5` into `saveSHA1` as the async method for `saveSHA1`
isn't blocking
- Changes all routes and callbacks directly interacting with SaveServer
to be async
---------
Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
### This depends on #1062
Actual changes in f940ac72b24951fae5abcf548e0a3d4c77640730
---------
Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
Removes the auto-install mod dependencies feature, the related messages,
and the configuration option.
Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
This updates the `exec` calls in the build script to use `spawn` instead
for better argument handling. Resolves an issue that caused spaces in
build paths to kill the build.
Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
- Removes a test for a class that was removed
- Changes the command for type checking from `lint:types` to
`type-check`
---------
Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
This should make every part that uses `loadAsync` asynchronous
The changes I made:
- I ended up creating a new method to make SHA-1 hashes asynchronously,
did up some reading up and found that `crypto.createHash` could
potentially be blocking.
- Ended up doing some slight code cleanup in `ImporterUtil` to make that
helper more readable.
- I changed `deserializeWithCacheCheckAsync` to skip writing files with
an extra parameter as it was blocking, this can now be called manually
with `writeCacheAsync` (Default behavior of this method stays the same)
Refactor of Create profile code into own service
Updated `addHideoutCustomisationLock` to use enums for parameters + refactored logic
Removed redundant `HideoutCustomizationGen` script
This adds the `FileSystem` and `FileSystemSync` classes to replace the
VFS class. These classes handle file system operations using `fs-extra`
for most tasks, except where the `atomically` package can be used to
improve reads and writes. The goal is to ensure that file operations are
as safe as possible while still providing a comfortable API. File
operation atomicity is focused on single files, as there's no trivial,
strict way to ensure atomicity for directory operations.
## Changes
- Adds `FileSystem` class for asynchronous file operations
- Adds `FileSystemSync` class for synchronous file operations
- Updates `atomically` to `2.0.3`
- Updates build script to transpiles ESM modules
- Resolves `AbstractWinstonLogger` bug that could cause a log file to be
overwritten
- Removes `VFS` class
- Removes `AsyncQueue` class
- Removes `proper-lockfile` package
## TODO
- Test anything that touches a file.
I'm leaving this in a draft state until I can test this further. Help is
more than welcome at this point. The classes are pretty solid, but
ensuring that they're being used properly throughout the existing code
still needs work.
---------
Co-authored-by: Chomp <dev@dev.sp-tarkov.com>
These are possible fixes for the two type errors that are currently holding back type checking this branch. I say possible because it's not tested in game and I've only solved the issues with the current types and have no idea if the types are actually correct.
Needs a review.