mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 08:50:43 -05:00
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>
92 lines
3.3 KiB
JSON
92 lines
3.3 KiB
JSON
{
|
|
"name": "spt-server",
|
|
"version": "4.0.0",
|
|
"author": "SPT Server",
|
|
"license": "NCSA",
|
|
"main": "obj/bundle.js",
|
|
"repository": "https://dev.sp-tarkov.com/SPT/Server",
|
|
"description": "The single-player modding framework for Escape From Tarkov.",
|
|
"icon": "assets/images/icon.ico",
|
|
"engines": {
|
|
"node": "22.12.0"
|
|
},
|
|
"scripts": {
|
|
"check:circular": "madge --circular --ts-config tsconfig.json --extensions ts ./src/",
|
|
"lint": "npx @biomejs/biome lint ./",
|
|
"lint:fix": "npx @biomejs/biome lint --write ./",
|
|
"style": "npx @biomejs/biome format ./",
|
|
"style:fix": "npx @biomejs/biome format --write ./",
|
|
"format": "npx @biomejs/biome check --write ./",
|
|
"test": "npx vitest run",
|
|
"test:watch": "npx vitest",
|
|
"test:coverage": "npx vitest run --coverage",
|
|
"test:ui": "npx vitest --ui --coverage",
|
|
"build:release": "cross-env PKG_CACHE_PATH=\"./.pkg-cache\" gulp build:release",
|
|
"build:debug": "cross-env PKG_CACHE_PATH=\"./.pkg-cache\" gulp build:debug",
|
|
"build:bleeding": "cross-env PKG_CACHE_PATH=\"./.pkg-cache\" gulp build:bleeding",
|
|
"build:bleedingmods": "cross-env PKG_CACHE_PATH=\"./.pkg-cache\" gulp build:bleedingmods",
|
|
"run:build": "gulp run:build",
|
|
"run:debug": "npm run type-check && tsx ./src/entry/run.ts",
|
|
"run:profiler": "gulp run:profiler",
|
|
"type-check": "tsc -p tsconfig.debug.json",
|
|
"gen:types": "tsc -p tsconfig.types.json",
|
|
"gen:docs": "typedoc --options ./typedoc.json --entryPointStrategy expand ./src",
|
|
"gen:items": "tsx ./src/tools/ItemTplGenerator/ItemTplGeneratorProgram.ts",
|
|
"gen:productionquests": "tsx ./src/tools/ProductionQuestsGen/ProductionQuestsGenProgram.ts"
|
|
},
|
|
"dependencies": {
|
|
"atomically": "2.0.3",
|
|
"buffer-crc32": "~1.0",
|
|
"date-fns": "~3.6",
|
|
"date-fns-tz": "~3.1",
|
|
"fs-extra": "11.2.0",
|
|
"i18n": "~0.15",
|
|
"json-fixer": "~1.6",
|
|
"json5": "~2.2",
|
|
"jsonc": "~2.0",
|
|
"logform": "~2.6",
|
|
"mongoid-js": "~1.3",
|
|
"reflect-metadata": "~0.2",
|
|
"semver": "~7.6",
|
|
"source-map-support": "~0.5",
|
|
"string-similarity-js": "~2.1",
|
|
"tsyringe": "~4.8",
|
|
"winston": "~3.13",
|
|
"winston-daily-rotate-file": "~5.0",
|
|
"ws": "~8.18"
|
|
},
|
|
"devDependencies": {
|
|
"@biomejs/biome": "1.8.3",
|
|
"@pnpm/exe": "8.15.9",
|
|
"@swc/cli": "0.5.2",
|
|
"@swc/core": "1.10.6",
|
|
"@types/fs-extra": "11.0.4",
|
|
"@types/i18n": "~0.13",
|
|
"@types/node": "22.10.2",
|
|
"@types/semver": "~7.5",
|
|
"@types/ws": "~8.5",
|
|
"@vitest/coverage-istanbul": "^2.1.8",
|
|
"@vitest/ui": "^2.1.8",
|
|
"@yao-pkg/pkg": "6.2.0",
|
|
"@yao-pkg/pkg-fetch": "3.5.18",
|
|
"cross-env": "~7.0",
|
|
"gulp": "~5.0",
|
|
"gulp-decompress": "~3.0",
|
|
"gulp-download": "~0.0.1",
|
|
"gulp-execa": "~7.0",
|
|
"gulp-rename": "~2.0",
|
|
"madge": "~7",
|
|
"minimist": "~1.2",
|
|
"resedit": "~2.0",
|
|
"tsx": "4.19.2",
|
|
"typedoc": "~0.26",
|
|
"typescript": "~5.5",
|
|
"vitest": "^2.1.8"
|
|
},
|
|
"targets": {
|
|
"default": {
|
|
"includeNodeModules": true
|
|
}
|
|
}
|
|
}
|