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
296 changes: 166 additions & 130 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"dotenv": "17.4.2",
"express": "5.2.1",
"express-async-handler": "1.2.0",
"fast-xml-builder": "1.2.0",
"fast-xml-parser": "5.9.0",
"hash-wasm": "4.12.0",
"mime-types": "3.0.2",
Expand Down Expand Up @@ -90,7 +91,7 @@
"vitest-mock-express": "^2.2.0"
},
"optionalDependencies": {
"sharp": "^0.34.5"
"sharp": "0.35.1"
},
"engines": {
"node": "^22.13.0 || >=24.11.0"
Expand Down
4 changes: 3 additions & 1 deletion src/services/drive/drive-file.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export class DriveFileService {
return driveFileItem;
};

private createDriveFileEntry = async (payload: StorageTypes.FileEntryByUuid): Promise<StorageTypes.DriveFileData> => {
private readonly createDriveFileEntry = async (
payload: StorageTypes.FileEntryByUuid,
): Promise<StorageTypes.DriveFileData> => {
const currentWorkspace = await AuthService.instance.getCurrentWorkspace();

if (currentWorkspace) {
Expand Down
7 changes: 5 additions & 2 deletions src/services/drive/drive-item.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { DriveItemBD } from '../database/drive-item/drive-item.domain';
export class DriveItemService {
static readonly instance = new DriveItemService();

private tryGetFileByUuid = async (cached: DriveItemBD, path: string): Promise<DriveFileItem | undefined> => {
private readonly tryGetFileByUuid = async (cached: DriveItemBD, path: string): Promise<DriveFileItem | undefined> => {
try {
const item = await DriveFileService.instance.getFileMetadata(cached.uuid);
await DriveItemRepository.instance.createOrUpdate([
Expand All @@ -28,7 +28,10 @@ export class DriveItemService {
}
};

private tryGetFolderByUuid = async (cached: DriveItemBD, path: string): Promise<DriveFolderItem | undefined> => {
private readonly tryGetFolderByUuid = async (
cached: DriveItemBD,
path: string,
): Promise<DriveFolderItem | undefined> => {
try {
const item = await DriveFolderService.instance.getFolderMetaByUuid(cached.uuid);
await DriveItemRepository.instance.createOrUpdate([
Expand Down
2 changes: 1 addition & 1 deletion src/services/thumbnail.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class ThumbnailService {
private readonly getThumbnailFromImageBuffer = async (buffer: Buffer): Promise<Buffer | undefined> => {
const sharp = await getSharp();
if (sharp) {
return sharp(buffer, { failOnError: false })
return sharp(buffer, { failOn: 'none' })
.resize({
height: ThumbnailConfig.MaxHeight,
width: ThumbnailConfig.MaxWidth,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/async.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ export class AsyncUtils {

return Promise.race([promise, timeoutPromise]).finally(() => {
clearTimeout(timeoutId);
}) as Promise<T>;
});
};
}
3 changes: 2 additions & 1 deletion src/utils/xml.utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { XMLParser, XMLBuilder, X2jOptions, XmlBuilderOptions } from 'fast-xml-parser';
import { XMLParser, X2jOptions, XmlBuilderOptions } from 'fast-xml-parser';
import XMLBuilder from 'fast-xml-builder';

export class XMLUtils {
static readonly DEFAULT_NAMESPACE_LETTER = 'D';
Expand Down
3 changes: 0 additions & 3 deletions src/webdav/middewares/webdav-auth.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ export const WebDAVAuthMiddleware = (configs: WebdavConfig): RequestHandler => {
return sendUnauthorizedError(res, 'Authentication failed. Please check your WebDAV custom credentials.');
} else {
next();
return;
}
} else {
next();
return;
}
})();
};
Expand All @@ -52,5 +50,4 @@ const sendUnauthorizedError = (res: Response, message: string) => {
);

res.status(401).send(errorBodyXML);
return;
};
Loading