n8n-nodes-chat2crm 0.1.17 → 0.1.18

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.
@@ -80,6 +80,12 @@ exports.STREAM_DEFINITIONS = [
80
80
  description: 'Outgoing messages from N8N (DB 1)',
81
81
  db: 1,
82
82
  },
83
+ {
84
+ name: 'N8N Chat Control',
85
+ value: 'N8N_CHAT_CONTROL',
86
+ description: 'Chat control messages for N8N (DB 1)',
87
+ db: 1,
88
+ },
83
89
  ];
84
90
  /**
85
91
  * Маппинг stream names к номерам баз данных
@@ -92,6 +98,7 @@ exports.STREAM_DB_MAP = {
92
98
  crm_outgoing_status: 1,
93
99
  N8N_INCOMING_MESSAGE: 1,
94
100
  N8N_OUTGOING_MESSAGE: 1,
101
+ N8N_CHAT_CONTROL: 1,
95
102
  // Поддержка старого формата (строчными) для обратной совместимости
96
103
  n8n_incoming_message: 1,
97
104
  n8n_outgoing_message: 1,
package/index.js CHANGED
@@ -1,3 +1,69 @@
1
+ // ========================================
2
+ // PROXY CONFIGURATION - ЛОГИРОВАНИЕ ПРОКСИ
3
+ // ========================================
4
+ const proxyVars = {
5
+ 'all_proxy': process.env.all_proxy,
6
+ 'ALL_PROXY': process.env.ALL_PROXY,
7
+ 'http_proxy': process.env.http_proxy,
8
+ 'HTTP_PROXY': process.env.HTTP_PROXY,
9
+ 'https_proxy': process.env.https_proxy,
10
+ 'HTTPS_PROXY': process.env.HTTPS_PROXY,
11
+ 'no_proxy': process.env.no_proxy,
12
+ 'NO_PROXY': process.env.NO_PROXY,
13
+ };
14
+
15
+ // Находим активный прокси (lowercase имеет приоритет)
16
+ const activeProxy = process.env.all_proxy || process.env.ALL_PROXY ||
17
+ process.env.http_proxy || process.env.HTTP_PROXY ||
18
+ process.env.https_proxy || process.env.HTTPS_PROXY;
19
+
20
+ // Выводим информацию о прокси БОЛЬШИМИ БУКВАМИ, чтобы было видно
21
+ console.log('\n');
22
+ console.log('╔════════════════════════════════════════════════════════════════╗');
23
+ console.log('║ PROXY CONFIGURATION ║');
24
+ console.log('╚════════════════════════════════════════════════════════════════╝');
25
+ console.log('');
26
+
27
+ if (activeProxy) {
28
+ // Маскируем пароль в логах
29
+ const maskedProxy = activeProxy.replace(/:\/\/[^:]+:[^@]+@/, '://***:***@');
30
+
31
+ console.log('✅ PROXY IS CONFIGURED AND ACTIVE');
32
+ console.log('');
33
+ console.log('Active Proxy URL:', maskedProxy);
34
+ console.log('NO_PROXY:', process.env.no_proxy || process.env.NO_PROXY || 'not set');
35
+ console.log('');
36
+ console.log('All proxy environment variables:');
37
+ Object.entries(proxyVars).forEach(([key, value]) => {
38
+ if (value) {
39
+ const masked = key.toLowerCase().includes('proxy') && !key.toLowerCase().includes('no')
40
+ ? value.replace(/:\/\/[^:]+:[^@]+@/, '://***:***@')
41
+ : value;
42
+ console.log(` ${key.padEnd(15)} = ${masked}`);
43
+ }
44
+ });
45
+ console.log('');
46
+ console.log('⚠️ All HTTP/HTTPS requests from n8n nodes will use this proxy');
47
+ console.log('⚠️ Redis connections (TCP) do NOT use HTTP proxy');
48
+ } else {
49
+ console.log('❌ NO PROXY CONFIGURED');
50
+ console.log('');
51
+ console.log('Available proxy environment variables (all empty):');
52
+ Object.keys(proxyVars).forEach(key => {
53
+ console.log(` ${key.padEnd(15)} = ${proxyVars[key] || '(not set)'}`);
54
+ });
55
+ console.log('');
56
+ console.log('To enable proxy, set in .env file:');
57
+ console.log(' ALL_PROXY=http://user:pass@host:port');
58
+ console.log(' all_proxy=http://user:pass@host:port');
59
+ }
60
+
61
+ console.log('');
62
+ console.log('╔════════════════════════════════════════════════════════════════╗');
63
+ console.log('║ END OF PROXY CONFIGURATION ║');
64
+ console.log('╚════════════════════════════════════════════════════════════════╝');
65
+ console.log('\n');
66
+
1
67
  module.exports = {
2
68
  nodes: [
3
69
  require('./dist/nodes/Chat2CrmTrigger/Chat2CrmTrigger.node.js'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-chat2crm",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "n8n node for Chat2Crm Redis integration",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",
@@ -11,7 +11,7 @@
11
11
  "main": "index.js",
12
12
  "scripts": {
13
13
  "build": "rm -rf dist && tsc && gulp build:icons",
14
- "dev": "npm run build && npx n8n",
14
+ "dev": "npm run build && node -r dotenv/config -r ./proxy-logger.js node_modules/.bin/n8n",
15
15
  "dev:watch": "tsc --watch",
16
16
  "format": "prettier nodes credentials --write",
17
17
  "lint": "eslint \"nodes/**/*.ts\" \"credentials/**/*.ts\" \"package.json\"",