@forklaunch/express 0.5.8 → 0.5.9

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.
package/lib/index.js CHANGED
@@ -88,7 +88,15 @@ function contentParse(options2) {
88
88
  chunks.push(chunk);
89
89
  });
90
90
  file.on("end", () => {
91
- const fileBuffer = Buffer.concat(chunks);
91
+ const fileBuffer = new Uint8Array(
92
+ chunks.reduce((acc, chunk) => {
93
+ const arr = new Uint8Array(chunk);
94
+ const tmp = new Uint8Array(acc.length + arr.length);
95
+ tmp.set(acc, 0);
96
+ tmp.set(arr, acc.length);
97
+ return tmp;
98
+ }, new Uint8Array())
99
+ );
92
100
  body[fieldname] = fileBuffer.toString();
93
101
  });
94
102
  });
package/lib/index.mjs CHANGED
@@ -57,7 +57,15 @@ function contentParse(options2) {
57
57
  chunks.push(chunk);
58
58
  });
59
59
  file.on("end", () => {
60
- const fileBuffer = Buffer.concat(chunks);
60
+ const fileBuffer = new Uint8Array(
61
+ chunks.reduce((acc, chunk) => {
62
+ const arr = new Uint8Array(chunk);
63
+ const tmp = new Uint8Array(acc.length + arr.length);
64
+ tmp.set(acc, 0);
65
+ tmp.set(arr, acc.length);
66
+ return tmp;
67
+ }, new Uint8Array())
68
+ );
61
69
  body[fieldname] = fileBuffer.toString();
62
70
  });
63
71
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forklaunch/express",
3
- "version": "0.5.8",
3
+ "version": "0.5.9",
4
4
  "description": "Forklaunch framework for express.",
5
5
  "homepage": "https://github.com/forklaunch/forklaunch-js#readme",
6
6
  "bugs": {
@@ -25,8 +25,8 @@
25
25
  "lib/**"
26
26
  ],
27
27
  "dependencies": {
28
- "@scalar/express-api-reference": "^0.8.2",
29
- "@types/multer": "^1.4.12",
28
+ "@scalar/express-api-reference": "^0.8.3",
29
+ "@types/multer": "^1.4.13",
30
30
  "body-parser": "^2.2.0",
31
31
  "busboy": "^1.6.0",
32
32
  "cors": "^2.8.5",
@@ -34,21 +34,21 @@
34
34
  "multer": "2.0.1",
35
35
  "qs": "^6.14.0",
36
36
  "swagger-ui-express": "^5.0.1",
37
- "@forklaunch/common": "0.3.6",
38
- "@forklaunch/core": "0.8.8",
39
- "@forklaunch/validator": "0.6.6"
37
+ "@forklaunch/common": "0.3.7",
38
+ "@forklaunch/core": "0.8.9",
39
+ "@forklaunch/validator": "0.6.7"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@eslint/js": "^9.28.0",
43
- "@types/body-parser": "^1.19.5",
43
+ "@types/body-parser": "^1.19.6",
44
44
  "@types/busboy": "^1.5.4",
45
- "@types/cors": "^2.8.18",
46
- "@types/express": "^5.0.2",
45
+ "@types/cors": "^2.8.19",
46
+ "@types/express": "^5.0.3",
47
47
  "@types/express-serve-static-core": "^5.0.6",
48
48
  "@types/jest": "^29.5.14",
49
49
  "@types/qs": "^6.14.0",
50
50
  "@types/swagger-ui-express": "^4.1.8",
51
- "@typescript/native-preview": "7.0.0-dev.20250605.1",
51
+ "@typescript/native-preview": "7.0.0-dev.20250609.1",
52
52
  "jest": "^29.7.0",
53
53
  "kill-port-process": "^3.2.1",
54
54
  "prettier": "^3.5.3",