🍱 graphql schema stitching related changes

This commit is contained in:
2026-03-05 01:00:04 -05:00
parent 22cbdcd468
commit 8a8acc656a
7 changed files with 539 additions and 351 deletions

View File

@@ -98,10 +98,17 @@ export const getSizeOfDirectory = async (
const files = await readdir(directoryPath);
const stats = files.map((file) => stat(path.join(directoryPath, file)));
return (await Promise.all(stats)).reduce(
const totalSizeInBytes = (await Promise.all(stats)).reduce(
(accumulator, { size }) => accumulator + size,
0
);
return {
totalSize: totalSizeInBytes,
totalSizeInMB: totalSizeInBytes / (1024 * 1024),
totalSizeInGB: totalSizeInBytes / (1024 * 1024 * 1024),
fileCount: files.length,
};
};
export const isValidImageFileExtension = (fileName: string): boolean => {