n8n-nodes-chatflow 0.2.10 → 0.2.12

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.
@@ -1,35 +1,26 @@
1
1
  class ChatflowApi {
2
2
  constructor() {
3
- // Дублируем статические свойства на экземпляр для совместимости
4
- this.name = ChatflowApi.name;
5
- this.displayName = ChatflowApi.displayName;
6
- this.documentationUrl = ChatflowApi.documentationUrl;
7
- this.properties = ChatflowApi.properties;
8
- this.test = ChatflowApi.test;
3
+ this.name = 'chatflowApi';
4
+ this.displayName = 'Chatflow API';
5
+ this.documentationUrl = 'https://app.chatflow.kz';
6
+ this.properties = [
7
+ {
8
+ displayName: 'Token',
9
+ name: 'token',
10
+ type: 'string',
11
+ typeOptions: { password: true },
12
+ default: '',
13
+ required: true,
14
+ description: 'API token from Chatflow → Settings → API Access',
15
+ },
16
+ ];
17
+ this.test = {
18
+ request: {
19
+ baseURL: 'https://app.chatflow.kz/',
20
+ url: 'ping',
21
+ method: 'GET',
22
+ },
23
+ };
9
24
  }
10
25
  }
11
- ChatflowApi.name = 'chatflowApi';
12
- ChatflowApi.displayName = 'Chatflow API';
13
- ChatflowApi.documentationUrl = 'https://app.chatflow.kz';
14
- ChatflowApi.properties = [
15
- {
16
- displayName: 'Token',
17
- name: 'token',
18
- type: 'string',
19
- typeOptions: { password: true },
20
- default: '',
21
- required: true,
22
- description: 'API token from Chatflow → Settings → API Access',
23
- },
24
- ];
25
- // Basic test to ensure base URL is reachable
26
- ChatflowApi.test = {
27
- request: {
28
- baseURL: 'https://app.chatflow.kz/',
29
- url: 'ping',
30
- method: 'GET',
31
- },
32
- };
33
- // Экспорт в обоих форматах
34
- exports.ChatflowApi = ChatflowApi;
35
- module.exports = ChatflowApi;
26
+ module.exports = { ChatflowApi };
package/dist/index.js CHANGED
@@ -1,4 +1,7 @@
1
- // Экспорт списка узлов/кредов поддержка разных способов require
2
- exports.nodes = ['dist/nodes/ChatflowMessage.node.js'];
3
- exports.credentials = ['dist/credentials/ChatflowApi.credentials.js'];
1
+ // Точка входа: экспортируем классы, а не пути. Относительные пути
2
+ // будут корректно работать как из исходников, так и после сборки в dist.
3
+ const { ChatflowMessage } = require('./nodes/ChatflowMessage.node.js');
4
+ const { ChatflowApi } = require('./credentials/ChatflowApi.credentials.js');
5
+ exports.nodes = [ChatflowMessage];
6
+ exports.credentials = [ChatflowApi];
4
7
  module.exports = { nodes: exports.nodes, credentials: exports.credentials };
@@ -115,6 +115,5 @@ ChatflowMessage.description = {
115
115
  { displayName: 'Continue On Fail', name: 'continueOnFail', type: 'boolean', default: true },
116
116
  ]
117
117
  };
118
- // Экспорт в обоих форматах (на всякий случай для разных загрузчиков)
119
- exports.ChatflowMessage = ChatflowMessage;
120
- module.exports = ChatflowMessage;
118
+ // Экспорт совместимый с n8n
119
+ module.exports = { ChatflowMessage };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-chatflow",
3
- "version": "0.2.10",
3
+ "version": "0.2.12",
4
4
  "description": "n8n community node to send WhatsApp messages via Chatflow API (text, audio, video, document, image)",
5
5
  "author": "Chatflow",
6
6
  "license": "MIT",
@@ -16,14 +16,7 @@
16
16
  "type": "git",
17
17
  "url": "https://github.com/chatflow/n8n-nodes-chatflow"
18
18
  },
19
- "n8n": {
20
- "nodes": [
21
- "dist/nodes/ChatflowMessage.node.js"
22
- ],
23
- "credentials": [
24
- "dist/credentials/ChatflowApi.credentials.js"
25
- ]
26
- },
19
+ "n8n": {},
27
20
  "main": "dist/index.js",
28
21
  "files": [
29
22
  "dist",