@timshel_npm/maildev 3.2.11 → 3.2.14

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/README.md CHANGED
@@ -30,8 +30,8 @@ Or can be installed using [Github](https://docs.npmjs.com/cli/v10/configuring-np
30
30
  Ex:
31
31
  ```json
32
32
  "devDependencies": {
33
- "maildev": "github:timshel/maildev#3.2.11",
34
- "maildev": "npm:@timshel_npm/maildev@^3.2.11"
33
+ "maildev": "github:timshel/maildev#3.2.14",
34
+ "maildev": "npm:@timshel_npm/maildev@^3.2.14"
35
35
  }
36
36
  ```
37
37
 
@@ -36,6 +36,7 @@ const events = require("events");
36
36
  const fs = require("fs");
37
37
  const os = require("os");
38
38
  const path = require("path");
39
+ const { PassThrough } = require("stream");
39
40
  const createDOMPurify = require("dompurify");
40
41
  const { JSDOM } = require("jsdom");
41
42
  const defaultPort = 1025;
@@ -493,12 +494,15 @@ function handleDataStream(mailServer, stream, session, callback) {
493
494
  return __awaiter(this, void 0, void 0, function* () {
494
495
  const id = utils.makeId();
495
496
  const emlStream = fs.createWriteStream(path.join(mailServer.mailDir, id + ".eml"));
496
- stream.on("end", function () {
497
+ const pt = new PassThrough();
498
+ pt.on("data", (data) => {
499
+ emlStream.write(data);
500
+ });
501
+ stream.on("end", () => {
497
502
  emlStream.end();
498
503
  callback(null, "Message queued as " + id);
499
504
  });
500
- stream.pipe(emlStream);
501
- const parsed = yield (0, mailparser_1.parse)(stream);
505
+ const parsed = yield (0, mailparser_1.parse)(stream.pipe(pt));
502
506
  const mail = yield buildMail(mailServer.mailDir, id, parsed);
503
507
  return saveEmailToStore(mailServer, mail);
504
508
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@timshel_npm/maildev",
3
3
  "description": "SMTP Server with async API and Web Interface for viewing and testing emails during development",
4
- "version": "3.2.11",
4
+ "version": "3.2.14",
5
5
  "keywords": [
6
6
  "email",
7
7
  "e-mail",
@@ -63,7 +63,7 @@
63
63
  "cors": "2.8.6",
64
64
  "dompurify": "3.3.1",
65
65
  "express": "5.2.1",
66
- "jsdom": "28.0.0",
66
+ "jsdom": "28.1.0",
67
67
  "mailparser": "3.9.3",
68
68
  "mime": "4.1.0",
69
69
  "nodemailer": "8.0.1",
@@ -74,7 +74,7 @@
74
74
  "overrides": {
75
75
  "diff": "8.0.3",
76
76
  "socket.io-adapter": "2.5.5",
77
- "qs": "6.14.1"
77
+ "qs": "6.14.2"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@types/express": "5.0.6",