n8n-nodes-base 1.95.1 → 1.96.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.
Files changed (148) hide show
  1. package/dist/credentials/PerplexityApi.credentials.js +1 -1
  2. package/dist/credentials/PerplexityApi.credentials.js.map +1 -1
  3. package/dist/nodes/Adalo/__schema__/v1.0.0/collection/getAll.json +21 -0
  4. package/dist/nodes/Airtable/test/v2/node/helpers.js +12 -2
  5. package/dist/nodes/Airtable/test/v2/node/helpers.js.map +1 -1
  6. package/dist/nodes/Airtop/__schema__/v1.0.0/extraction/query.json +7 -1
  7. package/dist/nodes/Airtop/__schema__/v1.0.0/session/create.json +9 -0
  8. package/dist/nodes/Airtop/__schema__/v1.0.0/window/create.json +40 -0
  9. package/dist/nodes/Airtop/test/node/helpers.js +12 -2
  10. package/dist/nodes/Airtop/test/node/helpers.js.map +1 -1
  11. package/dist/nodes/Asana/__schema__/v1.0.0/subtask/getAll.json +4 -1
  12. package/dist/nodes/Aws/S3/__schema__/v2.0.0/file/getAll.json +7 -1
  13. package/dist/nodes/Aws/S3/__schema__/v2.0.0/folder/getAll.json +7 -1
  14. package/dist/nodes/BambooHr/__schema__/v1.0.0/employee/getAll.json +1 -4
  15. package/dist/nodes/ClickUp/__schema__/v1.0.0/list/customFields.json +23 -1
  16. package/dist/nodes/Code/Pyodide.js +24 -0
  17. package/dist/nodes/Code/Pyodide.js.map +1 -1
  18. package/dist/nodes/CompareDatasets/GenericFunctions.js +5 -5
  19. package/dist/nodes/CompareDatasets/GenericFunctions.js.map +1 -1
  20. package/dist/nodes/Discord/__schema__/v2.0.0/message/sendAndWait.json +14 -0
  21. package/dist/nodes/Discord/v2/helpers/utils.js +2 -2
  22. package/dist/nodes/Discord/v2/helpers/utils.js.map +1 -1
  23. package/dist/nodes/Dropbox/__schema__/v1.0.0/file/download.json +31 -1
  24. package/dist/nodes/Dropcontact/__schema__/v1.0.0/contact/enrich.json +15 -1
  25. package/dist/nodes/Dropcontact/__schema__/v1.0.0/contact/fetchRequest.json +50 -0
  26. package/dist/nodes/EmailReadImap/v2/utils.js +16 -3
  27. package/dist/nodes/EmailReadImap/v2/utils.js.map +1 -1
  28. package/dist/nodes/EmailSend/__schema__/v2.1.0/email/send.json +1 -7
  29. package/dist/nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.js +1 -1
  30. package/dist/nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.js.map +1 -1
  31. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.js +2 -2
  32. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.js.map +1 -1
  33. package/dist/nodes/Form/Form.node.js +3 -3
  34. package/dist/nodes/Form/Form.node.js.map +1 -1
  35. package/dist/nodes/Form/utils/formCompletionUtils.js.map +1 -0
  36. package/dist/nodes/Form/utils/formNodeUtils.js.map +1 -0
  37. package/dist/nodes/Form/{utils.js → utils/utils.js} +21 -7
  38. package/dist/nodes/Form/utils/utils.js.map +1 -0
  39. package/dist/nodes/Form/v1/FormTriggerV1.node.js +1 -1
  40. package/dist/nodes/Form/v1/FormTriggerV1.node.js.map +1 -1
  41. package/dist/nodes/Form/v2/FormTriggerV2.node.js +1 -1
  42. package/dist/nodes/Form/v2/FormTriggerV2.node.js.map +1 -1
  43. package/dist/nodes/Freshservice/GenericFunctions.js +12 -2
  44. package/dist/nodes/Freshservice/GenericFunctions.js.map +1 -1
  45. package/dist/nodes/Google/Ads/__schema__/v1.0.0/campaign/getAll.json +13 -1
  46. package/dist/nodes/Google/Analytics/__schema__/v2.0.0/report/get.json +1 -4
  47. package/dist/nodes/Google/Calendar/__schema__/v1.3.0/event/getAll.json +1 -4
  48. package/dist/nodes/Google/Chat/__schema__/v1.0.0/message/create.json +30 -1
  49. package/dist/nodes/Google/Drive/__schema__/v3.0.0/file/upload.json +4 -1
  50. package/dist/nodes/Google/Drive/test/v2/node/helpers.js +12 -2
  51. package/dist/nodes/Google/Drive/test/v2/node/helpers.js.map +1 -1
  52. package/dist/nodes/Google/Firebase/CloudFirestore/__schema__/v1.1.0/document/query.json +1 -7
  53. package/dist/nodes/Google/Gmail/__schema__/v2.1.0/message/addLabels.json +13 -1
  54. package/dist/nodes/Google/Gmail/__schema__/v2.1.0/message/get.json +1 -7
  55. package/dist/nodes/Google/Gmail/__schema__/v2.1.0/message/markAsRead.json +13 -1
  56. package/dist/nodes/Google/Gmail/__schema__/v2.1.0/thread/addLabels.json +16 -1
  57. package/dist/nodes/Google/Sheet/v2/actions/sheet/update.operation.js +10 -4
  58. package/dist/nodes/Google/Sheet/v2/actions/sheet/update.operation.js.map +1 -1
  59. package/dist/nodes/HaloPSA/__schema__/v1.0.0/ticket/getAll.json +1 -268
  60. package/dist/nodes/HttpRequest/shared/optimizeResponse.js +5 -3
  61. package/dist/nodes/HttpRequest/shared/optimizeResponse.js.map +1 -1
  62. package/dist/nodes/Hubspot/__schema__/v2.1.0/company/getAll.json +1 -4
  63. package/dist/nodes/Hubspot/__schema__/v2.1.0/deal/getAll.json +64 -1
  64. package/dist/nodes/Hubspot/__schema__/v2.1.0/deal/search.json +1 -4
  65. package/dist/nodes/Hubspot/__schema__/v2.1.0/ticket/get.json +1 -61
  66. package/dist/nodes/JinaAI/__schema__/v1.0.0/reader/read.json +26 -0
  67. package/dist/nodes/Jira/__schema__/v1.0.0/issue/get.json +604 -7
  68. package/dist/nodes/Jira/__schema__/v1.0.0/issue/getAll.json +1 -110
  69. package/dist/nodes/Lemlist/__schema__/v2.0.0/lead/create.json +1 -4
  70. package/dist/nodes/Lemlist/__schema__/v2.0.0/lead/get.json +30 -0
  71. package/dist/nodes/Line/__schema__/v1.0.0/notification/send.json +4 -7
  72. package/dist/nodes/Linear/__schema__/v1.0.0/issue/getAll.json +12 -1
  73. package/dist/nodes/LocalFileTrigger/LocalFileTrigger.node.js +23 -3
  74. package/dist/nodes/LocalFileTrigger/LocalFileTrigger.node.js.map +1 -1
  75. package/dist/nodes/Microsoft/Entra/__schema__/v1.0.0/user/getAll.json +1 -7
  76. package/dist/nodes/Microsoft/Entra/descriptions/GroupDescription.js +12 -2
  77. package/dist/nodes/Microsoft/Entra/descriptions/GroupDescription.js.map +1 -1
  78. package/dist/nodes/Microsoft/Entra/descriptions/UserDescription.js +13 -3
  79. package/dist/nodes/Microsoft/Entra/descriptions/UserDescription.js.map +1 -1
  80. package/dist/nodes/Microsoft/OneDrive/__schema__/v1.0.0/file/download.json +23 -10
  81. package/dist/nodes/Microsoft/OneDrive/__schema__/v1.0.0/folder/create.json +1 -15
  82. package/dist/nodes/Microsoft/Outlook/__schema__/v2.0.0/event/getAll.json +1 -4
  83. package/dist/nodes/Microsoft/Outlook/__schema__/v2.0.0/folderMessage/getAll.json +124 -1
  84. package/dist/nodes/Microsoft/Outlook/__schema__/v2.0.0/message/getAll.json +1 -56
  85. package/dist/nodes/Microsoft/Sql/MicrosoftSql.node.js +12 -2
  86. package/dist/nodes/Microsoft/Sql/MicrosoftSql.node.js.map +1 -1
  87. package/dist/nodes/Microsoft/Storage/__schema__/v1.0.0/blob/create.json +39 -0
  88. package/dist/nodes/Microsoft/Storage/__schema__/v1.0.0/blob/get.json +44 -0
  89. package/dist/nodes/Microsoft/ToDo/__schema__/v1.0.0/task/getAll.json +5 -21
  90. package/dist/nodes/N8n/WorkflowDescription.js +40 -0
  91. package/dist/nodes/N8n/WorkflowDescription.js.map +1 -1
  92. package/dist/nodes/Nasa/__schema__/v1.0.0/donkiSolarFlare/get.json +1 -4
  93. package/dist/nodes/Notion/__schema__/v2.2.0/database/get.json +2 -149
  94. package/dist/nodes/Odoo/__schema__/v1.0.0/contact/get.json +1 -4
  95. package/dist/nodes/Odoo/__schema__/v1.0.0/contact/getAll.json +1 -10
  96. package/dist/nodes/Odoo/__schema__/v1.0.0/opportunity/getAll.json +1 -40
  97. package/dist/nodes/OpenAi/__schema__/v1.1.0/chat/complete.json +29 -1
  98. package/dist/nodes/Pipedrive/__schema__/v1.0.0/person/search.json +7 -1
  99. package/dist/nodes/QuickBase/__schema__/v1.0.0/record/getAll.json +9 -0
  100. package/dist/nodes/QuickBooks/__schema__/v1.0.0/transaction/getReport.json +4 -1
  101. package/dist/nodes/RssFeedRead/RssFeedRead.node.js +9 -3
  102. package/dist/nodes/RssFeedRead/RssFeedRead.node.js.map +1 -1
  103. package/dist/nodes/S3/__schema__/v1.0.0/file/download.json +21 -0
  104. package/dist/nodes/Salesforce/__schema__/v1.0.0/customObject/getAll.json +1 -4
  105. package/dist/nodes/Salesforce/__schema__/v1.0.0/lead/getAll.json +1 -4
  106. package/dist/nodes/Salesforce/__schema__/v1.0.0/opportunity/getAll.json +1 -4
  107. package/dist/nodes/Salesforce/__schema__/v1.0.0/search/query.json +1 -4
  108. package/dist/nodes/Shopify/__schema__/v1.0.0/order/getAll.json +250 -3
  109. package/dist/nodes/Slack/__schema__/v2.3.0/channel/history.json +1 -50
  110. package/dist/nodes/Slack/__schema__/v2.3.0/channel/member.json +168 -2
  111. package/dist/nodes/Slack/__schema__/v2.3.0/message/post.json +1 -4
  112. package/dist/nodes/Sms77/__schema__/v1.0.0/sms/send.json +1 -10
  113. package/dist/nodes/Strapi/__schema__/v1.0.0/entry/getAll.json +10 -1
  114. package/dist/nodes/Telegram/__schema__/v1.2.0/chat/member.json +1 -4
  115. package/dist/nodes/Telegram/__schema__/v1.2.0/message/editMessageText.json +4 -1
  116. package/dist/nodes/Telegram/__schema__/v1.2.0/message/sendAndWait.json +14 -0
  117. package/dist/nodes/Telegram/__schema__/v1.2.0/message/sendMessage.json +4 -21
  118. package/dist/nodes/Telegram/__schema__/v1.2.0/message/sendPhoto.json +1 -7
  119. package/dist/nodes/Telegram/tests/Helpers.js +12 -2
  120. package/dist/nodes/Telegram/tests/Helpers.js.map +1 -1
  121. package/dist/nodes/Transform/RemoveDuplicates/utils.js +8 -6
  122. package/dist/nodes/Transform/RemoveDuplicates/utils.js.map +1 -1
  123. package/dist/nodes/Trello/__schema__/v1.0.0/list/getAll.json +1 -4
  124. package/dist/nodes/Trello/__schema__/v1.0.0/list/getCards.json +1 -4
  125. package/dist/nodes/Twitter/__schema__/v2.0.0/tweet/search.json +7 -1
  126. package/dist/nodes/Wait/Wait.node.js +1 -1
  127. package/dist/nodes/Wait/Wait.node.js.map +1 -1
  128. package/dist/nodes/Wordpress/__schema__/v1.0.0/post/get.json +1 -7
  129. package/dist/nodes/Zoho/__schema__/v1.0.0/contact/getAll.json +1 -4
  130. package/dist/nodes/Zoho/__schema__/v1.0.0/lead/getAll.json +99 -1
  131. package/dist/test/nodes/Helpers.js +12 -2
  132. package/dist/test/nodes/Helpers.js.map +1 -1
  133. package/dist/types/credentials.json +1 -1
  134. package/dist/types/nodes.json +13 -13
  135. package/dist/utils/binary.js +12 -9
  136. package/dist/utils/binary.js.map +1 -1
  137. package/dist/utils/sendAndWait/utils.js +21 -6
  138. package/dist/utils/sendAndWait/utils.js.map +1 -1
  139. package/dist/utils/utilities.js +31 -16
  140. package/dist/utils/utilities.js.map +1 -1
  141. package/dist/utils/workflowInputsResourceMapping/GenericFunctions.js +2 -2
  142. package/dist/utils/workflowInputsResourceMapping/GenericFunctions.js.map +1 -1
  143. package/package.json +9 -9
  144. package/dist/nodes/Form/formCompletionUtils.js.map +0 -1
  145. package/dist/nodes/Form/formNodeUtils.js.map +0 -1
  146. package/dist/nodes/Form/utils.js.map +0 -1
  147. /package/dist/nodes/Form/{formCompletionUtils.js → utils/formCompletionUtils.js} +0 -0
  148. /package/dist/nodes/Form/{formNodeUtils.js → utils/formNodeUtils.js} +0 -0
