@mibo-ai/n8n-nodes-mibo-testing 0.2.1
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/LICENSE +674 -0
- package/README.md +227 -0
- package/dist/credentials/MiboTestingApi.credentials.d.ts +11 -0
- package/dist/credentials/MiboTestingApi.credentials.d.ts.map +1 -0
- package/dist/credentials/MiboTestingApi.credentials.js +53 -0
- package/dist/credentials/MiboTestingApi.credentials.js.map +1 -0
- package/dist/nodes/MiboTesting/MiboTesting.node.d.ts +6 -0
- package/dist/nodes/MiboTesting/MiboTesting.node.d.ts.map +1 -0
- package/dist/nodes/MiboTesting/MiboTesting.node.js +468 -0
- package/dist/nodes/MiboTesting/MiboTesting.node.js.map +1 -0
- package/dist/nodes/MiboTesting/builders.d.ts +6 -0
- package/dist/nodes/MiboTesting/builders.d.ts.map +1 -0
- package/dist/nodes/MiboTesting/builders.js +102 -0
- package/dist/nodes/MiboTesting/builders.js.map +1 -0
- package/dist/nodes/MiboTesting/constants.d.ts +21 -0
- package/dist/nodes/MiboTesting/constants.d.ts.map +1 -0
- package/dist/nodes/MiboTesting/constants.js +36 -0
- package/dist/nodes/MiboTesting/constants.js.map +1 -0
- package/dist/nodes/MiboTesting/mibo-client.d.ts +8 -0
- package/dist/nodes/MiboTesting/mibo-client.d.ts.map +1 -0
- package/dist/nodes/MiboTesting/mibo-client.js +91 -0
- package/dist/nodes/MiboTesting/mibo-client.js.map +1 -0
- package/dist/nodes/MiboTesting/mibo-testing.svg +23 -0
- package/dist/nodes/MiboTesting/types.d.ts +79 -0
- package/dist/nodes/MiboTesting/types.d.ts.map +1 -0
- package/dist/nodes/MiboTesting/types.js +3 -0
- package/dist/nodes/MiboTesting/types.js.map +1 -0
- package/dist/nodes/MiboTesting/utils.d.ts +8 -0
- package/dist/nodes/MiboTesting/utils.d.ts.map +1 -0
- package/dist/nodes/MiboTesting/utils.js +88 -0
- package/dist/nodes/MiboTesting/utils.js.map +1 -0
- package/package.json +73 -0
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MiboTesting = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const builders_1 = require("./builders");
|
|
6
|
+
const constants_1 = require("./constants");
|
|
7
|
+
const mibo_client_1 = require("./mibo-client");
|
|
8
|
+
const utils_1 = require("./utils");
|
|
9
|
+
class MiboTesting {
|
|
10
|
+
description = {
|
|
11
|
+
displayName: 'Mibo Testing',
|
|
12
|
+
name: 'miboTesting',
|
|
13
|
+
icon: 'file:mibo-testing.svg',
|
|
14
|
+
group: ['output'],
|
|
15
|
+
version: 1,
|
|
16
|
+
description: 'Capture and send workflow traces to Mibo Testing for semantic and procedural testing',
|
|
17
|
+
defaults: {
|
|
18
|
+
name: 'Mibo Testing',
|
|
19
|
+
},
|
|
20
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
21
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
22
|
+
credentials: [
|
|
23
|
+
{
|
|
24
|
+
name: 'miboTestingApi',
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
properties: [
|
|
29
|
+
{
|
|
30
|
+
displayName: 'Auto-detect Workflow Nodes',
|
|
31
|
+
name: 'useGetWorkflow',
|
|
32
|
+
type: 'boolean',
|
|
33
|
+
noDataExpression: true,
|
|
34
|
+
default: false,
|
|
35
|
+
description: 'Automatically detect all nodes in your workflow. If you have configured your n8n API Key and Base URL in the credentials, this works automatically (recommended). Otherwise, connect an n8n "Get Workflow" node before this one as a fallback.',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
displayName: 'Node Filter',
|
|
39
|
+
name: 'nodeFilterPreset',
|
|
40
|
+
type: 'options',
|
|
41
|
+
noDataExpression: true,
|
|
42
|
+
default: 'all',
|
|
43
|
+
description: 'Choose which nodes to capture from the workflow',
|
|
44
|
+
displayOptions: {
|
|
45
|
+
show: {
|
|
46
|
+
useGetWorkflow: [true],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
options: [
|
|
50
|
+
{
|
|
51
|
+
name: 'All Nodes',
|
|
52
|
+
value: 'all',
|
|
53
|
+
description: 'Capture data from all workflow nodes',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'AI Nodes Only',
|
|
57
|
+
value: 'ai',
|
|
58
|
+
description: 'Only nodes with "AI" in their name',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'HTTP/Webhook Only',
|
|
62
|
+
value: 'http',
|
|
63
|
+
description: 'Only HTTP Request and Webhook nodes',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'Exclude Utility Nodes',
|
|
67
|
+
value: 'excludeUtility',
|
|
68
|
+
description: 'Exclude Set, If, Merge, Switch nodes',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'Custom',
|
|
72
|
+
value: 'custom',
|
|
73
|
+
description: 'Select specific nodes by name',
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
displayName: 'Target Nodes',
|
|
79
|
+
name: 'targetNodes',
|
|
80
|
+
type: 'string',
|
|
81
|
+
default: '',
|
|
82
|
+
required: true,
|
|
83
|
+
description: 'Names of the nodes to capture data from, separated by commas',
|
|
84
|
+
placeholder: 'Webhook, HTTP Request, AI Agent',
|
|
85
|
+
displayOptions: {
|
|
86
|
+
show: {
|
|
87
|
+
useGetWorkflow: [false],
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
displayName: 'Custom Node Names',
|
|
93
|
+
name: 'customTargetNodes',
|
|
94
|
+
type: 'string',
|
|
95
|
+
default: '',
|
|
96
|
+
required: true,
|
|
97
|
+
description: "Names of the nodes to capture, separated by commas. Use expression {{ $json.nodes.map(n => n.name).join(', ') }} to see all available nodes.",
|
|
98
|
+
placeholder: 'Webhook, HTTP Request, AI Agent',
|
|
99
|
+
displayOptions: {
|
|
100
|
+
show: {
|
|
101
|
+
useGetWorkflow: [true],
|
|
102
|
+
nodeFilterPreset: ['custom'],
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
displayName: 'Request ID',
|
|
108
|
+
name: 'requestId',
|
|
109
|
+
type: 'string',
|
|
110
|
+
default: '',
|
|
111
|
+
description: 'The x-request-id for correlating this trace with n8n executions. Required for active testing when triggered via HTTP/Webhook. Use expression: {{ $("Webhook").item.json.headers["x-request-id"] }}',
|
|
112
|
+
placeholder: '={{ $("Webhook").item.json.headers["x-request-id"] }}',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
displayName: 'Platform ID',
|
|
116
|
+
name: 'platformId',
|
|
117
|
+
type: 'string',
|
|
118
|
+
default: '',
|
|
119
|
+
description: 'The unique identifier for your platform in Mibo Testing (UUID format)',
|
|
120
|
+
placeholder: 'e.g., 550e8400-e29b-41d4-a716-446655440000',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
displayName: 'Include Metadata',
|
|
124
|
+
name: 'includeMetadata',
|
|
125
|
+
type: 'boolean',
|
|
126
|
+
noDataExpression: true,
|
|
127
|
+
default: false,
|
|
128
|
+
description: 'Whether to include additional metadata with the trace',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
displayName: 'Metadata',
|
|
132
|
+
name: 'metadata',
|
|
133
|
+
type: 'fixedCollection',
|
|
134
|
+
typeOptions: {
|
|
135
|
+
multipleValues: false,
|
|
136
|
+
},
|
|
137
|
+
default: {},
|
|
138
|
+
displayOptions: {
|
|
139
|
+
show: {
|
|
140
|
+
includeMetadata: [true],
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
options: [
|
|
144
|
+
{
|
|
145
|
+
displayName: 'Fields',
|
|
146
|
+
name: 'fields',
|
|
147
|
+
values: [
|
|
148
|
+
{
|
|
149
|
+
displayName: 'Environment',
|
|
150
|
+
name: 'environment',
|
|
151
|
+
type: 'string',
|
|
152
|
+
default: 'production',
|
|
153
|
+
description: 'The environment where the workflow is running',
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
displayName: 'Version',
|
|
157
|
+
name: 'version',
|
|
158
|
+
type: 'string',
|
|
159
|
+
default: '1.0.0',
|
|
160
|
+
description: 'The version of your workflow or application',
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
displayName: 'Additional Fields',
|
|
164
|
+
name: 'additionalFields',
|
|
165
|
+
type: 'json',
|
|
166
|
+
default: '{}',
|
|
167
|
+
description: 'Any additional metadata fields (JSON format)',
|
|
168
|
+
placeholder: '{"team": "backend", "feature": "user-auth"}',
|
|
169
|
+
},
|
|
170
|
+
],
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
displayName: 'Options',
|
|
176
|
+
name: 'options',
|
|
177
|
+
type: 'collection',
|
|
178
|
+
placeholder: 'Add Option',
|
|
179
|
+
default: {},
|
|
180
|
+
options: [
|
|
181
|
+
{
|
|
182
|
+
displayName: 'Timeout (Seconds)',
|
|
183
|
+
name: 'timeout',
|
|
184
|
+
type: 'number',
|
|
185
|
+
default: constants_1.DEFAULT_TIMEOUT_SECONDS,
|
|
186
|
+
description: 'Maximum time in seconds to wait for the Mibo Testing server to respond',
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
};
|
|
192
|
+
async execute() {
|
|
193
|
+
const items = this.getInputData();
|
|
194
|
+
const returnData = [];
|
|
195
|
+
const credentials = await this.getCredentials('miboTestingApi');
|
|
196
|
+
const workflowData = this.getWorkflow();
|
|
197
|
+
const workflowId = workflowData.id || 'unknown';
|
|
198
|
+
const workflowName = workflowData.name || 'Unnamed Workflow';
|
|
199
|
+
const useGetWorkflow = this.getNodeParameter('useGetWorkflow', 0, false);
|
|
200
|
+
let targetNodes = [];
|
|
201
|
+
const nodeTypeMap = {};
|
|
202
|
+
const nodeParamsMap = {};
|
|
203
|
+
let fetchedNodes;
|
|
204
|
+
if (useGetWorkflow) {
|
|
205
|
+
const nodeFilterPreset = this.getNodeParameter('nodeFilterPreset', 0, 'all');
|
|
206
|
+
const n8nApiKey = credentials.n8nApiKey || '';
|
|
207
|
+
const n8nBaseUrl = (0, utils_1.resolveN8nBaseUrl)(credentials.n8nBaseUrl || '');
|
|
208
|
+
let inputNodes;
|
|
209
|
+
if (n8nApiKey) {
|
|
210
|
+
inputNodes = await (0, utils_1.fetchWorkflowNodes)(this, n8nBaseUrl, n8nApiKey, workflowId);
|
|
211
|
+
fetchedNodes = inputNodes;
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
const rawNodes = items[0]?.json?.nodes;
|
|
215
|
+
if (!rawNodes || !Array.isArray(rawNodes)) {
|
|
216
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No workflow nodes found', {
|
|
217
|
+
description: 'To auto-detect nodes, add your n8n API Key and Base URL in the Mibo Testing credentials (recommended). You can create an API key in n8n under Settings > API. Alternatively, connect an n8n "Get Workflow" node before this one.',
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
inputNodes = rawNodes;
|
|
221
|
+
}
|
|
222
|
+
const filteredInputNodes = inputNodes.filter((n) => {
|
|
223
|
+
if (constants_1.AUTO_EXCLUDED_NODE_TYPES.includes(n.type)) {
|
|
224
|
+
return false;
|
|
225
|
+
}
|
|
226
|
+
nodeTypeMap[n.name] = n.type || 'unknown';
|
|
227
|
+
nodeParamsMap[n.name] = n.parameters || {};
|
|
228
|
+
return true;
|
|
229
|
+
});
|
|
230
|
+
if (nodeFilterPreset === 'custom') {
|
|
231
|
+
const customTargetNodes = this.getNodeParameter('customTargetNodes', 0, '');
|
|
232
|
+
targetNodes = customTargetNodes
|
|
233
|
+
.split(',')
|
|
234
|
+
.map((name) => name.trim())
|
|
235
|
+
.filter((name) => name.length > 0);
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
let filteredNodes = filteredInputNodes;
|
|
239
|
+
switch (nodeFilterPreset) {
|
|
240
|
+
case 'ai':
|
|
241
|
+
filteredNodes = filteredInputNodes.filter((n) => n.name.toLowerCase().includes('ai'));
|
|
242
|
+
break;
|
|
243
|
+
case 'http':
|
|
244
|
+
filteredNodes = filteredInputNodes.filter((n) => {
|
|
245
|
+
const nodeType = n.type?.split('.').pop()?.toLowerCase() || '';
|
|
246
|
+
return ['httprequest', 'webhook'].includes(nodeType);
|
|
247
|
+
});
|
|
248
|
+
break;
|
|
249
|
+
case 'excludeUtility':
|
|
250
|
+
filteredNodes = filteredInputNodes.filter((n) => {
|
|
251
|
+
const nodeType = n.type?.split('.').pop()?.toLowerCase() || '';
|
|
252
|
+
return !['set', 'if', 'merge', 'switch'].includes(nodeType);
|
|
253
|
+
});
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
targetNodes = filteredNodes.map((n) => n.name);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
else {
|
|
260
|
+
const targetNodesInput = this.getNodeParameter('targetNodes', 0, '');
|
|
261
|
+
targetNodes = targetNodesInput
|
|
262
|
+
.split(',')
|
|
263
|
+
.map((name) => name.trim())
|
|
264
|
+
.filter((name) => name.length > 0);
|
|
265
|
+
}
|
|
266
|
+
if (targetNodes.length === 0) {
|
|
267
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No target nodes configured', {
|
|
268
|
+
description: useGetWorkflow
|
|
269
|
+
? 'No nodes matched the selected filter. Try a different filter or check that the Get Workflow node is providing data.'
|
|
270
|
+
: 'Enter node names separated by commas. Example: "Webhook, HTTP Request, AI Agent"',
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
const platformId = this.getNodeParameter('platformId', 0, '');
|
|
274
|
+
const includeMetadata = this.getNodeParameter('includeMetadata', 0, false);
|
|
275
|
+
const options = this.getNodeParameter('options', 0, {});
|
|
276
|
+
if (platformId && !(0, utils_1.isValidUUID)(platformId)) {
|
|
277
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Platform ID must be a valid UUID', {
|
|
278
|
+
description: 'The Platform ID must be in UUID format (e.g., 550e8400-e29b-41d4-a716-446655440000)',
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
const timestamp = new Date().toISOString();
|
|
282
|
+
const inputData = items.map((item) => item.json);
|
|
283
|
+
const metadataConfig = includeMetadata
|
|
284
|
+
? this.getNodeParameter('metadata', 0, {})
|
|
285
|
+
: {};
|
|
286
|
+
const metadata = (0, builders_1.buildMetadata)(workflowId, workflowName, timestamp, includeMetadata, metadataConfig, this);
|
|
287
|
+
const proxy = this.getWorkflowDataProxy(0);
|
|
288
|
+
const nodesData = [];
|
|
289
|
+
const nodesNotFound = [];
|
|
290
|
+
const nodesNotExecuted = [];
|
|
291
|
+
const manualRequestId = this.getNodeParameter('requestId', 0, '');
|
|
292
|
+
let requestId = manualRequestId || undefined;
|
|
293
|
+
if (!requestId) {
|
|
294
|
+
for (const item of items) {
|
|
295
|
+
requestId = (0, utils_1.findRequestIdInData)(item.json);
|
|
296
|
+
if (requestId) {
|
|
297
|
+
break;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
if (!requestId && useGetWorkflow) {
|
|
302
|
+
const allNodes = fetchedNodes || items[0]?.json?.nodes;
|
|
303
|
+
if (allNodes) {
|
|
304
|
+
const webhookNodes = allNodes.filter((n) => {
|
|
305
|
+
const nodeType = n.type?.split('.').pop()?.toLowerCase() || '';
|
|
306
|
+
return nodeType === 'webhook';
|
|
307
|
+
});
|
|
308
|
+
for (const webhookNode of webhookNodes) {
|
|
309
|
+
try {
|
|
310
|
+
const webhookItems = proxy.$items(webhookNode.name);
|
|
311
|
+
if (webhookItems && webhookItems.length > 0) {
|
|
312
|
+
for (const webhookItem of webhookItems) {
|
|
313
|
+
requestId = (0, utils_1.findRequestIdInData)(webhookItem.json);
|
|
314
|
+
if (requestId) {
|
|
315
|
+
break;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
catch {
|
|
321
|
+
// Webhook node not executed in this branch
|
|
322
|
+
}
|
|
323
|
+
if (requestId) {
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
const externalId = requestId;
|
|
330
|
+
for (const nodeName of targetNodes) {
|
|
331
|
+
const nodeProxy = proxy.$node[nodeName];
|
|
332
|
+
if (!nodeProxy) {
|
|
333
|
+
nodesNotFound.push(nodeName);
|
|
334
|
+
continue;
|
|
335
|
+
}
|
|
336
|
+
const nodeType = nodeTypeMap[nodeName] || 'unknown';
|
|
337
|
+
try {
|
|
338
|
+
const nodeItems = proxy.$items(nodeName);
|
|
339
|
+
if (nodeItems && nodeItems.length > 0) {
|
|
340
|
+
const nodeItemsData = [];
|
|
341
|
+
for (const nodeItem of nodeItems) {
|
|
342
|
+
const itemJson = nodeItem.json;
|
|
343
|
+
nodeItemsData.push(itemJson);
|
|
344
|
+
if (!requestId) {
|
|
345
|
+
requestId = (0, utils_1.findRequestIdInData)(itemJson);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
const nodeParams = nodeParamsMap[nodeName];
|
|
349
|
+
nodesData.push({
|
|
350
|
+
nodeName,
|
|
351
|
+
items: nodeItemsData,
|
|
352
|
+
type: nodeType,
|
|
353
|
+
parameters: nodeParams && Object.keys(nodeParams).length > 0 ? nodeParams : undefined,
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
nodesNotExecuted.push(nodeName);
|
|
358
|
+
nodesData.push({
|
|
359
|
+
nodeName,
|
|
360
|
+
items: [],
|
|
361
|
+
type: nodeType,
|
|
362
|
+
_notExecuted: true,
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
catch {
|
|
367
|
+
try {
|
|
368
|
+
const nodeJson = nodeProxy.json;
|
|
369
|
+
const nodeParams = nodeParamsMap[nodeName];
|
|
370
|
+
nodesData.push({
|
|
371
|
+
nodeName,
|
|
372
|
+
items: [nodeJson],
|
|
373
|
+
type: nodeType,
|
|
374
|
+
parameters: nodeParams && Object.keys(nodeParams).length > 0 ? nodeParams : undefined,
|
|
375
|
+
});
|
|
376
|
+
if (!requestId) {
|
|
377
|
+
requestId = (0, utils_1.findRequestIdInData)(nodeJson);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
catch {
|
|
381
|
+
nodesNotExecuted.push(nodeName);
|
|
382
|
+
nodesData.push({
|
|
383
|
+
nodeName,
|
|
384
|
+
items: [],
|
|
385
|
+
type: nodeType,
|
|
386
|
+
_notExecuted: true,
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
if (nodesNotFound.length > 0) {
|
|
392
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Nodes not found in workflow: '${nodesNotFound.join("', '")}'`, {
|
|
393
|
+
description: 'Check the exact node names. Node names are case-sensitive and must match exactly as they appear in your workflow.',
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
// Use optimized trace format when using Get Workflow mode
|
|
397
|
+
const tracePayload = useGetWorkflow
|
|
398
|
+
? (0, builders_1.buildOptimizedTracePayload)(nodesData, workflowId, workflowName, timestamp, platformId, includeMetadata ? metadata : undefined)
|
|
399
|
+
: (0, builders_1.buildTracePayload)(inputData, workflowId, metadata, platformId, externalId || '', nodesData);
|
|
400
|
+
const serverUrl = (0, utils_1.normalizeServerUrl)((0, constants_1.getServerUrl)());
|
|
401
|
+
const timeout = (options.timeout || constants_1.DEFAULT_TIMEOUT_SECONDS) * 1000;
|
|
402
|
+
const payloadSize = (0, mibo_client_1.calculatePayloadSize)(tracePayload);
|
|
403
|
+
const payloadSizeFormatted = (0, mibo_client_1.formatBytes)(payloadSize);
|
|
404
|
+
const payloadWarning = (0, mibo_client_1.getPayloadSizeWarning)(payloadSize);
|
|
405
|
+
try {
|
|
406
|
+
const response = await (0, mibo_client_1.sendTrace)(this, serverUrl, credentials.apiKey, tracePayload, timeout, requestId);
|
|
407
|
+
for (let i = 0; i < items.length; i++) {
|
|
408
|
+
const traceInfo = {
|
|
409
|
+
sent: true,
|
|
410
|
+
traceId: response?.data?.id || 'unknown',
|
|
411
|
+
platformId: platformId || 'resolved-from-api-key',
|
|
412
|
+
requestId: requestId || null,
|
|
413
|
+
timestamp,
|
|
414
|
+
nodesCollected: nodesData.filter((n) => !n._notExecuted).length,
|
|
415
|
+
targetNodes: targetNodes,
|
|
416
|
+
payloadSize: payloadSizeFormatted,
|
|
417
|
+
};
|
|
418
|
+
if (payloadWarning) {
|
|
419
|
+
traceInfo.payloadWarning = payloadWarning;
|
|
420
|
+
}
|
|
421
|
+
if (nodesNotExecuted.length > 0) {
|
|
422
|
+
traceInfo.warning = `Some nodes did not execute in this workflow branch: ${nodesNotExecuted.join(', ')}`;
|
|
423
|
+
traceInfo.nodesNotExecuted = nodesNotExecuted;
|
|
424
|
+
}
|
|
425
|
+
returnData.push({
|
|
426
|
+
json: {
|
|
427
|
+
...items[i].json,
|
|
428
|
+
_miboTrace: traceInfo,
|
|
429
|
+
},
|
|
430
|
+
pairedItem: { item: i },
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
catch (error) {
|
|
435
|
+
const errorMessage = (0, mibo_client_1.parseErrorResponse)(error);
|
|
436
|
+
if (this.continueOnFail()) {
|
|
437
|
+
for (let i = 0; i < items.length; i++) {
|
|
438
|
+
returnData.push({
|
|
439
|
+
json: {
|
|
440
|
+
...items[i].json,
|
|
441
|
+
_miboTrace: {
|
|
442
|
+
sent: false,
|
|
443
|
+
error: errorMessage,
|
|
444
|
+
platformId: platformId || 'unknown',
|
|
445
|
+
requestId: requestId || null,
|
|
446
|
+
timestamp,
|
|
447
|
+
targetNodes: targetNodes,
|
|
448
|
+
payloadSize: payloadSizeFormatted,
|
|
449
|
+
},
|
|
450
|
+
},
|
|
451
|
+
pairedItem: { item: i },
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
else {
|
|
456
|
+
const isPayloadTooLarge = errorMessage.toLowerCase().includes('too large');
|
|
457
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Failed to send trace to Mibo Testing: ${errorMessage}`, {
|
|
458
|
+
description: isPayloadTooLarge
|
|
459
|
+
? 'Try reducing the number of target nodes or exclude nodes with large data (files, images, etc.)'
|
|
460
|
+
: 'Check your Mibo Testing API Key (the first field in the credentials). This is NOT the n8n API Key.',
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
return [returnData];
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
exports.MiboTesting = MiboTesting;
|
|
468
|
+
//# sourceMappingURL=MiboTesting.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MiboTesting.node.js","sourceRoot":"","sources":["../../../nodes/MiboTesting/MiboTesting.node.ts"],"names":[],"mappings":";;;AAOA,+CAAuE;AACvE,yCAA0F;AAC1F,2CAA8F;AAC9F,+CAMuB;AAEvB,mCAMiB;AAEjB,MAAa,WAAW;IACtB,WAAW,GAAyB;QAClC,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,uBAAuB;QAC7B,KAAK,EAAE,CAAC,QAAQ,CAAC;QACjB,OAAO,EAAE,CAAC;QACV,WAAW,EACT,sFAAsF;QACxF,QAAQ,EAAE;YACR,IAAI,EAAE,cAAc;SACrB;QACD,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;QAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;QACnC,WAAW,EAAE;YACX;gBACE,IAAI,EAAE,gBAAgB;gBACtB,Q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,CAAC;QACH,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACtB,CAAC;CACF;AAvgBD,kCAugBC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IDataObject, IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
import type { NodeDataInput, OptimizedTracePayload, TracePayload } from './types';
|
|
3
|
+
export declare function buildMetadata(workflowId: string, workflowName: string, timestamp: string, includeMetadata: boolean, metadataConfig: IDataObject, node: IExecuteFunctions): IDataObject;
|
|
4
|
+
export declare function buildTracePayload(inputData: IDataObject[], workflowId: string, metadata: IDataObject, platformId: string, externalId: string, nodesData?: NodeDataInput[]): TracePayload;
|
|
5
|
+
export declare function buildOptimizedTracePayload(nodesData: NodeDataInput[], workflowId: string, workflowName: string, timestamp: string, platformId?: string, extraMetadata?: IDataObject): OptimizedTracePayload;
|
|
6
|
+
//# sourceMappingURL=builders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../../nodes/MiboTesting/builders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEnE,OAAO,KAAK,EAEV,aAAa,EAEb,qBAAqB,EACrB,YAAY,EACb,MAAM,SAAS,CAAC;AAEjB,wBAAgB,aAAa,CAC3B,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,OAAO,EACxB,cAAc,EAAE,WAAW,EAC3B,IAAI,EAAE,iBAAiB,GACtB,WAAW,CAuCb;AAED,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,WAAW,EAAE,EACxB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,WAAW,EACrB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,SAAS,CAAC,EAAE,aAAa,EAAE,GAC1B,YAAY,CAwBd;AAED,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,aAAa,EAAE,EAC1B,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,WAAW,GAC1B,qBAAqB,CA0CvB"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildMetadata = buildMetadata;
|
|
4
|
+
exports.buildTracePayload = buildTracePayload;
|
|
5
|
+
exports.buildOptimizedTracePayload = buildOptimizedTracePayload;
|
|
6
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
7
|
+
function buildMetadata(workflowId, workflowName, timestamp, includeMetadata, metadataConfig, node) {
|
|
8
|
+
const metadata = {
|
|
9
|
+
workflowId,
|
|
10
|
+
workflowName,
|
|
11
|
+
timestamp,
|
|
12
|
+
};
|
|
13
|
+
if (!includeMetadata) {
|
|
14
|
+
return metadata;
|
|
15
|
+
}
|
|
16
|
+
const fields = metadataConfig.fields;
|
|
17
|
+
if (!fields) {
|
|
18
|
+
return metadata;
|
|
19
|
+
}
|
|
20
|
+
if (fields.environment) {
|
|
21
|
+
metadata.environment = fields.environment;
|
|
22
|
+
}
|
|
23
|
+
if (fields.version) {
|
|
24
|
+
metadata.version = fields.version;
|
|
25
|
+
}
|
|
26
|
+
if (fields.additionalFields) {
|
|
27
|
+
try {
|
|
28
|
+
const additionalFields = typeof fields.additionalFields === 'string'
|
|
29
|
+
? JSON.parse(fields.additionalFields)
|
|
30
|
+
: fields.additionalFields;
|
|
31
|
+
Object.assign(metadata, additionalFields);
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
throw new n8n_workflow_1.NodeOperationError(node.getNode(), 'Invalid JSON in Additional Fields', {
|
|
35
|
+
description: 'Please ensure the Additional Fields contains valid JSON',
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return metadata;
|
|
40
|
+
}
|
|
41
|
+
function buildTracePayload(inputData, workflowId, metadata, platformId, externalId, nodesData) {
|
|
42
|
+
const payload = {
|
|
43
|
+
data: {
|
|
44
|
+
input: inputData,
|
|
45
|
+
},
|
|
46
|
+
externalMetadata: {
|
|
47
|
+
workflowId,
|
|
48
|
+
},
|
|
49
|
+
metadata,
|
|
50
|
+
};
|
|
51
|
+
if (nodesData && nodesData.length > 0) {
|
|
52
|
+
payload.data.nodes = nodesData;
|
|
53
|
+
}
|
|
54
|
+
if (platformId) {
|
|
55
|
+
payload.platformId = platformId;
|
|
56
|
+
}
|
|
57
|
+
if (externalId) {
|
|
58
|
+
payload.externalId = externalId;
|
|
59
|
+
}
|
|
60
|
+
return payload;
|
|
61
|
+
}
|
|
62
|
+
function buildOptimizedTracePayload(nodesData, workflowId, workflowName, timestamp, platformId, extraMetadata) {
|
|
63
|
+
const data = {};
|
|
64
|
+
let hasSkipped = false;
|
|
65
|
+
for (const node of nodesData) {
|
|
66
|
+
if (node._notExecuted) {
|
|
67
|
+
hasSkipped = true;
|
|
68
|
+
data[node.nodeName] = {
|
|
69
|
+
output: {},
|
|
70
|
+
type: node.type || 'unknown',
|
|
71
|
+
status: 'skipped',
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
const output = node.items.length === 1 ? node.items[0] : node.items;
|
|
76
|
+
const nodeEntry = {
|
|
77
|
+
output,
|
|
78
|
+
type: node.type || 'unknown',
|
|
79
|
+
status: 'success',
|
|
80
|
+
};
|
|
81
|
+
if (node.parameters && Object.keys(node.parameters).length > 0) {
|
|
82
|
+
nodeEntry.parameters = node.parameters;
|
|
83
|
+
}
|
|
84
|
+
data[node.nodeName] = nodeEntry;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
const payload = {
|
|
88
|
+
status: hasSkipped ? 'partial' : 'success',
|
|
89
|
+
data,
|
|
90
|
+
metadata: {
|
|
91
|
+
workflow_id: workflowId,
|
|
92
|
+
workflow_name: workflowName,
|
|
93
|
+
timestamp,
|
|
94
|
+
...extraMetadata,
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
if (platformId) {
|
|
98
|
+
payload.platformId = platformId;
|
|
99
|
+
}
|
|
100
|
+
return payload;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=builders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builders.js","sourceRoot":"","sources":["../../../nodes/MiboTesting/builders.ts"],"names":[],"mappings":";;AAUA,sCA8CC;AAED,8CA+BC;AAED,gEAiDC;AA3ID,+CAAkD;AASlD,SAAgB,aAAa,CAC3B,UAAkB,EAClB,YAAoB,EACpB,SAAiB,EACjB,eAAwB,EACxB,cAA2B,EAC3B,IAAuB;IAEvB,MAAM,QAAQ,GAAgB;QAC5B,UAAU;QACV,YAAY;QACZ,SAAS;KACV,CAAC;IAEF,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM,MAAM,GAAG,cAAc,CAAC,MAAoC,CAAC;IACnE,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QACvB,QAAQ,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAC5C,CAAC;IAED,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,QAAQ,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IACpC,CAAC;IAED,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAC5B,IAAI,CAAC;YACH,MAAM,gBAAgB,GACpB,OAAO,MAAM,CAAC,gBAAgB,KAAK,QAAQ;gBACzC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC;gBACrC,CAAC,CAAC,MAAM,CAAC,gBAA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AAI,EAAE,IAAI,CAAC,IAAI,IAAI,SAAS;gBAC5B,MAAM,EAAE,SAAS;aAClB,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;YACpE,MAAM,SAAS,GAAsB;gBACnC,MAAM;gBACN,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,SAAS;gBAC5B,MAAM,EAAE,SAAS;aAClB,CAAC;YACF,IAAI,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC/D,SAAS,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;YACzC,CAAC;YACD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;QAClC,CAAC;IACH,CAAC;IAED,MAAM,OAAO,GAA0B;QACrC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;QAC1C,IAAI;QACJ,QAAQ,EAAE;YACR,WAAW,EAAE,UAAU;YACvB,aAAa,EAAE,YAAY;YAC3B,SAAS;YACT,GAAG,aAAa;SACjB;KACF,CAAC;IAEF,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,CAAC,UAAU,GAAG,UAAU,CAAC;IAClC,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const DEFAULT_SERVER_URL = "https://api.mibo-ai.com";
|
|
2
|
+
export declare const DEFAULT_TIMEOUT_SECONDS = 30;
|
|
3
|
+
export declare const UUID_REGEX: RegExp;
|
|
4
|
+
export declare const MAX_PAYLOAD_SIZE_BYTES: number;
|
|
5
|
+
export declare const MAX_PAYLOAD_SIZE_MB = 10;
|
|
6
|
+
export declare const GZIP_THRESHOLD_BYTES: number;
|
|
7
|
+
export declare const AUTO_EXCLUDED_NODE_TYPES: string[];
|
|
8
|
+
export declare function getServerUrl(): string;
|
|
9
|
+
export declare const ERROR_CODES: {
|
|
10
|
+
readonly MISSING_API_KEY: "Missing x-api-key header. Make sure you are sending the API key in the headers.";
|
|
11
|
+
readonly INVALID_API_KEY: "The API key does not exist or has been revoked. Verify that you are using a valid API key.";
|
|
12
|
+
readonly VALIDATION_ERROR: "The request body failed validation.";
|
|
13
|
+
readonly PLATFORM_NOT_FOUND: {
|
|
14
|
+
readonly withRestrictions: "The API key is restricted to specific platforms. Verify that the platformId matches one of the allowed platforms.";
|
|
15
|
+
readonly withoutRestrictions: "Could not determine the target platform. Send a platformId in the body, or restrict the API key to a single platform.";
|
|
16
|
+
};
|
|
17
|
+
readonly AUTH_ERROR: "Internal error while validating the API key. Contact support.";
|
|
18
|
+
readonly INTERNAL_SERVER_ERROR: "Unexpected server error. Contact support if it persists.";
|
|
19
|
+
readonly PAYLOAD_TOO_LARGE: "The trace data is too large to send. Try reducing the number of target nodes or filtering nodes with large outputs (files, images, etc.).";
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../nodes/MiboTesting/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,4BAA4B,CAAC;AAC5D,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,UAAU,QACuD,CAAC;AAC/E,eAAO,MAAM,sBAAsB,QAAmB,CAAC;AACvD,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,oBAAoB,QAAkB,CAAC;AAEpD,eAAO,MAAM,wBAAwB,UASpC,CAAC;AAEF,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;CAgBd,CAAC"}
|