formflux 0.0.1

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 (38) hide show
  1. package/README.md +127 -0
  2. package/dist/EventHandlers.js +16 -0
  3. package/dist/EventHandlers.js.map +1 -0
  4. package/dist/ExtractContent.js +154 -0
  5. package/dist/ExtractContent.js.map +1 -0
  6. package/dist/FormFlux.Types.js +3 -0
  7. package/dist/FormFlux.Types.js.map +1 -0
  8. package/dist/FormFlux.js +472 -0
  9. package/dist/FormFlux.js.map +1 -0
  10. package/dist/FormFluxError.js +11 -0
  11. package/dist/FormFluxError.js.map +1 -0
  12. package/dist/SetBodyContentToReq.js +101 -0
  13. package/dist/SetBodyContentToReq.js.map +1 -0
  14. package/dist/SetFileContentToReqFile.js +69 -0
  15. package/dist/SetFileContentToReqFile.js.map +1 -0
  16. package/dist/WriteFileContent.js +125 -0
  17. package/dist/WriteFileContent.js.map +1 -0
  18. package/dist/declarations/EventHandlers.d.ts +7 -0
  19. package/dist/declarations/ExtractContent.d.ts +11 -0
  20. package/dist/declarations/FormFlux.Types.d.ts +51 -0
  21. package/dist/declarations/FormFlux.d.ts +16 -0
  22. package/dist/declarations/FormFluxError.d.ts +5 -0
  23. package/dist/declarations/SetBodyContentToReq.d.ts +10 -0
  24. package/dist/declarations/SetFileContentToReqFile.d.ts +11 -0
  25. package/dist/declarations/WriteFileContent.d.ts +17 -0
  26. package/dist/declarations/defaultOptions.d.ts +2 -0
  27. package/dist/declarations/helpers/resBodyMaker.d.ts +1 -0
  28. package/dist/declarations/setDatatoReqobj.d.ts +7 -0
  29. package/dist/declarations/setFileNameToBody.d.ts +10 -0
  30. package/dist/defaultOptions.js +13 -0
  31. package/dist/defaultOptions.js.map +1 -0
  32. package/dist/helpers/resBodyMaker.js +30 -0
  33. package/dist/helpers/resBodyMaker.js.map +1 -0
  34. package/dist/setDatatoReqobj.js +21 -0
  35. package/dist/setDatatoReqobj.js.map +1 -0
  36. package/dist/setFileNameToBody.js +102 -0
  37. package/dist/setFileNameToBody.js.map +1 -0
  38. package/package.json +45 -0