@@ -25,7 +25,7 @@ class PerplexityApi {
25
25
  constructor() {
26
26
  this.name = "perplexityApi";
27
27
  this.displayName = "Perplexity API";
28
- this.documentationUrl = "https://docs.perplexity.ai";
28
+ this.documentationUrl = "perplexity";
29
29
  this.properties = [
30
30
  {
31
31
  displayName: "API Key",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../credentials/PerplexityApi.credentials.ts"],"sourcesContent":["import type {\n\tIAuthenticateGeneric,\n\tICredentialTestRequest,\n\tICredentialType,\n\tINodeProperties,\n} from 'n8n-workflow';\n\nexport class PerplexityApi implements ICredentialType {\n\tname = 'perplexityApi';\n\n\tdisplayName = 'Perplexity API';\n\n\tdocumentationUrl = 'https://docs.perplexity.ai';\n\n\tproperties: INodeProperties[] = [\n\t\t{\n\t\t\tdisplayName: 'API Key',\n\t\t\tname: 'apiKey',\n\t\t\ttype: 'string',\n\t\t\ttypeOptions: { password: true },\n\t\t\trequired: true,\n\t\t\tdefault: '',\n\t\t\tdescription: 'Your Perplexity API key. Get it from your Perplexity account.',\n\t\t},\n\t];\n\n\tauthenticate: IAuthenticateGeneric = {\n\t\ttype: 'generic',\n\t\tproperties: {\n\t\t\theaders: {\n\t\t\t\tAuthorization: '=Bearer {{$credentials.apiKey}}',\n\t\t\t},\n\t\t},\n\t};\n\n\ttest: ICredentialTestRequest = {\n\t\trequest: {\n\t\t\tbaseURL: 'https://api.perplexity.ai',\n\t\t\turl: '/chat/completions',\n\t\t\tmethod: 'POST',\n\t\t\tbody: {\n\t\t\t\tmodel: 'r1-1776',\n\t\t\t\tmessages: [{ role: 'user', content: 'test' }],\n\t\t\t},\n\t\t\theaders: {\n\t\t\t\tAuthorization: '=Bearer {{$credentials.apiKey}}',\n\t\t\t\t'Content-Type': 'application/json',\n\t\t\t},\n\t\t\tjson: true,\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,MAAM,cAAyC;AAAA,EAA/C;AACN,gBAAO;AAEP,uBAAc;AAEd,4BAAmB;AAEnB,sBAAgC;AAAA,MAC/B;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,aAAa,EAAE,UAAU,KAAK;AAAA,QAC9B,UAAU;AAAA,QACV,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,IACD;AAEA,wBAAqC;AAAA,MACpC,MAAM;AAAA,MACN,YAAY;AAAA,QACX,SAAS;AAAA,UACR,eAAe;AAAA,QAChB;AAAA,MACD;AAAA,IACD;AAEA,gBAA+B;AAAA,MAC9B,SAAS;AAAA,QACR,SAAS;AAAA,QACT,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,UACL,OAAO;AAAA,UACP,UAAU,CAAC,EAAE,MAAM,QAAQ,SAAS,OAAO,CAAC;AAAA,QAC7C;AAAA,QACA,SAAS;AAAA,UACR,eAAe;AAAA,UACf,gBAAgB;AAAA,QACjB;AAAA,QACA,MAAM;AAAA,MACP;AAAA,IACD;AAAA;AACD;","names":[]}
1
+ {"version":3,"sources":["../../credentials/PerplexityApi.credentials.ts"],"sourcesContent":["import type {\n\tIAuthenticateGeneric,\n\tICredentialTestRequest,\n\tICredentialType,\n\tINodeProperties,\n} from 'n8n-workflow';\n\nexport class PerplexityApi implements ICredentialType {\n\tname = 'perplexityApi';\n\n\tdisplayName = 'Perplexity API';\n\n\tdocumentationUrl = 'perplexity';\n\n\tproperties: INodeProperties[] = [\n\t\t{\n\t\t\tdisplayName: 'API Key',\n\t\t\tname: 'apiKey',\n\t\t\ttype: 'string',\n\t\t\ttypeOptions: { password: true },\n\t\t\trequired: true,\n\t\t\tdefault: '',\n\t\t\tdescription: 'Your Perplexity API key. Get it from your Perplexity account.',\n\t\t},\n\t];\n\n\tauthenticate: IAuthenticateGeneric = {\n\t\ttype: 'generic',\n\t\tproperties: {\n\t\t\theaders: {\n\t\t\t\tAuthorization: '=Bearer {{$credentials.apiKey}}',\n\t\t\t},\n\t\t},\n\t};\n\n\ttest: ICredentialTestRequest = {\n\t\trequest: {\n\t\t\tbaseURL: 'https://api.perplexity.ai',\n\t\t\turl: '/chat/completions',\n\t\t\tmethod: 'POST',\n\t\t\tbody: {\n\t\t\t\tmodel: 'r1-1776',\n\t\t\t\tmessages: [{ role: 'user', content: 'test' }],\n\t\t\t},\n\t\t\theaders: {\n\t\t\t\tAuthorization: '=Bearer {{$credentials.apiKey}}',\n\t\t\t\t'Content-Type': 'application/json',\n\t\t\t},\n\t\t\tjson: true,\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,MAAM,cAAyC;AAAA,EAA/C;AACN,gBAAO;AAEP,uBAAc;AAEd,4BAAmB;AAEnB,sBAAgC;AAAA,MAC/B;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,aAAa,EAAE,UAAU,KAAK;AAAA,QAC9B,UAAU;AAAA,QACV,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,IACD;AAEA,wBAAqC;AAAA,MACpC,MAAM;AAAA,MACN,YAAY;AAAA,QACX,SAAS;AAAA,UACR,eAAe;AAAA,QAChB;AAAA,MACD;AAAA,IACD;AAEA,gBAA+B;AAAA,MAC9B,SAAS;AAAA,QACR,SAAS;AAAA,QACT,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,UACL,OAAO;AAAA,UACP,UAAU,CAAC,EAAE,MAAM,QAAQ,SAAS,OAAO,CAAC;AAAA,QAC7C;AAAA,QACA,SAAS;AAAA,UACR,eAAe;AAAA,UACf,gBAAgB;AAAA,QACjB;AAAA,QACA,MAAM;AAAA,MACP;AAAA,IACD;AAAA;AACD;","names":[]}
@@ -0,0 +1,21 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "created_at": {
5
+ "type": "string"
6
+ },
7
+ "deleted_TS": {
8
+ "type": "null"
9
+ },
10
+ "dropbox_thumbnailURL": {
11
+ "type": "null"
12
+ },
13
+ "id": {
14
+ "type": "integer"
15
+ },
16
+ "updated_at": {
17
+ "type": "string"
18
+ }
19
+ },
20
+ "version": 1
21
+ }
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
  var helpers_exports = {};
20
30
  __export(helpers_exports, {
@@ -22,7 +32,7 @@ __export(helpers_exports, {
22
32
  node: () => node
23
33
  });
24
34
  module.exports = __toCommonJS(helpers_exports);
25
- var import_lodash = require("lodash");
35
+ var import_get = __toESM(require("lodash/get"));
26
36
  var import_n8n_core = require("n8n-core");
27
37
  const node = {
28
38
  id: "11",
@@ -41,7 +51,7 @@ const createMockExecuteFunction = (nodeParameters) => {
41
51
  },
42
52
  getNodeParameter(parameterName, _itemIndex, fallbackValue, options) {
43
53
  const parameter = options?.extractValue ? `${parameterName}.value` : parameterName;
44
- return (0, import_lodash.get)(nodeParameters, parameter, fallbackValue);
54
+ return (0, import_get.default)(nodeParameters, parameter, fallbackValue);
45
55
  },
46
56
  getNode() {
47
57
  return node;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../nodes/Airtable/test/v2/node/helpers.ts"],"sourcesContent":["import { get } from 'lodash';\nimport { constructExecutionMetaData } from 'n8n-core';\nimport type { IDataObject, IExecuteFunctions, IGetNodeParameterOptions, INode } from 'n8n-workflow';\n\nexport const node: INode = {\n\tid: '11',\n\tname: 'Airtable node',\n\ttypeVersion: 2,\n\ttype: 'n8n-nodes-base.airtable',\n\tposition: [42, 42],\n\tparameters: {\n\t\toperation: 'create',\n\t},\n};\n\nexport const createMockExecuteFunction = (nodeParameters: IDataObject) => {\n\tconst fakeExecuteFunction = {\n\t\tgetInputData() {\n\t\t\treturn [{ json: {} }];\n\t\t},\n\t\tgetNodeParameter(\n\t\t\tparameterName: string,\n\t\t\t_itemIndex: number,\n\t\t\tfallbackValue?: IDataObject | undefined,\n\t\t\toptions?: IGetNodeParameterOptions | undefined,\n\t\t) {\n\t\t\tconst parameter = options?.extractValue ? `${parameterName}.value` : parameterName;\n\t\t\treturn get(nodeParameters, parameter, fallbackValue);\n\t\t},\n\t\tgetNode() {\n\t\t\treturn node;\n\t\t},\n\t\thelpers: { constructExecutionMetaData },\n\t\tcontinueOnFail: () => false,\n\t} as unknown as IExecuteFunctions;\n\treturn fakeExecuteFunction;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAoB;AACpB,sBAA2C;AAGpC,MAAM,OAAc;AAAA,EAC1B,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU,CAAC,IAAI,EAAE;AAAA,EACjB,YAAY;AAAA,IACX,WAAW;AAAA,EACZ;AACD;AAEO,MAAM,4BAA4B,CAAC,mBAAgC;AACzE,QAAM,sBAAsB;AAAA,IAC3B,eAAe;AACd,aAAO,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC;AAAA,IACrB;AAAA,IACA,iBACC,eACA,YACA,eACA,SACC;AACD,YAAM,YAAY,SAAS,eAAe,GAAG,aAAa,WAAW;AACrE,iBAAO,mBAAI,gBAAgB,WAAW,aAAa;AAAA,IACpD;AAAA,IACA,UAAU;AACT,aAAO;AAAA,IACR;AAAA,IACA,SAAS,EAAE,uEAA2B;AAAA,IACtC,gBAAgB,MAAM;AAAA,EACvB;AACA,SAAO;AACR;","names":[]}
1
+ {"version":3,"sources":["../../../../../../nodes/Airtable/test/v2/node/helpers.ts"],"sourcesContent":["import get from 'lodash/get';\nimport { constructExecutionMetaData } from 'n8n-core';\nimport type { IDataObject, IExecuteFunctions, IGetNodeParameterOptions, INode } from 'n8n-workflow';\n\nexport const node: INode = {\n\tid: '11',\n\tname: 'Airtable node',\n\ttypeVersion: 2,\n\ttype: 'n8n-nodes-base.airtable',\n\tposition: [42, 42],\n\tparameters: {\n\t\toperation: 'create',\n\t},\n};\n\nexport const createMockExecuteFunction = (nodeParameters: IDataObject) => {\n\tconst fakeExecuteFunction = {\n\t\tgetInputData() {\n\t\t\treturn [{ json: {} }];\n\t\t},\n\t\tgetNodeParameter(\n\t\t\tparameterName: string,\n\t\t\t_itemIndex: number,\n\t\t\tfallbackValue?: IDataObject | undefined,\n\t\t\toptions?: IGetNodeParameterOptions | undefined,\n\t\t) {\n\t\t\tconst parameter = options?.extractValue ? `${parameterName}.value` : parameterName;\n\t\t\treturn get(nodeParameters, parameter, fallbackValue);\n\t\t},\n\t\tgetNode() {\n\t\t\treturn node;\n\t\t},\n\t\thelpers: { constructExecutionMetaData },\n\t\tcontinueOnFail: () => false,\n\t} as unknown as IExecuteFunctions;\n\treturn fakeExecuteFunction;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAgB;AAChB,sBAA2C;AAGpC,MAAM,OAAc;AAAA,EAC1B,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU,CAAC,IAAI,EAAE;AAAA,EACjB,YAAY;AAAA,IACX,WAAW;AAAA,EACZ;AACD;AAEO,MAAM,4BAA4B,CAAC,mBAAgC;AACzE,QAAM,sBAAsB;AAAA,IAC3B,eAAe;AACd,aAAO,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC;AAAA,IACrB;AAAA,IACA,iBACC,eACA,YACA,eACA,SACC;AACD,YAAM,YAAY,SAAS,eAAe,GAAG,aAAa,WAAW;AACrE,iBAAO,WAAAA,SAAI,gBAAgB,WAAW,aAAa;AAAA,IACpD;AAAA,IACA,UAAU;AACT,aAAO;AAAA,IACR;AAAA,IACA,SAAS,EAAE,uEAA2B;AAAA,IACtC,gBAAgB,MAAM;AAAA,EACvB;AACA,SAAO;AACR;","names":["get"]}
@@ -31,6 +31,9 @@
31
31
  }
32
32
  }
33
33
  },
34
+ "sessionId": {
35
+ "type": "string"
36
+ },
34
37
  "warnings": {
35
38
  "type": "array",
36
39
  "items": {
@@ -41,7 +44,10 @@
41
44
  }
42
45
  }
43
46
  }
47
+ },
48
+ "windowId": {
49
+ "type": "string"
44
50
  }
45
51
  },
46
- "version": 1
52
+ "version": 2
47
53
  }
@@ -0,0 +1,9 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "sessionId": {
5
+ "type": "string"
6
+ }
7
+ },
8
+ "version": 1
9
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "data": {
5
+ "type": "object",
6
+ "properties": {
7
+ "liveViewUrl": {
8
+ "type": "string"
9
+ },
10
+ "targetId": {
11
+ "type": "string"
12
+ },
13
+ "windowId": {
14
+ "type": "string"
15
+ }
16
+ }
17
+ },
18
+ "errors": {
19
+ "type": "null"
20
+ },
21
+ "meta": {
22
+ "type": "object",
23
+ "properties": {
24
+ "requestId": {
25
+ "type": "string"
26
+ }
27
+ }
28
+ },
29
+ "sessionId": {
30
+ "type": "string"
31
+ },
32
+ "warnings": {
33
+ "type": "null"
34
+ },
35
+ "windowId": {
36
+ "type": "string"
37
+ }
38
+ },
39
+ "version": 1
40
+ }
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
  var helpers_exports = {};
20
30
  __export(helpers_exports, {
@@ -22,7 +32,7 @@ __export(helpers_exports, {
22
32
  node: () => node
23
33
  });
24
34
  module.exports = __toCommonJS(helpers_exports);
25
- var import_lodash = require("lodash");
35
+ var import_get = __toESM(require("lodash/get"));
26
36
  var import_n8n_core = require("n8n-core");
27
37
  const node = {
28
38
  id: "1",
@@ -39,7 +49,7 @@ const createMockExecuteFunction = (nodeParameters) => {
39
49
  },
40
50
  getNodeParameter(parameterName, _itemIndex, fallbackValue, options) {
41
51
  const parameter = options?.extractValue ? `${parameterName}.value` : parameterName;
42
- return (0, import_lodash.get)(nodeParameters, parameter, fallbackValue);
52
+ return (0, import_get.default)(nodeParameters, parameter, fallbackValue);
43
53
  },
44
54
  getNode() {
45
55
  return node;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../nodes/Airtop/test/node/helpers.ts"],"sourcesContent":["import { get } from 'lodash';\nimport { constructExecutionMetaData } from 'n8n-core';\nimport type {\n\tIDataObject,\n\tIExecuteFunctions,\n\tIGetNodeParameterOptions,\n\tINode,\n\tINodeExecutionData,\n} from 'n8n-workflow';\n\nexport const node: INode = {\n\tid: '1',\n\tname: 'Airtop node',\n\ttypeVersion: 1,\n\ttype: 'n8n-nodes-base.airtop',\n\tposition: [10, 10],\n\tparameters: {},\n};\n\nexport const createMockExecuteFunction = (nodeParameters: IDataObject) => {\n\tconst fakeExecuteFunction = {\n\t\tgetInputData(): INodeExecutionData[] {\n\t\t\treturn [{ json: {} }];\n\t\t},\n\t\tgetNodeParameter(\n\t\t\tparameterName: string,\n\t\t\t_itemIndex: number,\n\t\t\tfallbackValue?: IDataObject | undefined,\n\t\t\toptions?: IGetNodeParameterOptions | undefined,\n\t\t) {\n\t\t\tconst parameter = options?.extractValue ? `${parameterName}.value` : parameterName;\n\t\t\treturn get(nodeParameters, parameter, fallbackValue);\n\t\t},\n\t\tgetNode() {\n\t\t\treturn node;\n\t\t},\n\t\thelpers: {\n\t\t\tconstructExecutionMetaData,\n\t\t\treturnJsonArray: (data: IDataObject | IDataObject[]) => {\n\t\t\t\treturn [{ json: data }] as INodeExecutionData[];\n\t\t\t},\n\t\t\tprepareBinaryData: async (data: Buffer) => {\n\t\t\t\treturn {\n\t\t\t\t\tmimeType: 'image/jpeg',\n\t\t\t\t\tfileType: 'jpg',\n\t\t\t\t\tfileName: 'screenshot.jpg',\n\t\t\t\t\tdata: data.toString('base64'),\n\t\t\t\t};\n\t\t\t},\n\t\t},\n\t\tcontinueOnFail: () => false,\n\t\tlogger: {\n\t\t\tinfo: () => {},\n\t\t},\n\t} as unknown as IExecuteFunctions;\n\treturn fakeExecuteFunction;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAoB;AACpB,sBAA2C;AASpC,MAAM,OAAc;AAAA,EAC1B,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU,CAAC,IAAI,EAAE;AAAA,EACjB,YAAY,CAAC;AACd;AAEO,MAAM,4BAA4B,CAAC,mBAAgC;AACzE,QAAM,sBAAsB;AAAA,IAC3B,eAAqC;AACpC,aAAO,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC;AAAA,IACrB;AAAA,IACA,iBACC,eACA,YACA,eACA,SACC;AACD,YAAM,YAAY,SAAS,eAAe,GAAG,aAAa,WAAW;AACrE,iBAAO,mBAAI,gBAAgB,WAAW,aAAa;AAAA,IACpD;AAAA,IACA,UAAU;AACT,aAAO;AAAA,IACR;AAAA,IACA,SAAS;AAAA,MACR;AAAA,MACA,iBAAiB,CAAC,SAAsC;AACvD,eAAO,CAAC,EAAE,MAAM,KAAK,CAAC;AAAA,MACvB;AAAA,MACA,mBAAmB,OAAO,SAAiB;AAC1C,eAAO;AAAA,UACN,UAAU;AAAA,UACV,UAAU;AAAA,UACV,UAAU;AAAA,UACV,MAAM,KAAK,SAAS,QAAQ;AAAA,QAC7B;AAAA,MACD;AAAA,IACD;AAAA,IACA,gBAAgB,MAAM;AAAA,IACtB,QAAQ;AAAA,MACP,MAAM,MAAM;AAAA,MAAC;AAAA,IACd;AAAA,EACD;AACA,SAAO;AACR;","names":[]}
1
+ {"version":3,"sources":["../../../../../nodes/Airtop/test/node/helpers.ts"],"sourcesContent":["import get from 'lodash/get';\nimport { constructExecutionMetaData } from 'n8n-core';\nimport type {\n\tIDataObject,\n\tIExecuteFunctions,\n\tIGetNodeParameterOptions,\n\tINode,\n\tINodeExecutionData,\n} from 'n8n-workflow';\n\nexport const node: INode = {\n\tid: '1',\n\tname: 'Airtop node',\n\ttypeVersion: 1,\n\ttype: 'n8n-nodes-base.airtop',\n\tposition: [10, 10],\n\tparameters: {},\n};\n\nexport const createMockExecuteFunction = (nodeParameters: IDataObject) => {\n\tconst fakeExecuteFunction = {\n\t\tgetInputData(): INodeExecutionData[] {\n\t\t\treturn [{ json: {} }];\n\t\t},\n\t\tgetNodeParameter(\n\t\t\tparameterName: string,\n\t\t\t_itemIndex: number,\n\t\t\tfallbackValue?: IDataObject | undefined,\n\t\t\toptions?: IGetNodeParameterOptions | undefined,\n\t\t) {\n\t\t\tconst parameter = options?.extractValue ? `${parameterName}.value` : parameterName;\n\t\t\treturn get(nodeParameters, parameter, fallbackValue);\n\t\t},\n\t\tgetNode() {\n\t\t\treturn node;\n\t\t},\n\t\thelpers: {\n\t\t\tconstructExecutionMetaData,\n\t\t\treturnJsonArray: (data: IDataObject | IDataObject[]) => {\n\t\t\t\treturn [{ json: data }] as INodeExecutionData[];\n\t\t\t},\n\t\t\tprepareBinaryData: async (data: Buffer) => {\n\t\t\t\treturn {\n\t\t\t\t\tmimeType: 'image/jpeg',\n\t\t\t\t\tfileType: 'jpg',\n\t\t\t\t\tfileName: 'screenshot.jpg',\n\t\t\t\t\tdata: data.toString('base64'),\n\t\t\t\t};\n\t\t\t},\n\t\t},\n\t\tcontinueOnFail: () => false,\n\t\tlogger: {\n\t\t\tinfo: () => {},\n\t\t},\n\t} as unknown as IExecuteFunctions;\n\treturn fakeExecuteFunction;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAgB;AAChB,sBAA2C;AASpC,MAAM,OAAc;AAAA,EAC1B,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU,CAAC,IAAI,EAAE;AAAA,EACjB,YAAY,CAAC;AACd;AAEO,MAAM,4BAA4B,CAAC,mBAAgC;AACzE,QAAM,sBAAsB;AAAA,IAC3B,eAAqC;AACpC,aAAO,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC;AAAA,IACrB;AAAA,IACA,iBACC,eACA,YACA,eACA,SACC;AACD,YAAM,YAAY,SAAS,eAAe,GAAG,aAAa,WAAW;AACrE,iBAAO,WAAAA,SAAI,gBAAgB,WAAW,aAAa;AAAA,IACpD;AAAA,IACA,UAAU;AACT,aAAO;AAAA,IACR;AAAA,IACA,SAAS;AAAA,MACR;AAAA,MACA,iBAAiB,CAAC,SAAsC;AACvD,eAAO,CAAC,EAAE,MAAM,KAAK,CAAC;AAAA,MACvB;AAAA,MACA,mBAAmB,OAAO,SAAiB;AAC1C,eAAO;AAAA,UACN,UAAU;AAAA,UACV,UAAU;AAAA,UACV,UAAU;AAAA,UACV,MAAM,KAAK,SAAS,QAAQ;AAAA,QAC7B;AAAA,MACD;AAAA,IACD;AAAA,IACA,gBAAgB,MAAM;AAAA,IACtB,QAAQ;AAAA,MACP,MAAM,MAAM;AAAA,MAAC;AAAA,IACd;AAAA,EACD;AACA,SAAO;AACR;","names":["get"]}
@@ -7,9 +7,12 @@
7
7
  "name": {
8
8
  "type": "string"
9
9
  },
10
+ "resource_subtype": {
11
+ "type": "string"
12
+ },
10
13
  "resource_type": {
11
14
  "type": "string"
12
15
  }
13
16
  },
14
- "version": 1
17
+ "version": 2
15
18
  }
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "type": "object",
3
3
  "properties": {
4
+ "ChecksumAlgorithm": {
5
+ "type": "string"
6
+ },
7
+ "ChecksumType": {
8
+ "type": "string"
9
+ },
4
10
  "ETag": {
5
11
  "type": "string"
6
12
  },
@@ -17,5 +23,5 @@
17
23
  "type": "string"
18
24
  }
19
25
  },
20
- "version": 2
26
+ "version": 3
21
27
  }
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "type": "object",
3
3
  "properties": {
4
+ "ChecksumAlgorithm": {
5
+ "type": "string"
6
+ },
7
+ "ChecksumType": {
8
+ "type": "string"
9
+ },
4
10
  "ETag": {
5
11
  "type": "string"
6
12
  },
@@ -17,5 +23,5 @@
17
23
  "type": "string"
18
24
  }
19
25
  },
20
- "version": 1
26
+ "version": 2
21
27
  }
@@ -21,10 +21,7 @@
21
21
  },
22
22
  "photoUrl": {
23
23
  "type": "string"
24
- },
25
- "pronouns": {
26
- "type": "null"
27
24
  }
28
25
  },
