natureco-cli 1.0.26 → 1.0.27

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": "natureco-cli",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "NatureCo AI Bot Terminal Interface",
5
5
  "main": "bin/natureco.js",
6
6
  "bin": {
@@ -116,8 +116,12 @@ async function startWhatsAppConnection(sessionDir, botId, selectedBot, config) {
116
116
  version,
117
117
  auth: state,
118
118
  printQRInTerminal: false,
119
- browser: Browsers.ubuntu('Chrome'),
120
119
  logger: logger,
120
+ browser: Browsers.ubuntu('Chrome'),
121
+ connectTimeoutMs: 60000,
122
+ defaultQueryTimeoutMs: 60000,
123
+ keepAliveIntervalMs: 10000,
124
+ retryRequestDelayMs: 2000,
121
125
  });
122
126
 
123
127
  let qrDisplayed = false;
@@ -145,10 +149,10 @@ async function startWhatsAppConnection(sessionDir, botId, selectedBot, config) {
145
149
  if (connection === 'close') {
146
150
  const statusCode = lastDisconnect?.error?.output?.statusCode;
147
151
 
148
- if (statusCode === 515) {
152
+ if (statusCode === 515 || statusCode === 408) {
149
153
  // Normal — yeniden bağlan, logout değil
150
154
  console.log(chalk.yellow('🔄 Yeniden bağlanıyor...'));
151
- setTimeout(() => startWhatsAppConnection(sessionDir, botId, selectedBot, config), 1000);
155
+ setTimeout(() => startWhatsAppConnection(sessionDir, botId, selectedBot, config), 2000);
152
156
  return;
153
157
  } else if (statusCode === 401) {
154
158
  console.log(chalk.red('❌ Oturum sonlandı, tekrar bağlanın.'));