package/README.md ADDED
@@ -0,0 +1,127 @@
1
+ # FormFlux
2
+
3
+ **FormFlux** is a powerful, customizable middleware for handling `multipart/form-data` in Node.js, built with TypeScript. It is inspired by [Multer](https://github.com/expressjs/multer) but written from scratch — without using `busboy` under the hood.
4
+
5
+ FormFlux focuses on giving developers greater control over file validation, parsing, and flexible API.
6
+
7
+ ---
8
+
9
+ ## Features
10
+
11
+ - ✅ Built from scratch (no `busboy`) in TypeScript
12
+ - ✅ Extended features compared to Multer
13
+ - ✅ Middleware options: `single`, `fields`, `any`, `bodyParser`
14
+ - ✅ Memory and disk storage support
15
+ - ✅ Strong validation capabilities (per-file and per-field)
16
+ - ✅ Easily integrates with Express or similar frameworks
17
+
18
+ ---
19
+
20
+ ## Code Example
21
+
22
+ ```ts
23
+ import express, { Request } from "express";
24
+ import path from "path";
25
+ import { FormFlux } from "formflux";
26
+ import { File } from "./FormFlux.Types"; // adjust the path as needed
27
+ import FormfluxError from "./FormFluxError"; // adjust the path as needed
28
+
29
+ const router = express.Router();
30
+
31
+ // Step 1: Configure memory storage or disk storage with options
32
+ const formFluxConfig = FormFlux.memoryStorage({
33
+ attachFileToReqBody: true, // global behavior
34
+ maxFields: 2,
35
+ maxFileCount: 3,
36
+ minFileCount: 1,
37
+ maxFileSize: 580 * 1024, // 580KB
38
+
39
+ destination: (
40
+ req: Request,
41
+ file: File,
42
+ cb: (err: FormfluxError | null, filePath: string) => void
43
+ ) => {
44
+ cb(null, path.resolve(process.cwd(), "temp"));
45
+ },
46
+
47
+ filename: (req, file, cb) => {
48
+ if (file.mimetype === "image/jpg") {
49
+ cb(null, Date.now() + "-" + file.originalname);
50
+ } else {
51
+ cb(null, "low-" + file.originalname);
52
+ }
53
+ },
54
+
55
+ fileFilter: (req, file, cb) => {
56
+ // Add your custom logic here
57
+ cb(null, true); // Allow all for now
58
+ },
59
+ });
60
+
61
+ // Step 2: Use in route like multer
62
+ router.post(
63
+ "/upload",
64
+ formFluxConfig.fields([
65
+ { name: "avatar", maxFileCount: 2, minFileCount: 1, maxFileSize: 100 * 1024 },
66
+ { name: "gallery", maxFileCount: 3 },
67
+ ]),
68
+ async (req, res) => {
69
+ console.log("Files:", req.files);
70
+ console.log("Body:", req.body); // Includes filenames if enabled
71
+
72
+ res.json({ message: "Files uploaded successfully" });
73
+ }
74
+ );
75
+
76
+ export default router;
77
+ ```
78
+
79
+ ## FormFlux Features
80
+
81
+ Here are some of the features of FormFlux:
82
+
83
+ 1. **Attach Filenames to `req.body`**
84
+ - FormFlux attaches the uploaded filename to the `req.body` – helpful when saving file metadata to a database.This behavior is enabled when the attachFileToReqBody: true option is set.
85
+
86
+ 2. **File Count Validation**
87
+ - Enforce `minFileCount`, `maxFileCount` and `maxFileSize` of files **per field** and **globally**.
88
+
89
+ 3. **File Filtering**
90
+ - Filter incoming files based on:
91
+ - `mimetype`
92
+ - `fieldname`
93
+ - `filesize`
94
+ - `originalname`
95
+
96
+ 4. **Per-Field Controls**
97
+ - Set validation options individually for each field:
98
+ - `minFileCount`
99
+ - `maxFileCount`
100
+ - `maxFileSize`
101
+
102
+ 5. **Field Limitations**
103
+ - Define how many total fields are allowed in a single request globally.
104
+ - `maxFields`
105
+
106
+ 6. **Flexible Middleware API**
107
+ - Just like Multer:
108
+ - `formflux.single(fieldname)`
109
+ - `formflux.fields([{ name, maxCount }])`
110
+ - `formflux.any()`
111
+ - `formflux.bodyParser()` – for parsing non-file fields
112
+
113
+ 7. **Storage Options**
114
+ - Supports `memoryStorage` and `diskStorage`, giving you full control over where and how files are saved.
115
+
116
+ ---
117
+
118
+ ## Limitation
119
+
120
+ Due to its custom implementation (not using `busboy`), the recommended **maximum file size is 200MB**. Going beyond that may lead to performance issues or high memory usage.
121
+
122
+ ---
123
+
124
+ ## Installation
125
+
126
+ ```bash
127
+ npm install formflux
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const node_events_1 = __importDefault(require("node:events"));
7
+ class EventHandlers extends node_events_1.default {
8
+ constructor() {
9
+ super();
10
+ }
11
+ emitMessage(eventName, message) {
12
+ this.emit(eventName, message);
13
+ }
14
+ }
15
+ exports.default = new EventHandlers();
16
+ //# sourceMappingURL=EventHandlers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventHandlers.js","sourceRoot":"","sources":["../src/EventHandlers.ts"],"names":[],"mappings":";;;;;AAAA,8DAAuC;AAEtC,MAAM,aAAc,SAAQ,qBAAY;IACrC;QACI,KAAK,EAAE,CAAC;IACZ,CAAC;IAED,WAAW,CAAC,SAAiB,EAAE,OAAwB;QACnD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC;CACJ;AAED,kBAAe,IAAI,aAAa,EAAE,CAAC"}
@@ -0,0 +1,154 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const FormFluxError_1 = __importDefault(require("./FormFluxError"));
7
+ class ExtractFileContent {
8
+ constructor(obj, options, fieldArr, singleObj) {
9
+ this.obj = obj;
10
+ this.options = options;
11
+ this.fieldArr = fieldArr;
12
+ this.singleObj = singleObj;
13
+ }
14
+ extraction() {
15
+ for (let val of this.obj.data) {
16
+ if (val.includes("\r\n\r\n") && val.includes("Content-Type")) {
17
+ const [meta, content] = val.split("\r\n\r\n");
18
+ this.obj.fieldNameFile.push(val.split(`name="`)[1].substring(0, val.split(`name="`)[1].indexOf(`"`)));
19
+ this.obj.content.push(Buffer.from(content, "binary"));
20
+ if (this.options && this.options["maxFileSize"] && Buffer.from(content, "binary").length > this.options["maxFileSize"])
21
+ throw new FormFluxError_1.default("File size exceeded limit", 400);
22
+ this.obj.metaData.push(meta);
23
+ }
24
+ else if (!val.includes("Content-Type")) {
25
+ this.obj.fieldNameBody.push(val.split(`name="`)[1].substring(0, val.split(`name="`)[1].indexOf(`"`)));
26
+ this.obj.contentBody.push(val?.split("\r\n\r\n")[1].substring(0, val?.split("\r\n\r\n")[1].indexOf("\r\n")));
27
+ }
28
+ }
29
+ // for single file checks
30
+ if (this.singleObj) {
31
+ let count = 0;
32
+ for (let val of this.obj.metaData) {
33
+ if (val.includes("filename") &&
34
+ val.split(`name="`)[1].substring(0, val.split(`name="`)[1].indexOf(`"`)) == this.singleObj) {
35
+ count++;
36
+ if (count > 1)
37
+ throw new FormFluxError_1.default("Too many files", 429);
38
+ }
39
+ else if (val.includes("filename") && val.split(`name="`)[1].substring(0, val.split(`name="`)[1].indexOf(`"`)) != this.singleObj)
40
+ throw new FormFluxError_1.default("Unexpected field", 400);
41
+ }
42
+ }
43
+ // check maxfileCount
44
+ if (this.options && this.options?.maxFileCount) {
45
+ if (this.options.minFileCount && this.options.minFileCount > this.options.maxFileCount)
46
+ throw new FormFluxError_1.default("minFileCount should be less than maxFileCount", 500);
47
+ if (this.obj.content.length > this.options?.maxFileCount)
48
+ throw new FormFluxError_1.default("Too many files", 429);
49
+ }
50
+ //check minfileCount
51
+ if (this.options && this.options?.minFileCount) {
52
+ if (this.options.maxFileCount < this.options.minFileCount)
53
+ throw new FormFluxError_1.default("minFileCount should be less than maxFileCount", 500);
54
+ if (this.obj.content.length < this.options?.minFileCount)
55
+ throw new FormFluxError_1.default(`At least ${this.options?.minFileCount} file(s) required`, 400);
56
+ }
57
+ //check each fields
58
+ if (this.fieldArr && this.fieldArr?.length != 0) {
59
+ let fieldStart = 0;
60
+ let fieldEnd = this.fieldArr.length - 1;
61
+ let fieldObj = {};
62
+ let isCountField = false;
63
+ while (fieldStart <= fieldEnd) {
64
+ fieldObj[`${this.fieldArr[fieldStart].name}`] = [];
65
+ fieldObj[`${this.fieldArr[fieldStart].name}Check`] = false;
66
+ if (fieldStart == fieldEnd)
67
+ break;
68
+ fieldObj[`${this.fieldArr[fieldEnd].name}`] = [];
69
+ fieldObj[`${this.fieldArr[fieldEnd].name}Check`] = false;
70
+ fieldStart++;
71
+ fieldEnd--;
72
+ }
73
+ if (this.obj.metaData.length != 0) {
74
+ let header;
75
+ for (let val of this.obj.metaData) {
76
+ let count = 0;
77
+ if (val.includes("filename")) {
78
+ for (let item of this.fieldArr) {
79
+ header = val.split(`name="`)[1];
80
+ if (header.substring(0, header.indexOf(`"`)) == item.name) {
81
+ fieldObj[item.name].push(1);
82
+ count++;
83
+ // check if min is greater then max count
84
+ if (item.minFileCount && item.maxFileCount && item.maxFileCount < item.minFileCount)
85
+ throw new FormFluxError_1.default("minFileCount should be less than maxFileCount", 500);
86
+ if (item.maxFileCount && fieldObj[item.name].length > item.maxFileCount)
87
+ throw new FormFluxError_1.default("Too may files", 429);
88
+ // set the minCountfield
89
+ if (item.minFileCount && !fieldObj[`${item.name}minCount`]) {
90
+ isCountField = true;
91
+ }
92
+ // each field filesize check
93
+ if (item.maxFileSize && !fieldObj[`${item.name}Check`]) {
94
+ let rawContent = this.obj.data.filter(x => x.includes(`name="${item.name}"`) && x.includes("Content-Type"));
95
+ rawContent.forEach(cont => {
96
+ if (Buffer.from(cont.split("\r\n\r\n")[1], "binary").length > item.maxFileSize)
97
+ throw new FormFluxError_1.default("File size exceeded limit", 400);
98
+ });
99
+ fieldObj[`${item.name}Check`] = true;
100
+ }
101
+ }
102
+ }
103
+ if (count <= 0)
104
+ throw new FormFluxError_1.default("Unexpected Field", 400); // invalid field
105
+ }
106
+ }
107
+ if (isCountField) {
108
+ let i = 0;
109
+ let filterKeyVals = Object.entries(fieldObj).filter(x => !x[0].includes("Check"));
110
+ for (let i = 0; i < filterKeyVals.length; i++) {
111
+ if (this.fieldArr[i].minFileCount && filterKeyVals[i][1]["length"] < this.fieldArr[i].minFileCount)
112
+ throw new FormFluxError_1.default(`At least ${this.fieldArr[i].minFileCount} file(s) required for ${this.fieldArr[i].name} field`, 400);
113
+ }
114
+ }
115
+ }
116
+ }
117
+ this.obj.data = null; //*******emptying*******
118
+ //********maxFields validation*******
119
+ if (this.options && this.options?.maxFields) {
120
+ let countFileFields = 0;
121
+ let countBodyFields = 0;
122
+ if (this.obj.fieldNameFile.length > 0) {
123
+ let obj = {};
124
+ for (let field of this.obj.fieldNameFile) {
125
+ if (!Object.keys(obj).includes(`${field}`)) {
126
+ obj[`${field}`] = 1;
127
+ countFileFields += 1;
128
+ }
129
+ else
130
+ continue;
131
+ }
132
+ if (countFileFields > this.options.maxFields)
133
+ throw new FormFluxError_1.default("Too many fields", 429);
134
+ }
135
+ if (this.obj.fieldNameBody.length > 0) {
136
+ let obj = {};
137
+ for (let field of this.obj.fieldNameBody) {
138
+ if (!Object.keys(obj).includes(`${field}`)) {
139
+ obj[`${field}`] = 1;
140
+ countBodyFields += 1;
141
+ }
142
+ else
143
+ continue;
144
+ }
145
+ if (countBodyFields > this.options.maxFields)
146
+ throw new FormFluxError_1.default("Too many fields", 429);
147
+ }
148
+ if (countBodyFields + countFileFields > this.options.maxFields)
149
+ throw new FormFluxError_1.default("Too many fields", 429);
150
+ }
151
+ }
152
+ }
153
+ exports.default = ExtractFileContent;
154
+ //# sourceMappingURL=ExtractContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExtractContent.js","sourceRoot":"","sources":["../src/ExtractContent.ts"],"names":[],"mappings":";;;;;AAEA,oEAA4C;AAG5C,MAAM,kBAAkB;IAMpB,YAAY,GAAW,EAAE,OAA+B,EAAE,QAA6B,EAAE,SAAwB;QAE7G,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IACD,UAAU;QACN,KAAK,IAAI,GAAG,IA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.Types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormFlux.Types.js","sourceRoot":"","sources":["../src/FormFlux.Types.ts"],"names":[],"mappings":""}