29
- "version": 1
26
+ "version": 2
30
27
  }
@@ -15,7 +15,29 @@
15
15
  },
16
16
  "type": {
17
17
  "type": "string"
18
+ },
19
+ "type_config": {
20
+ "type": "object",
21
+ "properties": {
22
+ "options": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "object",
26
+ "properties": {
27
+ "id": {
28
+ "type": "string"
29
+ },
30
+ "name": {
31
+ "type": "string"
32
+ },
33
+ "orderindex": {
34
+ "type": "integer"
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
18
40
  }
19
41
  },
20
- "version": 1
42
+ "version": 2
21
43
  }
@@ -57,6 +57,30 @@ async function LoadPyodide(packageCacheDir) {
57
57
  context
58
58
  );
59
59
  await pyodideInstance.runPythonAsync(`
60
+ blocked_modules = ["os"]
61
+
62
+ import sys
63
+ for module_name in blocked_modules:
64
+ del sys.modules[module_name]
65
+
66
+ from importlib.abc import MetaPathFinder
67
+ from importlib.machinery import ModuleSpec
68
+ from types import ModuleType
69
+ from typing import Sequence, Optional
70
+
71
+ class ImportBlocker(MetaPathFinder):
72
+ def find_spec(
73
+ self,
74
+ fullname: str,
75
+ path: Sequence[bytes | str] | None,
76
+ target: ModuleType | None = None,
77
+ ) -> Optional[ModuleSpec]:
78
+ if fullname in blocked_modules:
79
+ raise ModuleNotFoundError(f"Module {fullname!r} is blocked", name=fullname)
80
+ return None
81
+
82
+ sys.meta_path.insert(0, ImportBlocker())
83
+
60
84
  from _pyodide_core import jsproxy_typedict
61
85
  from js import Object
62
86
  `);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../nodes/Code/Pyodide.ts"],"sourcesContent":["import { dirname } from 'node:path';\nimport { createContext, runInContext } from 'node:vm';\nimport type { PyodideInterface } from 'pyodide';\n\nlet pyodideInstance: PyodideInterface | undefined;\n\nexport async function LoadPyodide(packageCacheDir: string): Promise<PyodideInterface> {\n\tif (pyodideInstance === undefined) {\n\t\tconst { loadPyodide } = await import('pyodide');\n\t\tconst { XMLHttpRequest } = await import('xmlhttprequest-ssl');\n\t\tconst indexURL = dirname(require.resolve('pyodide'));\n\t\tconst context = createContext({\n\t\t\tloadPyodide,\n\t\t\tindexURL,\n\t\t\tpackageCacheDir,\n\t\t\tjsglobals: {\n\t\t\t\tconsole,\n\t\t\t\tfetch,\n\t\t\t\tAbortController,\n\t\t\t\tAbortSignal,\n\t\t\t\tObject,\n\t\t\t\tXMLHttpRequest,\n\t\t\t},\n\t\t});\n\t\tpyodideInstance = (await runInContext(\n\t\t\t'loadPyodide({ indexURL, packageCacheDir, jsglobals })',\n\t\t\tcontext,\n\t\t)) as PyodideInterface;\n\n\t\tawait pyodideInstance.runPythonAsync(`\nfrom _pyodide_core import jsproxy_typedict\nfrom js import Object\n`);\n\t}\n\n\treturn pyodideInstance;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AACxB,qBAA4C;AAG5C,IAAI;AAEJ,eAAsB,YAAY,iBAAoD;AACrF,MAAI,oBAAoB,QAAW;AAClC,UAAM,EAAE,YAAY,IAAI,MAAM,OAAO,SAAS;AAC9C,UAAM,EAAE,eAAe,IAAI,MAAM,OAAO,oBAAoB;AAC5D,UAAM,eAAW,0BAAQ,gBAAgB,SAAS,CAAC;AACnD,UAAM,cAAU,8BAAc;AAAA,MAC7B;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,IACD,CAAC;AACD,sBAAmB,UAAM;AAAA,MACxB;AAAA,MACA;AAAA,IACD;AAEA,UAAM,gBAAgB,eAAe;AAAA;AAAA;AAAA,CAGtC;AAAA,EACA;AAEA,SAAO;AACR;","names":[]}
1
+ {"version":3,"sources":["../../../nodes/Code/Pyodide.ts"],"sourcesContent":["import { dirname } from 'node:path';\nimport { createContext, runInContext } from 'node:vm';\nimport type { PyodideInterface } from 'pyodide';\n\nlet pyodideInstance: PyodideInterface | undefined;\n\nexport async function LoadPyodide(packageCacheDir: string): Promise<PyodideInterface> {\n\tif (pyodideInstance === undefined) {\n\t\tconst { loadPyodide } = await import('pyodide');\n\t\tconst { XMLHttpRequest } = await import('xmlhttprequest-ssl');\n\t\tconst indexURL = dirname(require.resolve('pyodide'));\n\t\tconst context = createContext({\n\t\t\tloadPyodide,\n\t\t\tindexURL,\n\t\t\tpackageCacheDir,\n\t\t\tjsglobals: {\n\t\t\t\tconsole,\n\t\t\t\tfetch,\n\t\t\t\tAbortController,\n\t\t\t\tAbortSignal,\n\t\t\t\tObject,\n\t\t\t\tXMLHttpRequest,\n\t\t\t},\n\t\t});\n\t\tpyodideInstance = (await runInContext(\n\t\t\t'loadPyodide({ indexURL, packageCacheDir, jsglobals })',\n\t\t\tcontext,\n\t\t)) as PyodideInterface;\n\n\t\tawait pyodideInstance.runPythonAsync(`\nblocked_modules = [\"os\"]\n\nimport sys\nfor module_name in blocked_modules:\n\tdel sys.modules[module_name]\n\nfrom importlib.abc import MetaPathFinder\nfrom importlib.machinery import ModuleSpec\nfrom types import ModuleType\nfrom typing import Sequence, Optional\n\nclass ImportBlocker(MetaPathFinder):\n\tdef find_spec(\n\t\tself,\n\t\tfullname: str,\n\t\tpath: Sequence[bytes | str] | None,\n\t\ttarget: ModuleType | None = None,\n) -> Optional[ModuleSpec]:\n\t\tif fullname in blocked_modules:\n\t\t\t\traise ModuleNotFoundError(f\"Module {fullname!r} is blocked\", name=fullname)\n\t\treturn None\n\nsys.meta_path.insert(0, ImportBlocker())\n\nfrom _pyodide_core import jsproxy_typedict\nfrom js import Object\n`);\n\t}\n\n\treturn pyodideInstance;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AACxB,qBAA4C;AAG5C,IAAI;AAEJ,eAAsB,YAAY,iBAAoD;AACrF,MAAI,oBAAoB,QAAW;AAClC,UAAM,EAAE,YAAY,IAAI,MAAM,OAAO,SAAS;AAC9C,UAAM,EAAE,eAAe,IAAI,MAAM,OAAO,oBAAoB;AAC5D,UAAM,eAAW,0BAAQ,gBAAgB,SAAS,CAAC;AACnD,UAAM,cAAU,8BAAc;AAAA,MAC7B;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,IACD,CAAC;AACD,sBAAmB,UAAM;AAAA,MACxB;AAAA,MACA;AAAA,IACD;AAEA,UAAM,gBAAgB,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CA2BtC;AAAA,EACA;AAEA,SAAO;AACR;","names":[]}
@@ -34,7 +34,7 @@ __export(GenericFunctions_exports, {
34
34
  findMatches: () => findMatches
35
35
  });
36
36
  module.exports = __toCommonJS(GenericFunctions_exports);
37
- var import_lodash = require("lodash");
37
+ var import_cloneDeep = __toESM(require("lodash/cloneDeep"));
38
38
  var import_difference = __toESM(require("lodash/difference"));
39
39
  var import_get = __toESM(require("lodash/get"));
40
40
  var import_intersection = __toESM(require("lodash/intersection"));
@@ -95,8 +95,8 @@ function compareItems(item1, item2, fieldsToMatch, options, skipFields, isEntrie
95
95
  const skippedFieldsWithDotNotation = skipFields.filter(
96
96
  (field) => field.startsWith(key) && field.includes(".")
97
97
  );
98
- input1 = (0, import_lodash.cloneDeep)(input1);
99
- input2 = (0, import_lodash.cloneDeep)(input2);
98
+ input1 = (0, import_cloneDeep.default)(input1);
99
+ input2 = (0, import_cloneDeep.default)(input2);
100
100
  if (skippedFieldsWithDotNotation.length && (typeof input1 !== "object" || typeof input2 !== "object")) {
101
101
  throw new import_n8n_workflow.ApplicationError(
102
102
  `The field '${key}' in item ${i} is not an object. It is not possible to use dot notation.`,
@@ -263,8 +263,8 @@ function findMatches(input1, input2, fieldsToMatch, options) {
263
263
  entryFromInput1 = (0, import_omit.default)(entryFromInput1, skipFields);
264
264
  entryFromInput2 = (0, import_omit.default)(entryFromInput2, skipFields);
265
265
  } else {
266
- entryFromInput1 = (0, import_lodash.cloneDeep)(entryFromInput1);
267
- entryFromInput2 = (0, import_lodash.cloneDeep)(entryFromInput2);
266
+ entryFromInput1 = (0, import_cloneDeep.default)(entryFromInput1);
267
+ entryFromInput2 = (0, import_cloneDeep.default)(entryFromInput2);
268
268
  skipFields.forEach((field) => {
269
269
  (0, import_unset.default)(entryFromInput1, field);
270
270
  (0, import_unset.default)(entryFromInput2, field);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../nodes/CompareDatasets/GenericFunctions.ts"],"sourcesContent":["import { cloneDeep } from 'lodash';\nimport difference from 'lodash/difference';\nimport get from 'lodash/get';\nimport intersection from 'lodash/intersection';\nimport isEmpty from 'lodash/isEmpty';\nimport omit from 'lodash/omit';\nimport set from 'lodash/set';\nimport union from 'lodash/union';\nimport unset from 'lodash/unset';\nimport { ApplicationError, type IDataObject, type INodeExecutionData } from 'n8n-workflow';\n\nimport { fuzzyCompare, preparePairedItemDataArray } from '@utils/utilities';\n\ntype PairToMatch = {\n\tfield1: string;\n\tfield2: string;\n};\n\ntype EntryMatches = {\n\tentry: INodeExecutionData;\n\tmatches: INodeExecutionData[];\n};\n\ntype CompareFunction = <T, U>(a: T, b: U) => boolean;\n\nconst processNullishValueFunction = (version: number) => {\n\tif (version >= 2) {\n\t\treturn <T>(value: T) => (value === undefined ? null : value);\n\t}\n\treturn <T>(value: T) => value || null;\n};\n\nfunction compareItems(\n\titem1: INodeExecutionData,\n\titem2: INodeExecutionData,\n\tfieldsToMatch: PairToMatch[],\n\toptions: IDataObject,\n\tskipFields: string[],\n\tisEntriesEqual: CompareFunction,\n) {\n\tconst keys = {} as IDataObject;\n\tfieldsToMatch.forEach((field) => {\n\t\tkeys[field.field1] = item1.json[field.field1];\n\t});\n\n\tconst keys1 = Object.keys(item1.json);\n\tconst keys2 = Object.keys(item2.json);\n\tconst allUniqueKeys = union(keys1, keys2);\n\n\tlet keysToCompare;\n\tif (options.fuzzyCompare && (options.nodeVersion as number) >= 2.1) {\n\t\tkeysToCompare = allUniqueKeys;\n\t} else {\n\t\tkeysToCompare = intersection(keys1, keys2);\n\t}\n\n\tconst same = keysToCompare.reduce((acc, key) => {\n\t\tif (isEntriesEqual(item1.json[key], item2.json[key])) {\n\t\t\tacc[key] = item1.json[key];\n\t\t}\n\t\treturn acc;\n\t}, {} as IDataObject);\n\n\tconst sameKeys = Object.keys(same);\n\tconst differentKeys = difference(allUniqueKeys, sameKeys);\n\n\tconst different: IDataObject = {};\n\tconst skipped: IDataObject = {};\n\n\tdifferentKeys.forEach((key, i) => {\n\t\tconst processNullishValue = processNullishValueFunction(options.nodeVersion as number);\n\n\t\tswitch (options.resolve) {\n\t\t\tcase 'preferInput1':\n\t\t\t\tdifferent[key] = processNullishValue(item1.json[key]);\n\t\t\t\tbreak;\n\t\t\tcase 'preferInput2':\n\t\t\t\tdifferent[key] = processNullishValue(item2.json[key]);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlet input1 = processNullishValue(item1.json[key]);\n\t\t\t\tlet input2 = processNullishValue(item2.json[key]);\n\n\t\t\t\tlet [firstInputName, secondInputName] = ['input1', 'input2'];\n\t\t\t\tif ((options.nodeVersion as number) >= 2) {\n\t\t\t\t\t[firstInputName, secondInputName] = ['inputA', 'inputB'];\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(options.nodeVersion as number) >= 2.1 &&\n\t\t\t\t\t!options.disableDotNotation &&\n\t\t\t\t\t!skipFields.some((field) => field === key)\n\t\t\t\t) {\n\t\t\t\t\tconst skippedFieldsWithDotNotation = skipFields.filter(\n\t\t\t\t\t\t(field) => field.startsWith(key) && field.includes('.'),\n\t\t\t\t\t);\n\n\t\t\t\t\tinput1 = cloneDeep(input1);\n\t\t\t\t\tinput2 = cloneDeep(input2);\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tskippedFieldsWithDotNotation.length &&\n\t\t\t\t\t\t(typeof input1 !== 'object' || typeof input2 !== 'object')\n\t\t\t\t\t) {\n\t\t\t\t\t\tthrow new ApplicationError(\n\t\t\t\t\t\t\t`The field \\'${key}\\' in item ${i} is not an object. It is not possible to use dot notation.`,\n\t\t\t\t\t\t\t{ level: 'warning' },\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (skipped[key] === undefined && skippedFieldsWithDotNotation.length) {\n\t\t\t\t\t\tskipped[key] = { [firstInputName]: {}, [secondInputName]: {} };\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (const skippedField of skippedFieldsWithDotNotation) {\n\t\t\t\t\t\tconst nestedField = skippedField.replace(`${key}.`, '');\n\t\t\t\t\t\tset(\n\t\t\t\t\t\t\t(skipped[key] as IDataObject)[firstInputName] as IDataObject,\n\t\t\t\t\t\t\tnestedField,\n\t\t\t\t\t\t\tget(input1, nestedField),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tset(\n\t\t\t\t\t\t\t(skipped[key] as IDataObject)[secondInputName] as IDataObject,\n\t\t\t\t\t\t\tnestedField,\n\t\t\t\t\t\t\tget(input2, nestedField),\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tunset(input1, nestedField);\n\t\t\t\t\t\tunset(input2, nestedField);\n\t\t\t\t\t}\n\n\t\t\t\t\tdifferent[key] = { [firstInputName]: input1, [secondInputName]: input2 };\n\t\t\t\t} else {\n\t\t\t\t\tif (skipFields.includes(key)) {\n\t\t\t\t\t\tskipped[key] = { [firstInputName]: input1, [secondInputName]: input2 };\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdifferent[key] = { [firstInputName]: input1, [secondInputName]: input2 };\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t});\n\n\treturn {\n\t\tjson: { keys, same, different, ...(!isEmpty(skipped) && { skipped }) },\n\t\tpairedItem: [\n\t\t\t...preparePairedItemDataArray(item1.pairedItem),\n\t\t\t...preparePairedItemDataArray(item2.pairedItem),\n\t\t],\n\t} as INodeExecutionData;\n}\n\nfunction combineItems(\n\titem1: INodeExecutionData,\n\titem2: INodeExecutionData,\n\tprefer: string,\n\texcept: string,\n\tdisableDotNotation: boolean,\n) {\n\tlet exceptFields: string[];\n\tconst [entry, match] = prefer === 'input1' ? [item1, item2] : [item2, item1];\n\n\tif (except && Array.isArray(except) && except.length) {\n\t\texceptFields = except;\n\t} else {\n\t\texceptFields = except ? except.split(',').map((field) => field.trim()) : [];\n\t}\n\n\texceptFields.forEach((field) => {\n\t\tentry.json[field] = match.json[field];\n\t\tif (disableDotNotation) {\n\t\t\tentry.json[field] = match.json[field];\n\t\t} else {\n\t\t\tconst value = get(match.json, field) || null;\n\t\t\tset(entry, ['json', field], value);\n\t\t}\n\t});\n\n\treturn entry;\n}\n\nfunction findAllMatches(\n\tdata: INodeExecutionData[],\n\tlookup: IDataObject,\n\tdisableDotNotation: boolean,\n\tisEntriesEqual: CompareFunction,\n) {\n\treturn data.reduce((acc, entry2, i) => {\n\t\tif (entry2 === undefined) return acc;\n\n\t\tfor (const key of Object.keys(lookup)) {\n\t\t\tconst excpectedValue = lookup[key];\n\t\t\tlet entry2FieldValue;\n\n\t\t\tif (disableDotNotation) {\n\t\t\t\tentry2FieldValue = entry2.json[key];\n\t\t\t} else {\n\t\t\t\tentry2FieldValue = get(entry2.json, key);\n\t\t\t}\n\n\t\t\tif (!isEntriesEqual(excpectedValue, entry2FieldValue)) {\n\t\t\t\treturn acc;\n\t\t\t}\n\t\t}\n\n\t\treturn acc.concat({\n\t\t\tentry: entry2,\n\t\t\tindex: i,\n\t\t});\n\t}, [] as IDataObject[]);\n}\n\nfunction findFirstMatch(\n\tdata: INodeExecutionData[],\n\tlookup: IDataObject,\n\tdisableDotNotation: boolean,\n\tisEntriesEqual: CompareFunction,\n) {\n\tconst index = data.findIndex((entry2) => {\n\t\tif (entry2 === undefined) return false;\n\n\t\tfor (const key of Object.keys(lookup)) {\n\t\t\tconst excpectedValue = lookup[key];\n\t\t\tlet entry2FieldValue;\n\n\t\t\tif (disableDotNotation) {\n\t\t\t\tentry2FieldValue = entry2.json[key];\n\t\t\t} else {\n\t\t\t\tentry2FieldValue = get(entry2.json, key);\n\t\t\t}\n\n\t\t\tif (!isEntriesEqual(excpectedValue, entry2FieldValue)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t});\n\tif (index === -1) return [];\n\n\treturn [{ entry: data[index], index }];\n}\n\nexport function findMatches(\n\tinput1: INodeExecutionData[],\n\tinput2: INodeExecutionData[],\n\tfieldsToMatch: PairToMatch[],\n\toptions: IDataObject,\n) {\n\tconst data1 = [...input1];\n\tconst data2 = [...input2];\n\n\tconst isEntriesEqual = fuzzyCompare(\n\t\toptions.fuzzyCompare as boolean,\n\t\toptions.nodeVersion as number,\n\t);\n\tconst disableDotNotation = (options.disableDotNotation as boolean) || false;\n\tconst multipleMatches = (options.multipleMatches as string) || 'first';\n\tconst skipFields = ((options.skipFields as string) || '').split(',').map((field) => field.trim());\n\n\tif (disableDotNotation && skipFields.some((field) => field.includes('.'))) {\n\t\tconst fieldToSkip = skipFields.find((field) => field.includes('.'));\n\t\tconst msg = `Dot notation is disabled, but field to skip comparing '${fieldToSkip}' contains dot`;\n\t\tthrow new ApplicationError(msg, { level: 'warning' });\n\t}\n\n\tconst filteredData = {\n\t\tmatched: [] as EntryMatches[],\n\t\tunmatched1: [] as INodeExecutionData[],\n\t\tunmatched2: [] as INodeExecutionData[],\n\t};\n\n\tconst matchedInInput2 = new Set<number>();\n\n\tmatchesLoop: for (const entry of data1) {\n\t\tconst lookup: IDataObject = {};\n\n\t\tfieldsToMatch.forEach((matchCase) => {\n\t\t\tlet valueToCompare;\n\t\t\tif (disableDotNotation) {\n\t\t\t\tvalueToCompare = entry.json[matchCase.field1];\n\t\t\t} else {\n\t\t\t\tvalueToCompare = get(entry.json, matchCase.field1);\n\t\t\t}\n\t\t\tlookup[matchCase.field2] = valueToCompare;\n\t\t});\n\n\t\tfor (const fieldValue of Object.values(lookup)) {\n\t\t\tif (fieldValue === undefined) {\n\t\t\t\tfilteredData.unmatched1.push(entry);\n\t\t\t\tcontinue matchesLoop;\n\t\t\t}\n\t\t}\n\n\t\tconst foundedMatches =\n\t\t\tmultipleMatches === 'all'\n\t\t\t\t? findAllMatches(data2, lookup, disableDotNotation, isEntriesEqual)\n\t\t\t\t: findFirstMatch(data2, lookup, disableDotNotation, isEntriesEqual);\n\n\t\tconst matches = foundedMatches.map((match) => match.entry) as INodeExecutionData[];\n\t\tfoundedMatches.map((match) => matchedInInput2.add(match.index as number));\n\n\t\tif (matches.length) {\n\t\t\tfilteredData.matched.push({ entry, matches });\n\t\t} else {\n\t\t\tfilteredData.unmatched1.push(entry);\n\t\t}\n\t}\n\n\tdata2.forEach((entry, i) => {\n\t\tif (!matchedInInput2.has(i)) {\n\t\t\tfilteredData.unmatched2.push(entry);\n\t\t}\n\t});\n\n\tconst same: INodeExecutionData[] = [];\n\tconst different: INodeExecutionData[] = [];\n\n\tfilteredData.matched.forEach((entryMatches) => {\n\t\tlet entryCopy: INodeExecutionData | undefined;\n\n\t\tentryMatches.matches.forEach((match) => {\n\t\t\tlet entryFromInput1 = entryMatches.entry.json;\n\t\t\tlet entryFromInput2 = match.json;\n\n\t\t\tif (skipFields.length) {\n\t\t\t\tif (disableDotNotation || !skipFields.some((field) => field.includes('.'))) {\n\t\t\t\t\tentryFromInput1 = omit(entryFromInput1, skipFields);\n\t\t\t\t\tentryFromInput2 = omit(entryFromInput2, skipFields);\n\t\t\t\t} else {\n\t\t\t\t\tentryFromInput1 = cloneDeep(entryFromInput1);\n\t\t\t\t\tentryFromInput2 = cloneDeep(entryFromInput2);\n\n\t\t\t\t\tskipFields.forEach((field) => {\n\t\t\t\t\t\tunset(entryFromInput1, field);\n\t\t\t\t\t\tunset(entryFromInput2, field);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet isItemsEqual = true;\n\t\t\tif (options.fuzzyCompare) {\n\t\t\t\tfor (const key of Object.keys(entryFromInput1)) {\n\t\t\t\t\tif (!isEntriesEqual(entryFromInput1[key], entryFromInput2[key])) {\n\t\t\t\t\t\tisItemsEqual = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisItemsEqual = isEntriesEqual(entryFromInput1, entryFromInput2);\n\t\t\t}\n\n\t\t\tif (isItemsEqual) {\n\t\t\t\tif (!entryCopy) {\n\t\t\t\t\tif (options.fuzzyCompare && options.resolve === 'preferInput2') {\n\t\t\t\t\t\tentryCopy = match;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentryCopy = entryMatches.entry;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (options.resolve) {\n\t\t\t\t\tcase 'preferInput1':\n\t\t\t\t\t\tdifferent.push(entryMatches.entry);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'preferInput2':\n\t\t\t\t\t\tdifferent.push(match);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mix':\n\t\t\t\t\t\tdifferent.push(\n\t\t\t\t\t\t\tcombineItems(\n\t\t\t\t\t\t\t\tentryMatches.entry,\n\t\t\t\t\t\t\t\tmatch,\n\t\t\t\t\t\t\t\toptions.preferWhenMix as string,\n\t\t\t\t\t\t\t\toptions.exceptWhenMix as string,\n\t\t\t\t\t\t\t\tdisableDotNotation,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tdifferent.push(\n\t\t\t\t\t\t\tcompareItems(\n\t\t\t\t\t\t\t\tentryMatches.entry,\n\t\t\t\t\t\t\t\tmatch,\n\t\t\t\t\t\t\t\tfieldsToMatch,\n\t\t\t\t\t\t\t\toptions,\n\t\t\t\t\t\t\t\tskipFields,\n\t\t\t\t\t\t\t\tisEntriesEqual,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tif (!isEmpty(entryCopy)) {\n\t\t\tsame.push(entryCopy);\n\t\t}\n\t});\n\n\treturn [filteredData.unmatched1, same, different, filteredData.unmatched2];\n}\n\nexport function checkMatchFieldsInput(data: IDataObject[]) {\n\tif (data.length === 1 && data[0].field1 === '' && data[0].field2 === '') {\n\t\tthrow new ApplicationError(\n\t\t\t'You need to define at least one pair of fields in \"Fields to Match\" to match on',\n\t\t\t{ level: 'warning' },\n\t\t);\n\t}\n\tfor (const [index, pair] of data.entries()) {\n\t\tif (pair.field1 === '' || pair.field2 === '') {\n\t\t\tthrow new ApplicationError(\n\t\t\t\t`You need to define both fields in \"Fields to Match\" for pair ${index + 1},\n\t\t\t\t field 1 = '${pair.field1}'\n\t\t\t\t field 2 = '${pair.field2}'`,\n\t\t\t\t{ level: 'warning' },\n\t\t\t);\n\t\t}\n\t}\n\treturn data as PairToMatch[];\n}\n\nexport function checkInput(input: INodeExecutionData[]) {\n\tif (!input) return [];\n\tif (input.some((item) => isEmpty(item.json))) {\n\t\tinput = input.filter((item) => !isEmpty(item.json));\n\t}\n\treturn input;\n}\n\nexport function checkInputAndThrowError(\n\tinput: INodeExecutionData[],\n\tfields: string[],\n\tdisableDotNotation: boolean,\n\tinputLabel: string,\n) {\n\tif (input.some((item) => isEmpty(item.json))) {\n\t\tinput = input.filter((item) => !isEmpty(item.json));\n\t}\n\tif (input.length === 0) {\n\t\treturn input;\n\t}\n\tfor (const field of fields) {\n\t\tconst isPresent = (input || []).some((entry) => {\n\t\t\tif (disableDotNotation) {\n\t\t\t\treturn entry.json.hasOwnProperty(field);\n\t\t\t}\n\t\t\treturn get(entry.json, field, undefined) !== undefined;\n\t\t});\n\t\tif (!isPresent) {\n\t\t\tthrow new ApplicationError(\n\t\t\t\t`Field '${field}' is not present in any of items in '${inputLabel}'`,\n\t\t\t\t{ level: 'warning' },\n\t\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AAC,OAAO,IAAI,KAAK,KAAK,QAAQ,GAAG;AAC3C,QAAI,KAAK,WAAW,MAAM,KAAK,WAAW,IAAI;AAC7C,YAAM,IAAI;AAAA,QACT,gEAAgE,QAAQ,CAAC;AAAA,kBAC3D,KAAK,MAAM;AAAA,kBACX,KAAK,MAAM;AAAA,QACzB,EAAE,OAAO,UAAU;AAAA,MACpB;AAAA,IACD;AAAA,EACD;AACA,SAAO;AACR;AAEO,SAAS,WAAW,OAA6B;AACvD,MAAI,CAAC,MAAO,QAAO,CAAC;AACpB,MAAI,MAAM,KAAK,CAAC,aAAS,eAAAA,SAAQ,KAAK,IAAI,CAAC,GAAG;AAC7C,YAAQ,MAAM,OAAO,CAAC,SAAS,KAAC,eAAAA,SAAQ,KAAK,IAAI,CAAC;AAAA,EACnD;AACA,SAAO;AACR;AAEO,SAAS,wBACf,OACA,QACA,oBACA,YACC;AACD,MAAI,MAAM,KAAK,CAAC,aAAS,eAAAA,SAAQ,KAAK,IAAI,CAAC,GAAG;AAC7C,YAAQ,MAAM,OAAO,CAAC,SAAS,KAAC,eAAAA,SAAQ,KAAK,IAAI,CAAC;AAAA,EACnD;AACA,MAAI,MAAM,WAAW,GAAG;AACvB,WAAO;AAAA,EACR;AACA,aAAW,SAAS,QAAQ;AAC3B,UAAM,aAAa,SAAS,CAAC,GAAG,KAAK,CAAC,UAAU;AAC/C,UAAI,oBAAoB;AACvB,eAAO,MAAM,KAAK,eAAe,KAAK;AAAA,MACvC;AACA,iBAAO,WAAAF,SAAI,MAAM,MAAM,OAAO,MAAS,MAAM;AAAA,IAC9C,CAAC;AACD,QAAI,CAAC,WAAW;AACf,YAAM,IAAI;AAAA,QACT,UAAU,KAAK,wCAAwC,UAAU;AAAA,QACjE,EAAE,OAAO,UAAU;AAAA,MACpB;AAAA,IACD;AAAA,EACD;AACA,SAAO;AACR;","names":["union","intersection","difference","set","get","unset","isEmpty","omit"]}
1
+ {"version":3,"sources":["../../../nodes/CompareDatasets/GenericFunctions.ts"],"sourcesContent":["import cloneDeep from 'lodash/cloneDeep';\nimport difference from 'lodash/difference';\nimport get from 'lodash/get';\nimport intersection from 'lodash/intersection';\nimport isEmpty from 'lodash/isEmpty';\nimport omit from 'lodash/omit';\nimport set from 'lodash/set';\nimport union from 'lodash/union';\nimport unset from 'lodash/unset';\nimport { ApplicationError, type IDataObject, type INodeExecutionData } from 'n8n-workflow';\n\nimport { fuzzyCompare, preparePairedItemDataArray } from '@utils/utilities';\n\ntype PairToMatch = {\n\tfield1: string;\n\tfield2: string;\n};\n\ntype EntryMatches = {\n\tentry: INodeExecutionData;\n\tmatches: INodeExecutionData[];\n};\n\ntype CompareFunction = <T, U>(a: T, b: U) => boolean;\n\nconst processNullishValueFunction = (version: number) => {\n\tif (version >= 2) {\n\t\treturn <T>(value: T) => (value === undefined ? null : value);\n\t}\n\treturn <T>(value: T) => value || null;\n};\n\nfunction compareItems(\n\titem1: INodeExecutionData,\n\titem2: INodeExecutionData,\n\tfieldsToMatch: PairToMatch[],\n\toptions: IDataObject,\n\tskipFields: string[],\n\tisEntriesEqual: CompareFunction,\n) {\n\tconst keys = {} as IDataObject;\n\tfieldsToMatch.forEach((field) => {\n\t\tkeys[field.field1] = item1.json[field.field1];\n\t});\n\n\tconst keys1 = Object.keys(item1.json);\n\tconst keys2 = Object.keys(item2.json);\n\tconst allUniqueKeys = union(keys1, keys2);\n\n\tlet keysToCompare;\n\tif (options.fuzzyCompare && (options.nodeVersion as number) >= 2.1) {\n\t\tkeysToCompare = allUniqueKeys;\n\t} else {\n\t\tkeysToCompare = intersection(keys1, keys2);\n\t}\n\n\tconst same = keysToCompare.reduce((acc, key) => {\n\t\tif (isEntriesEqual(item1.json[key], item2.json[key])) {\n\t\t\tacc[key] = item1.json[key];\n\t\t}\n\t\treturn acc;\n\t}, {} as IDataObject);\n\n\tconst sameKeys = Object.keys(same);\n\tconst differentKeys = difference(allUniqueKeys, sameKeys);\n\n\tconst different: IDataObject = {};\n\tconst skipped: IDataObject = {};\n\n\tdifferentKeys.forEach((key, i) => {\n\t\tconst processNullishValue = processNullishValueFunction(options.nodeVersion as number);\n\n\t\tswitch (options.resolve) {\n\t\t\tcase 'preferInput1':\n\t\t\t\tdifferent[key] = processNullishValue(item1.json[key]);\n\t\t\t\tbreak;\n\t\t\tcase 'preferInput2':\n\t\t\t\tdifferent[key] = processNullishValue(item2.json[key]);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlet input1 = processNullishValue(item1.json[key]);\n\t\t\t\tlet input2 = processNullishValue(item2.json[key]);\n\n\t\t\t\tlet [firstInputName, secondInputName] = ['input1', 'input2'];\n\t\t\t\tif ((options.nodeVersion as number) >= 2) {\n\t\t\t\t\t[firstInputName, secondInputName] = ['inputA', 'inputB'];\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(options.nodeVersion as number) >= 2.1 &&\n\t\t\t\t\t!options.disableDotNotation &&\n\t\t\t\t\t!skipFields.some((field) => field === key)\n\t\t\t\t) {\n\t\t\t\t\tconst skippedFieldsWithDotNotation = skipFields.filter(\n\t\t\t\t\t\t(field) => field.startsWith(key) && field.includes('.'),\n\t\t\t\t\t);\n\n\t\t\t\t\tinput1 = cloneDeep(input1);\n\t\t\t\t\tinput2 = cloneDeep(input2);\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tskippedFieldsWithDotNotation.length &&\n\t\t\t\t\t\t(typeof input1 !== 'object' || typeof input2 !== 'object')\n\t\t\t\t\t) {\n\t\t\t\t\t\tthrow new ApplicationError(\n\t\t\t\t\t\t\t`The field \\'${key}\\' in item ${i} is not an object. It is not possible to use dot notation.`,\n\t\t\t\t\t\t\t{ level: 'warning' },\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (skipped[key] === undefined && skippedFieldsWithDotNotation.length) {\n\t\t\t\t\t\tskipped[key] = { [firstInputName]: {}, [secondInputName]: {} };\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (const skippedField of skippedFieldsWithDotNotation) {\n\t\t\t\t\t\tconst nestedField = skippedField.replace(`${key}.`, '');\n\t\t\t\t\t\tset(\n\t\t\t\t\t\t\t(skipped[key] as IDataObject)[firstInputName] as IDataObject,\n\t\t\t\t\t\t\tnestedField,\n\t\t\t\t\t\t\tget(input1, nestedField),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tset(\n\t\t\t\t\t\t\t(skipped[key] as IDataObject)[secondInputName] as IDataObject,\n\t\t\t\t\t\t\tnestedField,\n\t\t\t\t\t\t\tget(input2, nestedField),\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tunset(input1, nestedField);\n\t\t\t\t\t\tunset(input2, nestedField);\n\t\t\t\t\t}\n\n\t\t\t\t\tdifferent[key] = { [firstInputName]: input1, [secondInputName]: input2 };\n\t\t\t\t} else {\n\t\t\t\t\tif (skipFields.includes(key)) {\n\t\t\t\t\t\tskipped[key] = { [firstInputName]: input1, [secondInputName]: input2 };\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdifferent[key] = { [firstInputName]: input1, [secondInputName]: input2 };\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t});\n\n\treturn {\n\t\tjson: { keys, same, different, ...(!isEmpty(skipped) && { skipped }) },\n\t\tpairedItem: [\n\t\t\t...preparePairedItemDataArray(item1.pairedItem),\n\t\t\t...preparePairedItemDataArray(item2.pairedItem),\n\t\t],\n\t} as INodeExecutionData;\n}\n\nfunction combineItems(\n\titem1: INodeExecutionData,\n\titem2: INodeExecutionData,\n\tprefer: string,\n\texcept: string,\n\tdisableDotNotation: boolean,\n) {\n\tlet exceptFields: string[];\n\tconst [entry, match] = prefer === 'input1' ? [item1, item2] : [item2, item1];\n\n\tif (except && Array.isArray(except) && except.length) {\n\t\texceptFields = except;\n\t} else {\n\t\texceptFields = except ? except.split(',').map((field) => field.trim()) : [];\n\t}\n\n\texceptFields.forEach((field) => {\n\t\tentry.json[field] = match.json[field];\n\t\tif (disableDotNotation) {\n\t\t\tentry.json[field] = match.json[field];\n\t\t} else {\n\t\t\tconst value = get(match.json, field) || null;\n\t\t\tset(entry, ['json', field], value);\n\t\t}\n\t});\n\n\treturn entry;\n}\n\nfunction findAllMatches(\n\tdata: INodeExecutionData[],\n\tlookup: IDataObject,\n\tdisableDotNotation: boolean,\n\tisEntriesEqual: CompareFunction,\n) {\n\treturn data.reduce((acc, entry2, i) => {\n\t\tif (entry2 === undefined) return acc;\n\n\t\tfor (const key of Object.keys(lookup)) {\n\t\t\tconst excpectedValue = lookup[key];\n\t\t\tlet entry2FieldValue;\n\n\t\t\tif (disableDotNotation) {\n\t\t\t\tentry2FieldValue = entry2.json[key];\n\t\t\t} else {\n\t\t\t\tentry2FieldValue = get(entry2.json, key);\n\t\t\t}\n\n\t\t\tif (!isEntriesEqual(excpectedValue, entry2FieldValue)) {\n\t\t\t\treturn acc;\n\t\t\t}\n\t\t}\n\n\t\treturn acc.concat({\n\t\t\tentry: entry2,\n\t\t\tindex: i,\n\t\t});\n\t}, [] as IDataObject[]);\n}\n\nfunction findFirstMatch(\n\tdata: INodeExecutionData[],\n\tlookup: IDataObject,\n\tdisableDotNotation: boolean,\n\tisEntriesEqual: CompareFunction,\n) {\n\tconst index = data.findIndex((entry2) => {\n\t\tif (entry2 === undefined) return false;\n\n\t\tfor (const key of Object.keys(lookup)) {\n\t\t\tconst excpectedValue = lookup[key];\n\t\t\tlet entry2FieldValue;\n\n\t\t\tif (disableDotNotation) {\n\t\t\t\tentry2FieldValue = entry2.json[key];\n\t\t\t} else {\n\t\t\t\tentry2FieldValue = get(entry2.json, key);\n\t\t\t}\n\n\t\t\tif (!isEntriesEqual(excpectedValue, entry2FieldValue)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t});\n\tif (index === -1) return [];\n\n\treturn [{ entry: data[index], index }];\n}\n\nexport function findMatches(\n\tinput1: INodeExecutionData[],\n\tinput2: INodeExecutionData[],\n\tfieldsToMatch: PairToMatch[],\n\toptions: IDataObject,\n) {\n\tconst data1 = [...input1];\n\tconst data2 = [...input2];\n\n\tconst isEntriesEqual = fuzzyCompare(\n\t\toptions.fuzzyCompare as boolean,\n\t\toptions.nodeVersion as number,\n\t);\n\tconst disableDotNotation = (options.disableDotNotation as boolean) || false;\n\tconst multipleMatches = (options.multipleMatches as string) || 'first';\n\tconst skipFields = ((options.skipFields as string) || '').split(',').map((field) => field.trim());\n\n\tif (disableDotNotation && skipFields.some((field) => field.includes('.'))) {\n\t\tconst fieldToSkip = skipFields.find((field) => field.includes('.'));\n\t\tconst msg = `Dot notation is disabled, but field to skip comparing '${fieldToSkip}' contains dot`;\n\t\tthrow new ApplicationError(msg, { level: 'warning' });\n\t}\n\n\tconst filteredData = {\n\t\tmatched: [] as EntryMatches[],\n\t\tunmatched1: [] as INodeExecutionData[],\n\t\tunmatched2: [] as INodeExecutionData[],\n\t};\n\n\tconst matchedInInput2 = new Set<number>();\n\n\tmatchesLoop: for (const entry of data1) {\n\t\tconst lookup: IDataObject = {};\n\n\t\tfieldsToMatch.forEach((matchCase) => {\n\t\t\tlet valueToCompare;\n\t\t\tif (disableDotNotation) {\n\t\t\t\tvalueToCompare = entry.json[matchCase.field1];\n\t\t\t} else {\n\t\t\t\tvalueToCompare = get(entry.json, matchCase.field1);\n\t\t\t}\n\t\t\tlookup[matchCase.field2] = valueToCompare;\n\t\t});\n\n\t\tfor (const fieldValue of Object.values(lookup)) {\n\t\t\tif (fieldValue === undefined) {\n\t\t\t\tfilteredData.unmatched1.push(entry);\n\t\t\t\tcontinue matchesLoop;\n\t\t\t}\n\t\t}\n\n\t\tconst foundedMatches =\n\t\t\tmultipleMatches === 'all'\n\t\t\t\t? findAllMatches(data2, lookup, disableDotNotation, isEntriesEqual)\n\t\t\t\t: findFirstMatch(data2, lookup, disableDotNotation, isEntriesEqual);\n\n\t\tconst matches = foundedMatches.map((match) => match.entry) as INodeExecutionData[];\n\t\tfoundedMatches.map((match) => matchedInInput2.add(match.index as number));\n\n\t\tif (matches.length) {\n\t\t\tfilteredData.matched.push({ entry, matches });\n\t\t} else {\n\t\t\tfilteredData.unmatched1.push(entry);\n\t\t}\n\t}\n\n\tdata2.forEach((entry, i) => {\n\t\tif (!matchedInInput2.has(i)) {\n\t\t\tfilteredData.unmatched2.push(entry);\n\t\t}\n\t});\n\n\tconst same: INodeExecutionData[] = [];\n\tconst different: INodeExecutionData[] = [];\n\n\tfilteredData.matched.forEach((entryMatches) => {\n\t\tlet entryCopy: INodeExecutionData | undefined;\n\n\t\tentryMatches.matches.forEach((match) => {\n\t\t\tlet entryFromInput1 = entryMatches.entry.json;\n\t\t\tlet entryFromInput2 = match.json;\n\n\t\t\tif (skipFields.length) {\n\t\t\t\tif (disableDotNotation || !skipFields.some((field) => field.includes('.'))) {\n\t\t\t\t\tentryFromInput1 = omit(entryFromInput1, skipFields);\n\t\t\t\t\tentryFromInput2 = omit(entryFromInput2, skipFields);\n\t\t\t\t} else {\n\t\t\t\t\tentryFromInput1 = cloneDeep(entryFromInput1);\n\t\t\t\t\tentryFromInput2 = cloneDeep(entryFromInput2);\n\n\t\t\t\t\tskipFields.forEach((field) => {\n\t\t\t\t\t\tunset(entryFromInput1, field);\n\t\t\t\t\t\tunset(entryFromInput2, field);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet isItemsEqual = true;\n\t\t\tif (options.fuzzyCompare) {\n\t\t\t\tfor (const key of Object.keys(entryFromInput1)) {\n\t\t\t\t\tif (!isEntriesEqual(entryFromInput1[key], entryFromInput2[key])) {\n\t\t\t\t\t\tisItemsEqual = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisItemsEqual = isEntriesEqual(entryFromInput1, entryFromInput2);\n\t\t\t}\n\n\t\t\tif (isItemsEqual) {\n\t\t\t\tif (!entryCopy) {\n\t\t\t\t\tif (options.fuzzyCompare && options.resolve === 'preferInput2') {\n\t\t\t\t\t\tentryCopy = match;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentryCopy = entryMatches.entry;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (options.resolve) {\n\t\t\t\t\tcase 'preferInput1':\n\t\t\t\t\t\tdifferent.push(entryMatches.entry);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'preferInput2':\n\t\t\t\t\t\tdifferent.push(match);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mix':\n\t\t\t\t\t\tdifferent.push(\n\t\t\t\t\t\t\tcombineItems(\n\t\t\t\t\t\t\t\tentryMatches.entry,\n\t\t\t\t\t\t\t\tmatch,\n\t\t\t\t\t\t\t\toptions.preferWhenMix as string,\n\t\t\t\t\t\t\t\toptions.exceptWhenMix as string,\n\t\t\t\t\t\t\t\tdisableDotNotation,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tdifferent.push(\n\t\t\t\t\t\t\tcompareItems(\n\t\t\t\t\t\t\t\tentryMatches.entry,\n\t\t\t\t\t\t\t\tmatch,\n\t\t\t\t\t\t\t\tfieldsToMatch,\n\t\t\t\t\t\t\t\toptions,\n\t\t\t\t\t\t\t\tskipFields,\n\t\t\t\t\t\t\t\tisEntriesEqual,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tif (!isEmpty(entryCopy)) {\n\t\t\tsame.push(entryCopy);\n\t\t}\n\t});\n\n\treturn [filteredData.unmatched1, same, different, filteredData.unmatched2];\n}\n\nexport function checkMatchFieldsInput(data: IDataObject[]) {\n\tif (data.length === 1 && data[0].field1 === '' && data[0].field2 === '') {\n\t\tthrow new ApplicationError(\n\t\t\t'You need to define at least one pair of fields in \"Fields to Match\" to match on',\n\t\t\t{ level: 'warning' },\n\t\t);\n\t}\n\tfor (const [index, pair] of data.entries()) {\n\t\tif (pair.field1 === '' || pair.field2 === '') {\n\t\t\tthrow new ApplicationError(\n\t\t\t\t`You need to define both fields in \"Fields to Match\" for pair ${index + 1},\n\t\t\t\t field 1 = '${pair.field1}'\n\t\t\t\t field 2 = '${pair.field2}'`,\n\t\t\t\t{ level: 'warning' },\n\t\t\t);\n\t\t}\n\t}\n\treturn data as PairToMatch[];\n}\n\nexport function checkInput(input: INodeExecutionData[]) {\n\tif (!input) return [];\n\tif (input.some((item) => isEmpty(item.json))) {\n\t\tinput = input.filter((item) => !isEmpty(item.json));\n\t}\n\treturn input;\n}\n\nexport function checkInputAndThrowError(\n\tinput: INodeExecutionData[],\n\tfields: string[],\n\tdisableDotNotation: boolean,\n\tinputLabel: string,\n) {\n\tif (input.some((item) => isEmpty(item.json))) {\n\t\tinput = input.filter((item) => !isEmpty(item.json));\n\t}\n\tif (input.length === 0) {\n\t\treturn input;\n\t}\n\tfor (const field of fields) {\n\t\tconst isPresent = (input || []).some((entry) => {\n\t\t\tif (disableDotNotation) {\n\t\t\t\treturn entry.json.hasOwnProperty(field);\n\t\t\t}\n\t\t\treturn get(entry.json, field, undefined) !== undefined;\n\t\t});\n\t\tif (!isPresent) {\n\t\t\tthrow new ApplicationError(\n\t\t\t\t`Field '${field}' is not present in any of items in '${inputLabel}'`,\n\t\t\t\t{ level: 'warning' },\n\t\t\t);\n\t\t}\n\t}\n\treturn input;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAsB;AACtB,wBAAuB;AACvB,iBAAgB;AAChB,0BAAyB;AACzB,qBAAoB;AACpB,kBAAiB;AACjB,iBAAgB;AAChB,mBAAkB;AAClB,mBAAkB;AAClB,0BAA4E;AAE5E,uBAAyD;AAczD,MAAM,8BAA8B,CAAC,YAAoB;AACxD,MAAI,WAAW,GAAG;AACjB,WAAO,CAAI,UAAc,UAAU,SAAY,OAAO;AAAA,EACvD;AACA,SAAO,CAAI,UAAa,SAAS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CAAC,GAAG;AAC7C,YAAQ,MAAM,OAAO,CAAC,SAAS,KAAC,eAAAA,SAAQ,KAAK,IAAI,CAAC;AAAA,EACnD;AACA,SAAO;AACR;AAEO,SAAS,wBACf,OACA,QACA,oBACA,YACC;AACD,MAAI,MAAM,KAAK,CAAC,aAAS,eAAAA,SAAQ,KAAK,IAAI,CAAC,GAAG;AAC7C,YAAQ,MAAM,OAAO,CAAC,SAAS,KAAC,eAAAA,SAAQ,KAAK,IAAI,CAAC;AAAA,EACnD;AACA,MAAI,MAAM,WAAW,GAAG;AACvB,WAAO;AAAA,EACR;AACA,aAAW,SAAS,QAAQ;AAC3B,UAAM,aAAa,SAAS,CAAC,GAAG,KAAK,CAAC,UAAU;AAC/C,UAAI,oBAAoB;AACvB,eAAO,MAAM,KAAK,eAAe,KAAK;AAAA,MACvC;AACA,iBAAO,WAAAF,SAAI,MAAM,MAAM,OAAO,MAAS,MAAM;AAAA,IAC9C,CAAC;AACD,QAAI,CAAC,WAAW;AACf,YAAM,IAAI;AAAA,QACT,UAAU,KAAK,wCAAwC,UAAU;AAAA,QACjE,EAAE,OAAO,UAAU;AAAA,MACpB;AAAA,IACD;AAAA,EACD;AACA,SAAO;AACR;","names":["union","intersection","difference","cloneDeep","set","get","unset","isEmpty","omit"]}
@@ -0,0 +1,14 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "data": {
5
+ "type": "object",
6
+ "properties": {
7
+ "approved": {
8
+ "type": "boolean"
9
+ }
10
+ }
11
+ }
12
+ },
13
+ "version": 1
14
+ }
@@ -42,7 +42,7 @@ __export(utils_exports, {
42
42
  });
43
43
  module.exports = __toCommonJS(utils_exports);
44
44
  var import_form_data = __toESM(require("form-data"));
45
- var import_lodash = require("lodash");
45
+ var import_isEmpty = __toESM(require("lodash/isEmpty"));
46
46
  var import_mime_types = require("mime-types");
47
47
  var import_n8n_workflow = require("n8n-workflow");
48
48
  var import_utils = require("../../../../utils/sendAndWait/utils");
@@ -171,7 +171,7 @@ function prepareEmbeds(embeds) {
171
171
  };
172
172
  }
173
173
  return embedReturnData;
174
- }).filter((embed) => !(0, import_lodash.isEmpty)(embed));
174
+ }).filter((embed) => !(0, import_isEmpty.default)(embed));
175
175
  }
176
176
  async function prepareMultiPartForm(items, files, jsonPayload, i) {
177
177
  const multiPartBody = new import_form_data.default();