Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .npm-upgrade.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"reason": "Remove when https://github.com/winstonjs/logform/issues/336 is fixed"
},
"@types/node": {
"versions": ">22.0.0",
"reason": "LTS is 22"
"versions": ">24.0.0",
"reason": "LTS is 24"
}
}
}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# GameVault Backend Server Changelog

## 16.2.0

### Changes

- Fixed usage of deprecated Node 22 property
- Fixed Session Cleanup Algorithm failing to work on large servers.

## 16.1.2

### Changes
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gamevault-backend",
"version": "16.1.2",
"version": "16.2.0",
"description": "the self-hosted gaming platform for drm-free games",
"author": "Alkan Alper, Schäfer Philip GbR / Phalcode",
"private": true,
Expand Down Expand Up @@ -99,7 +99,7 @@
"@types/morgan": "^1.9.10",
"@types/ms": "^2.1.0",
"@types/multer": "^2.0.0",
"@types/node": "^22.0.0",
"@types/node": "^24.0.0",
"@types/node-7z": "^2.1.11",
"@types/passport-http": "^0.3.11",
"@types/passport-jwt": "^4.0.1",
Expand Down
320 changes: 160 additions & 160 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions src/modules/auth/authentication.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,13 @@ export class AuthenticationService implements OnModuleInit {
);
const cutoffDate = new Date(Date.now() - expiryTime * 3);

const result = await this.sessionRepository.remove(
await this.sessionRepository.find({
where: {
expires_at: LessThan(cutoffDate),
},
}),
);
const result = await this.sessionRepository.delete({
expires_at: LessThan(cutoffDate),
});

this.logger.debug({
message: "Cleaned up expired sessions",
deletedCount: result.length,
deletedCount: result.affected,
cutoffDate,
expiryTime,
});
Expand Down
2 changes: 1 addition & 1 deletion src/modules/games/files.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ export class FilesService implements OnApplicationBootstrap {
entries
.filter((e) => e.isFile() && this.isValidFilePath(e.name))
.map(async (e) => {
const path = join(e.path, e.name);
const path = join(e.parentPath, e.name);
const { size } = await stat(path);
return { path, size: BigInt(size) };
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export class MediaGarbageCollectionService implements OnApplicationBootstrap {
})
)
.filter((file) => file.isFile() && isUUID(file.name.substring(0, 35), 4))
.map((file) => join(file.path, file.name));
.map((file) => join(file.parentPath, file.name));

let removedCount = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default async function loadPlugins() {

const plugins = await Promise.all(
pluginModuleFiles.map(
(file) => import(resolve(join(file.path, file.name))),
(file) => import(resolve(join(file.parentPath, file.name))),
),
);

Expand Down
Loading