0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:30:45 -05:00

4310 Commits

Author SHA1 Message Date
1d1104a1e8
Refactor SaveServer and the things that interact with it to be async (#1064)
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>
2025-01-10 09:15:14 +00:00
Chomp
9612ca2834
Default new profile name to launcher username (#1066)
Instead of always naming new profiles "SPTarkov", use the launcher
username as the default.

This improves the UX as you can quickly click through account creation
on multiple accounts without needing to remember to re-enter a new
profile name for each account
2025-01-10 08:54:09 +00:00
DrakiaXYZ
89b292e42b Default new profile name to launcher username 2025-01-09 18:32:00 -08:00
DrakiaXYZ
d2b83f64d8 Logform made a breaking change in 2.7.0, fix our call to printf to work with it 2025-01-09 18:10:12 -08:00
c334855919
Removes Typedoc (#1063)
### This depends on #1062

Actual changes in f940ac72b24951fae5abcf548e0a3d4c77640730

---------

Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
2025-01-09 21:54:12 +00:00
a821f1caba
Pins NPM Packages (#1062)
We can't commit our npm lockfile, so this should help lock things down.
2025-01-09 21:53:00 +00:00
Chomp
fb10df25e0
Removes date-fns (#1061)
Removes `date-fns` dependency and replace date formatting with custom
implementation.
2025-01-09 21:21:33 +00:00
73ebeca095
Removes date-fns
Removes `date-fns` dependency and replace date formatting with custom implementation.
2025-01-09 15:54:31 -05:00
17a614aa03
Removes PNPM Feature (#1060)
Removes the auto-install mod dependencies feature, the related messages,
and the configuration option.

Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
4.0.0-BE-20250109
2025-01-09 20:29:28 +00:00
6be6d9099c
Removes buffer-crc32 (#1058)
Remove `buffer-crc32` dependency and use `crc32` from `node:zlib`.

Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
2025-01-09 20:28:33 +00:00
468ffed1b4
Use spawn instead of exec in build (#1057)
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>
2025-01-09 20:27:37 +00:00
dcbb5c1d5f
Fix CI (#1056)
- 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>
2025-01-09 20:25:53 +00:00
Chomp
6283635be6
Hash mods asynchronously (#1055) 2025-01-09 20:23:58 +00:00
Chomp
18b4488d2e
Updates Issue URL (#1059)
![That's
it.](https://media1.giphy.com/media/v1.Y2lkPTc5MGI3NjExMWJ3OHF3Z2U0NWwyc2RwY2ZoN25xZmFzbWNrbGtlc2lybzQybG52OCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/CM42QlML275iJngh7H/giphy.webp)
2025-01-09 20:23:16 +00:00
15ff09bbb5
Updates Issue URL 2025-01-09 13:33:06 -05:00
e86ceb89ce Hash mods asynchronously 2025-01-09 18:07:48 +01:00
ab1b5cd30e
Fully make loadAsync asynchronous (#1053)
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)
2025-01-09 16:50:36 +00:00
Chomp
7468975f95
Timer Utility Class (#1054)
Refactor timing logic to use a new simple Timer utility class for
performance measurements across services.

Adds a timer for database import.
2025-01-09 16:39:42 +00:00
abbaef4094
Timer Util Class
Refactor timing logic to use a new simple Timer class for performance measurements across services
2025-01-09 11:32:01 -05:00
Chomp
7c3b10d0de
Replace json-fixer with jsonrepair (#1052)
The `fixJson` package is stale and `jsonrepair` is an active
alternative. Seams to work well.
2025-01-09 16:00:07 +00:00
Chomp
4b04b5d110
Merge branch '4.0.0-DEV' into json-validation-module 2025-01-09 15:59:27 +00:00
Chomp
ae7fddb96e Initial implementation of Prestige system
Refactor of Create profile code into own service

Updated `addHideoutCustomisationLock` to use enums for parameters + refactored logic

Removed redundant `HideoutCustomizationGen` script
2025-01-09 15:58:11 +00:00
56c13e9d3f
Replace json-fixer with jsonrepair for improved JSON validation 2025-01-09 09:59:13 -05:00
Chomp
228be2e50f Moved trader images to correct path 2025-01-09 14:50:58 +00:00
Chomp
54213a4ab3 Added missing images 2025-01-09 11:51:19 +00:00
Chomp
f6f744c928 Move images to correct path to be fully utilised by new route gen system 2025-01-09 11:43:33 +00:00
Chomp
97d1343385 Rewrote image route generation system 2025-01-09 11:42:17 +00:00
Chomp
ae0e271957 Log file errors when performing imageRoute lookup 2025-01-09 11:41:47 +00:00
Chomp
bd00542793 Reduce server start time when running in debug mode by generating less flea offers 2025-01-09 10:52:36 +00:00
Chomp
f5600fe215 Stub out get Prestige endpoint 2025-01-09 10:52:09 +00:00
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
Chomp
52aba88e49 Removed unused script 2025-01-09 10:05:23 +00:00
Chomp
ce4cf5aabb Fixed cultist circle not utilising itemConfig.rewardItemTypeBlacklist 2025-01-09 09:26:38 +00:00
Chomp
3273c3233c Blacklisted TG-Vi-24 true vaccine from loot + pmcs 2025-01-08 22:15:59 +00:00
Chomp
9d2a10a748
Fix exception when heal item can't be found (#1049) 4.0.0-BE-20250108 2025-01-08 20:59:37 +00:00
DrakiaXYZ
0435b09810 Fix exception when heal item can't be found 2025-01-08 12:56:34 -08:00
Chomp
97e4fa98ff Revert "Added locationConfig.forcedRaidEndState property"
This reverts commit d578e5f001cac460d2eac10ec81465b54ac334fd.
2025-01-08 19:38:58 +00:00
Chomp
d578e5f001 Added locationConfig.forcedRaidEndState property 2025-01-08 19:30:41 +00:00
Chomp
ce1f645697 Extend christmas to 14th 2025-01-08 19:03:59 +00:00
Chomp
33591df715 Added system to strip children from containers defined in new config property tplsToStripChildItemsFrom
Fixes Christmas gifts causing strange behaviour when moved to stash as we generate container gift loot when player opens then
2025-01-08 19:03:50 +00:00
Chomp
0eb31c468f Updated quest.json values
Updated locales
2025-01-08 15:48:31 +00:00
Chomp
e31303fec9 Added killa helmet globals default preset 2025-01-08 14:53:11 +00:00
Chomp
ddb83aeb4e Updated JSONs 2025-01-08 14:52:53 +00:00
Chomp
5a5b01dc71 Disabled cursedAssault to pmc conversion 2025-01-08 12:07:11 +00:00
Chomp
2ad2774739 Blacklisted locked case from pmcs and loot reward pool 2025-01-08 12:06:47 +00:00
Chomp
60996cd330 Blacklisted case key from PMCs and item reward pool 2025-01-08 11:49:15 +00:00
Chomp
35a2d74e8f Set LowerNickname property on bot generation 2025-01-08 11:37:37 +00:00
Chomp
588e5ecb44 Blacklisted TG-Vi-24 lethal vaccine from PMCs and reward item pool 2025-01-08 10:16:08 +00:00
Chomp
8e016b0ab7 Fixed type errors 2025-01-08 10:15:02 +00:00
Chomp
61532d917d Silenced various warnings 2025-01-08 10:11:48 +00:00