Implemented placeholders for saving a file in the files service and added a new POST endpoint in the files controller. These changes lay the groundwork for future development of file uploading functionality.
Introduced CreateGroupDto to enforce validation rules for group creation. Integrated DbModule into GroupsService and added a getGroupsByName method for database queries. Placeholder methods for group creation, deletion and file retrieval are also defined.
Updated the FilesService.get() method to return a StreamableFile directly with appropriate headers instead of a custom object. Adjusted the FilesController to reflect this change and ensure the file names are formatted by replacing spaces with underscores.
Replace loop-based MIME type check with Set.prototype.has for improved readability and performance. This change eliminates the need for an explicit loop, making the code more concise and efficient.
Introduce 'extension' and 'isDocumentation' fields to the database schema. These additions enhance file metadata and facilitate improved data management.
This commit updates the FilesModule to import both StorageModule and DbModule. This enhances the functionality of the FilesModule by integrating database and storage services.
Replaced Buffer with StreamableFile for more efficient file handling by streaming the content instead of reading it into memory. Additionally, updated the method signatures and parameters to improve clarity and align with the new changes.
Included ts-mockito version 2.6.1 to both package.json and pnpm-lock.yaml files. This addition will aid in creating mock objects in unit tests, enhancing the project's test capabilities.
Removed the `files.service.spec.ts` test file as it is no longer required. Updated the `get` method parameter in `files.service.ts` to use `fileId` instead of `checksum`, and adjusted the related logic for consistency.
Implemented a method to fetch a file and its information based on checksum. Integrated database and storage services to retrieve and prepare file stream and metadata. Also handles scenarios where the file is not found or multiple entries exist for the same checksum.
Introduced a new `read` method in `storage.service.ts` to fetch files from storage based on checksum, extension, and type. This method handles potential exceptions by throwing a `NotFoundException` if the file is not found.
Enhanced the "new" method to include detailed documentation and parameters for file processing and validation. Introduced allowed MIME types as a parameter and logging for clearer file management.
Update all NestJS imports to use double quotes instead of single quotes across multiple files. Adjusted indentation in various files to ensure uniform code style. These changes improve code readability and maintainability.
Updated the Documentation button to include a NotepadTextDashed icon from lucide-react. This change improves visual consistency and enhances user experience by aligning with the icon usage pattern established in the Accueil button.
Deleted MachineController, MachineModule, and associated tests to streamline the codebase. This simplifies the project structure by removing unused or redundant components.
Reorganized StorageService to incorporate MIME type validation and adjustable file size limits, enhancing file validation. Introduced new methods for checksum calculation and file information generation, and updated the StorageModule to import the DbModule for database interactions.
Added a new 'checksum' field with a length of 64 characters to ensure data integrity. Additionally, enforced uniqueness on the 'type_name' to prevent duplicate entries.
Updated tsconfig.json to include paths for better imports. Modified layout.tsx and Header.tsx for improved styles. Refactored HomePage to use new state management and simplified components for better readability and navigation.
Updated `MachineModule` to `MachinesModule` and `AuthorModule` to `AuthorsModule` for consistency with pluralized naming. Adjusted import paths accordingly to reflect these changes.
Renamed MachineService to MachinesService across the codebase for consistency. Added MachinesController, MachinesModule, and associated tests to enhance modularity and structure.
Added dependencies include @nestjs/throttler, argon2, express, helmet, and jose. Updated existing dependencies in package.json and pnpm-lock.yaml to their latest versions for compatibility and security improvements.
Added dependencies include @nestjs/throttler, argon2, express, helmet, and jose. Updated existing dependencies in package.json and pnpm-lock.yaml to their latest versions for compatibility and security improvements.
Updated multiple dependencies to their latest versions in both package.json and pnpm-lock.yaml. This ensures compatibility and incorporates the latest features and security fixes.
This change ensures the file ends with a newline character, conforming to standard formatting practices. It helps in maintaining consistency and prevents potential issues with some text editors and version control systems.
This commit adds MachineModule and AuthorModule to the imports array in the AppModule. This inclusion ensures that the functionalities provided by these modules are available throughout the application.
Implemented the MachineModule along with its corresponding MachineController and MachineService classes. Added unit tests for both the controller and service to ensure they are correctly instantiated and defined.
This commit introduces a new Author module in the backend application. It includes the AuthorController with basic endpoints and the AuthorService for handling author-related logic. Basic test files for both the controller and the service are also added.
Implemented GET, POST, and DELETE endpoints in GroupsController to manage groups and associated files with pagination and optional search functionality. Created an ISearchQuery interface to standardize query parameters across methods.
This commit introduces the Files, Groups, and Admin modules, along with their respective services and controllers. Each module includes basic setup with injectable services, controllers, and initial test specs to ensure they are defined properly. This groundwork prepares the backend for further development and feature implementation.
Integrated FilesModule, AdminModule, and GroupsModule into app.module.ts to extend functionality. This addition enhances organizational capabilities and improves system modularity.
Added the `groupId` column to the existing table to link with the new `FilesGroupTable`. The `FilesGroupTable` includes a unique identifier and a unique group name to manage file groups effectively.
Deleted unused spec files for app controller and service to clean up the codebase. Added helmet middleware for security and integrated ThrottlerModule for rate limiting and ConfigModule for configuration management. Updated app.service to modify response structure.
Removed the deprecated `firstName` and `lastName` fields and introduced `email` and `uploader` fields. Added `FilesTypesTable`, `MachinesTable`, and `FilesTypeForMachine` for managing file types and machine associations. Updated the `fileType` field to reference `FilesTypesTable`.
Introduced `CredentialsService` for handling password hashing, verification, and JWT token operations. Added `CredentialsModule` to register `CredentialsService` and integrate it with the ConfigModule.
Implemented the `AuthModule` with necessary controllers and services to handle user authentication and authorization. Added `UserGuard` and `AdminGuard` to secure endpoints based on user roles.
Ajout des nouveaux composants UI : Alert, Badge, Form, Sheet, Tabs et Input dans le répertoire frontend. Mise à jour du fichier package.json avec des nouvelles dépendances Radix UI et des autres bibliothèques nécessaires. Ajout d'une configuration pour TailwindCSS dans components.json.
Ajout des nouveaux composants UI : Alert, Badge, Form, Sheet, Tabs et Input dans le répertoire frontend. Mise à jour du fichier package.json avec des nouvelles dépendances Radix UI et des autres bibliothèques nécessaires. Ajout d'une configuration pour TailwindCSS dans components.json.
Ajoute la spécification de retour pour la méthode getChecksum dans StorageService. Cela améliore la clarté et la sécurité du code en explicitant le type de retour attendu.
Ajout de "file-type" à la liste des dépendances dans package.json pour permettre la détection du type de fichier. Les modifications dans pnpm-lock.yaml incluent également des dépendances supplémentaires et leurs résolutions associées.
Ajout des fonctions privées pour sauvegarder, vérifier, et récupérer des fichiers dans le service de stockage. Plusieurs exceptions gérées pour les erreurs courantes telles que la taille et le type de fichier.
Change le type du paramètre dbConfig de `any` à `object` pour renforcer le typage et éviter les erreurs potentielles. Cela améliore la robustesse et la maintenabilité du code.
Cette configuration ajoute un fichier docker-compose.yml pour définir un service PostgreSQL. Cela inclut les paramètres nécessaires tels que les variables d'environnement et les volumes. Cela simplifie le déploiement et le développement en configurant automatiquement le conteneur PostgreSQL.
Création du fichier StorageService avec l'annotation @Injectable et déclaration de StorageModule avec le StorageService comme fournisseur. Cela prépare le backend à gérer les fonctionnalités de stockage.
Ajout des dépendances liées à NestJS, Drizzle, Esbuild et PostgreSQL. Cela inclut les versions spécifiées pour chaque package, garantissant la compatibilité et les mises à jour nécessaires pour le projet.
Sépare la configuration de la base de données et l'initialisation des clients en deux méthodes distinctes. Cela améliore la lisibilité et facilite la gestion future des configurations et des clients.
Ajout des bibliothèques @nestjs/config, drizzle-kit, drizzle-orm, drizzle-zod et postgres dans package.json. Cela permettra une meilleure configuration de l'application et des interactions avec la base de données.
Cette modification standardise les indentations afin d'améliorer la lisibilité et la cohérence du code. Aucune fonctionnalité n'a été modifiée, ces changements sont purement esthétiques.
Réajustement de l'ordre des importations dans db.module.ts pour améliorer la lisibilité et le respect des conventions de code. Aucun changement fonctionnel n'a été introduit.
Cela empêche le commit accidentel des fichiers de configuration sensibles. Les variables d'environnement définies dans .env ne seront plus suivies par Git, ce qui améliore la sécurité du dépôt.