@bobfrankston/iflow-direct 0.1.5 → 0.1.7

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/gmail.d.ts CHANGED
@@ -9,6 +9,7 @@ export interface GmailOAuthConfig {
9
9
  tokenProvider: TokenProvider;
10
10
  verbose?: boolean;
11
11
  rejectUnauthorized?: boolean;
12
+ inactivityTimeout?: number;
12
13
  }
13
14
  /**
14
15
  * Check if email address is Gmail
@@ -35,5 +36,6 @@ export declare function createAutoImapConfig(config: {
35
36
  tokenProvider?: TokenProvider;
36
37
  verbose?: boolean;
37
38
  rejectUnauthorized?: boolean;
39
+ inactivityTimeout?: number;
38
40
  }): ImapClientConfig;
39
41
  //# sourceMappingURL=gmail.d.ts.map
package/gmail.js CHANGED
@@ -33,6 +33,7 @@ export function createGmailConfig(config) {
33
33
  tokenProvider: config.tokenProvider,
34
34
  verbose: config.verbose,
35
35
  rejectUnauthorized: config.rejectUnauthorized,
36
+ inactivityTimeout: config.inactivityTimeout,
36
37
  };
37
38
  }
38
39
  /**
@@ -50,6 +51,7 @@ export function createAutoImapConfig(config) {
50
51
  tokenProvider: config.tokenProvider,
51
52
  verbose: config.verbose,
52
53
  rejectUnauthorized: config.rejectUnauthorized,
54
+ inactivityTimeout: config.inactivityTimeout,
53
55
  });
54
56
  }
55
57
  else {
@@ -60,6 +62,7 @@ export function createAutoImapConfig(config) {
60
62
  password: config.password,
61
63
  verbose: config.verbose,
62
64
  rejectUnauthorized: config.rejectUnauthorized,
65
+ inactivityTimeout: config.inactivityTimeout,
63
66
  };
64
67
  }
65
68
  }
package/imap-native.d.ts CHANGED
@@ -118,7 +118,8 @@ export declare class NativeImapClient {
118
118
  /** Inactivity timeout — how long to wait with NO data before declaring the connection dead.
119
119
  * This is NOT a wall-clock timeout. Timer resets every time data arrives from the server.
120
120
  * A large FETCH returning data continuously will never timeout.
121
- * 60s accommodates Gmail which is slow on SEARCH for large folders. */
121
+ * 60s accommodates Gmail which is slow on SEARCH for large folders.
122
+ * Overridable via ImapClientConfig.inactivityTimeout — slow Dovecot servers need 180s+. */
122
123
  private inactivityTimeout;
123
124
  /** Fetch chunk sizes — start small for quick first paint, ramp up for throughput */
124
125
  private static INITIAL_CHUNK_SIZE;
package/imap-native.js CHANGED
@@ -28,6 +28,7 @@ export class NativeImapClient {
28
28
  this.transportFactory = transportFactory;
29
29
  this.transport = transportFactory();
30
30
  this.verbose = config.verbose || false;
31
+ this.inactivityTimeout = config.inactivityTimeout ?? 60000;
31
32
  }
32
33
  get connected() { return this._connected; }
33
34
  // ── Connection ──
@@ -457,8 +458,9 @@ export class NativeImapClient {
457
458
  /** Inactivity timeout — how long to wait with NO data before declaring the connection dead.
458
459
  * This is NOT a wall-clock timeout. Timer resets every time data arrives from the server.
459
460
  * A large FETCH returning data continuously will never timeout.
460
- * 60s accommodates Gmail which is slow on SEARCH for large folders. */
461
- inactivityTimeout = 60000;
461
+ * 60s accommodates Gmail which is slow on SEARCH for large folders.
462
+ * Overridable via ImapClientConfig.inactivityTimeout slow Dovecot servers need 180s+. */
463
+ inactivityTimeout;
462
464
  /** Fetch chunk sizes — start small for quick first paint, ramp up for throughput */
463
465
  static INITIAL_CHUNK_SIZE = 25;
464
466
  static MAX_CHUNK_SIZE = 500;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/iflow-direct",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Direct IMAP client — transport-agnostic, no Node.js dependencies, browser-ready",
5
5
  "main": "index.js",
6
6
  "types": "index.ts",
package/types.d.ts CHANGED
@@ -10,5 +10,6 @@ export interface ImapClientConfig {
10
10
  tokenProvider?: TokenProvider;
11
11
  verbose?: boolean;
12
12
  rejectUnauthorized?: boolean;
13
+ inactivityTimeout?: number;
13
14
  }
14
15
  //# sourceMappingURL=types.d.ts.map