0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 06:50:43 -05:00
server/project/.swcrc
Refringe 9c17464ae3
File System (#1050)
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>
2025-01-09 10:50:39 +00:00

28 lines
608 B
Plaintext

{
"$schema": "https://json.schemastore.org/swcrc",
"jsc": {
"parser": {
"syntax": "typescript",
"dynamicImport": true,
"decorators": true
},
"transform": {
"decoratorMetadata": true
},
"target": "esnext",
"loose": true,
"externalHelpers": false,
"keepClassNames": true,
"baseUrl": "./",
"paths": {
"@spt/*": ["src/*"]
}
},
"module": {
"type": "commonjs",
"strictMode": false
},
"sourceMaps": true,
"minify": false
}