express-project-builder 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +25 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -676,3 +676,28 @@ delete_cache_from_RAM("user:123"); // 1 (deleted)
676
676
  // Clear all cache
677
677
  clear_all_cache(); // Removes all entries
678
678
  ```
679
+
680
+ - /src/utils/**removeUploadedFiles.ts** <br/>
681
+ Utility functions for cleaning up uploaded files from local storage after cloud upload or error handling.
682
+
683
+ ```typescript
684
+ // In your service file or any file
685
+ import {
686
+ removeSingleUploadedFile,
687
+ removeUploadedFiles,
688
+ removeFilesFromFields,
689
+ cleanUploadDirectory,
690
+ } from "../../utils/removeUploadedFiles";
691
+
692
+ // Remove a single file
693
+ await removeSingleUploadedFile("/path/to/file.jpg");
694
+
695
+ // Remove all uploaded files from multer request
696
+ await removeUploadedFiles(req.files);
697
+
698
+ // Remove files from specific fields only
699
+ await removeFilesFromFields(req.files, ["images", "documents"]);
700
+
701
+ // Clean entire upload directory
702
+ await cleanUploadDirectory("/path/to/uploads");
703
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-project-builder",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "A powerful and professional Express.js project generator CLI that instantly scaffolds a production-ready backend with TypeScript, modular architecture, and built-in support for MongoDB (Mongoose) or PostgreSQL (Prisma). Includes authentication, error handling, rate limiting, file upload, caching, and utility functions—so you can focus on building features instead of boilerplate. Perfect for kickstarting your next Express.js API project with best practices and modern tools.",
5
5
  "type": "module",
6
6
  "main": "dist/bin/index.js",