@5minds/node-red-contrib-processcube-tools 1.2.0-feature-8f3d72-mg9cplxi → 1.2.0-feature-6f535f-mgp6k79t
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/.env.template +1 -7
- package/.mocharc.json +5 -0
- package/dist/email-receiver/email-receiver.d.ts +3 -0
- package/{email-receiver → dist/email-receiver}/email-receiver.html +4 -82
- package/dist/email-receiver/email-receiver.js +342 -0
- package/dist/email-receiver/email-receiver.js.map +1 -0
- package/dist/email-sender/email-sender.d.ts +3 -0
- package/{email-sender → dist/email-sender}/email-sender.html +24 -106
- package/dist/email-sender/email-sender.js +193 -0
- package/dist/email-sender/email-sender.js.map +1 -0
- package/dist/html-to-text/html-to-text.d.ts +3 -0
- package/{processcube-html-to-text/processcube-html-to-text.html → dist/html-to-text/html-to-text.html} +3 -3
- package/dist/html-to-text/html-to-text.js +40 -0
- package/dist/html-to-text/html-to-text.js.map +1 -0
- package/dist/imap-config/imap-config.d.ts +3 -0
- package/dist/imap-config/imap-config.html +139 -0
- package/dist/imap-config/imap-config.js +22 -0
- package/dist/imap-config/imap-config.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/EmailReceiverMessage.d.ts +20 -0
- package/dist/interfaces/EmailReceiverMessage.js +3 -0
- package/dist/interfaces/EmailReceiverMessage.js.map +1 -0
- package/dist/interfaces/EmailSenderNodeProperties.d.ts +22 -0
- package/dist/interfaces/EmailSenderNodeProperties.js +3 -0
- package/dist/interfaces/EmailSenderNodeProperties.js.map +1 -0
- package/dist/interfaces/FetchState.d.ts +11 -0
- package/dist/interfaces/FetchState.js +3 -0
- package/dist/interfaces/FetchState.js.map +1 -0
- package/dist/interfaces/ImapConnectionConfig.d.ts +16 -0
- package/dist/interfaces/ImapConnectionConfig.js +3 -0
- package/dist/interfaces/ImapConnectionConfig.js.map +1 -0
- package/dist/smtp-config/smtp-config.d.ts +3 -0
- package/dist/smtp-config/smtp-config.html +138 -0
- package/dist/smtp-config/smtp-config.js +22 -0
- package/dist/smtp-config/smtp-config.js.map +1 -0
- package/package.json +28 -17
- package/tsconfig.json +23 -0
- package/email-receiver/email-receiver.js +0 -304
- package/email-sender/email-sender.js +0 -178
- package/examples/.gitkeep +0 -0
- package/file-storage/file-storage.html +0 -203
- package/file-storage/file-storage.js +0 -148
- package/processcube-html-to-text/processcube-html-to-text.js +0 -22
- package/storage/providers/fs.js +0 -117
- package/storage/providers/postgres.js +0 -160
- package/storage/storage-core.js +0 -77
- package/test/helpers/email-receiver.mocks.js +0 -447
- package/test/helpers/email-sender.mocks.js +0 -368
- package/test/integration/email-receiver.integration.test.js +0 -515
- package/test/integration/email-sender.integration.test.js +0 -239
- package/test/unit/email-receiver.unit.test.js +0 -304
- package/test/unit/email-sender.unit.test.js +0 -570
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const ImapConfigNode = (RED) => {
|
|
3
|
+
function ImapConfig(config) {
|
|
4
|
+
RED.nodes.createNode(this, config);
|
|
5
|
+
// Store configuration properties
|
|
6
|
+
this.host = config.host;
|
|
7
|
+
this.port = config.port;
|
|
8
|
+
this.tls = config.tls;
|
|
9
|
+
this.user = config.user;
|
|
10
|
+
this.userType = config.userType;
|
|
11
|
+
this.password = config.password;
|
|
12
|
+
this.passwordType = config.passwordType;
|
|
13
|
+
this.connTimeout = config.connTimeout || 10000;
|
|
14
|
+
this.authTimeout = config.authTimeout || 5000;
|
|
15
|
+
this.keepalive = config.keepalive !== undefined ? config.keepalive : true;
|
|
16
|
+
this.autotls = config.autotls || 'never';
|
|
17
|
+
this.rejectUnauthorized = config.rejectUnauthorized !== undefined ? config.rejectUnauthorized : false;
|
|
18
|
+
}
|
|
19
|
+
RED.nodes.registerType('imap-config', ImapConfig);
|
|
20
|
+
};
|
|
21
|
+
module.exports = ImapConfigNode;
|
|
22
|
+
//# sourceMappingURL=im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AAC;AAEF,iBAAS,cAAc,CAAC"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
// Importiere die Registrierungsfunktion für deine Nodes.
|
|
6
|
+
const imap_config_1 = __importDefault(require("./imap-config/imap-config"));
|
|
7
|
+
const smtp_config_1 = __importDefault(require("./smtp-config/smtp-config"));
|
|
8
|
+
const email_receiver_1 = __importDefault(require("./email-receiver/email-receiver"));
|
|
9
|
+
const email_sender_1 = __importDefault(require("./email-sender/email-sender"));
|
|
10
|
+
const html_to_text_1 = __importDefault(require("./html-to-text/html-to-text"));
|
|
11
|
+
module.exports = function (RED) {
|
|
12
|
+
// Rufe die Registrierungsfunktionen für jede Node auf.
|
|
13
|
+
(0, imap_config_1.default)(RED);
|
|
14
|
+
(0, smtp_config_1.default)(RED);
|
|
15
|
+
(0, email_receiver_1.default)(RED);
|
|
16
|
+
(0, email_sender_1.default)(RED);
|
|
17
|
+
(0, html_to_text_1.default)(RED);
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,yDAAyD;AACzD,4EAA+D;AAC/D,4EAA+D;AAC/D,qFAAwE;AACxE,+EAAkE;AAClE,+EAAiE;AAGjE,iBAAS,UAAU,GAAQ;IACvB,uDAAuD;IACvD,IAAA,qBAAsB,EAAC,GAAG,CAAC,CAAC;IAC5B,IAAA,qBAAsB,EAAC,GAAG,CAAC,CAAC;IAC5B,IAAA,wBAAyB,EAAC,GAAG,CAAC,CAAC;IAC/B,IAAA,sBAAuB,EAAC,GAAG,CAAC,CAAC;IAC7B,IAAA,sBAAsB,EAAC,GAAG,CAAC,CAAC;AAChC,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ParsedMail } from 'mailparser';
|
|
2
|
+
export interface EmailReceiverMessage {
|
|
3
|
+
topic: string | undefined;
|
|
4
|
+
payload: string | undefined;
|
|
5
|
+
html: string | boolean | undefined;
|
|
6
|
+
from: string | undefined;
|
|
7
|
+
date: Date | undefined;
|
|
8
|
+
folder: string;
|
|
9
|
+
header: ParsedMail['headers'];
|
|
10
|
+
attachments: Array<{
|
|
11
|
+
contentType: string;
|
|
12
|
+
fileName: string | undefined;
|
|
13
|
+
contentDisposition: string;
|
|
14
|
+
generatedFileName: string | undefined;
|
|
15
|
+
contentId: string | undefined;
|
|
16
|
+
checksum: string;
|
|
17
|
+
length: number;
|
|
18
|
+
content: Buffer;
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmailReceiverMessage.js","sourceRoot":"","sources":["../../src/interfaces/EmailReceiverMessage.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { NodeDef } from 'node-red';
|
|
2
|
+
export interface EmailSenderNodeProperties extends NodeDef {
|
|
3
|
+
sender: string;
|
|
4
|
+
senderType: string;
|
|
5
|
+
from: string;
|
|
6
|
+
fromType: string;
|
|
7
|
+
to: string;
|
|
8
|
+
toType: string;
|
|
9
|
+
cc: string;
|
|
10
|
+
ccType: string;
|
|
11
|
+
bcc: string;
|
|
12
|
+
bccType: string;
|
|
13
|
+
replyTo: string;
|
|
14
|
+
replyToType: string;
|
|
15
|
+
subject: string;
|
|
16
|
+
subjectType: string;
|
|
17
|
+
htmlContent: string;
|
|
18
|
+
htmlContentType: string;
|
|
19
|
+
attachments: string;
|
|
20
|
+
attachmentsType: string;
|
|
21
|
+
smtpConfig: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmailSenderNodeProperties.js","sourceRoot":"","sources":["../../src/interfaces/EmailSenderNodeProperties.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FetchState.js","sourceRoot":"","sources":["../../src/interfaces/FetchState.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface ImapConnectionConfig {
|
|
2
|
+
host: string;
|
|
3
|
+
port: number;
|
|
4
|
+
tls: boolean;
|
|
5
|
+
user: string;
|
|
6
|
+
password: string;
|
|
7
|
+
folders: string[];
|
|
8
|
+
markSeen: boolean;
|
|
9
|
+
connTimeout: number;
|
|
10
|
+
authTimeout: number;
|
|
11
|
+
keepalive: boolean;
|
|
12
|
+
autotls: string;
|
|
13
|
+
tlsOptions: {
|
|
14
|
+
rejectUnauthorized: boolean;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImapConnectionConfig.js","sourceRoot":"","sources":["../../src/interfaces/ImapConnectionConfig.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<script type="text/javascript">
|
|
2
|
+
RED.nodes.registerType('smtp-config', {
|
|
3
|
+
category: 'config',
|
|
4
|
+
defaults: {
|
|
5
|
+
name: { value: '' },
|
|
6
|
+
host: { value: '', required: true },
|
|
7
|
+
port: { value: 587, required: true, validate: RED.validators.number() },
|
|
8
|
+
user: { value: '', required: true, validate: RED.validators.typedInput('userType') },
|
|
9
|
+
userType: { value: 'env' },
|
|
10
|
+
password: { value: '', required: true, validate: RED.validators.typedInput('passwordType') },
|
|
11
|
+
passwordType: { value: 'env' },
|
|
12
|
+
connTimeout: { value: 10000, validate: RED.validators.number() },
|
|
13
|
+
authTimeout: { value: 5000, validate: RED.validators.number() },
|
|
14
|
+
keepalive: { value: true },
|
|
15
|
+
secure: { value: false },
|
|
16
|
+
autotls: { value: 'never' },
|
|
17
|
+
rejectUnauthorized: { value: false },
|
|
18
|
+
},
|
|
19
|
+
label: function () {
|
|
20
|
+
return this.name || `${this.user}@${this.host}`;
|
|
21
|
+
},
|
|
22
|
+
oneditprepare: function () {
|
|
23
|
+
$('#node-config-input-user').typedInput({
|
|
24
|
+
default: 'env',
|
|
25
|
+
types: ['global', 'env'],
|
|
26
|
+
typeField: '#node-config-input-userType',
|
|
27
|
+
});
|
|
28
|
+
$('#node-config-input-password').typedInput({
|
|
29
|
+
default: 'env',
|
|
30
|
+
types: ['global', 'env'],
|
|
31
|
+
typeField: '#node-config-input-passwordType',
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<script type="text/html" data-template-name="smtp-config">
|
|
38
|
+
<div class="form-row">
|
|
39
|
+
<label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
40
|
+
<input type="text" id="node-config-input-name" placeholder="My SMTP Server" />
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div class="form-row">
|
|
44
|
+
<label for="node-config-input-host"><i class="fa fa-server"></i> SMTP Host</label>
|
|
45
|
+
<input type="text" id="node-config-input-host" placeholder="smtp.gmail.com" />
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div class="form-row">
|
|
49
|
+
<label for="node-config-input-port"><i class="fa fa-terminal"></i> Port</label>
|
|
50
|
+
<input type="text" id="node-config-input-port" placeholder="587" />
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<div class="form-row">
|
|
54
|
+
<label for="node-config-input-user"><i class="fa fa-user"></i> User</label>
|
|
55
|
+
<input type="text" id="node-config-input-user" placeholder="SMTP_USER" />
|
|
56
|
+
<input type="hidden" id="node-config-input-userType" />
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<div class="form-row">
|
|
60
|
+
<label for="node-config-input-password"><i class="fa fa-key"></i> Password</label>
|
|
61
|
+
<input type="text" id="node-config-input-password" placeholder="SMTP_PASSWORD" />
|
|
62
|
+
<input type="hidden" id="node-config-input-passwordType" />
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div class="form-row">
|
|
66
|
+
<label for="node-config-input-connTimeout"><i class="fa fa-clock-o"></i> Connection Timeout (ms)</label>
|
|
67
|
+
<input type="text" id="node-config-input-connTimeout" placeholder="10000" />
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<div class="form-row">
|
|
71
|
+
<label for="node-config-input-authTimeout"><i class="fa fa-clock-o"></i> Auth Timeout (ms)</label>
|
|
72
|
+
<input type="text" id="node-config-input-authTimeout" placeholder="5000" />
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div class="form-row">
|
|
76
|
+
<label for="node-config-input-keepalive"><i class="fa fa-heart"></i> Keep Alive</label>
|
|
77
|
+
<input type="checkbox" id="node-config-input-keepalive" style="display: inline-block; width: auto; vertical-align: top;" />
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<div class="form-row">
|
|
81
|
+
<label for="node-config-input-secure"><i class="fa fa-shield"></i> Use SSL/TLS (Secure)</label>
|
|
82
|
+
<input type="checkbox" id="node-config-input-secure" style="display: inline-block; width: auto; vertical-align: top;" />
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<div class="form-row">
|
|
86
|
+
<label for="node-config-input-autotls"><i class="fa fa-shield"></i> Auto TLS</label>
|
|
87
|
+
<select id="node-config-input-autotls" style="width: 70%;">
|
|
88
|
+
<option value="never">Never</option>
|
|
89
|
+
<option value="always">Always</option>
|
|
90
|
+
<option value="required">Required</option>
|
|
91
|
+
</select>
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<div class="form-row">
|
|
95
|
+
<label for="node-config-input-rejectUnauthorized"><i class="fa fa-certificate"></i> Reject Unauthorized</label>
|
|
96
|
+
<input type="checkbox" id="node-config-input-rejectUnauthorized" style="display: inline-block; width: auto; vertical-align: top;" />
|
|
97
|
+
</div>
|
|
98
|
+
</script>
|
|
99
|
+
|
|
100
|
+
<script type="text/html" data-help-name="smtp-config">
|
|
101
|
+
<p>Configuration node for SMTP server connection settings.</p>
|
|
102
|
+
|
|
103
|
+
<h3>Configuration</h3>
|
|
104
|
+
<dl class="message-properties">
|
|
105
|
+
<dt>Name <span class="property-type">string</span></dt>
|
|
106
|
+
<dd>A friendly name for this SMTP configuration.</dd>
|
|
107
|
+
|
|
108
|
+
<dt>SMTP Host <span class="property-type">string</span></dt>
|
|
109
|
+
<dd>The hostname or IP address of the SMTP server (e.g., smtp.gmail.com).</dd>
|
|
110
|
+
|
|
111
|
+
<dt>Port <span class="property-type">number</span></dt>
|
|
112
|
+
<dd>The port number for SMTP connection (typically 587 for STARTTLS, 465 for SSL/TLS).</dd>
|
|
113
|
+
|
|
114
|
+
<dt>User <span class="property-type">string | variable</span></dt>
|
|
115
|
+
<dd>The username for SMTP authentication. Supports environment variables and global context.</dd>
|
|
116
|
+
|
|
117
|
+
<dt>Password <span class="property-type">string | variable</span></dt>
|
|
118
|
+
<dd>The password for SMTP authentication. Supports environment variables and global context.</dd>
|
|
119
|
+
|
|
120
|
+
<dt>Connection Timeout <span class="property-type">number</span></dt>
|
|
121
|
+
<dd>The connection timeout in milliseconds (default: 10000).</dd>
|
|
122
|
+
|
|
123
|
+
<dt>Auth Timeout <span class="property-type">number</span></dt>
|
|
124
|
+
<dd>The authentication timeout in milliseconds (default: 5000).</dd>
|
|
125
|
+
|
|
126
|
+
<dt>Keep Alive <span class="property-type">boolean</span></dt>
|
|
127
|
+
<dd>Keep the connection alive by sending periodic commands (default: true).</dd>
|
|
128
|
+
|
|
129
|
+
<dt>Use SSL/TLS (Secure) <span class="property-type">boolean</span></dt>
|
|
130
|
+
<dd>Enable SSL/TLS encryption for the connection (default: false).</dd>
|
|
131
|
+
|
|
132
|
+
<dt>Auto TLS <span class="property-type">string</span></dt>
|
|
133
|
+
<dd>Controls STARTTLS behavior: never, always, or required (default: never).</dd>
|
|
134
|
+
|
|
135
|
+
<dt>Reject Unauthorized <span class="property-type">boolean</span></dt>
|
|
136
|
+
<dd>Reject connections with invalid TLS certificates (default: false).</dd>
|
|
137
|
+
</dl>
|
|
138
|
+
</script>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const SmtpConfigNode = (RED) => {
|
|
3
|
+
function SmtpConfig(config) {
|
|
4
|
+
RED.nodes.createNode(this, config);
|
|
5
|
+
// Store configuration properties
|
|
6
|
+
this.host = config.host;
|
|
7
|
+
this.port = config.port;
|
|
8
|
+
this.user = config.user;
|
|
9
|
+
this.userType = config.userType;
|
|
10
|
+
this.password = config.password;
|
|
11
|
+
this.passwordType = config.passwordType;
|
|
12
|
+
this.connTimeout = config.connTimeout !== undefined ? config.connTimeout : 10000;
|
|
13
|
+
this.authTimeout = config.authTimeout !== undefined ? config.authTimeout : 5000;
|
|
14
|
+
this.keepalive = config.keepalive !== undefined ? config.keepalive : true;
|
|
15
|
+
this.secure = config.secure !== undefined ? config.secure : false;
|
|
16
|
+
this.autotls = config.autotls || 'never';
|
|
17
|
+
this.rejectUnauthorized = config.rejectUnauthorized !== undefined ? config.rejectUnauthorized : false;
|
|
18
|
+
}
|
|
19
|
+
RED.nodes.registerType('smtp-config', SmtpConfig);
|
|
20
|
+
};
|
|
21
|
+
module.exports = SmtpConfigNode;
|
|
22
|
+
//# sourceMappingURL=smtp-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smtp-config.js","sourceRoot":"","sources":["../../src/smtp-config/smtp-config.ts"],"names":[],"mappings":";AAiBA,MAAM,cAAc,GAAoB,CAAC,GAAG,EAAE,EAAE;IAC5C,SAAS,UAAU,CAAY,MAAgC;QAC3D,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAEnC,iCAAiC;QACjC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,I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6k79t",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Node-RED tools nodes for ProcessCube",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"
|
|
8
|
-
"
|
|
7
|
+
"build": "npm-run-all build:*",
|
|
8
|
+
"build:ts": "tsc",
|
|
9
|
+
"build:html": "cpx \"./src/**/*.html\" ./dist",
|
|
10
|
+
"lint": "prettier --write --config ./.prettierrc.json \"**/*.{html,ts}\"",
|
|
11
|
+
"test": "mocha --require ts-node/register 'src/test/**/*.test.ts'",
|
|
12
|
+
"test:unit": "mocha --require ts-node/register 'src/test/unit/**/*.test.ts'",
|
|
13
|
+
"test:integration": "mocha --require ts-node/register 'src/test/integration/**/*.test.ts'"
|
|
9
14
|
},
|
|
10
15
|
"authors": [
|
|
11
16
|
{
|
|
@@ -19,10 +24,6 @@
|
|
|
19
24
|
{
|
|
20
25
|
"name": "Diana Stefan",
|
|
21
26
|
"email": "Diana.Stefan@5Minds.de"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"name": "Thorsten Kallweit",
|
|
25
|
-
"email": "Thorsten.Kallweit@5Minds.de"
|
|
26
27
|
}
|
|
27
28
|
],
|
|
28
29
|
"repository": {
|
|
@@ -38,35 +39,45 @@
|
|
|
38
39
|
"npm": ">=8.0.0"
|
|
39
40
|
},
|
|
40
41
|
"node-red": {
|
|
41
|
-
"version": "
|
|
42
|
+
"version": "^4.1.0",
|
|
42
43
|
"nodes": {
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
44
|
+
"ImapConfig": "dist/imap-config/imap-config.js",
|
|
45
|
+
"SmtpConfig": "dist/smtp-config/smtp-config.js",
|
|
46
|
+
"EmailReceiver": "dist/email-receiver/email-receiver.js",
|
|
47
|
+
"EmailSender": "dist/email-sender/email-sender.js",
|
|
48
|
+
"HtmlToText": "dist/html-to-text/html-to-text.js"
|
|
47
49
|
},
|
|
48
50
|
"examples": "examples"
|
|
49
51
|
},
|
|
50
52
|
"dependencies": {
|
|
51
53
|
"html-to-text": "^9.0.5",
|
|
52
|
-
"mailparser": "^3.
|
|
54
|
+
"mailparser": "^3.7.4",
|
|
53
55
|
"node-imap": "^0.9.6",
|
|
54
56
|
"nodemailer": "^7.0.6",
|
|
55
|
-
"pg": "^8.16.3",
|
|
56
|
-
"pg-large-object": "^2.0.0",
|
|
57
57
|
"utf7": "^1.0.2"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
+
"@types/chai": "^5.2.2",
|
|
61
|
+
"@types/mailparser": "^3.4.6",
|
|
62
|
+
"@types/mocha": "^10.0.10",
|
|
63
|
+
"@types/node": "^24.5.2",
|
|
64
|
+
"@types/node-imap": "^0.9.3",
|
|
65
|
+
"@types/node-red": "^1.3.5",
|
|
66
|
+
"@types/node-red-node-test-helper": "^0.3.4",
|
|
67
|
+
"@types/nodemailer": "^7.0.1",
|
|
60
68
|
"chai": "^4.3.4",
|
|
69
|
+
"cpx2": "^8.0.0",
|
|
61
70
|
"mocha": "^11.7.2",
|
|
62
71
|
"node-red": "^4.0.9",
|
|
63
|
-
"node-red-node-test-helper": "^0.3.5"
|
|
72
|
+
"node-red-node-test-helper": "^0.3.5",
|
|
73
|
+
"npm-run-all": "^4.1.5",
|
|
74
|
+
"ts-node": "^10.9.2",
|
|
75
|
+
"typescript": "^5.9.2"
|
|
64
76
|
},
|
|
65
77
|
"overrides": {
|
|
66
78
|
"semver": ">=7.5.2",
|
|
67
79
|
"axios": ">=1.12.0",
|
|
68
80
|
"html-to-text": "^9.0.5",
|
|
69
|
-
"mailparser": "^3.6.8",
|
|
70
81
|
"node-imap": "^0.9.6",
|
|
71
82
|
"nodemailer": "^7.0.6",
|
|
72
83
|
"utf7": "^1.0.2"
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"rootDir": "./src",
|
|
4
|
+
"outDir": "./dist",
|
|
5
|
+
//set to commonjs and node for node-red compatibility
|
|
6
|
+
"module": "commonjs",
|
|
7
|
+
"moduleResolution": "node",
|
|
8
|
+
// set to es2021 for node-red compatibility
|
|
9
|
+
"target": "es2018",
|
|
10
|
+
"lib": ["es2018"],
|
|
11
|
+
"declaration": true,
|
|
12
|
+
"skipLibCheck": true,
|
|
13
|
+
"declarationDir": "dist",
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"esModuleInterop": true,
|
|
16
|
+
"strict": true,
|
|
17
|
+
"forceConsistentCasingInFileNames": true,
|
|
18
|
+
"types": ["mocha", "chai", "node"],
|
|
19
|
+
"allowSyntheticDefaultImports": true
|
|
20
|
+
},
|
|
21
|
+
"include": ["src/test/**/*", "src/**/*"],
|
|
22
|
+
"exclude": ["node_modules", "dist"]
|
|
23
|
+
}
|