@hyperbytes/wappler-imap-manager 1.0.0 → 1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperbytes/wappler-imap-manager",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "IMAP eMail Management for Wappler",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -13,7 +13,7 @@
13
13
  "email"
14
14
  ],
15
15
  "dependencies": {
16
- "imap": "^8.8.19",
16
+ "imap": "^0.8.0",
17
17
  "mailparser": "^3.7.2",
18
18
  "imap-simple": "^5.1.0",
19
19
  "mailtrap": "^4.1.0",
@@ -9,7 +9,7 @@
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2'
14
14
  }
15
15
  },
@@ -9,7 +9,7 @@
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2'
14
14
  }
15
15
  },
@@ -9,7 +9,7 @@ groupIcon : 'fas fa-envelope comp-general',
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2'
14
14
  }
15
15
  },
@@ -9,7 +9,7 @@
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2'
14
14
  }
15
15
  },
@@ -9,7 +9,7 @@
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2'
14
14
  }
15
15
  },
@@ -9,7 +9,7 @@ groupIcon : 'fas fa-envelope comp-general',
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2'
14
14
  }
15
15
  },
@@ -9,7 +9,7 @@ groupIcon : 'fas fa-envelope comp-general',
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2'
14
14
  }
15
15
  },
@@ -9,7 +9,7 @@ groupIcon : 'fas fa-envelope comp-general',
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2'
14
14
  }
15
15
  },
@@ -9,7 +9,7 @@ groupIcon : 'fas fa-envelope comp-general',
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2'
14
14
  }
15
15
  },
@@ -9,7 +9,7 @@ groupIcon : 'fas fa-envelope comp-general',
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2'
14
14
  }
15
15
  },
@@ -9,7 +9,7 @@ groupIcon : 'fas fa-envelope comp-general',
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2'
14
14
  }
15
15
  },
@@ -9,7 +9,7 @@ groupIcon : 'fas fa-envelope comp-general',
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2'
14
14
  }
15
15
  },
@@ -9,7 +9,7 @@ groupIcon : 'fas fa-envelope comp-general',
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2'
14
14
  }
15
15
  },
@@ -9,7 +9,7 @@ groupIcon : 'fas fa-envelope comp-general',
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2',
14
14
  'imap-simple' : '^5.1.0',
15
15
  'mailtrap' : '^4.1.0',
@@ -9,7 +9,7 @@
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2',
14
14
  'nodemailer' : '^6.10.1'
15
15
  }
@@ -9,7 +9,7 @@ groupIcon : 'fas fa-envelope comp-general',
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2'
14
14
  }
15
15
  },
@@ -9,7 +9,7 @@ groupIcon : 'fas fa-envelope comp-general',
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2'
14
14
  }
15
15
  },
@@ -9,7 +9,7 @@
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2'
14
14
  }
15
15
  },
@@ -9,7 +9,7 @@
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2'
14
14
  }
15
15
  },
@@ -9,7 +9,7 @@
9
9
  dataPickObject: true,
10
10
  usedModules : {
11
11
  node: {
12
- 'imap' : '^8.8.19',
12
+ 'imap' : '^0.8.19',
13
13
  'mailparser' : '^3.7.2'
14
14
  }
15
15
  },
