@social-mail/social-mail-web-server 1.7.64 → 1.7.66

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": "@social-mail/social-mail-web-server",
3
- "version": "1.7.64",
3
+ "version": "1.7.66",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -38,8 +38,16 @@ const loadScanner = async () => {
38
38
  // socket exists... try to connect...
39
39
  // console.log(`Waiting for clamd to start... at port ${socket}`);
40
40
  try {
41
- using s = await SocketClient.connect({ port: socket });
42
- break;
41
+
42
+ const { default: NodeClam } = await import("clamscan");
43
+ const nc = new NodeClam();
44
+ return await nc.init({
45
+ debugMode,
46
+ clamdscan: {
47
+ socket,
48
+ host
49
+ }
50
+ });
43
51
  } catch (error) {
44
52
  console.error(error);
45
53
  await sleep(2000);
@@ -48,16 +56,6 @@ const loadScanner = async () => {
48
56
  throw new Error(`could not connect to socket at ${socket}.`);
49
57
  }
50
58
  }
51
-
52
- const { default: NodeClam } = await import("clamscan");
53
- const nc = new NodeClam();
54
- return await nc.init({
55
- debugMode,
56
- clamdscan: {
57
- socket,
58
- host
59
- }
60
- });
61
59
  };
62
60
 
63
61
  export default class AVService {
@@ -223,9 +223,6 @@ export default class SyncMailboxWorkflow extends Workflow<any, any> {
223
223
 
224
224
  const { emailID, uid, labels, messageId, from } = iterator;
225
225
  const cUID = BigInt(uid);
226
- if (cUID > currentLastUID && cUID < end) {
227
- currentLastUID = cUID;
228
- }
229
226
 
230
227
  state.lastIndex = iterator.index.toString();
231
228
 
@@ -248,6 +245,9 @@ export default class SyncMailboxWorkflow extends Workflow<any, any> {
248
245
  // we will send noop to
249
246
  // prevent disconnection
250
247
  syncState.progress = (BigInt(syncState.progress) + 1n).toString();
248
+ if (cUID > currentLastUID && cUID < end) {
249
+ currentLastUID = cUID;
250
+ }
251
251
  continue;
252
252
  }
253
253
  }
@@ -270,6 +270,9 @@ export default class SyncMailboxWorkflow extends Workflow<any, any> {
270
270
  isDraft,
271
271
  silent: true
272
272
  });
273
+ if (cUID > currentLastUID && cUID < end) {
274
+ currentLastUID = cUID;
275
+ }
273
276
  // console.log(`Saved ${uid}`);
274
277
  }
275
278