beast-agent 0.23.2 → 0.23.3
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 +1 -1
- package/src/agent/bus.js +6 -1
- package/src/main.js +6 -1
package/package.json
CHANGED
package/src/agent/bus.js
CHANGED
|
@@ -170,8 +170,13 @@ async function startMailIdle(getCfg) {
|
|
|
170
170
|
while (running.mailIdle) {
|
|
171
171
|
let ImapFlow = null;
|
|
172
172
|
try {
|
|
173
|
-
|
|
173
|
+
/* imapflow yeni sürümlerde named export ({ ImapFlow }) — her şekli çöz */
|
|
174
|
+
const _if = require('imapflow');
|
|
175
|
+
ImapFlow = (_if && (_if.ImapFlow || _if.default)) || (typeof _if === 'function' ? _if : null);
|
|
174
176
|
} catch {
|
|
177
|
+
ImapFlow = null;
|
|
178
|
+
}
|
|
179
|
+
if (!ImapFlow) {
|
|
175
180
|
log('imapflow yok — mail:new kapalı');
|
|
176
181
|
return;
|
|
177
182
|
}
|
package/src/main.js
CHANGED
|
@@ -179,7 +179,12 @@ let waAwaitingRestart = false;
|
|
|
179
179
|
|
|
180
180
|
let ImapFlow = null;
|
|
181
181
|
let nodemailer = null;
|
|
182
|
-
|
|
182
|
+
/* imapflow yeni sürümlerde named export ({ ImapFlow }) verir, eskisi direkt
|
|
183
|
+
class'tı — her iki şekli de (ve ESM default'unu) kapsayacak şekilde çöz */
|
|
184
|
+
try {
|
|
185
|
+
const _if = require('imapflow');
|
|
186
|
+
ImapFlow = (_if && (_if.ImapFlow || _if.default)) || (typeof _if === 'function' ? _if : null);
|
|
187
|
+
} catch {}
|
|
183
188
|
try { nodemailer = require('nodemailer'); } catch {}
|
|
184
189
|
|
|
185
190
|
const APP_DIR = path.join(app.getPath('appData'), 'beast');
|