@@ -1,134 +0,0 @@
1
- [{
2
- type: 'testfile-testfile',
3
- module : 'testfile',
4
- action : 'testfile',
5
- groupTitle : 'Mailer',
6
- groupIcon : 'fas fa-envelope comp-general',
7
- title : 'IMAP testfile',
8
- icon : 'fas fa-solid fa-list comp-general',
9
- dataPickObject: true,
10
- usedModules : {
11
- node: {
12
- 'imap' : '^8.8.19',
13
- 'mailparser' : '^3.7.2'
14
- }
15
- },
16
- dataScheme: [# HJSON definition using 'sub' for nested structures, as requested for Wappler.io
17
- [
18
- { name: 'id', type: 'number' }
19
- { name: 'uid', type: 'number' }
20
- {
21
- name: 'headers', type: 'object', sub: [ # <--- Changed from 'schema' to 'sub'
22
- { name: 'from', type: 'text' }, sub: [ {name:'address', type:'text'}, {name:'name', type:'text'} ]
23
- { name: 'to', type: 'array' }, sub: [ sub: [ {name:'address', type:'text'}, {name:'name', type:'text'} ]]
24
- { name: 'cc', type: 'array' }, sub: []# Array of email strings
25
- { name: 'bcc', type: 'array' }, sub: []# Array of email strings (can be empty)
26
- { name: 'subject', type: 'text' } # Array of subject strings
27
- { name: 'message-id', type: 'number' } # Array of message-id strings
28
- { name: 'messagedate', type: 'text' } # Date/time string
29
- ]
30
- }
31
- { name: 'flags', type: 'array' } # Array of flag strings (e.g., "\\Seen")
32
- { name: 'attachmentCount', type: 'number' }
33
- { name: 'uidvalidity', type: 'number' }
34
- { name: 'mailbox', type: 'text' }
35
- { name: 'uidKey', type: 'text' }
36
- { name: 'status', type: 'number' }
37
- ]
38
- ],
39
- properties : [
40
- {
41
- group: 'IMAP Inputs',
42
- variables: [
43
-
44
- { name: 'actionName',
45
- optionName: 'name',
46
- title: 'Name',
47
- type: 'text',
48
- required: true,
49
- baseName: "imap"
50
- },
51
- { name: 'selector', optionName: 'selector', title: 'IAMP Settings Selection',
52
- type: 'droplist',
53
- values: [
54
- {title: 'Use ENV ', value: 'ENV' ,show:[],hide:['imap_msg','imap_host','imap_user','imap_password','imap_port','imap_tls']},
55
- {title: 'Enable Manula Overrides', value: 'MANUAL',hide:[],show:['imap_msg','imap_host','imap_user','imap_password','imap_port','imap_tls'] },
56
-
57
-
58
- ],
59
- defaultValue: 'ENV',
60
- help: 'Choose your TLS settings.',
61
- initValue: "ENV"
62
- },
63
-
64
- {name: 'imap_msg',
65
- optionName: 'imap_msg',
66
- title: 'IMAP password',
67
- type: 'static',
68
- help: 'IMAP .ENV OVERRIDE SETTINGS'
69
- },
70
-
71
- {name: 'imap_host',
72
- optionName: 'imap_host',
73
- title: 'IMAP Host',
74
- type: 'text',
75
- defaultValue: "", initDisplay: 'none',
76
- serverDataBindings: true,
77
- help: 'The IMAP Host Server'
78
- },
79
- {name: 'imap_user',
80
- optionName: 'imap_user',
81
- title: 'IMAP User',
82
- type: 'text',
83
- defaultValue: "", initDisplay: 'none',
84
- serverDataBindings: true,
85
- help: 'The IMAP user'
86
- },
87
-
88
- {name: 'imap_password',
89
- optionName: 'imap_password',
90
- title: 'IMAP password',
91
- type: 'text',
92
- defaultValue: "", initDisplay: 'none',
93
- serverDataBindings: true,
94
- help: 'The IMAP password'
95
- },
96
- {name: 'imap_port',
97
- optionName: 'imap_port',
98
- title: 'IMAP Port',
99
- type: 'text',
100
- defaultValue: "", initDisplay: 'none',
101
- serverDataBindings: true,
102
- help: 'The IMAP port'
103
- },
104
- { name: 'imap_tls', optionName: 'imap_tls', title: 'TLS Settings',
105
- type: 'droplist',
106
- values: [
107
- {title: 'Use ENV if available', value: 'ENV' },
108
- {title: 'True', value: 'True' },
109
- {title: 'False', value: 'False' },
110
-
111
- ],
112
- defaultValue: 'ENV', initDisplay: 'none',
113
- help: 'Choose your TLS settings.',
114
- initValue: "ENV"
115
- },
116
-
117
- {name: 'imap_msg2',
118
- optionName: 'imap_msg2',
119
- title: '',
120
- type: 'static',
121
- help: 'API ACTION SETTINGS'
122
- },
123
-
124
-
125
- { name: 'output',
126
- optionName: 'output',
127
- title: 'Output',
128
- type: 'boolean',
129
- defaultValue: false
130
- }
131
-
132
- ]
133
- },
134
- ]}]
@@ -1,28 +0,0 @@
1
- const nodemailer = require("nodemailer");
2
- const imap = require("imap");
3
- const fs = require("fs");
4
- const path = require("path");
5
- const { toSystemPath } = require("../../../lib/core/path");
6
-
7
-
8
- // Function to load SMTP settings dynamically
9
-
10
- exports.testfile = async function (options) {
11
-
12
- const imap_host = this.parseOptional(options.imap_host, '*', process.env.IMAP_HOST);
13
- const imap_password = this.parseOptional(options.imap_password, '*', process.env.IMAP_PASSWORD);
14
- const imap_user = this.parseOptional(options.imap_usesr, '*', process.env.IMAP_USER);
15
- const imap_port = this.parseOptional(options.imap_port, '*', process.env.IMAP_PORT);
16
- const imap_tlsstring = this.parseOptional(options.imap_tls, '*', process.env.IMAP_TLS).toLowerCase();
17
- const imap_tls = (imap_tlsstring == 'true');
18
- console.log("imap_host: " + imap_host);
19
- console.log("imap_password: " + imap_password);
20
- console.log("imap_user: " + imap_user);
21
- console.log("imap_port: " + imap_port);
22
- console.log("imap_tls Options: " + options.imap_tls);
23
- console.log("imap_tls: " + imap_tls);
24
- let folderRaw = process.env.IMAP_DEFAULT_DOWNLOAD_FOLDER;
25
- console.log("ENV path: " + folderRaw)
26
- return folderParsed
27
-
28
- }
@@ -1,141 +0,0 @@
1
- [{
2
- type: 'testfile_bug-testfile_bug',
3
- module : 'testfile_bug',
4
- action : 'testfile_bug',
5
- groupTitle : 'Mailer',
6
- groupIcon : 'fas fa-envelope comp-general',
7
- title : 'bug test file',
8
- icon : 'fas fa-solid fa-calculator comp-general',
9
- dataPickObject: true,
10
- usedModules : {
11
- },
12
- dataScheme: [
13
- ],
14
- properties : [
15
- {
16
- group: 'Inputs',
17
- variables: [
18
-
19
-
20
- { name: 'actionName',
21
- optionName: 'name',
22
- title: 'Name',
23
- type: 'text',
24
- required: true,
25
- baseName: "imap"
26
- },
27
- { name: 'selector', optionName: 'selector', title: 'IAMP Settings Selection',
28
- type: 'droplist',
29
- values: [
30
- {title: 'Use ENV ', value: 'ENV' ,show:[],hide:['imap_msg','imap_host','imap_user','imap_password','imap_port','imap_tls']},
31
- {title: 'Enable Manula Overrides', value: 'MANUAL',hide:[],show:['imap_msg','imap_host','imap_user','imap_password','imap_port','imap_tls'] },
32
-
33
-
34
- ],
35
- defaultValue: 'ENV',
36
- help: 'Choose your TLS settings.',
37
- initValue: "ENV"
38
- },
39
-
40
-
41
- { name: 'actionName',
42
- optionName: 'name',
43
- title: 'Name',
44
- type: 'text',
45
- required: true,
46
- baseName: "imap"
47
- },
48
- { name: 'selector', optionName: 'selector', title: 'IAMP Settings Selection',
49
- type: 'droplist',
50
- values: [
51
- {title: 'Use ENV ', value: 'ENV' ,show:[],hide:['imap_msg','imap_host','imap_user','imap_password','imap_port','imap_tls']},
52
- {title: 'Enable Manula Overrides', value: 'MANUAL',hide:[],show:['imap_msg','imap_host','imap_user','imap_password','imap_port','imap_tls'] },
53
-
54
-
55
- ],
56
- defaultValue: 'ENV',
57
- help: 'Choose your TLS settings.',
58
- initValue: "ENV"
59
- },
60
-
61
- {name: 'imap_msg',
62
- optionName: 'imap_msg',
63
- title: 'IMAP password',
64
- type: 'static',
65
- help: 'IMAP .ENV OVERRIDE SETTINGS'
66
- },
67
-
68
- {name: 'imap_host',
69
- optionName: 'imap_host',
70
- title: 'IMAP Host',
71
- type: 'text',
72
- defaultValue: "", initDisplay: 'none',
73
- serverDataBindings: true,
74
- help: 'The IMAP Host Server'
75
- },
76
- {name: 'imap_user',
77
- optionName: 'imap_user',
78
- title: 'IMAP User',
79
- type: 'text',
80
- defaultValue: "", initDisplay: 'none',
81
- serverDataBindings: true,
82
- help: 'The IMAP user'
83
- },
84
-
85
- {name: 'imap_password',
86
- optionName: 'imap_password',
87
- title: 'IMAP password',
88
- type: 'text',
89
- defaultValue: "", initDisplay: 'none',
90
- serverDataBindings: true,
91
- help: 'The IMAP password'
92
- },
93
- {name: 'imap_port',
94
- optionName: 'imap_port',
95
- title: 'IMAP Port',
96
- type: 'text',
97
- defaultValue: "", initDisplay: 'none',
98
- serverDataBindings: true,
99
- help: 'The IMAP port'
100
- },
101
- { name: 'imap_tls', optionName: 'imap_tls', title: 'TLS Settings',
102
- type: 'droplist',
103
- values: [
104
- {title: 'Use ENV if available', value: 'ENV' },
105
- {title: 'True', value: 'True' },
106
- {title: 'False', value: 'False' },
107
-
108
- ],
109
- defaultValue: 'ENV', initDisplay: 'none',
110
- help: 'Choose your TLS settings.',
111
- initValue: "ENV"
112
- },
113
-
114
- {name: 'imap_msg2',
115
- optionName: 'imap_msg2',
116
- title: '',
117
- type: 'static',
118
- help: 'API ACTION SETTINGS'
119
- },
120
-
121
- {name: 'entry',
122
- optionName: 'entry',
123
- title: 'Entry',
124
- type: 'folder',
125
- defaultValue: "",
126
- serverDataBindings: true,
127
- help: 'The Entry'
128
- },
129
- { name: 'output',
130
- optionName: 'output',
131
- title: 'Output',
132
- type: 'boolean',
133
- defaultValue: false
134
- }
135
-
136
- ]
137
- },
138
-
139
- ]
140
- }
141
- ]
@@ -1,8 +0,0 @@
1
-
2
-
3
-
4
- exports.testfile_bug = async function (options) {
5
- const entry = this.parseOptional(options.entry, '*', '');
6
- console.log("Enty: " + entry);
7
- return entry
8
- }