TXBOX - refactor: update package configuration and improve error handling

- Changed package.json to use "tsx" instead of "ts-node" for development.
- Updated "@whiskeysockets/baileys" dependency to version 6.7.24.
- Added error handling for unhandled rejections and uncaught exceptions in server.ts.
- Implemented a reconnect mechanism for WhatsApp connection failures.
- Updated tsconfig.json to use "NodeNext" module and resolution for ESM compatibility.
This commit is contained in:
2026-10-06 15:39:28 -03:00
parent 0d6231a02e
commit 1438585a0a
4 changed files with 1436 additions and 2240 deletions
+2 -1
View File
@@ -26,7 +26,8 @@
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
"module": "NodeNext", /* Specify what module code is generated. Required for ESM-only Baileys 6.7.x. */
"moduleResolution": "NodeNext", /* Resolve modules the way Node.js ESM does. */
"rootDir": "src", /* Specify the root folder within your source files. */
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */