n8n-nodes-base 1.100.0 → 1.101.0

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.
Files changed (75) hide show
  1. package/dist/nodes/EmailReadImap/EmailReadImap.node.d.ts.map +1 -1
  2. package/dist/nodes/EmailReadImap/EmailReadImap.node.js +2 -1
  3. package/dist/nodes/EmailReadImap/EmailReadImap.node.js.map +1 -1
  4. package/dist/nodes/EmailReadImap/v1/EmailReadImapV1.node.js.map +1 -1
  5. package/dist/nodes/EmailReadImap/v2/EmailReadImapV2.node.d.ts.map +1 -1
  6. package/dist/nodes/EmailReadImap/v2/EmailReadImapV2.node.js +39 -15
  7. package/dist/nodes/EmailReadImap/v2/EmailReadImapV2.node.js.map +1 -1
  8. package/dist/nodes/EmailReadImap/v2/utils.d.ts +10 -3
  9. package/dist/nodes/EmailReadImap/v2/utils.d.ts.map +1 -1
  10. package/dist/nodes/EmailReadImap/v2/utils.js +120 -99
  11. package/dist/nodes/EmailReadImap/v2/utils.js.map +1 -1
  12. package/dist/nodes/Evaluation/Evaluation/CannedMetricPrompts.ee.d.ts +5 -0
  13. package/dist/nodes/Evaluation/Evaluation/CannedMetricPrompts.ee.d.ts.map +1 -0
  14. package/dist/nodes/Evaluation/Evaluation/CannedMetricPrompts.ee.js +155 -0
  15. package/dist/nodes/Evaluation/Evaluation/CannedMetricPrompts.ee.js.map +1 -0
  16. package/dist/nodes/Evaluation/Evaluation/Description.node.d.ts.map +1 -1
  17. package/dist/nodes/Evaluation/Evaluation/Description.node.js +253 -1
  18. package/dist/nodes/Evaluation/Evaluation/Description.node.js.map +1 -1
  19. package/dist/nodes/Evaluation/Evaluation/Evaluation.node.ee.d.ts.map +1 -1
  20. package/dist/nodes/Evaluation/Evaluation/Evaluation.node.ee.js +2 -3
  21. package/dist/nodes/Evaluation/Evaluation/Evaluation.node.ee.js.map +1 -1
  22. package/dist/nodes/Evaluation/utils/evaluationUtils.d.ts +9 -0
  23. package/dist/nodes/Evaluation/utils/evaluationUtils.d.ts.map +1 -1
  24. package/dist/nodes/Evaluation/utils/evaluationUtils.js +17 -16
  25. package/dist/nodes/Evaluation/utils/evaluationUtils.js.map +1 -1
  26. package/dist/nodes/Evaluation/utils/metricHandlers.d.ts +10 -0
  27. package/dist/nodes/Evaluation/utils/metricHandlers.d.ts.map +1 -0
  28. package/dist/nodes/Evaluation/utils/metricHandlers.js +255 -0
  29. package/dist/nodes/Evaluation/utils/metricHandlers.js.map +1 -0
  30. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflow/ExecuteWorkflow.node.d.ts.map +1 -1
  31. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflow/ExecuteWorkflow.node.js +11 -1
  32. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflow/ExecuteWorkflow.node.js.map +1 -1
  33. package/dist/nodes/Form/Form.node.js +1 -1
  34. package/dist/nodes/Form/Form.node.js.map +1 -1
  35. package/dist/nodes/Github/Github.node.d.ts.map +1 -1
  36. package/dist/nodes/Github/Github.node.js +3 -2
  37. package/dist/nodes/Github/Github.node.js.map +1 -1
  38. package/dist/nodes/Github/SearchFunctions.d.ts.map +1 -1
  39. package/dist/nodes/Github/SearchFunctions.js +10 -1
  40. package/dist/nodes/Github/SearchFunctions.js.map +1 -1
  41. package/dist/nodes/Google/Gmail/v2/GmailV2.node.js +1 -1
  42. package/dist/nodes/Google/Gmail/v2/GmailV2.node.js.map +1 -1
  43. package/dist/nodes/Google/Gmail/v2/utils/draft.d.ts.map +1 -1
  44. package/dist/nodes/Google/Gmail/v2/utils/draft.js +14 -6
  45. package/dist/nodes/Google/Gmail/v2/utils/draft.js.map +1 -1
  46. package/dist/nodes/Linear/IssueDescription.d.ts.map +1 -1
  47. package/dist/nodes/Linear/IssueDescription.js +89 -0
  48. package/dist/nodes/Linear/IssueDescription.js.map +1 -1
  49. package/dist/nodes/Linear/Linear.node.js +1 -1
  50. package/dist/nodes/Linear/Linear.node.js.map +1 -1
  51. package/dist/nodes/Perplexity/descriptions/chat/complete.operation.js +2 -2
  52. package/dist/nodes/RespondToWebhook/RespondToWebhook.node.d.ts.map +1 -1
  53. package/dist/nodes/RespondToWebhook/RespondToWebhook.node.js +68 -17
  54. package/dist/nodes/RespondToWebhook/RespondToWebhook.node.js.map +1 -1
  55. package/dist/nodes/RespondToWebhook/utils/binary.d.ts +6 -0
  56. package/dist/nodes/RespondToWebhook/utils/binary.d.ts.map +1 -0
  57. package/dist/nodes/RespondToWebhook/utils/binary.js +38 -0
  58. package/dist/nodes/RespondToWebhook/utils/binary.js.map +1 -0
  59. package/dist/nodes/RespondToWebhook/{utils.d.ts → utils/outputs.d.ts} +1 -1
  60. package/dist/nodes/RespondToWebhook/utils/outputs.d.ts.map +1 -0
  61. package/dist/nodes/RespondToWebhook/{utils.js → utils/outputs.js} +1 -1
  62. package/dist/nodes/RespondToWebhook/utils/outputs.js.map +1 -0
  63. package/dist/nodes/Webhook/utils.js +1 -1
  64. package/dist/nodes/Webhook/utils.js.map +1 -1
  65. package/dist/typecheck.tsbuildinfo +1 -1
  66. package/dist/types/nodes.json +10 -10
  67. package/dist/utils/sendAndWait/interfaces.d.ts +1 -0
  68. package/dist/utils/sendAndWait/interfaces.d.ts.map +1 -1
  69. package/dist/utils/workflow-backtracking.d.ts +8 -0
  70. package/dist/utils/workflow-backtracking.d.ts.map +1 -0
  71. package/dist/utils/workflow-backtracking.js +86 -0
  72. package/dist/utils/workflow-backtracking.js.map +1 -0
  73. package/package.json +8 -7
  74. package/dist/nodes/RespondToWebhook/utils.d.ts.map +0 -1
  75. package/dist/nodes/RespondToWebhook/utils.js.map +0 -1
@@ -7,6 +7,7 @@ export interface IEmail {
7
7
  replyTo?: string;
8
8
  inReplyTo?: string;
9
9
  reference?: string;
10
+ references?: string;
10
11
  subject: string;
11
12
  body: string;
12
13
  htmlBody?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../utils/sendAndWait/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,WAAW,MAAM;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,WAAW,EAAE,CAAC;CAC5B"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../utils/sendAndWait/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,WAAW,MAAM;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,WAAW,EAAE,CAAC;CAC5B"}
@@ -0,0 +1,8 @@
1
+ import type { INodeExecutionData, IPairedItemData, IRunExecutionData, ITaskData } from 'n8n-workflow';
2
+ /**
3
+ * This function retrieves the previous task data for a given task in the workflow run data.
4
+ * Until there is no more source set
5
+ */
6
+ export declare function previousTaskData(runData: IRunExecutionData['resultData']['runData'], currentRunData: ITaskData): ITaskData | undefined;
7
+ export declare function findPairedItemTroughWorkflowData(workflowRunData: IRunExecutionData, item: INodeExecutionData, itemIndex: number): IPairedItemData | IPairedItemData[] | number | undefined;
8
+ //# sourceMappingURL=workflow-backtracking.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-backtracking.d.ts","sourceRoot":"","sources":["../../utils/workflow-backtracking.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,MAAM,cAAc,CAAC;AActB;;;GAGG;AACH,wBAAgB,gBAAgB,CAC/B,OAAO,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,EACnD,cAAc,EAAE,SAAS,GACvB,SAAS,GAAG,SAAS,CAevB;AAED,wBAAgB,gCAAgC,CAC/C,eAAe,EAAE,iBAAiB,EAClC,IAAI,EAAE,kBAAkB,EACxB,SAAS,EAAE,MAAM,GACf,eAAe,GAAG,eAAe,EAAE,GAAG,MAAM,GAAG,SAAS,CAkE1D"}
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.previousTaskData = previousTaskData;
4
+ exports.findPairedItemTroughWorkflowData = findPairedItemTroughWorkflowData;
5
+ /*
6
+ * These functions do not cover all possible edge cases for backtracking through workflow run data.
7
+ * They are designed to work for a simple and linear workflow execution.
8
+ * If the workflow has branches or complex execution paths, additional logic may be needed.
9
+ * We should follow up on this and improve the logic in the future.
10
+ */
11
+ /*
12
+ * If we cannot backtrack correctly, we return undefined to fallback to the current paired item behavior
13
+ * failing in these functions will cause the parent workflow to fail
14
+ */
15
+ /**
16
+ * This function retrieves the previous task data for a given task in the workflow run data.
17
+ * Until there is no more source set
18
+ */
19
+ function previousTaskData(runData, currentRunData) {
20
+ const nextNodeName = currentRunData.source?.[0]?.previousNode;
21
+ if (!nextNodeName) {
22
+ return undefined; // No next node
23
+ }
24
+ const nextRunData = runData[nextNodeName];
25
+ if (!nextRunData || nextRunData.length === 0) {
26
+ // We don't expect this case to happen in practice, but if for some reason it happens, we fallback to undefined
27
+ return undefined; // No run data for the next node
28
+ }
29
+ const nextRunIndex = currentRunData.source?.[0]?.previousNodeRun ?? 0;
30
+ return nextRunData[nextRunIndex]; // Return the first run data for the next node
31
+ }
32
+ function findPairedItemTroughWorkflowData(workflowRunData, item, itemIndex) {
33
+ // The provided item is already the item of the last node executed in this workflow run
34
+ // So the item.pairedItem is the paired item of the last node executed and is therefore referencing
35
+ // a node in the previous task data
36
+ const currentNodeName = workflowRunData.resultData.lastNodeExecuted;
37
+ if (!currentNodeName) {
38
+ // If no node name is available, then we don't know where to start backtracking
39
+ return undefined;
40
+ }
41
+ // This is the run data of the last node executed in the workflow run
42
+ const runData = workflowRunData.resultData.runData[currentNodeName];
43
+ if (!runData) {
44
+ // No run data available for the last node executed
45
+ return undefined;
46
+ }
47
+ // Since we are backtracking through the workflow, we start with the last run data
48
+ const runIndex = runData.length - 1;
49
+ const taskData = runData[runIndex];
50
+ if (!taskData) {
51
+ // If no run data is available, then the workflow did not run at all
52
+ return undefined;
53
+ }
54
+ // Now we are getting the second last task data, because our initial pairedItem points to this.
55
+ let runDataItem = previousTaskData(workflowRunData.resultData.runData, taskData);
56
+ let pairedItem = item.pairedItem;
57
+ // move the runDataItem to the previous node in the in the workflow execution data
58
+ // and find the paired item of the current item in the previous task data
59
+ // We do this until we reach the first task data of the workflow run
60
+ while (runDataItem !== undefined) {
61
+ // We find the output items for the current run data item
62
+ const nodeInformationArray = runDataItem.data?.['main'];
63
+ // We find and fallback to 0 for the input index and item index
64
+ // The input index is the run the node was executed in case it was executed multiple times
65
+ // The item index is the index of the paired item we are looking for
66
+ let inputIndex = 0;
67
+ let nodeIndex = itemIndex;
68
+ if (typeof pairedItem === 'object') {
69
+ inputIndex = pairedItem.input ?? 0;
70
+ nodeIndex = pairedItem.item ?? itemIndex;
71
+ }
72
+ else if (typeof pairedItem === 'number') {
73
+ // If the paired item is a number, we use it as the node index
74
+ nodeIndex = pairedItem;
75
+ // and fallback to 0 for the input index
76
+ inputIndex = 0;
77
+ }
78
+ // We found the paired item of the current run data item, this points to the node in the previous task data
79
+ pairedItem = nodeInformationArray?.[inputIndex]?.[nodeIndex]?.pairedItem;
80
+ // We move the runDataItem to the previous task data
81
+ runDataItem = previousTaskData(workflowRunData.resultData.runData, runDataItem);
82
+ }
83
+ // This is the paired item that was in the first task data when the workflow was executed
84
+ return pairedItem;
85
+ }
86
+ //# sourceMappingURL=workflow-backtracking.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-backtracking.js","sourceRoot":"","sources":["../../utils/workflow-backtracking.ts"],"names":[],"mappings":";;AAuBA,4CAkBC;AAED,4EAsEC;AA1GD;;;;;GAKG;AAEH;;;GAGG;AAEH;;;GAGG;AACH,SAAgB,gBAAgB,CAC/B,OAAmD,EACnD,cAAyB;IAEzB,MAAM,YAAY,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC;IAC9D,IAAI,CAAC,YAAY,EAAE,CAAC;QACnB,OAAO,SAAS,CAAC,CAAC,eAAe;IAClC,CAAC;IAED,MAAM,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAC1C,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9C,+GAA+G;QAC/G,OAAO,SAAS,CAAC,CAAC,gCAAgC;IACnD,CAAC;IAED,MAAM,YAAY,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,eAAe,IAAI,CAAC,CAAC;IAEtE,OAAO,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,8CAA8C;AACjF,CAAC;AAED,SAAgB,gCAAgC,CAC/C,eAAkC,EAClC,IAAwB,EACxB,SAAiB;IAE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AO,UAAU,KAAK,QAAQ,EAAE,CAAC;YAC3C,8DAA8D;YAC9D,SAAS,GAAG,UAAU,CAAC;YACvB,wCAAwC;YACxC,UAAU,GAAG,CAAC,CAAC;QAChB,CAAC;QAED,2GAA2G;QAC3G,UAAU,GAAG,oBAAoB,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC;QAEzE,oDAAoD;QACpD,WAAW,GAAG,gBAAgB,CAAC,eAAe,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACjF,CAAC;IAED,yFAAyF;IACzF,OAAO,UAAU,CAAC;AACnB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-base",
3
- "version": "1.100.0",
3
+ "version": "1.101.0",
4
4
  "description": "Base nodes of n8n",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -847,7 +847,7 @@
847
847
  "@types/html-to-text": "^9.0.1",
848
848
  "@types/js-nacl": "^1.3.0",
849
849
  "@types/jsonwebtoken": "^9.0.9",
850
- "@types/lodash": "^4.17.17",
850
+ "@types/lodash": "4.17.17",
851
851
  "@types/lossless-json": "^1.0.0",
852
852
  "@types/mailparser": "^3.4.4",
853
853
  "@types/mime-types": "^2.1.0",
@@ -861,8 +861,8 @@
861
861
  "@types/uuid": "^10.0.0",
862
862
  "@types/xml2js": "^0.4.14",
863
863
  "eslint-plugin-n8n-nodes-base": "^1.16.3",
864
- "@n8n/typescript-config": "1.3.0",
865
- "n8n-core": "1.101.0"
864
+ "n8n-core": "1.102.0",
865
+ "@n8n/typescript-config": "1.3.0"
866
866
  },
867
867
  "dependencies": {
868
868
  "@aws-sdk/client-sso-oidc": "3.808.0",
@@ -881,6 +881,7 @@
881
881
  "currency-codes": "2.1.0",
882
882
  "eventsource": "2.0.2",
883
883
  "fast-glob": "3.2.12",
884
+ "fastest-levenshtein": "^1.0.16",
884
885
  "fflate": "0.7.4",
885
886
  "generate-schema": "2.6.0",
886
887
  "get-system-fonts": "2.0.2",
@@ -931,10 +932,10 @@
931
932
  "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz",
932
933
  "xml2js": "0.6.2",
933
934
  "xmlhttprequest-ssl": "3.1.0",
934
- "@n8n/config": "1.45.0",
935
+ "@n8n/config": "1.46.0",
935
936
  "@n8n/di": "0.8.0",
936
- "n8n-workflow": "1.99.0",
937
- "@n8n/imap": "0.12.0"
937
+ "@n8n/imap": "0.13.0",
938
+ "n8n-workflow": "1.100.0"
938
939
  },
939
940
  "license": "SEE LICENSE IN LICENSE.md",
940
941
  "homepage": "https://n8n.io",
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../nodes/RespondToWebhook/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,GAC7B,SAAS,MAAM,EACf,YAAY;IAAE,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAAE;;;GAiB9C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../nodes/RespondToWebhook/utils.ts"],"names":[],"mappings":";;;AAAO,MAAM,iBAAiB,GAAG,CAChC,OAAe,EACf,UAA8C,EAC7C,EAAE;IACH,MAAM,eAAe,GAAG,OAAO,KAAK,GAAG,IAAI,CAAC,OAAO,IAAI,GAAG,IAAI,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC/F,IAAI,eAAe,EAAE,CAAC;QACrB,OAAO;YACN;gBACC,IAAI,EAAE,MAAM;gBACZ,WAAW,EAAE,YAAY;aACzB;YACD;gBACC,IAAI,EAAE,MAAM;gBACZ,WAAW,EAAE,UAAU;aACvB;SACD,CAAC;IACH,CAAC;IAED,OAAO,CAAC,MAAM,CAAC,CAAC;AACjB,CAAC,CAAC;AAnBW,QAAA,iBAAiB,qBAmB5B"}