We've created our own Git Large File Storage (LFS) server due to the
excessive cost of GitHub's bandwidth. Did you know all of their Ethernet
cables are actually gold coated diamonds?
This PR reverses the work done in #954 to compress large location JSON
files into a 7zip archive and handle the (de)compression of the archive.
Only JSON files within the `project/assets/database/` directory that are
larger than 5MB have been included in LFS. This translates to all of the
`looseLoot.json` files. The rest are small enough to be included in the
base repo.
A `.lfsconfig` file has been added to the root of the project to alert
git to the presence of the custom LFS server. This public server is
read-only. Write access is only available to developers within the
Single Player Tarkov GitHub organization.
<img
src="https://github.com/user-attachments/assets/7ddfec9b-5a9a-42e6-806d-fd419e4eaa4f"
width="250">
Due to LFS storage issues... This PR removes all current LFS files (the
location loot files) and replaces them with a single 7-zip archive. The
archive is stored in LFS, but has decreased in size by roughly 95%.
The location `.json` files are now git-ignored.
There are two new npm commands to aid in working with the archive:
- `npm run database:compress`
Compresses the JSON files into an archive *which can be committed into
the project*.
- `npm run database:decompress`
Decompresses the archive into the original JSON files located in the
working directory.
The gulp file that handles builds has been updated to ensure that the
archive files are *always* used when a build is processed, regardless of
if the JSON files are already present in the working directory.
This update now runs Prettier before ESLint (with the Stylistic plugin) for code formatting. This takes care of a lot of the edge cases that ESLint doesn't touch by itself. Also adds the `eslint-plugin-unused-imports` ESLint plugin to remove unused imports and the `eslint-plugin-switch-allman` ESLint plugin to enforce Allman braces on case declarations.
The VSCode format-on-save function now requires two additional extentions to be installed: Prettier and Format Code Action. Links can be found in the README and in the recommended extentions section of VSCode when the workspace is open.
Co-authored-by: chomp <chomp@noreply.dev.sp-tarkov.com>
Reviewed-on: SPT-AKI/Server#336
Co-authored-by: Refringe <me@refringe.com>
Co-committed-by: Refringe <me@refringe.com>
The `package-lock.json` file was logging platform specific package information. This was causing builds to fail on platforms other than the platform that last generated the `package-lock.json` file.
Resolves#572