n8n-editor-ui 1.19.1 → 1.19.3

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 (114) hide show
  1. package/.turbo/turbo-build.log +60 -60
  2. package/dist/assets/{AuthView-pnWQAK0S.js → AuthView-KzKyZSHz.js} +2 -2
  3. package/dist/assets/{AuthView-pnWQAK0S.js.map → AuthView-KzKyZSHz.js.map} +1 -1
  4. package/dist/assets/{CanvasControls-kb3__O2G.js → CanvasControls-6jR1_mnm.js} +2 -2
  5. package/dist/assets/{CanvasControls-kb3__O2G.js.map → CanvasControls-6jR1_mnm.js.map} +1 -1
  6. package/dist/assets/{ChangePasswordView-w8ZDdsHs.js → ChangePasswordView-TW8EQPS0.js} +2 -2
  7. package/dist/assets/{ChangePasswordView-w8ZDdsHs.js.map → ChangePasswordView-TW8EQPS0.js.map} +1 -1
  8. package/dist/assets/{CredentialsView-9EPVLguD.js → CredentialsView-AVQZL_tm.js} +2 -2
  9. package/dist/assets/{CredentialsView-9EPVLguD.js.map → CredentialsView-AVQZL_tm.js.map} +1 -1
  10. package/dist/assets/{ExecutionFilter-xWjqUjz0.js → ExecutionFilter-tcX3bN8y.js} +2 -2
  11. package/dist/assets/{ExecutionFilter-xWjqUjz0.js.map → ExecutionFilter-tcX3bN8y.js.map} +1 -1
  12. package/dist/assets/{ExecutionPreview-IQ7v5u01.js → ExecutionPreview-OuL-2qRR.js} +2 -2
  13. package/dist/assets/{ExecutionPreview-IQ7v5u01.js.map → ExecutionPreview-OuL-2qRR.js.map} +1 -1
  14. package/dist/assets/{ExecutionsInfoAccordion-GNoSEKPt.js → ExecutionsInfoAccordion-J0VUGzOg.js} +2 -2
  15. package/dist/assets/{ExecutionsInfoAccordion-GNoSEKPt.js.map → ExecutionsInfoAccordion-J0VUGzOg.js.map} +1 -1
  16. package/dist/assets/{ExecutionsLandingPage-bMbJUz4X.js → ExecutionsLandingPage-LNx1ct-F.js} +2 -2
  17. package/dist/assets/{ExecutionsLandingPage-bMbJUz4X.js.map → ExecutionsLandingPage-LNx1ct-F.js.map} +1 -1
  18. package/dist/assets/{ExecutionsList-VqMNpnno.js → ExecutionsList-1jr8ziaw.js} +2 -2
  19. package/dist/assets/ExecutionsList-1jr8ziaw.js.map +1 -0
  20. package/dist/assets/{ExecutionsView-cib3hepc.js → ExecutionsView-vfalxf-N.js} +2 -2
  21. package/dist/assets/{ExecutionsView-cib3hepc.js.map → ExecutionsView-vfalxf-N.js.map} +1 -1
  22. package/dist/assets/{FixedCollectionParameter-2NZhE0YP.js → FixedCollectionParameter-i4v0_RBC.js} +3 -3
  23. package/dist/assets/{FixedCollectionParameter-2NZhE0YP.js.map → FixedCollectionParameter-i4v0_RBC.js.map} +1 -1
  24. package/dist/assets/{ForgotMyPasswordView-JpQD0IzR.js → ForgotMyPasswordView-n-WXfUXB.js} +2 -2
  25. package/dist/assets/{ForgotMyPasswordView-JpQD0IzR.js.map → ForgotMyPasswordView-n-WXfUXB.js.map} +1 -1
  26. package/dist/assets/{MainHeader-_EB1A67D.js → MainHeader-it41_mme.js} +2 -2
  27. package/dist/assets/{MainHeader-_EB1A67D.js.map → MainHeader-it41_mme.js.map} +1 -1
  28. package/dist/assets/{MainSidebar-QaJ5uvnW.js → MainSidebar-K22ttpb5.js} +2 -2
  29. package/dist/assets/{MainSidebar-QaJ5uvnW.js.map → MainSidebar-K22ttpb5.js.map} +1 -1
  30. package/dist/assets/{NodeCreation-OxTpBRfP.js → NodeCreation-3pcb_BwC.js} +3 -3
  31. package/dist/assets/{NodeCreation-OxTpBRfP.js.map → NodeCreation-3pcb_BwC.js.map} +1 -1
  32. package/dist/assets/{NodeCreator-_GxUysbY.js → NodeCreator-r6gxY14d.js} +2 -2
  33. package/dist/assets/{NodeCreator-_GxUysbY.js.map → NodeCreator-r6gxY14d.js.map} +1 -1
  34. package/dist/assets/{NodeView-CdR2fi_x.js → NodeView-LzPrYfwG.js} +3 -3
  35. package/dist/assets/{NodeView-CdR2fi_x.js.map → NodeView-LzPrYfwG.js.map} +1 -1
  36. package/dist/assets/{ResourcesListLayout-XUIQQpyB.js → ResourcesListLayout-XbNZXU-j.js} +2 -2
  37. package/dist/assets/{ResourcesListLayout-XUIQQpyB.js.map → ResourcesListLayout-XbNZXU-j.js.map} +1 -1
  38. package/dist/assets/{RunDataAi-4m1wWDUf.js → RunDataAi-ueFTZBht.js} +2 -2
  39. package/dist/assets/{RunDataAi-4m1wWDUf.js.map → RunDataAi-ueFTZBht.js.map} +1 -1
  40. package/dist/assets/{RunDataJson-FZZoF8ao.js → RunDataJson-VFzb6R4m.js} +3 -3
  41. package/dist/assets/{RunDataJson-FZZoF8ao.js.map → RunDataJson-VFzb6R4m.js.map} +1 -1
  42. package/dist/assets/{RunDataJsonActions-LZGsgNyW.js → RunDataJsonActions-LDR8SlAW.js} +2 -2
  43. package/dist/assets/{RunDataJsonActions-LZGsgNyW.js.map → RunDataJsonActions-LDR8SlAW.js.map} +1 -1
  44. package/dist/assets/{RunDataSchema-wjyR7MiY.js → RunDataSchema-BB0j0bVA.js} +2 -2
  45. package/dist/assets/{RunDataSchema-wjyR7MiY.js.map → RunDataSchema-BB0j0bVA.js.map} +1 -1
  46. package/dist/assets/{RunDataTable-690SZ7_1.js → RunDataTable-Qas85Wnj.js} +2 -2
  47. package/dist/assets/{RunDataTable-690SZ7_1.js.map → RunDataTable-Qas85Wnj.js.map} +1 -1
  48. package/dist/assets/{SamlOnboarding-9tSVzIi2.js → SamlOnboarding-4D4QjACf.js} +2 -2
  49. package/dist/assets/{SamlOnboarding-9tSVzIi2.js.map → SamlOnboarding-4D4QjACf.js.map} +1 -1
  50. package/dist/assets/{SettingsApiView-95Wb-oA5.js → SettingsApiView-0Ne2kemN.js} +2 -2
  51. package/dist/assets/{SettingsApiView-95Wb-oA5.js.map → SettingsApiView-0Ne2kemN.js.map} +1 -1
  52. package/dist/assets/{SettingsCommunityNodesView-WW65T1Gl.js → SettingsCommunityNodesView-zzzz0aj6.js} +2 -2
  53. package/dist/assets/{SettingsCommunityNodesView-WW65T1Gl.js.map → SettingsCommunityNodesView-zzzz0aj6.js.map} +1 -1
  54. package/dist/assets/{SettingsExternalSecrets-6YJbQ8LH.js → SettingsExternalSecrets-bsdr9nMJ.js} +2 -2
  55. package/dist/assets/{SettingsExternalSecrets-6YJbQ8LH.js.map → SettingsExternalSecrets-bsdr9nMJ.js.map} +1 -1
  56. package/dist/assets/{SettingsFakeDoorView-6ZiGYnHw.js → SettingsFakeDoorView-0ioWE56l.js} +2 -2
  57. package/dist/assets/{SettingsFakeDoorView-6ZiGYnHw.js.map → SettingsFakeDoorView-0ioWE56l.js.map} +1 -1
  58. package/dist/assets/{SettingsLdapView-G9lNDLq4.js → SettingsLdapView-nV_D5CDp.js} +2 -2
  59. package/dist/assets/{SettingsLdapView-G9lNDLq4.js.map → SettingsLdapView-nV_D5CDp.js.map} +1 -1
  60. package/dist/assets/{SettingsLogStreamingView-hOxp5upg.js → SettingsLogStreamingView-GPC6oqoB.js} +2 -2
  61. package/dist/assets/{SettingsLogStreamingView-hOxp5upg.js.map → SettingsLogStreamingView-GPC6oqoB.js.map} +1 -1
  62. package/dist/assets/{SettingsSourceControl-A4p6uSTm.js → SettingsSourceControl-YlWPbedb.js} +2 -2
  63. package/dist/assets/{SettingsSourceControl-A4p6uSTm.js.map → SettingsSourceControl-YlWPbedb.js.map} +1 -1
  64. package/dist/assets/{SettingsSso-kXl38iOM.js → SettingsSso-o3FTQjpW.js} +2 -2
  65. package/dist/assets/{SettingsSso-kXl38iOM.js.map → SettingsSso-o3FTQjpW.js.map} +1 -1
  66. package/dist/assets/{SettingsUsageAndPlan-E00t5N2Z.js → SettingsUsageAndPlan-lypv7X6a.js} +2 -2
  67. package/dist/assets/{SettingsUsageAndPlan-E00t5N2Z.js.map → SettingsUsageAndPlan-lypv7X6a.js.map} +1 -1
  68. package/dist/assets/{SettingsUsersView-4PoSbZc_.js → SettingsUsersView-BP40GKuA.js} +2 -2
  69. package/dist/assets/{SettingsUsersView-4PoSbZc_.js.map → SettingsUsersView-BP40GKuA.js.map} +1 -1
  70. package/dist/assets/{SettingsView-ITSZzUOy.js → SettingsView-UI5wnO8B.js} +2 -2
  71. package/dist/assets/{SettingsView-ITSZzUOy.js.map → SettingsView-UI5wnO8B.js.map} +1 -1
  72. package/dist/assets/{SetupView-iFHyYLKM.js → SetupView-jUHcBldc.js} +2 -2
  73. package/dist/assets/{SetupView-iFHyYLKM.js.map → SetupView-jUHcBldc.js.map} +1 -1
  74. package/dist/assets/{SetupWorkflowFromTemplateView-1mq-ZIl2.js → SetupWorkflowFromTemplateView-xZok8Ro-.js} +2 -2
  75. package/dist/assets/{SetupWorkflowFromTemplateView-1mq-ZIl2.js.map → SetupWorkflowFromTemplateView-xZok8Ro-.js.map} +1 -1
  76. package/dist/assets/{SigninView-eqdMLCtk.js → SigninView-jH2VFMFu.js} +2 -2
  77. package/dist/assets/{SigninView-eqdMLCtk.js.map → SigninView-jH2VFMFu.js.map} +1 -1
  78. package/dist/assets/{SignupView-a26ywVgy.js → SignupView-cQJowW7M.js} +2 -2
  79. package/dist/assets/{SignupView-a26ywVgy.js.map → SignupView-cQJowW7M.js.map} +1 -1
  80. package/dist/assets/{TemplateDetails-neZvQLcE.js → TemplateDetails-FXwRGgg3.js} +2 -2
  81. package/dist/assets/{TemplateDetails-neZvQLcE.js.map → TemplateDetails-FXwRGgg3.js.map} +1 -1
  82. package/dist/assets/{TemplateList-apw79EVp.js → TemplateList-ygiFPwW5.js} +2 -2
  83. package/dist/assets/{TemplateList-apw79EVp.js.map → TemplateList-ygiFPwW5.js.map} +1 -1
  84. package/dist/assets/{TemplatesCollectionView-2NGTxXTg.js → TemplatesCollectionView-iJK5C7dQ.js} +2 -2
  85. package/dist/assets/{TemplatesCollectionView-2NGTxXTg.js.map → TemplatesCollectionView-iJK5C7dQ.js.map} +1 -1
  86. package/dist/assets/{TemplatesSearchView-0FL2pP83.js → TemplatesSearchView-HA2xad9U.js} +2 -2
  87. package/dist/assets/{TemplatesSearchView-0FL2pP83.js.map → TemplatesSearchView-HA2xad9U.js.map} +1 -1
  88. package/dist/assets/{TemplatesWorkflowView-D4Lnmnhg.js → TemplatesWorkflowView-KdHMuTUs.js} +2 -2
  89. package/dist/assets/{TemplatesWorkflowView-D4Lnmnhg.js.map → TemplatesWorkflowView-KdHMuTUs.js.map} +1 -1
  90. package/dist/assets/{VariablesView-tzHYYMLV.js → VariablesView-BGFOVdr1.js} +2 -2
  91. package/dist/assets/{VariablesView-tzHYYMLV.js.map → VariablesView-BGFOVdr1.js.map} +1 -1
  92. package/dist/assets/{WorkerView-AmUPKGBk.js → WorkerView-FnskutaO.js} +2 -2
  93. package/dist/assets/{WorkerView-AmUPKGBk.js.map → WorkerView-FnskutaO.js.map} +1 -1
  94. package/dist/assets/{WorkflowActivator-haTVfR4g.js → WorkflowActivator-B2Cg8gE_.js} +2 -2
  95. package/dist/assets/{WorkflowActivator-haTVfR4g.js.map → WorkflowActivator-B2Cg8gE_.js.map} +1 -1
  96. package/dist/assets/{WorkflowOnboardingView-azyuxv8R.js → WorkflowOnboardingView-ZBFcAyXB.js} +2 -2
  97. package/dist/assets/{WorkflowOnboardingView-azyuxv8R.js.map → WorkflowOnboardingView-ZBFcAyXB.js.map} +1 -1
  98. package/dist/assets/{WorkflowsView-oE-PnjgI.js → WorkflowsView-ZCzM_7eW.js} +2 -2
  99. package/dist/assets/{WorkflowsView-oE-PnjgI.js.map → WorkflowsView-ZCzM_7eW.js.map} +1 -1
  100. package/dist/assets/{cloud-TMu3mk45.js → cloud-B6sgy7jV.js} +2 -2
  101. package/dist/assets/{cloud-TMu3mk45.js.map → cloud-B6sgy7jV.js.map} +1 -1
  102. package/dist/assets/{executionsHelpers-jpam7Sff.js → executionsHelpers-8_uqSfWi.js} +2 -2
  103. package/dist/assets/{executionsHelpers-jpam7Sff.js.map → executionsHelpers-8_uqSfWi.js.map} +1 -1
  104. package/dist/assets/{index-hMVAffQ3.js → index-sMRiWGJS.js} +4 -4
  105. package/dist/assets/{index-hMVAffQ3.js.map → index-sMRiWGJS.js.map} +1 -1
  106. package/dist/assets/{pushConnection-NKwmlD0l.js → pushConnection-SP3wVlD4.js} +2 -2
  107. package/dist/assets/{pushConnection-NKwmlD0l.js.map → pushConnection-SP3wVlD4.js.map} +1 -1
  108. package/dist/assets/{useExecutionDebugging-WpRAbEhr.js → useExecutionDebugging-vYjc-e7j.js} +2 -2
  109. package/dist/assets/{useExecutionDebugging-WpRAbEhr.js.map → useExecutionDebugging-vYjc-e7j.js.map} +1 -1
  110. package/dist/assets/{workflowActivate-UB1_xc5U.js → workflowActivate-FonyQsS3.js} +2 -2
  111. package/dist/assets/{workflowActivate-UB1_xc5U.js.map → workflowActivate-FonyQsS3.js.map} +1 -1
  112. package/dist/index.html +1 -1
  113. package/package.json +1 -1
  114. package/dist/assets/ExecutionsList-VqMNpnno.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{H as j,J as K,w as V,ah as J}from"./index-hMVAffQ3.js";import{y as Y,v as z,cQ as X,u as Z,t as ee,O as te,l as se,Q as oe,R as re,aC as ae,dA as ie,d1 as ne,cS as ue,d5 as q}from"./n8n-NE7NqrvB.js";import{d as le,m as de}from"./pinia-IhuTtYiV.js";import{p as ce}from"./flatted-jPn12Tq4.js";import{u as he,a as we}from"./collaboration.store-lUjjktP5.js";import{G as fe}from"./vendor-2CfOYFi2.js";const pe="/orchestration/worker/status",ke=async e=>{await Y(e,"POST",pe)},ge=100,me=120*1e3,Se=le("orchestrationManager",{state:()=>({workers:{},workersHistory:{},workersLastUpdated:{},statusInterval:null}),actions:{updateWorkerStatus(e){this.workers[e.workerId]=e,this.workersHistory[e.workerId]||(this.workersHistory[e.workerId]=[]),this.workersHistory[e.workerId].push({data:e,timestamp:Date.now()}),this.workersHistory[e.workerId].length>ge&&this.workersHistory[e.workerId].shift(),this.workersLastUpdated[e.workerId]=Date.now()},removeStaleWorkers(){for(const e in this.workersLastUpdated)this.workersLastUpdated[e]+me<Date.now()&&(delete this.workers[e],delete this.workersHistory[e],delete this.workersLastUpdated[e])},startWorkerStatusPolling(){const e=z();this.statusInterval||(this.statusInterval=setInterval(async()=>{await ke(e.getRestApiContext),this.removeStaleWorkers()},1e3))},stopWorkerStatusPolling(){this.statusInterval&&(clearInterval(this.statusInterval),this.statusInterval=null)},getWorkerLastUpdated(e){return this.workersLastUpdated[e]??0},getWorkerStatus(e){return this.workers[e]},getWorkerStatusHistory(e){return this.workersHistory[e]??[]}}}),De=fe({setup(){return{...X(),...Z()}},created(){this.pushStore.addEventListener(e=>{this.pushMessageReceived(e)})},mixins:[j,K,V],data(){return{retryTimeout:null,pushMessageQueue:[]}},computed:{...de(re,oe,se,te,ee,J,Se,we,he),sessionId(){return this.rootStore.sessionId}},methods:{queuePushMessage(e,r){this.pushMessageQueue.push({message:e,retriesLeft:r}),this.retryTimeout===null&&(this.retryTimeout=setTimeout(this.processWaitingPushMessages,20))},async processWaitingPushMessages(){this.retryTimeout!==null&&(clearTimeout(this.retryTimeout),this.retryTimeout=null);const e=this.pushMessageQueue.length;for(let r=0;r<e;r++){const n=this.pushMessageQueue.shift();if(!await this.pushMessageReceived(n.message,!0)){n.retriesLeft-=1,n.retriesLeft>0&&this.pushMessageQueue.unshift(n);break}}this.pushMessageQueue.length!==0&&this.retryTimeout===null&&(this.retryTimeout=setTimeout(this.processWaitingPushMessages,25))},async pushMessageReceived(e,r){var f,g,m,S,x,y,E,T,I,N,D,M,v,W,A,b,R,C,L,$,O,P,H,_,U,F,Q,G;if(e.type==="sendWorkerStatusMessage"){const s=e.data;return this.orchestrationManagerStore.updateWorkerStatus(s.status),!0}if(e.type==="sendConsoleMessage"){const s=e.data;return console.log(s.source,...s.messages),!0}if(!["testWebhookReceived"].includes(e.type)&&r!==!0&&this.pushMessageQueue.length)return this.queuePushMessage(e,5),!1;if(e.type==="nodeExecuteAfter"||e.type==="nodeExecuteBefore"){if(!this.uiStore.isActionActive("workflowRunning"))return!1;const s=e.data;if(this.workflowsStore.activeExecutionId!==s.executionId)return r!==!0&&this.queuePushMessage(event,5),!1}let c;if(e.type==="executionRecovered"){const s=(f=e.data)==null?void 0:f.executionId;if(this.uiStore.isActionActive("workflowRunning")&&this.workflowsStore.activeExecutionId===s){const t=await this.workflowsStore.fetchExecutionDataById(this.workflowsStore.activeExecutionId);if(t!=null&&t.data){t.data=ce(t.data);const d={startData:(g=t.data)==null?void 0:g.startData,resultData:((m=t.data)==null?void 0:m.resultData)??{runData:{}},executionData:(S=t.data)==null?void 0:S.executionData};if(((x=this.workflowsStore.workflowExecutionData)==null?void 0:x.workflowId)===t.workflowId){const u=(T=(E=(y=this.workflowsStore.workflowExecutionData)==null?void 0:y.data)==null?void 0:E.resultData)==null?void 0:T.runData;if(u)for(const w of Object.keys(u))d.resultData.runData[w]=u[w]}const p={data:d,finished:t.finished,mode:t.mode,waitTill:(I=t.data)==null?void 0:I.waitTill,startedAt:t.startedAt,stoppedAt:t.stoppedAt,status:"crashed"};t.data&&(c={executionId:t.id,data:p})}}}if(e.type==="workflowFailedToActivate"&&this.workflowsStore.workflowId===e.data.workflowId)return this.workflowsStore.setWorkflowInactive(e.data.workflowId),this.workflowsStore.setActive(!1),this.showError(new Error(e.data.errorMessage),this.$locale.baseText("workflowActivator.showError.title",{interpolate:{newStateName:"activated"}})+":"),!0;if(e.type==="workflowActivated")return this.workflowsStore.setWorkflowActive(e.data.workflowId),!0;if(e.type==="workflowDeactivated")return this.workflowsStore.setWorkflowInactive(e.data.workflowId),!0;if(e.type==="executionFinished"||e.type==="executionRecovered"){let s;if(e.type==="executionRecovered"&&c!==void 0?s=c:s=e.data,this.workflowsStore.activeExecutionId===s.executionId){const o=(M=(D=(N=this.workflowsStore.workflowExecutionData)==null?void 0:N.data)==null?void 0:D.resultData)==null?void 0:M.runData;if(o)for(const a of Object.keys(o))((L=(C=(R=(b=(A=(W=(v=s.data.data.resultData.runData[a])==null?void 0:v[0])==null?void 0:W.data)==null?void 0:A.main)==null?void 0:b[0])==null?void 0:R[0])==null?void 0:C.json)==null?void 0:L.isArtificialRecoveredEventItem)===!0&&o[a].length>0&&(s.data.data.resultData.runData[a]=o[a]);this.workflowsStore.finishActiveExecution(s)}if(!this.uiStore.isActionActive("workflowRunning"))return!1;const{activeExecutionId:h}=this.workflowsStore;if(h!==s.executionId)return r!==!0&&this.queuePushMessage(event,5),!1;const t=s.data;let d=this.getExecutionError(t.data);t.status==="crashed"?d=this.$locale.baseText("pushConnection.executionFailed.message"):t.status==="canceled"&&(d=this.$locale.baseText("executionsList.showMessage.stopExecution.message",{interpolate:{activeExecutionId:h}}));const p=(P=(O=($=t==null?void 0:t.data)==null?void 0:$.resultData)==null?void 0:O.error)==null?void 0:P.lineNumber;ae.emit("error-line-number",p||"final");const u=this.getCurrentWorkflow();if(t.waitTill!==void 0){const o=this.workflowsStore.activeExecutionId,a=this.workflowsStore.workflowSettings,i=this.rootStore.saveManualExecutions,l=a.saveManualExecutions===void 0?i:a.saveManualExecutions;let k;l?k=`<a href="/workflow/${u.id}/executions/${o}">View the execution</a> to see what happened after this node.`:(ie.emit("registerGlobalLinkAction",{key:"open-settings",action:async()=>{this.workflowsStore.isNewWorkflow&&await this.saveAsNewWorkflow(),this.uiStore.openModal(ne)}}),k='<a data-action="open-settings">Turn on saving manual executions</a> and run again to see what happened after this node.'),this.titleSet(u.name,"IDLE"),this.showToast({title:"Workflow started waiting",message:`${k} <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/" target="_blank">More info</a>`,type:"success",duration:0})}else if(t.finished!==!0){if(this.titleSet(u.name,"ERROR"),((H=t.data.resultData.error)==null?void 0:H.name)==="ExpressionError"&&t.data.resultData.error.context.functionality==="pairedItem"){const o=t.data.resultData.error;this.getWorkflowDataToSave().then(a=>{const i={caused_by_credential:!1,error_message:o.description,error_title:o.message,error_type:o.context.type,node_graph_string:JSON.stringify(ue(a,this.getNodeTypes()).nodeGraph),workflow_id:this.workflowsStore.workflowId};if(o.context.nodeCause&&["no pairing info","invalid pairing info"].includes(o.context.type)){const l=u.getNode(o.context.nodeCause);l&&(i.is_pinned=!!u.getPinDataOfNode(l.name),i.mode=l.parameters.mode,i.node_type=l.type,i.operation=l.parameters.operation,i.resource=l.parameters.resource)}this.$telemetry.track("Instance FE emitted paired item error",i,{withPostHog:!0})})}if(((_=t.data.resultData.error)==null?void 0:_.name)==="SubworkflowOperationError"){const o=t.data.resultData.error;this.workflowsStore.subWorkflowExecutionError=o,this.showMessage({title:o.message,message:o.description,type:"error",duration:0})}else if(((U=t.data.resultData.error)==null?void 0:U.name)==="NodeOperationError"&&t.data.resultData.error.functionality==="configuration-node"){let o;const a=t.data.resultData.error;a.node.name?o=`Error in sub-node ‘${a.node.name}‘`:o="Problem executing workflow",this.showMessage({title:o,message:((a==null?void 0:a.description)??d)+this.$locale.baseText("pushConnection.executionError.openNode",{interpolate:{node:a.node.name}}),type:"error",duration:0,dangerouslyUseHTMLString:!0})}else{let o;t.mode==="manual"&&t.status==="canceled"?this.showMessage({title:this.$locale.baseText("nodeView.showMessage.stopExecutionTry.title"),type:"success"}):(t.data.resultData.lastNodeExecuted?o=`Problem in node ‘${t.data.resultData.lastNodeExecuted}‘`:o="Problem executing workflow",this.showMessage({title:o,message:d,type:"error",duration:0,dangerouslyUseHTMLString:!0}))}}else{this.titleSet(u.name,"IDLE");const o=this.workflowsStore.getWorkflowExecution;if(o!=null&&o.executedNode){const a=this.workflowsStore.getNodeByName(o.executedNode),i=a&&this.nodeTypesStore.getNodeType(a.type,a.typeVersion),l=o&&o.executedNode&&((G=(Q=(F=o.data)==null?void 0:F.resultData)==null?void 0:Q.runData)==null?void 0:G[o.executedNode]);i!=null&&i.polling&&!l?this.showMessage({title:this.$locale.baseText("pushConnection.pollingNode.dataNotFound",{interpolate:{service:q(i)}}),message:this.$locale.baseText("pushConnection.pollingNode.dataNotFound.message",{interpolate:{service:q(i)}}),type:"success"}):this.showMessage({title:this.$locale.baseText("pushConnection.nodeExecutedSuccessfully"),type:"success"})}else this.showMessage({title:this.$locale.baseText("pushConnection.workflowExecutedSuccessfully"),type:"success"})}this.workflowsStore.getWorkflowRunData&&(t.data.resultData.runData=this.workflowsStore.getWorkflowRunData),this.workflowsStore.executingNode.length=0,this.workflowsStore.setWorkflowExecutionData(t),this.uiStore.removeActiveAction("workflowRunning"),this.updateNodesExecutionIssues();const w=t.data.resultData.lastNodeExecuted;let B=0;w&&t.data.resultData.runData[w]&&!d&&(B=t.data.resultData.runData[w][0].data.main[0].length),this.$externalHooks().run("pushConnection.executionFinished",{itemsCount:B,nodeName:t.data.resultData.lastNodeExecuted,errorMessage:d,runDataExecutedStartData:t.data.startData,resultDataError:t.data.resultData.error}),t.data.resultData.error||this.segmentStore.trackSuccessfulWorkflowExecution(t)}else if(e.type==="executionStarted"){const s=e.data,h={id:s.executionId,finished:!1,mode:s.mode,startedAt:s.startedAt,retryOf:s.retryOf,workflowId:s.workflowId,workflowName:s.workflowName};this.workflowsStore.addActiveExecution(h)}else if(e.type==="nodeExecuteAfter"){const s=e.data;this.workflowsStore.addNodeExecutionData(s),this.workflowsStore.removeExecutingNode(s.nodeName)}else if(e.type==="nodeExecuteBefore"){const s=e.data;this.workflowsStore.addExecutingNode(s.nodeName)}else if(e.type==="testWebhookDeleted")e.data.workflowId===this.workflowsStore.workflowId&&(this.workflowsStore.executionWaitingForWebhook=!1,this.uiStore.removeActiveAction("workflowRunning"));else if(e.type==="testWebhookReceived"){const s=e.data;s.workflowId===this.workflowsStore.workflowId&&(this.workflowsStore.executionWaitingForWebhook=!1,this.workflowsStore.activeExecutionId=s.executionId),this.processWaitingPushMessages()}else if(e.type==="reloadNodeType")await this.nodeTypesStore.getNodeTypes(),await this.nodeTypesStore.getFullNodesProperties([e.data]);else if(e.type==="removeNodeType"){const h=[e.data];await this.credentialsStore.fetchCredentialTypes(!1).then(()=>{this.nodeTypesStore.removeNodeTypes(h)})}else e.type==="nodeDescriptionUpdated"&&(await this.nodeTypesStore.getNodeTypes(),await this.credentialsStore.fetchCredentialTypes(!0));return!0},getExecutionError(e){const r=e.resultData.error;let n;if(e.resultData.lastNodeExecuted&&r)n=r.message||r.description;else if(n=this.$locale.baseText("pushConnection.executionError",{interpolate:{error:"!"}}),r!=null&&r.message){let c;"node"in r&&(c=typeof r.node=="string"?r.node:r.node.name);const f=c?`${c}: ${r.message}`:r.message;n=this.$locale.baseText("pushConnection.executionError",{interpolate:{error:`.${this.$locale.baseText("pushConnection.executionError.details",{interpolate:{details:f}})}`}})}return n}}});export{ge as W,De as p,Se as u};
2
- //# sourceMappingURL=pushConnection-NKwmlD0l.js.map
1
+ import{H as j,J as K,w as V,ah as J}from"./index-sMRiWGJS.js";import{y as Y,v as z,cQ as X,u as Z,t as ee,O as te,l as se,Q as oe,R as re,aC as ae,dA as ie,d1 as ne,cS as ue,d5 as q}from"./n8n-NE7NqrvB.js";import{d as le,m as de}from"./pinia-IhuTtYiV.js";import{p as ce}from"./flatted-jPn12Tq4.js";import{u as he,a as we}from"./collaboration.store-lUjjktP5.js";import{G as fe}from"./vendor-2CfOYFi2.js";const pe="/orchestration/worker/status",ke=async e=>{await Y(e,"POST",pe)},ge=100,me=120*1e3,Se=le("orchestrationManager",{state:()=>({workers:{},workersHistory:{},workersLastUpdated:{},statusInterval:null}),actions:{updateWorkerStatus(e){this.workers[e.workerId]=e,this.workersHistory[e.workerId]||(this.workersHistory[e.workerId]=[]),this.workersHistory[e.workerId].push({data:e,timestamp:Date.now()}),this.workersHistory[e.workerId].length>ge&&this.workersHistory[e.workerId].shift(),this.workersLastUpdated[e.workerId]=Date.now()},removeStaleWorkers(){for(const e in this.workersLastUpdated)this.workersLastUpdated[e]+me<Date.now()&&(delete this.workers[e],delete this.workersHistory[e],delete this.workersLastUpdated[e])},startWorkerStatusPolling(){const e=z();this.statusInterval||(this.statusInterval=setInterval(async()=>{await ke(e.getRestApiContext),this.removeStaleWorkers()},1e3))},stopWorkerStatusPolling(){this.statusInterval&&(clearInterval(this.statusInterval),this.statusInterval=null)},getWorkerLastUpdated(e){return this.workersLastUpdated[e]??0},getWorkerStatus(e){return this.workers[e]},getWorkerStatusHistory(e){return this.workersHistory[e]??[]}}}),De=fe({setup(){return{...X(),...Z()}},created(){this.pushStore.addEventListener(e=>{this.pushMessageReceived(e)})},mixins:[j,K,V],data(){return{retryTimeout:null,pushMessageQueue:[]}},computed:{...de(re,oe,se,te,ee,J,Se,we,he),sessionId(){return this.rootStore.sessionId}},methods:{queuePushMessage(e,r){this.pushMessageQueue.push({message:e,retriesLeft:r}),this.retryTimeout===null&&(this.retryTimeout=setTimeout(this.processWaitingPushMessages,20))},async processWaitingPushMessages(){this.retryTimeout!==null&&(clearTimeout(this.retryTimeout),this.retryTimeout=null);const e=this.pushMessageQueue.length;for(let r=0;r<e;r++){const n=this.pushMessageQueue.shift();if(!await this.pushMessageReceived(n.message,!0)){n.retriesLeft-=1,n.retriesLeft>0&&this.pushMessageQueue.unshift(n);break}}this.pushMessageQueue.length!==0&&this.retryTimeout===null&&(this.retryTimeout=setTimeout(this.processWaitingPushMessages,25))},async pushMessageReceived(e,r){var f,g,m,S,x,y,E,T,I,N,D,M,v,W,A,b,R,C,L,$,O,P,H,_,U,F,Q,G;if(e.type==="sendWorkerStatusMessage"){const s=e.data;return this.orchestrationManagerStore.updateWorkerStatus(s.status),!0}if(e.type==="sendConsoleMessage"){const s=e.data;return console.log(s.source,...s.messages),!0}if(!["testWebhookReceived"].includes(e.type)&&r!==!0&&this.pushMessageQueue.length)return this.queuePushMessage(e,5),!1;if(e.type==="nodeExecuteAfter"||e.type==="nodeExecuteBefore"){if(!this.uiStore.isActionActive("workflowRunning"))return!1;const s=e.data;if(this.workflowsStore.activeExecutionId!==s.executionId)return r!==!0&&this.queuePushMessage(event,5),!1}let c;if(e.type==="executionRecovered"){const s=(f=e.data)==null?void 0:f.executionId;if(this.uiStore.isActionActive("workflowRunning")&&this.workflowsStore.activeExecutionId===s){const t=await this.workflowsStore.fetchExecutionDataById(this.workflowsStore.activeExecutionId);if(t!=null&&t.data){t.data=ce(t.data);const d={startData:(g=t.data)==null?void 0:g.startData,resultData:((m=t.data)==null?void 0:m.resultData)??{runData:{}},executionData:(S=t.data)==null?void 0:S.executionData};if(((x=this.workflowsStore.workflowExecutionData)==null?void 0:x.workflowId)===t.workflowId){const u=(T=(E=(y=this.workflowsStore.workflowExecutionData)==null?void 0:y.data)==null?void 0:E.resultData)==null?void 0:T.runData;if(u)for(const w of Object.keys(u))d.resultData.runData[w]=u[w]}const p={data:d,finished:t.finished,mode:t.mode,waitTill:(I=t.data)==null?void 0:I.waitTill,startedAt:t.startedAt,stoppedAt:t.stoppedAt,status:"crashed"};t.data&&(c={executionId:t.id,data:p})}}}if(e.type==="workflowFailedToActivate"&&this.workflowsStore.workflowId===e.data.workflowId)return this.workflowsStore.setWorkflowInactive(e.data.workflowId),this.workflowsStore.setActive(!1),this.showError(new Error(e.data.errorMessage),this.$locale.baseText("workflowActivator.showError.title",{interpolate:{newStateName:"activated"}})+":"),!0;if(e.type==="workflowActivated")return this.workflowsStore.setWorkflowActive(e.data.workflowId),!0;if(e.type==="workflowDeactivated")return this.workflowsStore.setWorkflowInactive(e.data.workflowId),!0;if(e.type==="executionFinished"||e.type==="executionRecovered"){let s;if(e.type==="executionRecovered"&&c!==void 0?s=c:s=e.data,this.workflowsStore.activeExecutionId===s.executionId){const o=(M=(D=(N=this.workflowsStore.workflowExecutionData)==null?void 0:N.data)==null?void 0:D.resultData)==null?void 0:M.runData;if(o)for(const a of Object.keys(o))((L=(C=(R=(b=(A=(W=(v=s.data.data.resultData.runData[a])==null?void 0:v[0])==null?void 0:W.data)==null?void 0:A.main)==null?void 0:b[0])==null?void 0:R[0])==null?void 0:C.json)==null?void 0:L.isArtificialRecoveredEventItem)===!0&&o[a].length>0&&(s.data.data.resultData.runData[a]=o[a]);this.workflowsStore.finishActiveExecution(s)}if(!this.uiStore.isActionActive("workflowRunning"))return!1;const{activeExecutionId:h}=this.workflowsStore;if(h!==s.executionId)return r!==!0&&this.queuePushMessage(event,5),!1;const t=s.data;let d=this.getExecutionError(t.data);t.status==="crashed"?d=this.$locale.baseText("pushConnection.executionFailed.message"):t.status==="canceled"&&(d=this.$locale.baseText("executionsList.showMessage.stopExecution.message",{interpolate:{activeExecutionId:h}}));const p=(P=(O=($=t==null?void 0:t.data)==null?void 0:$.resultData)==null?void 0:O.error)==null?void 0:P.lineNumber;ae.emit("error-line-number",p||"final");const u=this.getCurrentWorkflow();if(t.waitTill!==void 0){const o=this.workflowsStore.activeExecutionId,a=this.workflowsStore.workflowSettings,i=this.rootStore.saveManualExecutions,l=a.saveManualExecutions===void 0?i:a.saveManualExecutions;let k;l?k=`<a href="/workflow/${u.id}/executions/${o}">View the execution</a> to see what happened after this node.`:(ie.emit("registerGlobalLinkAction",{key:"open-settings",action:async()=>{this.workflowsStore.isNewWorkflow&&await this.saveAsNewWorkflow(),this.uiStore.openModal(ne)}}),k='<a data-action="open-settings">Turn on saving manual executions</a> and run again to see what happened after this node.'),this.titleSet(u.name,"IDLE"),this.showToast({title:"Workflow started waiting",message:`${k} <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/" target="_blank">More info</a>`,type:"success",duration:0})}else if(t.finished!==!0){if(this.titleSet(u.name,"ERROR"),((H=t.data.resultData.error)==null?void 0:H.name)==="ExpressionError"&&t.data.resultData.error.context.functionality==="pairedItem"){const o=t.data.resultData.error;this.getWorkflowDataToSave().then(a=>{const i={caused_by_credential:!1,error_message:o.description,error_title:o.message,error_type:o.context.type,node_graph_string:JSON.stringify(ue(a,this.getNodeTypes()).nodeGraph),workflow_id:this.workflowsStore.workflowId};if(o.context.nodeCause&&["no pairing info","invalid pairing info"].includes(o.context.type)){const l=u.getNode(o.context.nodeCause);l&&(i.is_pinned=!!u.getPinDataOfNode(l.name),i.mode=l.parameters.mode,i.node_type=l.type,i.operation=l.parameters.operation,i.resource=l.parameters.resource)}this.$telemetry.track("Instance FE emitted paired item error",i,{withPostHog:!0})})}if(((_=t.data.resultData.error)==null?void 0:_.name)==="SubworkflowOperationError"){const o=t.data.resultData.error;this.workflowsStore.subWorkflowExecutionError=o,this.showMessage({title:o.message,message:o.description,type:"error",duration:0})}else if(((U=t.data.resultData.error)==null?void 0:U.name)==="NodeOperationError"&&t.data.resultData.error.functionality==="configuration-node"){let o;const a=t.data.resultData.error;a.node.name?o=`Error in sub-node ‘${a.node.name}‘`:o="Problem executing workflow",this.showMessage({title:o,message:((a==null?void 0:a.description)??d)+this.$locale.baseText("pushConnection.executionError.openNode",{interpolate:{node:a.node.name}}),type:"error",duration:0,dangerouslyUseHTMLString:!0})}else{let o;t.mode==="manual"&&t.status==="canceled"?this.showMessage({title:this.$locale.baseText("nodeView.showMessage.stopExecutionTry.title"),type:"success"}):(t.data.resultData.lastNodeExecuted?o=`Problem in node ‘${t.data.resultData.lastNodeExecuted}‘`:o="Problem executing workflow",this.showMessage({title:o,message:d,type:"error",duration:0,dangerouslyUseHTMLString:!0}))}}else{this.titleSet(u.name,"IDLE");const o=this.workflowsStore.getWorkflowExecution;if(o!=null&&o.executedNode){const a=this.workflowsStore.getNodeByName(o.executedNode),i=a&&this.nodeTypesStore.getNodeType(a.type,a.typeVersion),l=o&&o.executedNode&&((G=(Q=(F=o.data)==null?void 0:F.resultData)==null?void 0:Q.runData)==null?void 0:G[o.executedNode]);i!=null&&i.polling&&!l?this.showMessage({title:this.$locale.baseText("pushConnection.pollingNode.dataNotFound",{interpolate:{service:q(i)}}),message:this.$locale.baseText("pushConnection.pollingNode.dataNotFound.message",{interpolate:{service:q(i)}}),type:"success"}):this.showMessage({title:this.$locale.baseText("pushConnection.nodeExecutedSuccessfully"),type:"success"})}else this.showMessage({title:this.$locale.baseText("pushConnection.workflowExecutedSuccessfully"),type:"success"})}this.workflowsStore.getWorkflowRunData&&(t.data.resultData.runData=this.workflowsStore.getWorkflowRunData),this.workflowsStore.executingNode.length=0,this.workflowsStore.setWorkflowExecutionData(t),this.uiStore.removeActiveAction("workflowRunning"),this.updateNodesExecutionIssues();const w=t.data.resultData.lastNodeExecuted;let B=0;w&&t.data.resultData.runData[w]&&!d&&(B=t.data.resultData.runData[w][0].data.main[0].length),this.$externalHooks().run("pushConnection.executionFinished",{itemsCount:B,nodeName:t.data.resultData.lastNodeExecuted,errorMessage:d,runDataExecutedStartData:t.data.startData,resultDataError:t.data.resultData.error}),t.data.resultData.error||this.segmentStore.trackSuccessfulWorkflowExecution(t)}else if(e.type==="executionStarted"){const s=e.data,h={id:s.executionId,finished:!1,mode:s.mode,startedAt:s.startedAt,retryOf:s.retryOf,workflowId:s.workflowId,workflowName:s.workflowName};this.workflowsStore.addActiveExecution(h)}else if(e.type==="nodeExecuteAfter"){const s=e.data;this.workflowsStore.addNodeExecutionData(s),this.workflowsStore.removeExecutingNode(s.nodeName)}else if(e.type==="nodeExecuteBefore"){const s=e.data;this.workflowsStore.addExecutingNode(s.nodeName)}else if(e.type==="testWebhookDeleted")e.data.workflowId===this.workflowsStore.workflowId&&(this.workflowsStore.executionWaitingForWebhook=!1,this.uiStore.removeActiveAction("workflowRunning"));else if(e.type==="testWebhookReceived"){const s=e.data;s.workflowId===this.workflowsStore.workflowId&&(this.workflowsStore.executionWaitingForWebhook=!1,this.workflowsStore.activeExecutionId=s.executionId),this.processWaitingPushMessages()}else if(e.type==="reloadNodeType")await this.nodeTypesStore.getNodeTypes(),await this.nodeTypesStore.getFullNodesProperties([e.data]);else if(e.type==="removeNodeType"){const h=[e.data];await this.credentialsStore.fetchCredentialTypes(!1).then(()=>{this.nodeTypesStore.removeNodeTypes(h)})}else e.type==="nodeDescriptionUpdated"&&(await this.nodeTypesStore.getNodeTypes(),await this.credentialsStore.fetchCredentialTypes(!0));return!0},getExecutionError(e){const r=e.resultData.error;let n;if(e.resultData.lastNodeExecuted&&r)n=r.message||r.description;else if(n=this.$locale.baseText("pushConnection.executionError",{interpolate:{error:"!"}}),r!=null&&r.message){let c;"node"in r&&(c=typeof r.node=="string"?r.node:r.node.name);const f=c?`${c}: ${r.message}`:r.message;n=this.$locale.baseText("pushConnection.executionError",{interpolate:{error:`.${this.$locale.baseText("pushConnection.executionError.details",{interpolate:{details:f}})}`}})}return n}}});export{ge as W,De as p,Se as u};
2
+ //# sourceMappingURL=pushConnection-SP3wVlD4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pushConnection-NKwmlD0l.js","sources":["../../src/api/orchestration.ts","../../src/stores/orchestration.store.ts","../../src/mixins/pushConnection.ts"],"sourcesContent":["import type { IRestApiContext } from '@/Interface';\nimport { makeRestApiRequest } from '@/utils/apiUtils';\n\nconst GET_STATUS_ENDPOINT = '/orchestration/worker/status';\n\nexport const sendGetWorkerStatus = async (context: IRestApiContext): Promise<void> => {\n\tawait makeRestApiRequest(context, 'POST', GET_STATUS_ENDPOINT);\n};\n","import { defineStore } from 'pinia';\nimport type { IPushDataWorkerStatusPayload } from '../Interface';\nimport { useRootStore } from './n8nRoot.store';\nimport { sendGetWorkerStatus } from '../api/orchestration';\n\nexport const WORKER_HISTORY_LENGTH = 100;\nconst STALE_SECONDS = 120 * 1000;\n\nexport interface IOrchestrationStoreState {\n\tworkers: { [id: string]: IPushDataWorkerStatusPayload };\n\tworkersHistory: {\n\t\t[id: string]: IWorkerHistoryItem[];\n\t};\n\tworkersLastUpdated: { [id: string]: number };\n\tstatusInterval: NodeJS.Timer | null;\n}\n\nexport interface IWorkerHistoryItem {\n\ttimestamp: number;\n\tdata: IPushDataWorkerStatusPayload;\n}\n\nexport const useOrchestrationStore = defineStore('orchestrationManager', {\n\tstate: (): IOrchestrationStoreState => ({\n\t\tworkers: {},\n\t\tworkersHistory: {},\n\t\tworkersLastUpdated: {},\n\t\tstatusInterval: null,\n\t}),\n\tactions: {\n\t\tupdateWorkerStatus(data: IPushDataWorkerStatusPayload) {\n\t\t\tthis.workers[data.workerId] = data;\n\t\t\tif (!this.workersHistory[data.workerId]) {\n\t\t\t\tthis.workersHistory[data.workerId] = [];\n\t\t\t}\n\t\t\tthis.workersHistory[data.workerId].push({ data, timestamp: Date.now() });\n\t\t\tif (this.workersHistory[data.workerId].length > WORKER_HISTORY_LENGTH) {\n\t\t\t\tthis.workersHistory[data.workerId].shift();\n\t\t\t}\n\t\t\tthis.workersLastUpdated[data.workerId] = Date.now();\n\t\t},\n\t\tremoveStaleWorkers() {\n\t\t\tfor (const id in this.workersLastUpdated) {\n\t\t\t\tif (this.workersLastUpdated[id] + STALE_SECONDS < Date.now()) {\n\t\t\t\t\tdelete this.workers[id];\n\t\t\t\t\tdelete this.workersHistory[id];\n\t\t\t\t\tdelete this.workersLastUpdated[id];\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tstartWorkerStatusPolling() {\n\t\t\tconst rootStore = useRootStore();\n\t\t\tif (!this.statusInterval) {\n\t\t\t\tthis.statusInterval = setInterval(async () => {\n\t\t\t\t\tawait sendGetWorkerStatus(rootStore.getRestApiContext);\n\t\t\t\t\tthis.removeStaleWorkers();\n\t\t\t\t}, 1000);\n\t\t\t}\n\t\t},\n\t\tstopWorkerStatusPolling() {\n\t\t\tif (this.statusInterval) {\n\t\t\t\tclearInterval(this.statusInterval);\n\t\t\t\tthis.statusInterval = null;\n\t\t\t}\n\t\t},\n\t\tgetWorkerLastUpdated(workerId: string): number {\n\t\t\treturn this.workersLastUpdated[workerId] ?? 0;\n\t\t},\n\t\tgetWorkerStatus(workerId: string): IPushDataWorkerStatusPayload | undefined {\n\t\t\treturn this.workers[workerId];\n\t\t},\n\t\tgetWorkerStatusHistory(workerId: string): IWorkerHistoryItem[] {\n\t\t\treturn this.workersHistory[workerId] ?? [];\n\t\t},\n\t},\n});\n","import type {\n\tIExecutionResponse,\n\tIExecutionsCurrentSummaryExtended,\n\tIPushData,\n\tIPushDataExecutionFinished,\n} from '@/Interface';\n\nimport { externalHooks } from '@/mixins/externalHooks';\nimport { nodeHelpers } from '@/mixins/nodeHelpers';\nimport { useTitleChange } from '@/composables/useTitleChange';\nimport { useToast } from '@/composables/useToast';\nimport { workflowHelpers } from '@/mixins/workflowHelpers';\n\nimport type {\n\tExpressionError,\n\tIDataObject,\n\tINodeTypeNameVersion,\n\tIRun,\n\tIRunExecutionData,\n\tIWorkflowBase,\n\tSubworkflowOperationError,\n\tIExecuteContextData,\n\tNodeOperationError,\n} from 'n8n-workflow';\nimport { TelemetryHelpers } from 'n8n-workflow';\n\nimport { WORKFLOW_SETTINGS_MODAL_KEY } from '@/constants';\nimport { getTriggerNodeServiceName } from '@/utils/nodeTypesUtils';\nimport { codeNodeEditorEventBus, globalLinkActionsEventBus } from '@/event-bus';\nimport { mapStores } from 'pinia';\nimport { useUIStore } from '@/stores/ui.store';\nimport { useWorkflowsStore } from '@/stores/workflows.store';\nimport { useNodeTypesStore } from '@/stores/nodeTypes.store';\nimport { useCredentialsStore } from '@/stores/credentials.store';\nimport { useSettingsStore } from '@/stores/settings.store';\nimport { parse } from 'flatted';\nimport { useSegment } from '@/stores/segment.store';\nimport { defineComponent } from 'vue';\nimport { useOrchestrationStore } from '@/stores/orchestration.store';\nimport { usePushConnectionStore } from '@/stores/pushConnection.store';\nimport { useCollaborationStore } from '@/stores/collaboration.store';\n\nexport const pushConnection = defineComponent({\n\tsetup() {\n\t\treturn {\n\t\t\t...useTitleChange(),\n\t\t\t...useToast(),\n\t\t};\n\t},\n\tcreated() {\n\t\tthis.pushStore.addEventListener((message) => {\n\t\t\tvoid this.pushMessageReceived(message);\n\t\t});\n\t},\n\tmixins: [externalHooks, nodeHelpers, workflowHelpers],\n\tdata() {\n\t\treturn {\n\t\t\tretryTimeout: null as NodeJS.Timeout | null,\n\t\t\tpushMessageQueue: [] as Array<{ message: IPushData; retriesLeft: number }>,\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapStores(\n\t\t\tuseCredentialsStore,\n\t\t\tuseNodeTypesStore,\n\t\t\tuseUIStore,\n\t\t\tuseWorkflowsStore,\n\t\t\tuseSettingsStore,\n\t\t\tuseSegment,\n\t\t\tuseOrchestrationStore,\n\t\t\tusePushConnectionStore,\n\t\t\tuseCollaborationStore,\n\t\t),\n\t\tsessionId(): string {\n\t\t\treturn this.rootStore.sessionId;\n\t\t},\n\t},\n\tmethods: {\n\t\t/**\n\t\t * Sometimes the push message is faster as the result from\n\t\t * the REST API so we do not know yet what execution ID\n\t\t * is currently active. So internally resend the message\n\t\t * a few more times\n\t\t */\n\t\tqueuePushMessage(event: IPushData, retryAttempts: number) {\n\t\t\tthis.pushMessageQueue.push({ message: event, retriesLeft: retryAttempts });\n\n\t\t\tif (this.retryTimeout === null) {\n\t\t\t\tthis.retryTimeout = setTimeout(this.processWaitingPushMessages, 20);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Process the push messages which are waiting in the queue\n\t\t */\n\t\tasync processWaitingPushMessages() {\n\t\t\tif (this.retryTimeout !== null) {\n\t\t\t\tclearTimeout(this.retryTimeout);\n\t\t\t\tthis.retryTimeout = null;\n\t\t\t}\n\n\t\t\tconst queueLength = this.pushMessageQueue.length;\n\t\t\tfor (let i = 0; i < queueLength; i++) {\n\t\t\t\tconst messageData = this.pushMessageQueue.shift();\n\n\t\t\t\tconst result = await this.pushMessageReceived(messageData!.message, true);\n\t\t\t\tif (!result) {\n\t\t\t\t\t// Was not successful\n\t\t\t\t\tmessageData!.retriesLeft -= 1;\n\n\t\t\t\t\tif (messageData!.retriesLeft > 0) {\n\t\t\t\t\t\t// If still retries are left add it back and stop execution\n\t\t\t\t\t\tthis.pushMessageQueue.unshift(messageData!);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.pushMessageQueue.length !== 0 && this.retryTimeout === null) {\n\t\t\t\tthis.retryTimeout = setTimeout(this.processWaitingPushMessages, 25);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Process a newly received message\n\t\t */\n\t\tasync pushMessageReceived(receivedData: IPushData, isRetry?: boolean): Promise<boolean> {\n\t\t\tconst retryAttempts = 5;\n\n\t\t\tif (receivedData.type === 'sendWorkerStatusMessage') {\n\t\t\t\tconst pushData = receivedData.data;\n\t\t\t\tthis.orchestrationManagerStore.updateWorkerStatus(pushData.status);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (receivedData.type === 'sendConsoleMessage') {\n\t\t\t\tconst pushData = receivedData.data;\n\t\t\t\tconsole.log(pushData.source, ...pushData.messages);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t!['testWebhookReceived'].includes(receivedData.type) &&\n\t\t\t\tisRetry !== true &&\n\t\t\t\tthis.pushMessageQueue.length\n\t\t\t) {\n\t\t\t\t// If there are already messages in the queue add the new one that all of them\n\t\t\t\t// get executed in order\n\t\t\t\tthis.queuePushMessage(receivedData, retryAttempts);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (receivedData.type === 'nodeExecuteAfter' || receivedData.type === 'nodeExecuteBefore') {\n\t\t\t\tif (!this.uiStore.isActionActive('workflowRunning')) {\n\t\t\t\t\t// No workflow is running so ignore the messages\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tconst pushData = receivedData.data;\n\t\t\t\tif (this.workflowsStore.activeExecutionId !== pushData.executionId) {\n\t\t\t\t\t// The data is not for the currently active execution or\n\t\t\t\t\t// we do not have the execution id yet.\n\t\t\t\t\tif (isRetry !== true) {\n\t\t\t\t\t\tthis.queuePushMessage(event, retryAttempts);\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// recovered execution data is handled like executionFinished data, however for security reasons\n\t\t\t// we need to fetch the data from the server again rather than push it to all clients\n\t\t\tlet recoveredPushData: IPushDataExecutionFinished | undefined = undefined;\n\t\t\tif (receivedData.type === 'executionRecovered') {\n\t\t\t\tconst recoveredExecutionId = receivedData.data?.executionId;\n\t\t\t\tconst isWorkflowRunning = this.uiStore.isActionActive('workflowRunning');\n\t\t\t\tif (isWorkflowRunning && this.workflowsStore.activeExecutionId === recoveredExecutionId) {\n\t\t\t\t\t// pull execution data for the recovered execution from the server\n\t\t\t\t\tconst executionData = await this.workflowsStore.fetchExecutionDataById(\n\t\t\t\t\t\tthis.workflowsStore.activeExecutionId,\n\t\t\t\t\t);\n\t\t\t\t\tif (executionData?.data) {\n\t\t\t\t\t\t// data comes in as 'flatten' object, so we need to parse it\n\t\t\t\t\t\texecutionData.data = parse(\n\t\t\t\t\t\t\texecutionData.data as unknown as string,\n\t\t\t\t\t\t) as IRunExecutionData;\n\t\t\t\t\t\tconst iRunExecutionData: IRunExecutionData = {\n\t\t\t\t\t\t\tstartData: executionData.data?.startData,\n\t\t\t\t\t\t\tresultData: executionData.data?.resultData ?? { runData: {} },\n\t\t\t\t\t\t\texecutionData: executionData.data?.executionData,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tthis.workflowsStore.workflowExecutionData?.workflowId === executionData.workflowId\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tconst activeRunData =\n\t\t\t\t\t\t\t\tthis.workflowsStore.workflowExecutionData?.data?.resultData?.runData;\n\t\t\t\t\t\t\tif (activeRunData) {\n\t\t\t\t\t\t\t\tfor (const key of Object.keys(activeRunData)) {\n\t\t\t\t\t\t\t\t\tiRunExecutionData.resultData.runData[key] = activeRunData[key];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst iRun: IRun = {\n\t\t\t\t\t\t\tdata: iRunExecutionData,\n\t\t\t\t\t\t\tfinished: executionData.finished,\n\t\t\t\t\t\t\tmode: executionData.mode,\n\t\t\t\t\t\t\twaitTill: executionData.data?.waitTill,\n\t\t\t\t\t\t\tstartedAt: executionData.startedAt,\n\t\t\t\t\t\t\tstoppedAt: executionData.stoppedAt,\n\t\t\t\t\t\t\tstatus: 'crashed',\n\t\t\t\t\t\t};\n\t\t\t\t\t\tif (executionData.data) {\n\t\t\t\t\t\t\trecoveredPushData = {\n\t\t\t\t\t\t\t\texecutionId: executionData.id,\n\t\t\t\t\t\t\t\tdata: iRun,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\treceivedData.type === 'workflowFailedToActivate' &&\n\t\t\t\tthis.workflowsStore.workflowId === receivedData.data.workflowId\n\t\t\t) {\n\t\t\t\tthis.workflowsStore.setWorkflowInactive(receivedData.data.workflowId);\n\t\t\t\tthis.workflowsStore.setActive(false);\n\n\t\t\t\tthis.showError(\n\t\t\t\t\tnew Error(receivedData.data.errorMessage),\n\t\t\t\t\tthis.$locale.baseText('workflowActivator.showError.title', {\n\t\t\t\t\t\tinterpolate: { newStateName: 'activated' },\n\t\t\t\t\t}) + ':',\n\t\t\t\t);\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (receivedData.type === 'workflowActivated') {\n\t\t\t\tthis.workflowsStore.setWorkflowActive(receivedData.data.workflowId);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (receivedData.type === 'workflowDeactivated') {\n\t\t\t\tthis.workflowsStore.setWorkflowInactive(receivedData.data.workflowId);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (receivedData.type === 'executionFinished' || receivedData.type === 'executionRecovered') {\n\t\t\t\t// The workflow finished executing\n\t\t\t\tlet pushData: IPushDataExecutionFinished;\n\t\t\t\tif (receivedData.type === 'executionRecovered' && recoveredPushData !== undefined) {\n\t\t\t\t\tpushData = recoveredPushData;\n\t\t\t\t} else {\n\t\t\t\t\tpushData = receivedData.data as IPushDataExecutionFinished;\n\t\t\t\t}\n\n\t\t\t\tif (this.workflowsStore.activeExecutionId === pushData.executionId) {\n\t\t\t\t\tconst activeRunData =\n\t\t\t\t\t\tthis.workflowsStore.workflowExecutionData?.data?.resultData?.runData;\n\t\t\t\t\tif (activeRunData) {\n\t\t\t\t\t\tfor (const key of Object.keys(activeRunData)) {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tpushData.data.data.resultData.runData[key]?.[0]?.data?.main?.[0]?.[0]?.json\n\t\t\t\t\t\t\t\t\t?.isArtificialRecoveredEventItem === true &&\n\t\t\t\t\t\t\t\tactiveRunData[key].length > 0\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\tpushData.data.data.resultData.runData[key] = activeRunData[key];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.workflowsStore.finishActiveExecution(pushData);\n\t\t\t\t}\n\n\t\t\t\tif (!this.uiStore.isActionActive('workflowRunning')) {\n\t\t\t\t\t// No workflow is running so ignore the messages\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tconst { activeExecutionId } = this.workflowsStore;\n\t\t\t\tif (activeExecutionId !== pushData.executionId) {\n\t\t\t\t\t// The workflow which did finish execution did either not get started\n\t\t\t\t\t// by this session or we do not have the execution id yet.\n\t\t\t\t\tif (isRetry !== true) {\n\t\t\t\t\t\tthis.queuePushMessage(event, retryAttempts);\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tconst runDataExecuted = pushData.data;\n\n\t\t\t\tlet runDataExecutedErrorMessage = this.getExecutionError(runDataExecuted.data);\n\n\t\t\t\tif (runDataExecuted.status === 'crashed') {\n\t\t\t\t\trunDataExecutedErrorMessage = this.$locale.baseText(\n\t\t\t\t\t\t'pushConnection.executionFailed.message',\n\t\t\t\t\t);\n\t\t\t\t} else if (runDataExecuted.status === 'canceled') {\n\t\t\t\t\trunDataExecutedErrorMessage = this.$locale.baseText(\n\t\t\t\t\t\t'executionsList.showMessage.stopExecution.message',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinterpolate: { activeExecutionId },\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst lineNumber = runDataExecuted?.data?.resultData?.error?.lineNumber;\n\n\t\t\t\tcodeNodeEditorEventBus.emit('error-line-number', lineNumber || 'final');\n\n\t\t\t\tconst workflow = this.getCurrentWorkflow();\n\t\t\t\tif (runDataExecuted.waitTill !== undefined) {\n\t\t\t\t\tconst activeExecutionId = this.workflowsStore.activeExecutionId;\n\t\t\t\t\tconst workflowSettings = this.workflowsStore.workflowSettings;\n\t\t\t\t\tconst saveManualExecutions = this.rootStore.saveManualExecutions;\n\n\t\t\t\t\tconst isSavingExecutions =\n\t\t\t\t\t\tworkflowSettings.saveManualExecutions === undefined\n\t\t\t\t\t\t\t? saveManualExecutions\n\t\t\t\t\t\t\t: workflowSettings.saveManualExecutions;\n\n\t\t\t\t\tlet action;\n\t\t\t\t\tif (!isSavingExecutions) {\n\t\t\t\t\t\tglobalLinkActionsEventBus.emit('registerGlobalLinkAction', {\n\t\t\t\t\t\t\tkey: 'open-settings',\n\t\t\t\t\t\t\taction: async () => {\n\t\t\t\t\t\t\t\tif (this.workflowsStore.isNewWorkflow) await this.saveAsNewWorkflow();\n\t\t\t\t\t\t\t\tthis.uiStore.openModal(WORKFLOW_SETTINGS_MODAL_KEY);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\taction =\n\t\t\t\t\t\t\t'<a data-action=\"open-settings\">Turn on saving manual executions</a> and run again to see what happened after this node.';\n\t\t\t\t\t} else {\n\t\t\t\t\t\taction = `<a href=\"/workflow/${workflow.id}/executions/${activeExecutionId}\">View the execution</a> to see what happened after this node.`;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Workflow did start but had been put to wait\n\t\t\t\t\tthis.titleSet(workflow.name as string, 'IDLE');\n\t\t\t\t\tthis.showToast({\n\t\t\t\t\t\ttitle: 'Workflow started waiting',\n\t\t\t\t\t\tmessage: `${action} <a href=\"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\" target=\"_blank\">More info</a>`,\n\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\tduration: 0,\n\t\t\t\t\t});\n\t\t\t\t} else if (runDataExecuted.finished !== true) {\n\t\t\t\t\tthis.titleSet(workflow.name as string, 'ERROR');\n\n\t\t\t\t\tif (\n\t\t\t\t\t\trunDataExecuted.data.resultData.error?.name === 'ExpressionError' &&\n\t\t\t\t\t\t(runDataExecuted.data.resultData.error as ExpressionError).context.functionality ===\n\t\t\t\t\t\t\t'pairedItem'\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst error = runDataExecuted.data.resultData.error as ExpressionError;\n\n\t\t\t\t\t\tvoid this.getWorkflowDataToSave().then((workflowData) => {\n\t\t\t\t\t\t\tconst eventData: IDataObject = {\n\t\t\t\t\t\t\t\tcaused_by_credential: false,\n\t\t\t\t\t\t\t\terror_message: error.description,\n\t\t\t\t\t\t\t\terror_title: error.message,\n\t\t\t\t\t\t\t\terror_type: error.context.type,\n\t\t\t\t\t\t\t\tnode_graph_string: JSON.stringify(\n\t\t\t\t\t\t\t\t\tTelemetryHelpers.generateNodesGraph(\n\t\t\t\t\t\t\t\t\t\tworkflowData as IWorkflowBase,\n\t\t\t\t\t\t\t\t\t\tthis.getNodeTypes(),\n\t\t\t\t\t\t\t\t\t).nodeGraph,\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\terror.context.nodeCause &&\n\t\t\t\t\t\t\t\t['no pairing info', 'invalid pairing info'].includes(error.context.type as string)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tconst node = workflow.getNode(error.context.nodeCause as string);\n\n\t\t\t\t\t\t\t\tif (node) {\n\t\t\t\t\t\t\t\t\teventData.is_pinned = !!workflow.getPinDataOfNode(node.name);\n\t\t\t\t\t\t\t\t\teventData.mode = node.parameters.mode;\n\t\t\t\t\t\t\t\t\teventData.node_type = node.type;\n\t\t\t\t\t\t\t\t\teventData.operation = node.parameters.operation;\n\t\t\t\t\t\t\t\t\teventData.resource = node.parameters.resource;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis.$telemetry.track('Instance FE emitted paired item error', eventData, {\n\t\t\t\t\t\t\t\twithPostHog: true,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tif (runDataExecuted.data.resultData.error?.name === 'SubworkflowOperationError') {\n\t\t\t\t\t\tconst error = runDataExecuted.data.resultData.error as SubworkflowOperationError;\n\n\t\t\t\t\t\tthis.workflowsStore.subWorkflowExecutionError = error;\n\n\t\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\t\ttitle: error.message,\n\t\t\t\t\t\t\tmessage: error.description,\n\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t\tduration: 0,\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (\n\t\t\t\t\t\trunDataExecuted.data.resultData.error?.name === 'NodeOperationError' &&\n\t\t\t\t\t\t(runDataExecuted.data.resultData.error as NodeOperationError).functionality ===\n\t\t\t\t\t\t\t'configuration-node'\n\t\t\t\t\t) {\n\t\t\t\t\t\t// If the error is a configuration error of the node itself doesn't get executed so we can't use lastNodeExecuted for the title\n\t\t\t\t\t\tlet title: string;\n\t\t\t\t\t\tconst nodeError = runDataExecuted.data.resultData.error as NodeOperationError;\n\t\t\t\t\t\tif (nodeError.node.name) {\n\t\t\t\t\t\t\ttitle = `Error in sub-node ‘${nodeError.node.name}‘`;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttitle = 'Problem executing workflow';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\t(nodeError?.description ?? runDataExecutedErrorMessage) +\n\t\t\t\t\t\t\t\tthis.$locale.baseText('pushConnection.executionError.openNode', {\n\t\t\t\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\t\t\t\tnode: nodeError.node.name,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t\tduration: 0,\n\t\t\t\t\t\t\tdangerouslyUseHTMLString: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlet title: string;\n\t\t\t\t\t\tconst isManualExecutionCancelled =\n\t\t\t\t\t\t\trunDataExecuted.mode === 'manual' && runDataExecuted.status === 'canceled';\n\n\t\t\t\t\t\t// Do not show the error message if the workflow got canceled manually\n\t\t\t\t\t\tif (isManualExecutionCancelled) {\n\t\t\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\t\t\ttitle: this.$locale.baseText('nodeView.showMessage.stopExecutionTry.title'),\n\t\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (runDataExecuted.data.resultData.lastNodeExecuted) {\n\t\t\t\t\t\t\t\ttitle = `Problem in node ‘${runDataExecuted.data.resultData.lastNodeExecuted}‘`;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttitle = 'Problem executing workflow';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\t\tmessage: runDataExecutedErrorMessage,\n\t\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t\t\tduration: 0,\n\t\t\t\t\t\t\t\tdangerouslyUseHTMLString: true,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Workflow did execute without a problem\n\t\t\t\t\tthis.titleSet(workflow.name as string, 'IDLE');\n\n\t\t\t\t\tconst execution = this.workflowsStore.getWorkflowExecution;\n\t\t\t\t\tif (execution?.executedNode) {\n\t\t\t\t\t\tconst node = this.workflowsStore.getNodeByName(execution.executedNode);\n\t\t\t\t\t\tconst nodeType = node && this.nodeTypesStore.getNodeType(node.type, node.typeVersion);\n\t\t\t\t\t\tconst nodeOutput =\n\t\t\t\t\t\t\texecution &&\n\t\t\t\t\t\t\texecution.executedNode &&\n\t\t\t\t\t\t\texecution.data?.resultData?.runData?.[execution.executedNode];\n\t\t\t\t\t\tif (nodeType?.polling && !nodeOutput) {\n\t\t\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\t\t\ttitle: this.$locale.baseText('pushConnection.pollingNode.dataNotFound', {\n\t\t\t\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\t\t\t\tservice: getTriggerNodeServiceName(nodeType),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\tmessage: this.$locale.baseText('pushConnection.pollingNode.dataNotFound.message', {\n\t\t\t\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\t\t\t\tservice: getTriggerNodeServiceName(nodeType),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\t\t\ttitle: this.$locale.baseText('pushConnection.nodeExecutedSuccessfully'),\n\t\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\t\ttitle: this.$locale.baseText('pushConnection.workflowExecutedSuccessfully'),\n\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// It does not push the runData as it got already pushed with each\n\t\t\t\t// node that did finish. For that reason copy in here the data\n\t\t\t\t// which we already have.\n\t\t\t\tif (this.workflowsStore.getWorkflowRunData) {\n\t\t\t\t\trunDataExecuted.data.resultData.runData = this.workflowsStore.getWorkflowRunData;\n\t\t\t\t}\n\n\t\t\t\tthis.workflowsStore.executingNode.length = 0;\n\t\t\t\tthis.workflowsStore.setWorkflowExecutionData(runDataExecuted as IExecutionResponse);\n\t\t\t\tthis.uiStore.removeActiveAction('workflowRunning');\n\n\t\t\t\t// Set the node execution issues on all the nodes which produced an error so that\n\t\t\t\t// it can be displayed in the node-view\n\t\t\t\tthis.updateNodesExecutionIssues();\n\n\t\t\t\tconst lastNodeExecuted: string | undefined =\n\t\t\t\t\trunDataExecuted.data.resultData.lastNodeExecuted;\n\t\t\t\tlet itemsCount = 0;\n\t\t\t\tif (\n\t\t\t\t\tlastNodeExecuted &&\n\t\t\t\t\trunDataExecuted.data.resultData.runData[lastNodeExecuted] &&\n\t\t\t\t\t!runDataExecutedErrorMessage\n\t\t\t\t) {\n\t\t\t\t\titemsCount =\n\t\t\t\t\t\trunDataExecuted.data.resultData.runData[lastNodeExecuted][0].data!.main[0]!.length;\n\t\t\t\t}\n\n\t\t\t\tvoid this.$externalHooks().run('pushConnection.executionFinished', {\n\t\t\t\t\titemsCount,\n\t\t\t\t\tnodeName: runDataExecuted.data.resultData.lastNodeExecuted,\n\t\t\t\t\terrorMessage: runDataExecutedErrorMessage,\n\t\t\t\t\trunDataExecutedStartData: runDataExecuted.data.startData,\n\t\t\t\t\tresultDataError: runDataExecuted.data.resultData.error,\n\t\t\t\t});\n\t\t\t\tif (!runDataExecuted.data.resultData.error) {\n\t\t\t\t\tthis.segmentStore.trackSuccessfulWorkflowExecution(runDataExecuted);\n\t\t\t\t}\n\t\t\t} else if (receivedData.type === 'executionStarted') {\n\t\t\t\tconst pushData = receivedData.data;\n\n\t\t\t\tconst executionData: IExecutionsCurrentSummaryExtended = {\n\t\t\t\t\tid: pushData.executionId,\n\t\t\t\t\tfinished: false,\n\t\t\t\t\tmode: pushData.mode,\n\t\t\t\t\tstartedAt: pushData.startedAt,\n\t\t\t\t\tretryOf: pushData.retryOf,\n\t\t\t\t\tworkflowId: pushData.workflowId,\n\t\t\t\t\tworkflowName: pushData.workflowName,\n\t\t\t\t};\n\n\t\t\t\tthis.workflowsStore.addActiveExecution(executionData);\n\t\t\t} else if (receivedData.type === 'nodeExecuteAfter') {\n\t\t\t\t// A node finished to execute. Add its data\n\t\t\t\tconst pushData = receivedData.data;\n\t\t\t\tthis.workflowsStore.addNodeExecutionData(pushData);\n\t\t\t\tthis.workflowsStore.removeExecutingNode(pushData.nodeName);\n\t\t\t} else if (receivedData.type === 'nodeExecuteBefore') {\n\t\t\t\t// A node started to be executed. Set it as executing.\n\t\t\t\tconst pushData = receivedData.data;\n\t\t\t\tthis.workflowsStore.addExecutingNode(pushData.nodeName);\n\t\t\t} else if (receivedData.type === 'testWebhookDeleted') {\n\t\t\t\t// A test-webhook was deleted\n\t\t\t\tconst pushData = receivedData.data;\n\n\t\t\t\tif (pushData.workflowId === this.workflowsStore.workflowId) {\n\t\t\t\t\tthis.workflowsStore.executionWaitingForWebhook = false;\n\t\t\t\t\tthis.uiStore.removeActiveAction('workflowRunning');\n\t\t\t\t}\n\t\t\t} else if (receivedData.type === 'testWebhookReceived') {\n\t\t\t\t// A test-webhook did get called\n\t\t\t\tconst pushData = receivedData.data;\n\n\t\t\t\tif (pushData.workflowId === this.workflowsStore.workflowId) {\n\t\t\t\t\tthis.workflowsStore.executionWaitingForWebhook = false;\n\t\t\t\t\tthis.workflowsStore.activeExecutionId = pushData.executionId;\n\t\t\t\t}\n\n\t\t\t\tvoid this.processWaitingPushMessages();\n\t\t\t} else if (receivedData.type === 'reloadNodeType') {\n\t\t\t\tawait this.nodeTypesStore.getNodeTypes();\n\t\t\t\tawait this.nodeTypesStore.getFullNodesProperties([receivedData.data]);\n\t\t\t} else if (receivedData.type === 'removeNodeType') {\n\t\t\t\tconst pushData = receivedData.data;\n\n\t\t\t\tconst nodesToBeRemoved: INodeTypeNameVersion[] = [pushData];\n\n\t\t\t\t// Force reload of all credential types\n\t\t\t\tawait this.credentialsStore.fetchCredentialTypes(false).then(() => {\n\t\t\t\t\tthis.nodeTypesStore.removeNodeTypes(nodesToBeRemoved);\n\t\t\t\t});\n\t\t\t} else if (receivedData.type === 'nodeDescriptionUpdated') {\n\t\t\t\tawait this.nodeTypesStore.getNodeTypes();\n\t\t\t\tawait this.credentialsStore.fetchCredentialTypes(true);\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\tgetExecutionError(data: IRunExecutionData | IExecuteContextData) {\n\t\t\tconst error = data.resultData.error;\n\n\t\t\tlet errorMessage: string;\n\n\t\t\tif (data.resultData.lastNodeExecuted && error) {\n\t\t\t\terrorMessage = error.message || error.description;\n\t\t\t} else {\n\t\t\t\terrorMessage = this.$locale.baseText('pushConnection.executionError', {\n\t\t\t\t\tinterpolate: { error: '!' },\n\t\t\t\t});\n\n\t\t\t\tif (error?.message) {\n\t\t\t\t\tlet nodeName: string | undefined;\n\t\t\t\t\tif ('node' in error) {\n\t\t\t\t\t\tnodeName = typeof error.node === 'string' ? error.node : error.node!.name;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst receivedError = nodeName ? `${nodeName}: ${error.message}` : error.message;\n\t\t\t\t\terrorMessage = this.$locale.baseText('pushConnection.executionError', {\n\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\terror: `.${this.$locale.baseText('pushConnection.executionError.details', {\n\t\t\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\t\t\tdetails: receivedError,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t})}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn errorMessage;\n\t\t},\n\t},\n});\n"],"names":["GET_STATUS_ENDPOINT","sendGetWorkerStatus","context","makeRestApiRequest","WORKER_HISTORY_LENGTH","STALE_SECONDS","useOrchestrationStore","defineStore","data","id","rootStore","useRootStore","workerId","pushConnection","defineComponent","useTitleChange","useToast","message","externalHooks","nodeHelpers","workflowHelpers","mapStores","useCredentialsStore","useNodeTypesStore","useUIStore","useWorkflowsStore","useSettingsStore","useSegment","usePushConnectionStore","useCollaborationStore","event","retryAttempts","queueLength","i","messageData","receivedData","isRetry","pushData","recoveredPushData","recoveredExecutionId","_a","executionData","parse","iRunExecutionData","_b","_c","_d","_e","activeRunData","_h","_g","_f","key","iRun","_i","_l","_k","_j","_s","_r","_q","_p","_o","_n","_m","activeExecutionId","runDataExecuted","runDataExecutedErrorMessage","lineNumber","_v","_u","_t","codeNodeEditorEventBus","workflow","workflowSettings","saveManualExecutions","isSavingExecutions","action","globalLinkActionsEventBus","WORKFLOW_SETTINGS_MODAL_KEY","_w","error","workflowData","eventData","TelemetryHelpers.generateNodesGraph","node","_x","_y","title","nodeError","execution","nodeType","nodeOutput","_B","_A","_z","getTriggerNodeServiceName","lastNodeExecuted","itemsCount","nodesToBeRemoved","errorMessage","nodeName","receivedError"],"mappings":"mZAGA,MAAMA,GAAsB,+BAEfC,GAAsB,MAAOC,GAA4C,CAC/E,MAAAC,EAAmBD,EAAS,OAAQF,EAAmB,CAC9D,ECFaI,GAAwB,IAC/BC,GAAgB,IAAM,IAgBfC,GAAwBC,GAAY,uBAAwB,CACxE,MAAO,KAAiC,CACvC,QAAS,CAAC,EACV,eAAgB,CAAC,EACjB,mBAAoB,CAAC,EACrB,eAAgB,IAAA,GAEjB,QAAS,CACR,mBAAmBC,EAAoC,CACjD,KAAA,QAAQA,EAAK,QAAQ,EAAIA,EACzB,KAAK,eAAeA,EAAK,QAAQ,IACrC,KAAK,eAAeA,EAAK,QAAQ,EAAI,CAAA,GAEjC,KAAA,eAAeA,EAAK,QAAQ,EAAE,KAAK,CAAE,KAAAA,EAAM,UAAW,KAAK,IAAI,CAAG,CAAA,EACnE,KAAK,eAAeA,EAAK,QAAQ,EAAE,OAASJ,IAC/C,KAAK,eAAeI,EAAK,QAAQ,EAAE,MAAM,EAE1C,KAAK,mBAAmBA,EAAK,QAAQ,EAAI,KAAK,KAC/C,EACA,oBAAqB,CACT,UAAAC,KAAM,KAAK,mBACjB,KAAK,mBAAmBA,CAAE,EAAIJ,GAAgB,KAAK,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C,KAAA,eAAe,kBAAoBA,EAAS,aAG7C,KAAK,4BAA2B,SAC3BF,EAAa,OAAS,iBAC1B,MAAA,KAAK,eAAe,eAC1B,MAAM,KAAK,eAAe,uBAAuB,CAACA,EAAa,IAAI,CAAC,UAC1DA,EAAa,OAAS,iBAAkB,CAG5C,MAAAgE,EAA2C,CAFhChE,EAAa,IAE4B,EAG1D,MAAM,KAAK,iBAAiB,qBAAqB,EAAK,EAAE,KAAK,IAAM,CAC7D,KAAA,eAAe,gBAAgBgE,CAAgB,CAAA,CACpD,CAAA,MACShE,EAAa,OAAS,2BAC1B,MAAA,KAAK,eAAe,eACpB,MAAA,KAAK,iBAAiB,qBAAqB,EAAI,GAE/C,MAAA,EACR,EACA,kBAAkB3B,EAA+C,CAC1D,MAAAyE,EAAQzE,EAAK,WAAW,MAE1B,IAAA4F,EAEA,GAAA5F,EAAK,WAAW,kBAAoByE,EACxBmB,EAAAnB,EAAM,SAAWA,EAAM,oBAEvBmB,EAAA,KAAK,QAAQ,SAAS,gCAAiC,CACrE,YAAa,CAAE,MAAO,GAAI,CAAA,CAC1B,EAEGnB,GAAA,MAAAA,EAAO,QAAS,CACf,IAAAoB,EACA,SAAUpB,IACboB,EAAW,OAAOpB,EAAM,MAAS,SAAWA,EAAM,KAAOA,EAAM,KAAM,MAGhE,MAAAqB,EAAgBD,EAAW,GAAGA,CAAQ,KAAKpB,EAAM,OAAO,GAAKA,EAAM,QAC1DmB,EAAA,KAAK,QAAQ,SAAS,gCAAiC,CACrE,YAAa,CACZ,MAAO,IAAI,KAAK,QAAQ,SAAS,wCAAyC,CACzE,YAAa,CACZ,QAASE,CACV,CACA,CAAA,CAAC,EACH,CAAA,CACA,CACF,CAGM,OAAAF,CACR,CACD,CACD,CAAC"}
1
+ {"version":3,"file":"pushConnection-SP3wVlD4.js","sources":["../../src/api/orchestration.ts","../../src/stores/orchestration.store.ts","../../src/mixins/pushConnection.ts"],"sourcesContent":["import type { IRestApiContext } from '@/Interface';\nimport { makeRestApiRequest } from '@/utils/apiUtils';\n\nconst GET_STATUS_ENDPOINT = '/orchestration/worker/status';\n\nexport const sendGetWorkerStatus = async (context: IRestApiContext): Promise<void> => {\n\tawait makeRestApiRequest(context, 'POST', GET_STATUS_ENDPOINT);\n};\n","import { defineStore } from 'pinia';\nimport type { IPushDataWorkerStatusPayload } from '../Interface';\nimport { useRootStore } from './n8nRoot.store';\nimport { sendGetWorkerStatus } from '../api/orchestration';\n\nexport const WORKER_HISTORY_LENGTH = 100;\nconst STALE_SECONDS = 120 * 1000;\n\nexport interface IOrchestrationStoreState {\n\tworkers: { [id: string]: IPushDataWorkerStatusPayload };\n\tworkersHistory: {\n\t\t[id: string]: IWorkerHistoryItem[];\n\t};\n\tworkersLastUpdated: { [id: string]: number };\n\tstatusInterval: NodeJS.Timer | null;\n}\n\nexport interface IWorkerHistoryItem {\n\ttimestamp: number;\n\tdata: IPushDataWorkerStatusPayload;\n}\n\nexport const useOrchestrationStore = defineStore('orchestrationManager', {\n\tstate: (): IOrchestrationStoreState => ({\n\t\tworkers: {},\n\t\tworkersHistory: {},\n\t\tworkersLastUpdated: {},\n\t\tstatusInterval: null,\n\t}),\n\tactions: {\n\t\tupdateWorkerStatus(data: IPushDataWorkerStatusPayload) {\n\t\t\tthis.workers[data.workerId] = data;\n\t\t\tif (!this.workersHistory[data.workerId]) {\n\t\t\t\tthis.workersHistory[data.workerId] = [];\n\t\t\t}\n\t\t\tthis.workersHistory[data.workerId].push({ data, timestamp: Date.now() });\n\t\t\tif (this.workersHistory[data.workerId].length > WORKER_HISTORY_LENGTH) {\n\t\t\t\tthis.workersHistory[data.workerId].shift();\n\t\t\t}\n\t\t\tthis.workersLastUpdated[data.workerId] = Date.now();\n\t\t},\n\t\tremoveStaleWorkers() {\n\t\t\tfor (const id in this.workersLastUpdated) {\n\t\t\t\tif (this.workersLastUpdated[id] + STALE_SECONDS < Date.now()) {\n\t\t\t\t\tdelete this.workers[id];\n\t\t\t\t\tdelete this.workersHistory[id];\n\t\t\t\t\tdelete this.workersLastUpdated[id];\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tstartWorkerStatusPolling() {\n\t\t\tconst rootStore = useRootStore();\n\t\t\tif (!this.statusInterval) {\n\t\t\t\tthis.statusInterval = setInterval(async () => {\n\t\t\t\t\tawait sendGetWorkerStatus(rootStore.getRestApiContext);\n\t\t\t\t\tthis.removeStaleWorkers();\n\t\t\t\t}, 1000);\n\t\t\t}\n\t\t},\n\t\tstopWorkerStatusPolling() {\n\t\t\tif (this.statusInterval) {\n\t\t\t\tclearInterval(this.statusInterval);\n\t\t\t\tthis.statusInterval = null;\n\t\t\t}\n\t\t},\n\t\tgetWorkerLastUpdated(workerId: string): number {\n\t\t\treturn this.workersLastUpdated[workerId] ?? 0;\n\t\t},\n\t\tgetWorkerStatus(workerId: string): IPushDataWorkerStatusPayload | undefined {\n\t\t\treturn this.workers[workerId];\n\t\t},\n\t\tgetWorkerStatusHistory(workerId: string): IWorkerHistoryItem[] {\n\t\t\treturn this.workersHistory[workerId] ?? [];\n\t\t},\n\t},\n});\n","import type {\n\tIExecutionResponse,\n\tIExecutionsCurrentSummaryExtended,\n\tIPushData,\n\tIPushDataExecutionFinished,\n} from '@/Interface';\n\nimport { externalHooks } from '@/mixins/externalHooks';\nimport { nodeHelpers } from '@/mixins/nodeHelpers';\nimport { useTitleChange } from '@/composables/useTitleChange';\nimport { useToast } from '@/composables/useToast';\nimport { workflowHelpers } from '@/mixins/workflowHelpers';\n\nimport type {\n\tExpressionError,\n\tIDataObject,\n\tINodeTypeNameVersion,\n\tIRun,\n\tIRunExecutionData,\n\tIWorkflowBase,\n\tSubworkflowOperationError,\n\tIExecuteContextData,\n\tNodeOperationError,\n} from 'n8n-workflow';\nimport { TelemetryHelpers } from 'n8n-workflow';\n\nimport { WORKFLOW_SETTINGS_MODAL_KEY } from '@/constants';\nimport { getTriggerNodeServiceName } from '@/utils/nodeTypesUtils';\nimport { codeNodeEditorEventBus, globalLinkActionsEventBus } from '@/event-bus';\nimport { mapStores } from 'pinia';\nimport { useUIStore } from '@/stores/ui.store';\nimport { useWorkflowsStore } from '@/stores/workflows.store';\nimport { useNodeTypesStore } from '@/stores/nodeTypes.store';\nimport { useCredentialsStore } from '@/stores/credentials.store';\nimport { useSettingsStore } from '@/stores/settings.store';\nimport { parse } from 'flatted';\nimport { useSegment } from '@/stores/segment.store';\nimport { defineComponent } from 'vue';\nimport { useOrchestrationStore } from '@/stores/orchestration.store';\nimport { usePushConnectionStore } from '@/stores/pushConnection.store';\nimport { useCollaborationStore } from '@/stores/collaboration.store';\n\nexport const pushConnection = defineComponent({\n\tsetup() {\n\t\treturn {\n\t\t\t...useTitleChange(),\n\t\t\t...useToast(),\n\t\t};\n\t},\n\tcreated() {\n\t\tthis.pushStore.addEventListener((message) => {\n\t\t\tvoid this.pushMessageReceived(message);\n\t\t});\n\t},\n\tmixins: [externalHooks, nodeHelpers, workflowHelpers],\n\tdata() {\n\t\treturn {\n\t\t\tretryTimeout: null as NodeJS.Timeout | null,\n\t\t\tpushMessageQueue: [] as Array<{ message: IPushData; retriesLeft: number }>,\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapStores(\n\t\t\tuseCredentialsStore,\n\t\t\tuseNodeTypesStore,\n\t\t\tuseUIStore,\n\t\t\tuseWorkflowsStore,\n\t\t\tuseSettingsStore,\n\t\t\tuseSegment,\n\t\t\tuseOrchestrationStore,\n\t\t\tusePushConnectionStore,\n\t\t\tuseCollaborationStore,\n\t\t),\n\t\tsessionId(): string {\n\t\t\treturn this.rootStore.sessionId;\n\t\t},\n\t},\n\tmethods: {\n\t\t/**\n\t\t * Sometimes the push message is faster as the result from\n\t\t * the REST API so we do not know yet what execution ID\n\t\t * is currently active. So internally resend the message\n\t\t * a few more times\n\t\t */\n\t\tqueuePushMessage(event: IPushData, retryAttempts: number) {\n\t\t\tthis.pushMessageQueue.push({ message: event, retriesLeft: retryAttempts });\n\n\t\t\tif (this.retryTimeout === null) {\n\t\t\t\tthis.retryTimeout = setTimeout(this.processWaitingPushMessages, 20);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Process the push messages which are waiting in the queue\n\t\t */\n\t\tasync processWaitingPushMessages() {\n\t\t\tif (this.retryTimeout !== null) {\n\t\t\t\tclearTimeout(this.retryTimeout);\n\t\t\t\tthis.retryTimeout = null;\n\t\t\t}\n\n\t\t\tconst queueLength = this.pushMessageQueue.length;\n\t\t\tfor (let i = 0; i < queueLength; i++) {\n\t\t\t\tconst messageData = this.pushMessageQueue.shift();\n\n\t\t\t\tconst result = await this.pushMessageReceived(messageData!.message, true);\n\t\t\t\tif (!result) {\n\t\t\t\t\t// Was not successful\n\t\t\t\t\tmessageData!.retriesLeft -= 1;\n\n\t\t\t\t\tif (messageData!.retriesLeft > 0) {\n\t\t\t\t\t\t// If still retries are left add it back and stop execution\n\t\t\t\t\t\tthis.pushMessageQueue.unshift(messageData!);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.pushMessageQueue.length !== 0 && this.retryTimeout === null) {\n\t\t\t\tthis.retryTimeout = setTimeout(this.processWaitingPushMessages, 25);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Process a newly received message\n\t\t */\n\t\tasync pushMessageReceived(receivedData: IPushData, isRetry?: boolean): Promise<boolean> {\n\t\t\tconst retryAttempts = 5;\n\n\t\t\tif (receivedData.type === 'sendWorkerStatusMessage') {\n\t\t\t\tconst pushData = receivedData.data;\n\t\t\t\tthis.orchestrationManagerStore.updateWorkerStatus(pushData.status);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (receivedData.type === 'sendConsoleMessage') {\n\t\t\t\tconst pushData = receivedData.data;\n\t\t\t\tconsole.log(pushData.source, ...pushData.messages);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t!['testWebhookReceived'].includes(receivedData.type) &&\n\t\t\t\tisRetry !== true &&\n\t\t\t\tthis.pushMessageQueue.length\n\t\t\t) {\n\t\t\t\t// If there are already messages in the queue add the new one that all of them\n\t\t\t\t// get executed in order\n\t\t\t\tthis.queuePushMessage(receivedData, retryAttempts);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (receivedData.type === 'nodeExecuteAfter' || receivedData.type === 'nodeExecuteBefore') {\n\t\t\t\tif (!this.uiStore.isActionActive('workflowRunning')) {\n\t\t\t\t\t// No workflow is running so ignore the messages\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tconst pushData = receivedData.data;\n\t\t\t\tif (this.workflowsStore.activeExecutionId !== pushData.executionId) {\n\t\t\t\t\t// The data is not for the currently active execution or\n\t\t\t\t\t// we do not have the execution id yet.\n\t\t\t\t\tif (isRetry !== true) {\n\t\t\t\t\t\tthis.queuePushMessage(event, retryAttempts);\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// recovered execution data is handled like executionFinished data, however for security reasons\n\t\t\t// we need to fetch the data from the server again rather than push it to all clients\n\t\t\tlet recoveredPushData: IPushDataExecutionFinished | undefined = undefined;\n\t\t\tif (receivedData.type === 'executionRecovered') {\n\t\t\t\tconst recoveredExecutionId = receivedData.data?.executionId;\n\t\t\t\tconst isWorkflowRunning = this.uiStore.isActionActive('workflowRunning');\n\t\t\t\tif (isWorkflowRunning && this.workflowsStore.activeExecutionId === recoveredExecutionId) {\n\t\t\t\t\t// pull execution data for the recovered execution from the server\n\t\t\t\t\tconst executionData = await this.workflowsStore.fetchExecutionDataById(\n\t\t\t\t\t\tthis.workflowsStore.activeExecutionId,\n\t\t\t\t\t);\n\t\t\t\t\tif (executionData?.data) {\n\t\t\t\t\t\t// data comes in as 'flatten' object, so we need to parse it\n\t\t\t\t\t\texecutionData.data = parse(\n\t\t\t\t\t\t\texecutionData.data as unknown as string,\n\t\t\t\t\t\t) as IRunExecutionData;\n\t\t\t\t\t\tconst iRunExecutionData: IRunExecutionData = {\n\t\t\t\t\t\t\tstartData: executionData.data?.startData,\n\t\t\t\t\t\t\tresultData: executionData.data?.resultData ?? { runData: {} },\n\t\t\t\t\t\t\texecutionData: executionData.data?.executionData,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tthis.workflowsStore.workflowExecutionData?.workflowId === executionData.workflowId\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tconst activeRunData =\n\t\t\t\t\t\t\t\tthis.workflowsStore.workflowExecutionData?.data?.resultData?.runData;\n\t\t\t\t\t\t\tif (activeRunData) {\n\t\t\t\t\t\t\t\tfor (const key of Object.keys(activeRunData)) {\n\t\t\t\t\t\t\t\t\tiRunExecutionData.resultData.runData[key] = activeRunData[key];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst iRun: IRun = {\n\t\t\t\t\t\t\tdata: iRunExecutionData,\n\t\t\t\t\t\t\tfinished: executionData.finished,\n\t\t\t\t\t\t\tmode: executionData.mode,\n\t\t\t\t\t\t\twaitTill: executionData.data?.waitTill,\n\t\t\t\t\t\t\tstartedAt: executionData.startedAt,\n\t\t\t\t\t\t\tstoppedAt: executionData.stoppedAt,\n\t\t\t\t\t\t\tstatus: 'crashed',\n\t\t\t\t\t\t};\n\t\t\t\t\t\tif (executionData.data) {\n\t\t\t\t\t\t\trecoveredPushData = {\n\t\t\t\t\t\t\t\texecutionId: executionData.id,\n\t\t\t\t\t\t\t\tdata: iRun,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\treceivedData.type === 'workflowFailedToActivate' &&\n\t\t\t\tthis.workflowsStore.workflowId === receivedData.data.workflowId\n\t\t\t) {\n\t\t\t\tthis.workflowsStore.setWorkflowInactive(receivedData.data.workflowId);\n\t\t\t\tthis.workflowsStore.setActive(false);\n\n\t\t\t\tthis.showError(\n\t\t\t\t\tnew Error(receivedData.data.errorMessage),\n\t\t\t\t\tthis.$locale.baseText('workflowActivator.showError.title', {\n\t\t\t\t\t\tinterpolate: { newStateName: 'activated' },\n\t\t\t\t\t}) + ':',\n\t\t\t\t);\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (receivedData.type === 'workflowActivated') {\n\t\t\t\tthis.workflowsStore.setWorkflowActive(receivedData.data.workflowId);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (receivedData.type === 'workflowDeactivated') {\n\t\t\t\tthis.workflowsStore.setWorkflowInactive(receivedData.data.workflowId);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (receivedData.type === 'executionFinished' || receivedData.type === 'executionRecovered') {\n\t\t\t\t// The workflow finished executing\n\t\t\t\tlet pushData: IPushDataExecutionFinished;\n\t\t\t\tif (receivedData.type === 'executionRecovered' && recoveredPushData !== undefined) {\n\t\t\t\t\tpushData = recoveredPushData;\n\t\t\t\t} else {\n\t\t\t\t\tpushData = receivedData.data as IPushDataExecutionFinished;\n\t\t\t\t}\n\n\t\t\t\tif (this.workflowsStore.activeExecutionId === pushData.executionId) {\n\t\t\t\t\tconst activeRunData =\n\t\t\t\t\t\tthis.workflowsStore.workflowExecutionData?.data?.resultData?.runData;\n\t\t\t\t\tif (activeRunData) {\n\t\t\t\t\t\tfor (const key of Object.keys(activeRunData)) {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tpushData.data.data.resultData.runData[key]?.[0]?.data?.main?.[0]?.[0]?.json\n\t\t\t\t\t\t\t\t\t?.isArtificialRecoveredEventItem === true &&\n\t\t\t\t\t\t\t\tactiveRunData[key].length > 0\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\tpushData.data.data.resultData.runData[key] = activeRunData[key];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.workflowsStore.finishActiveExecution(pushData);\n\t\t\t\t}\n\n\t\t\t\tif (!this.uiStore.isActionActive('workflowRunning')) {\n\t\t\t\t\t// No workflow is running so ignore the messages\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tconst { activeExecutionId } = this.workflowsStore;\n\t\t\t\tif (activeExecutionId !== pushData.executionId) {\n\t\t\t\t\t// The workflow which did finish execution did either not get started\n\t\t\t\t\t// by this session or we do not have the execution id yet.\n\t\t\t\t\tif (isRetry !== true) {\n\t\t\t\t\t\tthis.queuePushMessage(event, retryAttempts);\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tconst runDataExecuted = pushData.data;\n\n\t\t\t\tlet runDataExecutedErrorMessage = this.getExecutionError(runDataExecuted.data);\n\n\t\t\t\tif (runDataExecuted.status === 'crashed') {\n\t\t\t\t\trunDataExecutedErrorMessage = this.$locale.baseText(\n\t\t\t\t\t\t'pushConnection.executionFailed.message',\n\t\t\t\t\t);\n\t\t\t\t} else if (runDataExecuted.status === 'canceled') {\n\t\t\t\t\trunDataExecutedErrorMessage = this.$locale.baseText(\n\t\t\t\t\t\t'executionsList.showMessage.stopExecution.message',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinterpolate: { activeExecutionId },\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst lineNumber = runDataExecuted?.data?.resultData?.error?.lineNumber;\n\n\t\t\t\tcodeNodeEditorEventBus.emit('error-line-number', lineNumber || 'final');\n\n\t\t\t\tconst workflow = this.getCurrentWorkflow();\n\t\t\t\tif (runDataExecuted.waitTill !== undefined) {\n\t\t\t\t\tconst activeExecutionId = this.workflowsStore.activeExecutionId;\n\t\t\t\t\tconst workflowSettings = this.workflowsStore.workflowSettings;\n\t\t\t\t\tconst saveManualExecutions = this.rootStore.saveManualExecutions;\n\n\t\t\t\t\tconst isSavingExecutions =\n\t\t\t\t\t\tworkflowSettings.saveManualExecutions === undefined\n\t\t\t\t\t\t\t? saveManualExecutions\n\t\t\t\t\t\t\t: workflowSettings.saveManualExecutions;\n\n\t\t\t\t\tlet action;\n\t\t\t\t\tif (!isSavingExecutions) {\n\t\t\t\t\t\tglobalLinkActionsEventBus.emit('registerGlobalLinkAction', {\n\t\t\t\t\t\t\tkey: 'open-settings',\n\t\t\t\t\t\t\taction: async () => {\n\t\t\t\t\t\t\t\tif (this.workflowsStore.isNewWorkflow) await this.saveAsNewWorkflow();\n\t\t\t\t\t\t\t\tthis.uiStore.openModal(WORKFLOW_SETTINGS_MODAL_KEY);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\taction =\n\t\t\t\t\t\t\t'<a data-action=\"open-settings\">Turn on saving manual executions</a> and run again to see what happened after this node.';\n\t\t\t\t\t} else {\n\t\t\t\t\t\taction = `<a href=\"/workflow/${workflow.id}/executions/${activeExecutionId}\">View the execution</a> to see what happened after this node.`;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Workflow did start but had been put to wait\n\t\t\t\t\tthis.titleSet(workflow.name as string, 'IDLE');\n\t\t\t\t\tthis.showToast({\n\t\t\t\t\t\ttitle: 'Workflow started waiting',\n\t\t\t\t\t\tmessage: `${action} <a href=\"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\" target=\"_blank\">More info</a>`,\n\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\tduration: 0,\n\t\t\t\t\t});\n\t\t\t\t} else if (runDataExecuted.finished !== true) {\n\t\t\t\t\tthis.titleSet(workflow.name as string, 'ERROR');\n\n\t\t\t\t\tif (\n\t\t\t\t\t\trunDataExecuted.data.resultData.error?.name === 'ExpressionError' &&\n\t\t\t\t\t\t(runDataExecuted.data.resultData.error as ExpressionError).context.functionality ===\n\t\t\t\t\t\t\t'pairedItem'\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst error = runDataExecuted.data.resultData.error as ExpressionError;\n\n\t\t\t\t\t\tvoid this.getWorkflowDataToSave().then((workflowData) => {\n\t\t\t\t\t\t\tconst eventData: IDataObject = {\n\t\t\t\t\t\t\t\tcaused_by_credential: false,\n\t\t\t\t\t\t\t\terror_message: error.description,\n\t\t\t\t\t\t\t\terror_title: error.message,\n\t\t\t\t\t\t\t\terror_type: error.context.type,\n\t\t\t\t\t\t\t\tnode_graph_string: JSON.stringify(\n\t\t\t\t\t\t\t\t\tTelemetryHelpers.generateNodesGraph(\n\t\t\t\t\t\t\t\t\t\tworkflowData as IWorkflowBase,\n\t\t\t\t\t\t\t\t\t\tthis.getNodeTypes(),\n\t\t\t\t\t\t\t\t\t).nodeGraph,\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\terror.context.nodeCause &&\n\t\t\t\t\t\t\t\t['no pairing info', 'invalid pairing info'].includes(error.context.type as string)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tconst node = workflow.getNode(error.context.nodeCause as string);\n\n\t\t\t\t\t\t\t\tif (node) {\n\t\t\t\t\t\t\t\t\teventData.is_pinned = !!workflow.getPinDataOfNode(node.name);\n\t\t\t\t\t\t\t\t\teventData.mode = node.parameters.mode;\n\t\t\t\t\t\t\t\t\teventData.node_type = node.type;\n\t\t\t\t\t\t\t\t\teventData.operation = node.parameters.operation;\n\t\t\t\t\t\t\t\t\teventData.resource = node.parameters.resource;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis.$telemetry.track('Instance FE emitted paired item error', eventData, {\n\t\t\t\t\t\t\t\twithPostHog: true,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tif (runDataExecuted.data.resultData.error?.name === 'SubworkflowOperationError') {\n\t\t\t\t\t\tconst error = runDataExecuted.data.resultData.error as SubworkflowOperationError;\n\n\t\t\t\t\t\tthis.workflowsStore.subWorkflowExecutionError = error;\n\n\t\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\t\ttitle: error.message,\n\t\t\t\t\t\t\tmessage: error.description,\n\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t\tduration: 0,\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (\n\t\t\t\t\t\trunDataExecuted.data.resultData.error?.name === 'NodeOperationError' &&\n\t\t\t\t\t\t(runDataExecuted.data.resultData.error as NodeOperationError).functionality ===\n\t\t\t\t\t\t\t'configuration-node'\n\t\t\t\t\t) {\n\t\t\t\t\t\t// If the error is a configuration error of the node itself doesn't get executed so we can't use lastNodeExecuted for the title\n\t\t\t\t\t\tlet title: string;\n\t\t\t\t\t\tconst nodeError = runDataExecuted.data.resultData.error as NodeOperationError;\n\t\t\t\t\t\tif (nodeError.node.name) {\n\t\t\t\t\t\t\ttitle = `Error in sub-node ‘${nodeError.node.name}‘`;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttitle = 'Problem executing workflow';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\t(nodeError?.description ?? runDataExecutedErrorMessage) +\n\t\t\t\t\t\t\t\tthis.$locale.baseText('pushConnection.executionError.openNode', {\n\t\t\t\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\t\t\t\tnode: nodeError.node.name,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t\tduration: 0,\n\t\t\t\t\t\t\tdangerouslyUseHTMLString: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlet title: string;\n\t\t\t\t\t\tconst isManualExecutionCancelled =\n\t\t\t\t\t\t\trunDataExecuted.mode === 'manual' && runDataExecuted.status === 'canceled';\n\n\t\t\t\t\t\t// Do not show the error message if the workflow got canceled manually\n\t\t\t\t\t\tif (isManualExecutionCancelled) {\n\t\t\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\t\t\ttitle: this.$locale.baseText('nodeView.showMessage.stopExecutionTry.title'),\n\t\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (runDataExecuted.data.resultData.lastNodeExecuted) {\n\t\t\t\t\t\t\t\ttitle = `Problem in node ‘${runDataExecuted.data.resultData.lastNodeExecuted}‘`;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttitle = 'Problem executing workflow';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\t\tmessage: runDataExecutedErrorMessage,\n\t\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t\t\tduration: 0,\n\t\t\t\t\t\t\t\tdangerouslyUseHTMLString: true,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Workflow did execute without a problem\n\t\t\t\t\tthis.titleSet(workflow.name as string, 'IDLE');\n\n\t\t\t\t\tconst execution = this.workflowsStore.getWorkflowExecution;\n\t\t\t\t\tif (execution?.executedNode) {\n\t\t\t\t\t\tconst node = this.workflowsStore.getNodeByName(execution.executedNode);\n\t\t\t\t\t\tconst nodeType = node && this.nodeTypesStore.getNodeType(node.type, node.typeVersion);\n\t\t\t\t\t\tconst nodeOutput =\n\t\t\t\t\t\t\texecution &&\n\t\t\t\t\t\t\texecution.executedNode &&\n\t\t\t\t\t\t\texecution.data?.resultData?.runData?.[execution.executedNode];\n\t\t\t\t\t\tif (nodeType?.polling && !nodeOutput) {\n\t\t\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\t\t\ttitle: this.$locale.baseText('pushConnection.pollingNode.dataNotFound', {\n\t\t\t\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\t\t\t\tservice: getTriggerNodeServiceName(nodeType),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\tmessage: this.$locale.baseText('pushConnection.pollingNode.dataNotFound.message', {\n\t\t\t\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\t\t\t\tservice: getTriggerNodeServiceName(nodeType),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\t\t\ttitle: this.$locale.baseText('pushConnection.nodeExecutedSuccessfully'),\n\t\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\t\ttitle: this.$locale.baseText('pushConnection.workflowExecutedSuccessfully'),\n\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// It does not push the runData as it got already pushed with each\n\t\t\t\t// node that did finish. For that reason copy in here the data\n\t\t\t\t// which we already have.\n\t\t\t\tif (this.workflowsStore.getWorkflowRunData) {\n\t\t\t\t\trunDataExecuted.data.resultData.runData = this.workflowsStore.getWorkflowRunData;\n\t\t\t\t}\n\n\t\t\t\tthis.workflowsStore.executingNode.length = 0;\n\t\t\t\tthis.workflowsStore.setWorkflowExecutionData(runDataExecuted as IExecutionResponse);\n\t\t\t\tthis.uiStore.removeActiveAction('workflowRunning');\n\n\t\t\t\t// Set the node execution issues on all the nodes which produced an error so that\n\t\t\t\t// it can be displayed in the node-view\n\t\t\t\tthis.updateNodesExecutionIssues();\n\n\t\t\t\tconst lastNodeExecuted: string | undefined =\n\t\t\t\t\trunDataExecuted.data.resultData.lastNodeExecuted;\n\t\t\t\tlet itemsCount = 0;\n\t\t\t\tif (\n\t\t\t\t\tlastNodeExecuted &&\n\t\t\t\t\trunDataExecuted.data.resultData.runData[lastNodeExecuted] &&\n\t\t\t\t\t!runDataExecutedErrorMessage\n\t\t\t\t) {\n\t\t\t\t\titemsCount =\n\t\t\t\t\t\trunDataExecuted.data.resultData.runData[lastNodeExecuted][0].data!.main[0]!.length;\n\t\t\t\t}\n\n\t\t\t\tvoid this.$externalHooks().run('pushConnection.executionFinished', {\n\t\t\t\t\titemsCount,\n\t\t\t\t\tnodeName: runDataExecuted.data.resultData.lastNodeExecuted,\n\t\t\t\t\terrorMessage: runDataExecutedErrorMessage,\n\t\t\t\t\trunDataExecutedStartData: runDataExecuted.data.startData,\n\t\t\t\t\tresultDataError: runDataExecuted.data.resultData.error,\n\t\t\t\t});\n\t\t\t\tif (!runDataExecuted.data.resultData.error) {\n\t\t\t\t\tthis.segmentStore.trackSuccessfulWorkflowExecution(runDataExecuted);\n\t\t\t\t}\n\t\t\t} else if (receivedData.type === 'executionStarted') {\n\t\t\t\tconst pushData = receivedData.data;\n\n\t\t\t\tconst executionData: IExecutionsCurrentSummaryExtended = {\n\t\t\t\t\tid: pushData.executionId,\n\t\t\t\t\tfinished: false,\n\t\t\t\t\tmode: pushData.mode,\n\t\t\t\t\tstartedAt: pushData.startedAt,\n\t\t\t\t\tretryOf: pushData.retryOf,\n\t\t\t\t\tworkflowId: pushData.workflowId,\n\t\t\t\t\tworkflowName: pushData.workflowName,\n\t\t\t\t};\n\n\t\t\t\tthis.workflowsStore.addActiveExecution(executionData);\n\t\t\t} else if (receivedData.type === 'nodeExecuteAfter') {\n\t\t\t\t// A node finished to execute. Add its data\n\t\t\t\tconst pushData = receivedData.data;\n\t\t\t\tthis.workflowsStore.addNodeExecutionData(pushData);\n\t\t\t\tthis.workflowsStore.removeExecutingNode(pushData.nodeName);\n\t\t\t} else if (receivedData.type === 'nodeExecuteBefore') {\n\t\t\t\t// A node started to be executed. Set it as executing.\n\t\t\t\tconst pushData = receivedData.data;\n\t\t\t\tthis.workflowsStore.addExecutingNode(pushData.nodeName);\n\t\t\t} else if (receivedData.type === 'testWebhookDeleted') {\n\t\t\t\t// A test-webhook was deleted\n\t\t\t\tconst pushData = receivedData.data;\n\n\t\t\t\tif (pushData.workflowId === this.workflowsStore.workflowId) {\n\t\t\t\t\tthis.workflowsStore.executionWaitingForWebhook = false;\n\t\t\t\t\tthis.uiStore.removeActiveAction('workflowRunning');\n\t\t\t\t}\n\t\t\t} else if (receivedData.type === 'testWebhookReceived') {\n\t\t\t\t// A test-webhook did get called\n\t\t\t\tconst pushData = receivedData.data;\n\n\t\t\t\tif (pushData.workflowId === this.workflowsStore.workflowId) {\n\t\t\t\t\tthis.workflowsStore.executionWaitingForWebhook = false;\n\t\t\t\t\tthis.workflowsStore.activeExecutionId = pushData.executionId;\n\t\t\t\t}\n\n\t\t\t\tvoid this.processWaitingPushMessages();\n\t\t\t} else if (receivedData.type === 'reloadNodeType') {\n\t\t\t\tawait this.nodeTypesStore.getNodeTypes();\n\t\t\t\tawait this.nodeTypesStore.getFullNodesProperties([receivedData.data]);\n\t\t\t} else if (receivedData.type === 'removeNodeType') {\n\t\t\t\tconst pushData = receivedData.data;\n\n\t\t\t\tconst nodesToBeRemoved: INodeTypeNameVersion[] = [pushData];\n\n\t\t\t\t// Force reload of all credential types\n\t\t\t\tawait this.credentialsStore.fetchCredentialTypes(false).then(() => {\n\t\t\t\t\tthis.nodeTypesStore.removeNodeTypes(nodesToBeRemoved);\n\t\t\t\t});\n\t\t\t} else if (receivedData.type === 'nodeDescriptionUpdated') {\n\t\t\t\tawait this.nodeTypesStore.getNodeTypes();\n\t\t\t\tawait this.credentialsStore.fetchCredentialTypes(true);\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\tgetExecutionError(data: IRunExecutionData | IExecuteContextData) {\n\t\t\tconst error = data.resultData.error;\n\n\t\t\tlet errorMessage: string;\n\n\t\t\tif (data.resultData.lastNodeExecuted && error) {\n\t\t\t\terrorMessage = error.message || error.description;\n\t\t\t} else {\n\t\t\t\terrorMessage = this.$locale.baseText('pushConnection.executionError', {\n\t\t\t\t\tinterpolate: { error: '!' },\n\t\t\t\t});\n\n\t\t\t\tif (error?.message) {\n\t\t\t\t\tlet nodeName: string | undefined;\n\t\t\t\t\tif ('node' in error) {\n\t\t\t\t\t\tnodeName = typeof error.node === 'string' ? error.node : error.node!.name;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst receivedError = nodeName ? `${nodeName}: ${error.message}` : error.message;\n\t\t\t\t\terrorMessage = this.$locale.baseText('pushConnection.executionError', {\n\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\terror: `.${this.$locale.baseText('pushConnection.executionError.details', {\n\t\t\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\t\t\tdetails: receivedError,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t})}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn errorMessage;\n\t\t},\n\t},\n});\n"],"names":["GET_STATUS_ENDPOINT","sendGetWorkerStatus","context","makeRestApiRequest","WORKER_HISTORY_LENGTH","STALE_SECONDS","useOrchestrationStore","defineStore","data","id","rootStore","useRootStore","workerId","pushConnection","defineComponent","useTitleChange","useToast","message","externalHooks","nodeHelpers","workflowHelpers","mapStores","useCredentialsStore","useNodeTypesStore","useUIStore","useWorkflowsStore","useSettingsStore","useSegment","usePushConnectionStore","useCollaborationStore","event","retryAttempts","queueLength","i","messageData","receivedData","isRetry","pushData","recoveredPushData","recoveredExecutionId","_a","executionData","parse","iRunExecutionData","_b","_c","_d","_e","activeRunData","_h","_g","_f","key","iRun","_i","_l","_k","_j","_s","_r","_q","_p","_o","_n","_m","activeExecutionId","runDataExecuted","runDataExecutedErrorMessage","lineNumber","_v","_u","_t","codeNodeEditorEventBus","workflow","workflowSettings","saveManualExecutions","isSavingExecutions","action","globalLinkActionsEventBus","WORKFLOW_SETTINGS_MODAL_KEY","_w","error","workflowData","eventData","TelemetryHelpers.generateNodesGraph","node","_x","_y","title","nodeError","execution","nodeType","nodeOutput","_B","_A","_z","getTriggerNodeServiceName","lastNodeExecuted","itemsCount","nodesToBeRemoved","errorMessage","nodeName","receivedError"],"mappings":"mZAGA,MAAMA,GAAsB,+BAEfC,GAAsB,MAAOC,GAA4C,CAC/E,MAAAC,EAAmBD,EAAS,OAAQF,EAAmB,CAC9D,ECFaI,GAAwB,IAC/BC,GAAgB,IAAM,IAgBfC,GAAwBC,GAAY,uBAAwB,CACxE,MAAO,KAAiC,CACvC,QAAS,CAAC,EACV,eAAgB,CAAC,EACjB,mBAAoB,CAAC,EACrB,eAAgB,IAAA,GAEjB,QAAS,CACR,mBAAmBC,EAAoC,CACjD,KAAA,QAAQA,EAAK,QAAQ,EAAIA,EACzB,KAAK,eAAeA,EAAK,QAAQ,IACrC,KAAK,eAAeA,EAAK,QAAQ,EAAI,CAAA,GAEjC,KAAA,eAAeA,EAAK,QAAQ,EAAE,KAAK,CAAE,KAAAA,EAAM,UAAW,KAAK,IAAI,CAAG,CAAA,EACnE,KAAK,eAAeA,EAAK,QAAQ,EAAE,OAASJ,IAC/C,KAAK,eAAeI,EAAK,QAAQ,EAAE,MAAM,EAE1C,KAAK,mBAAmBA,EAAK,QAAQ,EAAI,KAAK,KAC/C,EACA,oBAAqB,CACT,UAAAC,KAAM,KAAK,mBACjB,KAAK,mBAAmBA,CAAE,EAAIJ,GAAgB,KAAK,QAC/C,OAAA,KAAK,QAAQI,CAAE,EACf,OAAA,KAAK,eAAeA,CAAE,EACtB,OAAA,KAAK,mBAAmBA,CAAE,EAGpC,EACA,0BAA2B,CAC1B,MAAMC,EAAYC,IACb,KAAK,iBACJ,KAAA,eAAiB,YAAY,SAAY,CACvC,MAAAV,GAAoBS,EAAU,iBAAiB,EACrD,KAAK,mBAAmB,GACtB,GAAI,EAET,EACA,yBAA0B,CACrB,KAAK,iBACR,cAAc,KAAK,cAAc,EACjC,KAAK,eAAiB,KA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,CAAA,CACpD,CAAA,MACShE,EAAa,OAAS,2BAC1B,MAAA,KAAK,eAAe,eACpB,MAAA,KAAK,iBAAiB,qBAAqB,EAAI,GAE/C,MAAA,EACR,EACA,kBAAkB3B,EAA+C,CAC1D,MAAAyE,EAAQzE,EAAK,WAAW,MAE1B,IAAA4F,EAEA,GAAA5F,EAAK,WAAW,kBAAoByE,EACxBmB,EAAAnB,EAAM,SAAWA,EAAM,oBAEvBmB,EAAA,KAAK,QAAQ,SAAS,gCAAiC,CACrE,YAAa,CAAE,MAAO,GAAI,CAAA,CAC1B,EAEGnB,GAAA,MAAAA,EAAO,QAAS,CACf,IAAAoB,EACA,SAAUpB,IACboB,EAAW,OAAOpB,EAAM,MAAS,SAAWA,EAAM,KAAOA,EAAM,KAAM,MAGhE,MAAAqB,EAAgBD,EAAW,GAAGA,CAAQ,KAAKpB,EAAM,OAAO,GAAKA,EAAM,QAC1DmB,EAAA,KAAK,QAAQ,SAAS,gCAAiC,CACrE,YAAa,CACZ,MAAO,IAAI,KAAK,QAAQ,SAAS,wCAAyC,CACzE,YAAa,CACZ,QAASE,CACV,CACA,CAAA,CAAC,EACH,CAAA,CACA,CACF,CAGM,OAAAF,CACR,CACD,CACD,CAAC"}
@@ -1,2 +1,2 @@
1
- import{aH as M,e as k,af as c}from"./vendor-2CfOYFi2.js";import{u as y,O as V,t as B,l as S,z as W,aa as C,B as P,dy as D,as as I}from"./n8n-NE7NqrvB.js";import{a as L}from"./index-hMVAffQ3.js";const j=()=>{const E=M(),t=I(),T=L(),g=y(),a=V(),h=B(),u=S(),x=k(()=>h.isEnterpriseFeatureEnabled(W.DebugInEditor));return{applyExecutionData:async o=>{var p;const n=await a.getExecution(o),l=a.getCurrentWorkflow(),m=a.getNodes();if(!((p=n==null?void 0:n.data)!=null&&p.resultData))return;const{runData:f}=n.data.resultData,w=Object.keys(f),b=w.filter(e=>!m.some(i=>i.name===e)),N=Object.keys(a.workflow.pinData??{}),d=w.filter(e=>N.includes(e));if(d.length>0){const e=c("p",[t.baseText("nodeView.confirmMessage.debug.message"),c("ul",{class:"mt-l ml-l"},d.map(s=>c("li",s)))]);if(await T.confirm(e,t.baseText("nodeView.confirmMessage.debug.headline"),{type:"warning",confirmButtonText:t.baseText("nodeView.confirmMessage.debug.confirmButtonText"),cancelButtonText:t.baseText("nodeView.confirmMessage.debug.cancelButtonText"),dangerouslyUseHTMLString:!0,customClass:"matching-pinned-nodes-confirmation"})===C)d.forEach(s=>{const r=a.getNodeByName(s);r&&a.unpinData({node:r})});else{await E.push({name:P.EXECUTION_PREVIEW,params:{name:l.id,executionId:o}});return}}a.setWorkflowExecutionData(n),m.filter(e=>!l.getParentNodes(e.name).length).forEach(e=>{var s,r;const i=(r=(s=f[e.name])==null?void 0:s[0].data)==null?void 0:r.main[0];i&&a.pinData({node:e,data:i})}),g.showToast({title:t.baseText("nodeView.showMessage.debug.title"),message:t.baseText("nodeView.showMessage.debug.content"),type:"info"}),b.length&&g.showToast({title:t.baseText("nodeView.showMessage.debug.missingNodes.title"),message:t.baseText("nodeView.showMessage.debug.missingNodes.content",{interpolate:{nodeNames:b.join(", ")}}),type:"warning"})},handleDebugLinkClick:o=>{if(!x.value){u.openModalWithData({name:D,data:{title:t.baseText(u.contextBasedTranslationKeys.feature.unavailable.title),footerButtonAction:()=>{u.closeModal(D),u.goToUpgrade("debug","upgrade-debug")}}}),o.preventDefault(),o.stopPropagation();return}a.isInDebugMode=!1}}};export{j as u};
2
- //# sourceMappingURL=useExecutionDebugging-WpRAbEhr.js.map
1
+ import{aH as M,e as k,af as c}from"./vendor-2CfOYFi2.js";import{u as y,O as V,t as B,l as S,z as W,aa as C,B as P,dy as D,as as I}from"./n8n-NE7NqrvB.js";import{a as L}from"./index-sMRiWGJS.js";const j=()=>{const E=M(),t=I(),T=L(),g=y(),a=V(),h=B(),u=S(),x=k(()=>h.isEnterpriseFeatureEnabled(W.DebugInEditor));return{applyExecutionData:async o=>{var p;const n=await a.getExecution(o),l=a.getCurrentWorkflow(),m=a.getNodes();if(!((p=n==null?void 0:n.data)!=null&&p.resultData))return;const{runData:f}=n.data.resultData,w=Object.keys(f),b=w.filter(e=>!m.some(i=>i.name===e)),N=Object.keys(a.workflow.pinData??{}),d=w.filter(e=>N.includes(e));if(d.length>0){const e=c("p",[t.baseText("nodeView.confirmMessage.debug.message"),c("ul",{class:"mt-l ml-l"},d.map(s=>c("li",s)))]);if(await T.confirm(e,t.baseText("nodeView.confirmMessage.debug.headline"),{type:"warning",confirmButtonText:t.baseText("nodeView.confirmMessage.debug.confirmButtonText"),cancelButtonText:t.baseText("nodeView.confirmMessage.debug.cancelButtonText"),dangerouslyUseHTMLString:!0,customClass:"matching-pinned-nodes-confirmation"})===C)d.forEach(s=>{const r=a.getNodeByName(s);r&&a.unpinData({node:r})});else{await E.push({name:P.EXECUTION_PREVIEW,params:{name:l.id,executionId:o}});return}}a.setWorkflowExecutionData(n),m.filter(e=>!l.getParentNodes(e.name).length).forEach(e=>{var s,r;const i=(r=(s=f[e.name])==null?void 0:s[0].data)==null?void 0:r.main[0];i&&a.pinData({node:e,data:i})}),g.showToast({title:t.baseText("nodeView.showMessage.debug.title"),message:t.baseText("nodeView.showMessage.debug.content"),type:"info"}),b.length&&g.showToast({title:t.baseText("nodeView.showMessage.debug.missingNodes.title"),message:t.baseText("nodeView.showMessage.debug.missingNodes.content",{interpolate:{nodeNames:b.join(", ")}}),type:"warning"})},handleDebugLinkClick:o=>{if(!x.value){u.openModalWithData({name:D,data:{title:t.baseText(u.contextBasedTranslationKeys.feature.unavailable.title),footerButtonAction:()=>{u.closeModal(D),u.goToUpgrade("debug","upgrade-debug")}}}),o.preventDefault(),o.stopPropagation();return}a.isInDebugMode=!1}}};export{j as u};
2
+ //# sourceMappingURL=useExecutionDebugging-vYjc-e7j.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useExecutionDebugging-WpRAbEhr.js","sources":["../../src/composables/useExecutionDebugging.ts"],"sourcesContent":["import { h, computed } from 'vue';\nimport { useRouter } from 'vue-router';\nimport { useI18n } from '@/composables/useI18n';\nimport { useMessage } from '@/composables/useMessage';\nimport { useToast } from '@/composables/useToast';\nimport {\n\tDEBUG_PAYWALL_MODAL_KEY,\n\tEnterpriseEditionFeature,\n\tMODAL_CONFIRM,\n\tVIEWS,\n} from '@/constants';\nimport type { INodeUi } from '@/Interface';\nimport { useWorkflowsStore } from '@/stores/workflows.store';\nimport { useSettingsStore } from '@/stores/settings.store';\nimport { useUIStore } from '@/stores/ui.store';\n\nexport const useExecutionDebugging = () => {\n\tconst router = useRouter();\n\tconst i18n = useI18n();\n\tconst message = useMessage();\n\tconst toast = useToast();\n\tconst workflowsStore = useWorkflowsStore();\n\tconst settingsStore = useSettingsStore();\n\tconst uiStore = useUIStore();\n\n\tconst isDebugEnabled = computed(() =>\n\t\tsettingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.DebugInEditor),\n\t);\n\n\tconst applyExecutionData = async (executionId: string): Promise<void> => {\n\t\tconst execution = await workflowsStore.getExecution(executionId);\n\t\tconst workflow = workflowsStore.getCurrentWorkflow();\n\t\tconst workflowNodes = workflowsStore.getNodes();\n\n\t\tif (!execution?.data?.resultData) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { runData } = execution.data.resultData;\n\n\t\tconst executionNodeNames = Object.keys(runData);\n\t\tconst missingNodeNames = executionNodeNames.filter(\n\t\t\t(name) => !workflowNodes.some((node) => node.name === name),\n\t\t);\n\n\t\t// Using the pinned data of the workflow to check if the node is pinned\n\t\t// because workflowsStore.getCurrentWorkflow() returns a cached workflow without the updated pinned data\n\t\tconst workflowPinnedNodeNames = Object.keys(workflowsStore.workflow.pinData ?? {});\n\t\tconst matchingPinnedNodeNames = executionNodeNames.filter((name) =>\n\t\t\tworkflowPinnedNodeNames.includes(name),\n\t\t);\n\n\t\tif (matchingPinnedNodeNames.length > 0) {\n\t\t\tconst confirmMessage = h('p', [\n\t\t\t\ti18n.baseText('nodeView.confirmMessage.debug.message'),\n\t\t\t\th(\n\t\t\t\t\t'ul',\n\t\t\t\t\t{ class: 'mt-l ml-l' },\n\t\t\t\t\tmatchingPinnedNodeNames.map((name) => h('li', name)),\n\t\t\t\t),\n\t\t\t]);\n\n\t\t\tconst overWritePinnedDataConfirm = await message.confirm(\n\t\t\t\tconfirmMessage,\n\t\t\t\ti18n.baseText('nodeView.confirmMessage.debug.headline'),\n\t\t\t\t{\n\t\t\t\t\ttype: 'warning',\n\t\t\t\t\tconfirmButtonText: i18n.baseText('nodeView.confirmMessage.debug.confirmButtonText'),\n\t\t\t\t\tcancelButtonText: i18n.baseText('nodeView.confirmMessage.debug.cancelButtonText'),\n\t\t\t\t\tdangerouslyUseHTMLString: true,\n\t\t\t\t\tcustomClass: 'matching-pinned-nodes-confirmation',\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tif (overWritePinnedDataConfirm === MODAL_CONFIRM) {\n\t\t\t\tmatchingPinnedNodeNames.forEach((name) => {\n\t\t\t\t\tconst node = workflowsStore.getNodeByName(name);\n\t\t\t\t\tif (node) {\n\t\t\t\t\t\tworkflowsStore.unpinData({ node });\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tawait router.push({\n\t\t\t\t\tname: VIEWS.EXECUTION_PREVIEW,\n\t\t\t\t\tparams: { name: workflow.id, executionId },\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// Set execution data\n\t\tworkflowsStore.setWorkflowExecutionData(execution);\n\n\t\t// Pin data of all nodes which do not have a parent node\n\t\tworkflowNodes\n\t\t\t.filter((node: INodeUi) => !workflow.getParentNodes(node.name).length)\n\t\t\t.forEach((node: INodeUi) => {\n\t\t\t\tconst nodeData = runData[node.name]?.[0].data?.main[0];\n\t\t\t\tif (nodeData) {\n\t\t\t\t\tworkflowsStore.pinData({\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\tdata: nodeData,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\ttoast.showToast({\n\t\t\ttitle: i18n.baseText('nodeView.showMessage.debug.title'),\n\t\t\tmessage: i18n.baseText('nodeView.showMessage.debug.content'),\n\t\t\ttype: 'info',\n\t\t});\n\n\t\tif (missingNodeNames.length) {\n\t\t\ttoast.showToast({\n\t\t\t\ttitle: i18n.baseText('nodeView.showMessage.debug.missingNodes.title'),\n\t\t\t\tmessage: i18n.baseText('nodeView.showMessage.debug.missingNodes.content', {\n\t\t\t\t\tinterpolate: { nodeNames: missingNodeNames.join(', ') },\n\t\t\t\t}),\n\t\t\t\ttype: 'warning',\n\t\t\t});\n\t\t}\n\t};\n\n\tconst handleDebugLinkClick = (event: Event): void => {\n\t\tif (!isDebugEnabled.value) {\n\t\t\tuiStore.openModalWithData({\n\t\t\t\tname: DEBUG_PAYWALL_MODAL_KEY,\n\t\t\t\tdata: {\n\t\t\t\t\ttitle: i18n.baseText(uiStore.contextBasedTranslationKeys.feature.unavailable.title),\n\t\t\t\t\tfooterButtonAction: () => {\n\t\t\t\t\t\tuiStore.closeModal(DEBUG_PAYWALL_MODAL_KEY);\n\t\t\t\t\t\tvoid uiStore.goToUpgrade('debug', 'upgrade-debug');\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\treturn;\n\t\t}\n\t\tworkflowsStore.isInDebugMode = false;\n\t};\n\n\treturn {\n\t\tapplyExecutionData,\n\t\thandleDebugLinkClick,\n\t};\n};\n"],"names":["useExecutionDebugging","router","useRouter","i18n","useI18n","message","useMessage","toast","useToast","workflowsStore","useWorkflowsStore","settingsStore","useSettingsStore","uiStore","useUIStore","isDebugEnabled","computed","EnterpriseEditionFeature","executionId","execution","workflow","workflowNodes","_a","runData","executionNodeNames","missingNodeNames","name","node","workflowPinnedNodeNames","matchingPinnedNodeNames","confirmMessage","h","MODAL_CONFIRM","VIEWS","nodeData","_b","event","DEBUG_PAYWALL_MODAL_KEY"],"mappings":"kMAgBO,MAAMA,E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MAAM1B,EAAO,KAAK,CACjB,KAAMgC,EAAM,kBACZ,OAAQ,CAAE,KAAMb,EAAS,GAAI,YAAAF,CAAY,CAAA,CACzC,EACD,MACD,CACD,CAGAT,EAAe,yBAAyBU,CAAS,EAGjDE,EACE,OAAQM,GAAkB,CAACP,EAAS,eAAeO,EAAK,IAAI,EAAE,MAAM,EACpE,QAASA,GAAkB,SACrB,MAAAO,GAAWC,GAAAb,EAAAC,EAAQI,EAAK,IAAI,IAAjB,YAAAL,EAAqB,GAAG,OAAxB,YAAAa,EAA8B,KAAK,GAChDD,GACHzB,EAAe,QAAQ,CACtB,KAAAkB,EACA,KAAMO,CAAA,CACN,CACF,CACA,EAEF3B,EAAM,UAAU,CACf,MAAOJ,EAAK,SAAS,kCAAkC,EACvD,QAASA,EAAK,SAAS,oCAAoC,EAC3D,KAAM,MAAA,CACN,EAEGsB,EAAiB,QACpBlB,EAAM,UAAU,CACf,MAAOJ,EAAK,SAAS,+CAA+C,EACpE,QAASA,EAAK,SAAS,kDAAmD,CACzE,YAAa,CAAE,UAAWsB,EAAiB,KAAK,IAAI,CAAE,CAAA,CACtD,EACD,KAAM,SAAA,CACN,CACF,EAwBA,qBArB6BW,GAAuB,CAChD,GAAA,CAACrB,EAAe,MAAO,CAC1BF,EAAQ,kBAAkB,CACzB,KAAMwB,EACN,KAAM,CACL,MAAOlC,EAAK,SAASU,EAAQ,4BAA4B,QAAQ,YAAY,KAAK,EAClF,mBAAoB,IAAM,CACzBA,EAAQ,WAAWwB,CAAuB,EACrCxB,EAAQ,YAAY,QAAS,eAAe,CAClD,CACD,CAAA,CACA,EACDuB,EAAM,eAAe,EACrBA,EAAM,gBAAgB,EACtB,MACD,CACA3B,EAAe,cAAgB,EAAA,CAK/B,CAEF"}
1
+ {"version":3,"file":"useExecutionDebugging-vYjc-e7j.js","sources":["../../src/composables/useExecutionDebugging.ts"],"sourcesContent":["import { h, computed } from 'vue';\nimport { useRouter } from 'vue-router';\nimport { useI18n } from '@/composables/useI18n';\nimport { useMessage } from '@/composables/useMessage';\nimport { useToast } from '@/composables/useToast';\nimport {\n\tDEBUG_PAYWALL_MODAL_KEY,\n\tEnterpriseEditionFeature,\n\tMODAL_CONFIRM,\n\tVIEWS,\n} from '@/constants';\nimport type { INodeUi } from '@/Interface';\nimport { useWorkflowsStore } from '@/stores/workflows.store';\nimport { useSettingsStore } from '@/stores/settings.store';\nimport { useUIStore } from '@/stores/ui.store';\n\nexport const useExecutionDebugging = () => {\n\tconst router = useRouter();\n\tconst i18n = useI18n();\n\tconst message = useMessage();\n\tconst toast = useToast();\n\tconst workflowsStore = useWorkflowsStore();\n\tconst settingsStore = useSettingsStore();\n\tconst uiStore = useUIStore();\n\n\tconst isDebugEnabled = computed(() =>\n\t\tsettingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.DebugInEditor),\n\t);\n\n\tconst applyExecutionData = async (executionId: string): Promise<void> => {\n\t\tconst execution = await workflowsStore.getExecution(executionId);\n\t\tconst workflow = workflowsStore.getCurrentWorkflow();\n\t\tconst workflowNodes = workflowsStore.getNodes();\n\n\t\tif (!execution?.data?.resultData) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { runData } = execution.data.resultData;\n\n\t\tconst executionNodeNames = Object.keys(runData);\n\t\tconst missingNodeNames = executionNodeNames.filter(\n\t\t\t(name) => !workflowNodes.some((node) => node.name === name),\n\t\t);\n\n\t\t// Using the pinned data of the workflow to check if the node is pinned\n\t\t// because workflowsStore.getCurrentWorkflow() returns a cached workflow without the updated pinned data\n\t\tconst workflowPinnedNodeNames = Object.keys(workflowsStore.workflow.pinData ?? {});\n\t\tconst matchingPinnedNodeNames = executionNodeNames.filter((name) =>\n\t\t\tworkflowPinnedNodeNames.includes(name),\n\t\t);\n\n\t\tif (matchingPinnedNodeNames.length > 0) {\n\t\t\tconst confirmMessage = h('p', [\n\t\t\t\ti18n.baseText('nodeView.confirmMessage.debug.message'),\n\t\t\t\th(\n\t\t\t\t\t'ul',\n\t\t\t\t\t{ class: 'mt-l ml-l' },\n\t\t\t\t\tmatchingPinnedNodeNames.map((name) => h('li', name)),\n\t\t\t\t),\n\t\t\t]);\n\n\t\t\tconst overWritePinnedDataConfirm = await message.confirm(\n\t\t\t\tconfirmMessage,\n\t\t\t\ti18n.baseText('nodeView.confirmMessage.debug.headline'),\n\t\t\t\t{\n\t\t\t\t\ttype: 'warning',\n\t\t\t\t\tconfirmButtonText: i18n.baseText('nodeView.confirmMessage.debug.confirmButtonText'),\n\t\t\t\t\tcancelButtonText: i18n.baseText('nodeView.confirmMessage.debug.cancelButtonText'),\n\t\t\t\t\tdangerouslyUseHTMLString: true,\n\t\t\t\t\tcustomClass: 'matching-pinned-nodes-confirmation',\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tif (overWritePinnedDataConfirm === MODAL_CONFIRM) {\n\t\t\t\tmatchingPinnedNodeNames.forEach((name) => {\n\t\t\t\t\tconst node = workflowsStore.getNodeByName(name);\n\t\t\t\t\tif (node) {\n\t\t\t\t\t\tworkflowsStore.unpinData({ node });\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tawait router.push({\n\t\t\t\t\tname: VIEWS.EXECUTION_PREVIEW,\n\t\t\t\t\tparams: { name: workflow.id, executionId },\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// Set execution data\n\t\tworkflowsStore.setWorkflowExecutionData(execution);\n\n\t\t// Pin data of all nodes which do not have a parent node\n\t\tworkflowNodes\n\t\t\t.filter((node: INodeUi) => !workflow.getParentNodes(node.name).length)\n\t\t\t.forEach((node: INodeUi) => {\n\t\t\t\tconst nodeData = runData[node.name]?.[0].data?.main[0];\n\t\t\t\tif (nodeData) {\n\t\t\t\t\tworkflowsStore.pinData({\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\tdata: nodeData,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\ttoast.showToast({\n\t\t\ttitle: i18n.baseText('nodeView.showMessage.debug.title'),\n\t\t\tmessage: i18n.baseText('nodeView.showMessage.debug.content'),\n\t\t\ttype: 'info',\n\t\t});\n\n\t\tif (missingNodeNames.length) {\n\t\t\ttoast.showToast({\n\t\t\t\ttitle: i18n.baseText('nodeView.showMessage.debug.missingNodes.title'),\n\t\t\t\tmessage: i18n.baseText('nodeView.showMessage.debug.missingNodes.content', {\n\t\t\t\t\tinterpolate: { nodeNames: missingNodeNames.join(', ') },\n\t\t\t\t}),\n\t\t\t\ttype: 'warning',\n\t\t\t});\n\t\t}\n\t};\n\n\tconst handleDebugLinkClick = (event: Event): void => {\n\t\tif (!isDebugEnabled.value) {\n\t\t\tuiStore.openModalWithData({\n\t\t\t\tname: DEBUG_PAYWALL_MODAL_KEY,\n\t\t\t\tdata: {\n\t\t\t\t\ttitle: i18n.baseText(uiStore.contextBasedTranslationKeys.feature.unavailable.title),\n\t\t\t\t\tfooterButtonAction: () => {\n\t\t\t\t\t\tuiStore.closeModal(DEBUG_PAYWALL_MODAL_KEY);\n\t\t\t\t\t\tvoid uiStore.goToUpgrade('debug', 'upgrade-debug');\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\treturn;\n\t\t}\n\t\tworkflowsStore.isInDebugMode = false;\n\t};\n\n\treturn {\n\t\tapplyExecutionData,\n\t\thandleDebugLinkClick,\n\t};\n};\n"],"names":["useExecutionDebugging","router","useRouter","i18n","useI18n","message","useMessage","toast","useToast","workflowsStore","useWorkflowsStore","settingsStore","useSettingsStore","uiStore","useUIStore","isDebugEnabled","computed","EnterpriseEditionFeature","executionId","execution","workflow","workflowNodes","_a","runData","executionNodeNames","missingNodeNames","name","node","workflowPinnedNodeNames","matchingPinnedNodeNames","confirmMessage","h","MODAL_CONFIRM","VIEWS","nodeData","_b","event","DEBUG_PAYWALL_MODAL_KEY"],"mappings":"kMAgBO,MAAMA,EAAwB,IAAM,CAC1C,MAAMC,EAASC,IAC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EAAM,kBACZ,OAAQ,CAAE,KAAMb,EAAS,GAAI,YAAAF,CAAY,CAAA,CACzC,EACD,MACD,CACD,CAGAT,EAAe,yBAAyBU,CAAS,EAGjDE,EACE,OAAQM,GAAkB,CAACP,EAAS,eAAeO,EAAK,IAAI,EAAE,MAAM,EACpE,QAASA,GAAkB,SACrB,MAAAO,GAAWC,GAAAb,EAAAC,EAAQI,EAAK,IAAI,IAAjB,YAAAL,EAAqB,GAAG,OAAxB,YAAAa,EAA8B,KAAK,GAChDD,GACHzB,EAAe,QAAQ,CACtB,KAAAkB,EACA,KAAMO,CAAA,CACN,CACF,CACA,EAEF3B,EAAM,UAAU,CACf,MAAOJ,EAAK,SAAS,kCAAkC,EACvD,QAASA,EAAK,SAAS,oCAAoC,EAC3D,KAAM,MAAA,CACN,EAEGsB,EAAiB,QACpBlB,EAAM,UAAU,CACf,MAAOJ,EAAK,SAAS,+CAA+C,EACpE,QAASA,EAAK,SAAS,kDAAmD,CACzE,YAAa,CAAE,UAAWsB,EAAiB,KAAK,IAAI,CAAE,CAAA,CACtD,EACD,KAAM,SAAA,CACN,CACF,EAwBA,qBArB6BW,GAAuB,CAChD,GAAA,CAACrB,EAAe,MAAO,CAC1BF,EAAQ,kBAAkB,CACzB,KAAMwB,EACN,KAAM,CACL,MAAOlC,EAAK,SAASU,EAAQ,4BAA4B,QAAQ,YAAY,KAAK,EAClF,mBAAoB,IAAM,CACzBA,EAAQ,WAAWwB,CAAuB,EACrCxB,EAAQ,YAAY,QAAS,eAAe,CAClD,CACD,CAAA,CACA,EACDuB,EAAM,eAAe,EACrBA,EAAM,gBAAgB,EACtB,MACD,CACA3B,EAAe,cAAgB,EAAA,CAK/B,CAEF"}
@@ -1,2 +1,2 @@
1
- import{m as c}from"./pinia-IhuTtYiV.js";import{u,O as k,l as d,t as h,a4 as v,d3 as p,d2 as W,d6 as m}from"./n8n-NE7NqrvB.js";import{H as g,w as A}from"./index-hMVAffQ3.js";import{G as I}from"./vendor-2CfOYFi2.js";const O=I({mixins:[g,A],setup(){return{...u()}},data(){return{updatingWorkflowActivation:!1}},computed:{...c(h,d,k)},methods:{async activateCurrentWorkflow(s){const t=this.workflowsStore.workflowId;return this.updateWorkflowActivation(t,!0,s)},async updateWorkflowActivation(s,t,l){this.updatingWorkflowActivation=!0;const w=this.workflowsStore.nodesIssuesExist;let o=s;if(!o||o===v){if(!await this.saveCurrentWorkflow()){this.updatingWorkflowActivation=!1;return}o=this.workflowsStore.workflowId}const e=o===this.workflowsStore.workflowId,r=this.workflowsStore.activeWorkflows.includes(o),i={workflow_id:o,is_active:t,previous_status:r,ndv_input:l==="ndv"};this.$telemetry.track("User set workflow active status",i),this.$externalHooks().run("workflowActivate.updateWorkflowActivation",i);try{if(r&&t){this.showMessage({title:this.$locale.baseText("workflowActivator.workflowIsActive"),type:"success"}),this.updatingWorkflowActivation=!1;return}if(e&&w&&t){this.showMessage({title:this.$locale.baseText("workflowActivator.showMessage.activeChangedNodesIssuesExistTrue.title"),message:this.$locale.baseText("workflowActivator.showMessage.activeChangedNodesIssuesExistTrue.message"),type:"error"}),this.updatingWorkflowActivation=!1;return}await this.updateWorkflow({workflowId:o,active:t},!this.uiStore.stateIsDirty)}catch(a){const n=t?"activated":"deactivated";this.showError(a,this.$locale.baseText("workflowActivator.showError.title",{interpolate:{newStateName:n}})+":"),this.updatingWorkflowActivation=!1;return}const f=e?"workflow.activeChangeCurrent":"workflow.activeChange";this.$externalHooks().run(f,{workflowId:o,active:t}),this.$emit("workflowActiveChanged",{id:o,active:t}),this.updatingWorkflowActivation=!1,e&&(t&&p(m).value!=="true"?this.uiStore.openModal(W):await this.settingsStore.fetchPromptsData())}}});export{O as w};
2
- //# sourceMappingURL=workflowActivate-UB1_xc5U.js.map
1
+ import{m as c}from"./pinia-IhuTtYiV.js";import{u,O as k,l as d,t as h,a4 as v,d3 as p,d2 as W,d6 as m}from"./n8n-NE7NqrvB.js";import{H as g,w as A}from"./index-sMRiWGJS.js";import{G as I}from"./vendor-2CfOYFi2.js";const O=I({mixins:[g,A],setup(){return{...u()}},data(){return{updatingWorkflowActivation:!1}},computed:{...c(h,d,k)},methods:{async activateCurrentWorkflow(s){const t=this.workflowsStore.workflowId;return this.updateWorkflowActivation(t,!0,s)},async updateWorkflowActivation(s,t,l){this.updatingWorkflowActivation=!0;const w=this.workflowsStore.nodesIssuesExist;let o=s;if(!o||o===v){if(!await this.saveCurrentWorkflow()){this.updatingWorkflowActivation=!1;return}o=this.workflowsStore.workflowId}const e=o===this.workflowsStore.workflowId,r=this.workflowsStore.activeWorkflows.includes(o),i={workflow_id:o,is_active:t,previous_status:r,ndv_input:l==="ndv"};this.$telemetry.track("User set workflow active status",i),this.$externalHooks().run("workflowActivate.updateWorkflowActivation",i);try{if(r&&t){this.showMessage({title:this.$locale.baseText("workflowActivator.workflowIsActive"),type:"success"}),this.updatingWorkflowActivation=!1;return}if(e&&w&&t){this.showMessage({title:this.$locale.baseText("workflowActivator.showMessage.activeChangedNodesIssuesExistTrue.title"),message:this.$locale.baseText("workflowActivator.showMessage.activeChangedNodesIssuesExistTrue.message"),type:"error"}),this.updatingWorkflowActivation=!1;return}await this.updateWorkflow({workflowId:o,active:t},!this.uiStore.stateIsDirty)}catch(a){const n=t?"activated":"deactivated";this.showError(a,this.$locale.baseText("workflowActivator.showError.title",{interpolate:{newStateName:n}})+":"),this.updatingWorkflowActivation=!1;return}const f=e?"workflow.activeChangeCurrent":"workflow.activeChange";this.$externalHooks().run(f,{workflowId:o,active:t}),this.$emit("workflowActiveChanged",{id:o,active:t}),this.updatingWorkflowActivation=!1,e&&(t&&p(m).value!=="true"?this.uiStore.openModal(W):await this.settingsStore.fetchPromptsData())}}});export{O as w};
2
+ //# sourceMappingURL=workflowActivate-FonyQsS3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"workflowActivate-UB1_xc5U.js","sources":["../../src/mixins/workflowActivate.ts"],"sourcesContent":["import { defineComponent } from 'vue';\nimport { mapStores } from 'pinia';\nimport { useStorage } from '@/composables/useStorage';\n\nimport { externalHooks } from '@/mixins/externalHooks';\nimport { workflowHelpers } from '@/mixins/workflowHelpers';\nimport { useToast } from '@/composables/useToast';\n\nimport {\n\tLOCAL_STORAGE_ACTIVATION_FLAG,\n\tPLACEHOLDER_EMPTY_WORKFLOW_ID,\n\tWORKFLOW_ACTIVE_MODAL_KEY,\n} from '@/constants';\nimport { useUIStore } from '@/stores/ui.store';\nimport { useSettingsStore } from '@/stores/settings.store';\nimport { useWorkflowsStore } from '@/stores/workflows.store';\n\nexport const workflowActivate = defineComponent({\n\tmixins: [externalHooks, workflowHelpers],\n\tsetup() {\n\t\treturn {\n\t\t\t...useToast(),\n\t\t};\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tupdatingWorkflowActivation: false,\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapStores(useSettingsStore, useUIStore, useWorkflowsStore),\n\t},\n\tmethods: {\n\t\tasync activateCurrentWorkflow(telemetrySource?: string) {\n\t\t\tconst workflowId = this.workflowsStore.workflowId;\n\t\t\treturn this.updateWorkflowActivation(workflowId, true, telemetrySource);\n\t\t},\n\t\tasync updateWorkflowActivation(\n\t\t\tworkflowId: string | undefined,\n\t\t\tnewActiveState: boolean,\n\t\t\ttelemetrySource?: string,\n\t\t) {\n\t\t\tthis.updatingWorkflowActivation = true;\n\t\t\tconst nodesIssuesExist = this.workflowsStore.nodesIssuesExist;\n\n\t\t\tlet currWorkflowId: string | undefined = workflowId;\n\t\t\tif (!currWorkflowId || currWorkflowId === PLACEHOLDER_EMPTY_WORKFLOW_ID) {\n\t\t\t\tconst saved = await this.saveCurrentWorkflow();\n\t\t\t\tif (!saved) {\n\t\t\t\t\tthis.updatingWorkflowActivation = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcurrWorkflowId = this.workflowsStore.workflowId;\n\t\t\t}\n\t\t\tconst isCurrentWorkflow = currWorkflowId === this.workflowsStore.workflowId;\n\n\t\t\tconst activeWorkflows = this.workflowsStore.activeWorkflows;\n\t\t\tconst isWorkflowActive = activeWorkflows.includes(currWorkflowId);\n\n\t\t\tconst telemetryPayload = {\n\t\t\t\tworkflow_id: currWorkflowId,\n\t\t\t\tis_active: newActiveState,\n\t\t\t\tprevious_status: isWorkflowActive,\n\t\t\t\tndv_input: telemetrySource === 'ndv',\n\t\t\t};\n\t\t\tthis.$telemetry.track('User set workflow active status', telemetryPayload);\n\t\t\tvoid this.$externalHooks().run('workflowActivate.updateWorkflowActivation', telemetryPayload);\n\n\t\t\ttry {\n\t\t\t\tif (isWorkflowActive && newActiveState) {\n\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\ttitle: this.$locale.baseText('workflowActivator.workflowIsActive'),\n\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t});\n\t\t\t\t\tthis.updatingWorkflowActivation = false;\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (isCurrentWorkflow && nodesIssuesExist && newActiveState) {\n\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\ttitle: this.$locale.baseText(\n\t\t\t\t\t\t\t'workflowActivator.showMessage.activeChangedNodesIssuesExistTrue.title',\n\t\t\t\t\t\t),\n\t\t\t\t\t\tmessage: this.$locale.baseText(\n\t\t\t\t\t\t\t'workflowActivator.showMessage.activeChangedNodesIssuesExistTrue.message',\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t});\n\n\t\t\t\t\tthis.updatingWorkflowActivation = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tawait this.updateWorkflow(\n\t\t\t\t\t{ workflowId: currWorkflowId, active: newActiveState },\n\t\t\t\t\t!this.uiStore.stateIsDirty,\n\t\t\t\t);\n\t\t\t} catch (error) {\n\t\t\t\tconst newStateName = newActiveState ? 'activated' : 'deactivated';\n\t\t\t\tthis.showError(\n\t\t\t\t\terror,\n\t\t\t\t\tthis.$locale.baseText('workflowActivator.showError.title', {\n\t\t\t\t\t\tinterpolate: { newStateName },\n\t\t\t\t\t}) + ':',\n\t\t\t\t);\n\t\t\t\tthis.updatingWorkflowActivation = false;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst activationEventName = isCurrentWorkflow\n\t\t\t\t? 'workflow.activeChangeCurrent'\n\t\t\t\t: 'workflow.activeChange';\n\t\t\tvoid this.$externalHooks().run(activationEventName, {\n\t\t\t\tworkflowId: currWorkflowId,\n\t\t\t\tactive: newActiveState,\n\t\t\t});\n\n\t\t\tthis.$emit('workflowActiveChanged', { id: currWorkflowId, active: newActiveState });\n\t\t\tthis.updatingWorkflowActivation = false;\n\n\t\t\tif (isCurrentWorkflow) {\n\t\t\t\tif (newActiveState && useStorage(LOCAL_STORAGE_ACTIVATION_FLAG).value !== 'true') {\n\t\t\t\t\tthis.uiStore.openModal(WORKFLOW_ACTIVE_MODAL_KEY);\n\t\t\t\t} else {\n\t\t\t\t\tawait this.settingsStore.fetchPromptsData();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n});\n"],"names":["workflowActivate","defineComponent","externalHooks","workflowHelpers","useToast","mapStores","useSettingsStore","useUIStore","useWorkflowsStore","telemetrySource","workflowId","newActiveState","nodesIssuesExist","currWorkflowId","PLACEHOLDER_EMPTY_WORKFLOW_ID","isCurrentWorkflow","isWorkflowActive","telemetryPayload","error","newStateName","activationEventName","useStorage","LOCAL_STORAGE_ACTIVATION_FLAG","WORKFLOW_ACTIVE_MODAL_KEY"],"mappings":"sNAiBO,MAAMA,EAAmBC,EAAgB,CAC/C,OAAQ,CAACC,EAAeC,CAAe,EACvC,OAAQ,CACA,MAAA,CACN,GAAGC,EAAS,CAAA,CAEd,EACA,MAAO,CACC,MAAA,CACN,2BAA4B,EAAA,CAE9B,EACA,SAAU,CACT,GAAGC,EAAUC,EAAkBC,EAAYC,CAAiB,CAC7D,EACA,QAAS,CACR,MAAM,wBAAwBC,EAA0B,CACjD,MAAAC,EAAa,KAAK,eAAe,WACvC,OAAO,KAAK,yBAAyBA,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F,CAAA,CACR,EAED,KAAK,MAAM,wBAAyB,CAAE,GAAIE,EAAgB,OAAQF,EAAgB,EAClF,KAAK,2BAA6B,GAE9BI,IACCJ,GAAkBU,EAAWC,CAA6B,EAAE,QAAU,OACpE,KAAA,QAAQ,UAAUC,CAAyB,EAE1C,MAAA,KAAK,cAAc,mBAG5B,CACD,CACD,CAAC"}
1
+ {"version":3,"file":"workflowActivate-FonyQsS3.js","sources":["../../src/mixins/workflowActivate.ts"],"sourcesContent":["import { defineComponent } from 'vue';\nimport { mapStores } from 'pinia';\nimport { useStorage } from '@/composables/useStorage';\n\nimport { externalHooks } from '@/mixins/externalHooks';\nimport { workflowHelpers } from '@/mixins/workflowHelpers';\nimport { useToast } from '@/composables/useToast';\n\nimport {\n\tLOCAL_STORAGE_ACTIVATION_FLAG,\n\tPLACEHOLDER_EMPTY_WORKFLOW_ID,\n\tWORKFLOW_ACTIVE_MODAL_KEY,\n} from '@/constants';\nimport { useUIStore } from '@/stores/ui.store';\nimport { useSettingsStore } from '@/stores/settings.store';\nimport { useWorkflowsStore } from '@/stores/workflows.store';\n\nexport const workflowActivate = defineComponent({\n\tmixins: [externalHooks, workflowHelpers],\n\tsetup() {\n\t\treturn {\n\t\t\t...useToast(),\n\t\t};\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tupdatingWorkflowActivation: false,\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapStores(useSettingsStore, useUIStore, useWorkflowsStore),\n\t},\n\tmethods: {\n\t\tasync activateCurrentWorkflow(telemetrySource?: string) {\n\t\t\tconst workflowId = this.workflowsStore.workflowId;\n\t\t\treturn this.updateWorkflowActivation(workflowId, true, telemetrySource);\n\t\t},\n\t\tasync updateWorkflowActivation(\n\t\t\tworkflowId: string | undefined,\n\t\t\tnewActiveState: boolean,\n\t\t\ttelemetrySource?: string,\n\t\t) {\n\t\t\tthis.updatingWorkflowActivation = true;\n\t\t\tconst nodesIssuesExist = this.workflowsStore.nodesIssuesExist;\n\n\t\t\tlet currWorkflowId: string | undefined = workflowId;\n\t\t\tif (!currWorkflowId || currWorkflowId === PLACEHOLDER_EMPTY_WORKFLOW_ID) {\n\t\t\t\tconst saved = await this.saveCurrentWorkflow();\n\t\t\t\tif (!saved) {\n\t\t\t\t\tthis.updatingWorkflowActivation = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcurrWorkflowId = this.workflowsStore.workflowId;\n\t\t\t}\n\t\t\tconst isCurrentWorkflow = currWorkflowId === this.workflowsStore.workflowId;\n\n\t\t\tconst activeWorkflows = this.workflowsStore.activeWorkflows;\n\t\t\tconst isWorkflowActive = activeWorkflows.includes(currWorkflowId);\n\n\t\t\tconst telemetryPayload = {\n\t\t\t\tworkflow_id: currWorkflowId,\n\t\t\t\tis_active: newActiveState,\n\t\t\t\tprevious_status: isWorkflowActive,\n\t\t\t\tndv_input: telemetrySource === 'ndv',\n\t\t\t};\n\t\t\tthis.$telemetry.track('User set workflow active status', telemetryPayload);\n\t\t\tvoid this.$externalHooks().run('workflowActivate.updateWorkflowActivation', telemetryPayload);\n\n\t\t\ttry {\n\t\t\t\tif (isWorkflowActive && newActiveState) {\n\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\ttitle: this.$locale.baseText('workflowActivator.workflowIsActive'),\n\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t});\n\t\t\t\t\tthis.updatingWorkflowActivation = false;\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (isCurrentWorkflow && nodesIssuesExist && newActiveState) {\n\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\ttitle: this.$locale.baseText(\n\t\t\t\t\t\t\t'workflowActivator.showMessage.activeChangedNodesIssuesExistTrue.title',\n\t\t\t\t\t\t),\n\t\t\t\t\t\tmessage: this.$locale.baseText(\n\t\t\t\t\t\t\t'workflowActivator.showMessage.activeChangedNodesIssuesExistTrue.message',\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t});\n\n\t\t\t\t\tthis.updatingWorkflowActivation = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tawait this.updateWorkflow(\n\t\t\t\t\t{ workflowId: currWorkflowId, active: newActiveState },\n\t\t\t\t\t!this.uiStore.stateIsDirty,\n\t\t\t\t);\n\t\t\t} catch (error) {\n\t\t\t\tconst newStateName = newActiveState ? 'activated' : 'deactivated';\n\t\t\t\tthis.showError(\n\t\t\t\t\terror,\n\t\t\t\t\tthis.$locale.baseText('workflowActivator.showError.title', {\n\t\t\t\t\t\tinterpolate: { newStateName },\n\t\t\t\t\t}) + ':',\n\t\t\t\t);\n\t\t\t\tthis.updatingWorkflowActivation = false;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst activationEventName = isCurrentWorkflow\n\t\t\t\t? 'workflow.activeChangeCurrent'\n\t\t\t\t: 'workflow.activeChange';\n\t\t\tvoid this.$externalHooks().run(activationEventName, {\n\t\t\t\tworkflowId: currWorkflowId,\n\t\t\t\tactive: newActiveState,\n\t\t\t});\n\n\t\t\tthis.$emit('workflowActiveChanged', { id: currWorkflowId, active: newActiveState });\n\t\t\tthis.updatingWorkflowActivation = false;\n\n\t\t\tif (isCurrentWorkflow) {\n\t\t\t\tif (newActiveState && useStorage(LOCAL_STORAGE_ACTIVATION_FLAG).value !== 'true') {\n\t\t\t\t\tthis.uiStore.openModal(WORKFLOW_ACTIVE_MODAL_KEY);\n\t\t\t\t} else {\n\t\t\t\t\tawait this.settingsStore.fetchPromptsData();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n});\n"],"names":["workflowActivate","defineComponent","externalHooks","workflowHelpers","useToast","mapStores","useSettingsStore","useUIStore","useWorkflowsStore","telemetrySource","workflowId","newActiveState","nodesIssuesExist","currWorkflowId","PLACEHOLDER_EMPTY_WORKFLOW_ID","isCurrentWorkflow","isWorkflowActive","telemetryPayload","error","newStateName","activationEventName","useStorage","LOCAL_STORAGE_ACTIVATION_FLAG","WORKFL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,KAAK,eACV,CAAE,WAAYE,EAAgB,OAAQF,CAAe,EACrD,CAAC,KAAK,QAAQ,YAAA,QAEPO,EAAO,CACT,MAAAC,EAAeR,EAAiB,YAAc,cAC/C,KAAA,UACJO,EACA,KAAK,QAAQ,SAAS,oCAAqC,CAC1D,YAAa,CAAE,aAAAC,CAAa,CAC5B,CAAA,EAAI,GAAA,EAEN,KAAK,2BAA6B,GAClC,MACD,CAEM,MAAAC,EAAsBL,EACzB,+BACA,wBACE,KAAK,iBAAiB,IAAIK,EAAqB,CACnD,WAAYP,EACZ,OAAQF,CAAA,CACR,EAED,KAAK,MAAM,wBAAyB,CAAE,GAAIE,EAAgB,OAAQF,EAAgB,EAClF,KAAK,2BAA6B,GAE9BI,IACCJ,GAAkBU,EAAWC,CAA6B,EAAE,QAAU,OACpE,KAAA,QAAQ,UAAUC,CAAyB,EAE1C,MAAA,KAAK,cAAc,mBAG5B,CACD,CACD,CAAC"}
package/dist/index.html CHANGED
@@ -12,7 +12,7 @@
12
12
  <script>!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled getFeatureFlag onFeatureFlags reloadFeatureFlags".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[])</script>
13
13
 
14
14
  <title>n8n.io - Workflow Automation</title>
15
- <script type="module" crossorigin src="/%7B%7BBASE_PATH%7D%7D/assets/index-hMVAffQ3.js"></script>
15
+ <script type="module" crossorigin src="/%7B%7BBASE_PATH%7D%7D/assets/index-sMRiWGJS.js"></script>
16
16
  <link rel="modulepreload" crossorigin href="/%7B%7BBASE_PATH%7D%7D/assets/vendor-2CfOYFi2.js">
17
17
  <link rel="modulepreload" crossorigin href="/%7B%7BBASE_PATH%7D%7D/assets/lodash-es-s_m9YyW7.js">
18
18
  <link rel="modulepreload" crossorigin href="/%7B%7BBASE_PATH%7D%7D/assets/@fortawesome/fontawesome-svg-core-xYGjsix9.js">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-editor-ui",
3
- "version": "1.19.1",
3
+ "version": "1.19.3",
4
4
  "description": "Workflow Editor UI for n8n",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "homepage": "https://n8n.io",
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExecutionsList-VqMNpnno.js","sources":["../../src/components/ExecutionsView/ExecutionCard.vue","../../src/components/ExecutionsView/ExecutionsSidebar.vue","../../src/components/ExecutionsView/ExecutionsList.vue"],"sourcesContent":["<template>\n\t<div\n\t\t:class=\"{\n\t\t\t['execution-card']: true,\n\t\t\t[$style.executionCard]: true,\n\t\t\t[$style.active]: isActive,\n\t\t\t[$style[executionUIDetails.name]]: true,\n\t\t\t[$style.highlight]: highlight,\n\t\t\t[$style.showGap]: showGap,\n\t\t}\"\n\t>\n\t\t<router-link\n\t\t\t:class=\"$style.executionLink\"\n\t\t\t:to=\"{\n\t\t\t\tname: VIEWS.EXECUTION_PREVIEW,\n\t\t\t\tparams: { name: currentWorkflow, executionId: execution.id },\n\t\t\t}\"\n\t\t\t:data-test-execution-status=\"executionUIDetails.name\"\n\t\t>\n\t\t\t<div :class=\"$style.description\">\n\t\t\t\t<n8n-text color=\"text-dark\" :bold=\"true\" size=\"medium\" data-test-id=\"execution-time\">\n\t\t\t\t\t{{ executionUIDetails.startTime }}\n\t\t\t\t</n8n-text>\n\t\t\t\t<div :class=\"$style.executionStatus\">\n\t\t\t\t\t<n8n-spinner\n\t\t\t\t\t\tv-if=\"executionUIDetails.name === 'running'\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t:class=\"[$style.spinner, 'mr-4xs']\"\n\t\t\t\t\t/>\n\t\t\t\t\t<n8n-text :class=\"$style.statusLabel\" size=\"small\">{{\n\t\t\t\t\t\texecutionUIDetails.label\n\t\t\t\t\t}}</n8n-text>\n\t\t\t\t\t{{ ' ' }}\n\t\t\t\t\t<n8n-text\n\t\t\t\t\t\tv-if=\"executionUIDetails.name === 'running'\"\n\t\t\t\t\t\t:color=\"isActive ? 'text-dark' : 'text-base'\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{{ $locale.baseText('executionDetails.runningTimeRunning') }}\n\t\t\t\t\t\t<execution-time :start-time=\"execution.startedAt\" />\n\t\t\t\t\t</n8n-text>\n\t\t\t\t\t<n8n-text\n\t\t\t\t\t\tv-else-if=\"executionUIDetails.runningTime !== ''\"\n\t\t\t\t\t\t:color=\"isActive ? 'text-dark' : 'text-base'\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t$locale.baseText('executionDetails.runningTimeFinished', {\n\t\t\t\t\t\t\t\tinterpolate: { time: executionUIDetails?.runningTime },\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}}\n\t\t\t\t\t</n8n-text>\n\t\t\t\t</div>\n\t\t\t\t<div v-if=\"execution.mode === 'retry'\">\n\t\t\t\t\t<n8n-text :color=\"isActive ? 'text-dark' : 'text-base'\" size=\"small\">\n\t\t\t\t\t\t{{ $locale.baseText('executionDetails.retry') }} #{{ execution.retryOf }}\n\t\t\t\t\t</n8n-text>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div :class=\"$style.icons\">\n\t\t\t\t<n8n-action-dropdown\n\t\t\t\t\tv-if=\"executionUIDetails.name === 'error'\"\n\t\t\t\t\t:class=\"[$style.icon, $style.retry]\"\n\t\t\t\t\t:items=\"retryExecutionActions\"\n\t\t\t\t\tactivatorIcon=\"redo\"\n\t\t\t\t\tdata-test-id=\"retry-execution-button\"\n\t\t\t\t\t@select=\"onRetryMenuItemSelect\"\n\t\t\t\t/>\n\t\t\t\t<n8n-tooltip v-if=\"execution.mode === 'manual'\" placement=\"top\">\n\t\t\t\t\t<template #content>\n\t\t\t\t\t\t<span>{{ $locale.baseText('executionsList.test') }}</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<font-awesome-icon\n\t\t\t\t\t\tv-if=\"execution.mode === 'manual'\"\n\t\t\t\t\t\t:class=\"[$style.icon, $style.manual]\"\n\t\t\t\t\t\ticon=\"flask\"\n\t\t\t\t\t/>\n\t\t\t\t</n8n-tooltip>\n\t\t\t</div>\n\t\t</router-link>\n\t</div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport type { IExecutionsSummary } from '@/Interface';\nimport type { IExecutionUIData } from '@/mixins/executionsHelpers';\nimport { executionHelpers } from '@/mixins/executionsHelpers';\nimport { VIEWS } from '@/constants';\nimport ExecutionTime from '@/components/ExecutionTime.vue';\n\nexport default defineComponent({\n\tname: 'execution-card',\n\tmixins: [executionHelpers],\n\tcomponents: {\n\t\tExecutionTime,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tVIEWS,\n\t\t};\n\t},\n\tprops: {\n\t\texecution: {\n\t\t\ttype: Object as () => IExecutionsSummary,\n\t\t\trequired: true,\n\t\t},\n\t\thighlight: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tshowGap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tcomputed: {\n\t\tretryExecutionActions(): object[] {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tid: 'current-workflow',\n\t\t\t\t\tlabel: this.$locale.baseText('executionsList.retryWithCurrentlySavedWorkflow'),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'original-workflow',\n\t\t\t\t\tlabel: this.$locale.baseText('executionsList.retryWithOriginalWorkflow'),\n\t\t\t\t},\n\t\t\t];\n\t\t},\n\t\texecutionUIDetails(): IExecutionUIData {\n\t\t\treturn this.getExecutionUIDetails(this.execution);\n\t\t},\n\t\tisActive(): boolean {\n\t\t\treturn this.execution.id === this.$route.params.executionId;\n\t\t},\n\t},\n\tmethods: {\n\t\tonRetryMenuItemSelect(action: string): void {\n\t\t\tthis.$emit('retryExecution', { execution: this.execution, command: action });\n\t\t},\n\t},\n});\n</script>\n\n<style module lang=\"scss\">\n.executionCard {\n\tdisplay: flex;\n\tflex-direction: column;\n\tpadding-right: var(--spacing-m);\n\n\t&.active {\n\t\tborder-left: var(--spacing-4xs) var(--border-style-base) transparent !important;\n\n\t\t.executionStatus {\n\t\t\tcolor: var(--color-text-dark) !important;\n\t\t}\n\t}\n\n\t&:hover,\n\t&.active {\n\t\t.executionLink {\n\t\t\tbackground-color: var(--color-foreground-light);\n\t\t}\n\t}\n\n\t&.running {\n\t\t.spinner {\n\t\t\tposition: relative;\n\t\t\ttop: 1px;\n\t\t}\n\t\t&,\n\t\t& .executionLink {\n\t\t\tborder-left: var(--spacing-4xs) var(--border-style-base) var(--execution-card-border-running);\n\t\t}\n\t\t.statusLabel,\n\t\t.spinner {\n\t\t\tcolor: var(--color-warning);\n\t\t}\n\t}\n\n\t&.success {\n\t\t&,\n\t\t& .executionLink {\n\t\t\tborder-left: var(--spacing-4xs) var(--border-style-base) var(--execution-card-border-success);\n\t\t}\n\t}\n\n\t&.waiting {\n\t\t&,\n\t\t& .executionLink {\n\t\t\tborder-left: var(--spacing-4xs) var(--border-style-base) var(--execution-card-border-waiting);\n\t\t}\n\t\t.statusLabel {\n\t\t\tcolor: var(--color-secondary);\n\t\t}\n\t}\n\n\t&.error {\n\t\t&,\n\t\t& .executionLink {\n\t\t\tborder-left: var(--spacing-4xs) var(--border-style-base) var(--execution-card-border-error);\n\t\t}\n\t\t.statusLabel {\n\t\t\tcolor: var(--color-danger);\n\t\t}\n\t}\n\n\t&.unknown {\n\t\t&,\n\t\t& .executionLink {\n\t\t\tborder-left: var(--spacing-4xs) var(--border-style-base) var(--execution-card-border-unknown);\n\t\t}\n\t}\n}\n\n.executionLink {\n\tdisplay: flex;\n\twidth: 100%;\n\talign-items: center;\n\tjustify-content: space-between;\n\tcolor: var(--color-text-base);\n\tfont-size: var(--font-size-xs);\n\tpadding: var(--spacing-xs);\n\tpadding-right: var(--spacing-s);\n\tposition: relative;\n\tleft: calc(\n\t\t-1 * var(--spacing-4xs)\n\t); // Hide link border under card border so it's not visible when not hovered\n\n\t&:active {\n\t\t.icon,\n\t\t.statusLabel {\n\t\t\tcolor: var(--color-text-base);\n\t\t}\n\t}\n}\n\n.icons {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.icon {\n\tfont-size: var(--font-size-s);\n\n\t&.retry {\n\t\tsvg {\n\t\t\tcolor: var(--color-primary);\n\t\t}\n\t}\n\n\t&.manual {\n\t\tposition: relative;\n\t\ttop: 1px;\n\t}\n\n\t& + & {\n\t\tmargin-left: var(--spacing-2xs);\n\t}\n}\n.showGap {\n\tmargin-bottom: var(--spacing-2xs);\n\t.executionLink {\n\t\tborder-bottom: 1px solid var(--color-foreground-dark);\n\t}\n}\n</style>\n","<template>\n\t<div\n\t\t:class=\"['executions-sidebar', $style.container]\"\n\t\tref=\"container\"\n\t\tdata-test-id=\"executions-sidebar\"\n\t>\n\t\t<div :class=\"$style.heading\">\n\t\t\t<n8n-heading tag=\"h2\" size=\"medium\" color=\"text-dark\">\n\t\t\t\t{{ $locale.baseText('generic.executions') }}\n\t\t\t</n8n-heading>\n\t\t</div>\n\t\t<div :class=\"$style.controls\">\n\t\t\t<el-checkbox\n\t\t\t\t:modelValue=\"autoRefresh\"\n\t\t\t\t@update:modelValue=\"$emit('update:autoRefresh', $event)\"\n\t\t\t\tdata-test-id=\"auto-refresh-checkbox\"\n\t\t\t>\n\t\t\t\t{{ $locale.baseText('executionsList.autoRefresh') }}\n\t\t\t</el-checkbox>\n\t\t\t<execution-filter popover-placement=\"left-start\" @filterChanged=\"onFilterChanged\" />\n\t\t</div>\n\t\t<div\n\t\t\t:class=\"$style.executionList\"\n\t\t\tref=\"executionList\"\n\t\t\tdata-test-id=\"current-executions-list\"\n\t\t\t@scroll=\"loadMore(20)\"\n\t\t>\n\t\t\t<div v-if=\"loading\" class=\"mr-l\">\n\t\t\t\t<n8n-loading variant=\"rect\" />\n\t\t\t</div>\n\t\t\t<div v-if=\"!loading && executions.length === 0\" :class=\"$style.noResultsContainer\">\n\t\t\t\t<n8n-text color=\"text-base\" size=\"medium\" align=\"center\">\n\t\t\t\t\t{{ $locale.baseText('executionsLandingPage.noResults') }}\n\t\t\t\t</n8n-text>\n\t\t\t</div>\n\t\t\t<execution-card\n\t\t\t\tv-else-if=\"temporaryExecution\"\n\t\t\t\t:execution=\"temporaryExecution\"\n\t\t\t\t:ref=\"`execution-${temporaryExecution.id}`\"\n\t\t\t\t:data-test-id=\"`execution-details-${temporaryExecution.id}`\"\n\t\t\t\t:showGap=\"true\"\n\t\t\t\t@retryExecution=\"onRetryExecution\"\n\t\t\t/>\n\t\t\t<execution-card\n\t\t\t\tv-for=\"execution in executions\"\n\t\t\t\t:key=\"execution.id\"\n\t\t\t\t:execution=\"execution\"\n\t\t\t\t:ref=\"`execution-${execution.id}`\"\n\t\t\t\t:data-test-id=\"`execution-details-${execution.id}`\"\n\t\t\t\t@retryExecution=\"onRetryExecution\"\n\t\t\t/>\n\t\t\t<div v-if=\"loadingMore\" class=\"mr-m\">\n\t\t\t\t<n8n-loading variant=\"p\" :rows=\"1\" />\n\t\t\t</div>\n\t\t</div>\n\t\t<div :class=\"$style.infoAccordion\">\n\t\t\t<executions-info-accordion :initiallyExpanded=\"false\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script lang=\"ts\">\nimport ExecutionCard from '@/components/ExecutionsView/ExecutionCard.vue';\nimport ExecutionsInfoAccordion from '@/components/ExecutionsView/ExecutionsInfoAccordion.vue';\nimport ExecutionFilter from '@/components/ExecutionFilter.vue';\nimport { VIEWS } from '@/constants';\nimport type { IExecutionsSummary } from 'n8n-workflow';\nimport type { Route } from 'vue-router';\nimport { defineComponent } from 'vue';\nimport type { PropType } from 'vue';\nimport { mapStores } from 'pinia';\nimport { useUIStore } from '@/stores/ui.store';\nimport { useWorkflowsStore } from '@/stores/workflows.store';\nimport type { ExecutionFilterType } from '@/Interface';\n\ntype ExecutionCardRef = InstanceType<typeof ExecutionCard>;\n\nexport default defineComponent({\n\tname: 'executions-sidebar',\n\tcomponents: {\n\t\tExecutionCard,\n\t\tExecutionsInfoAccordion,\n\t\tExecutionFilter,\n\t},\n\tprops: {\n\t\tautoRefresh: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\texecutions: {\n\t\t\ttype: Array as PropType<IExecutionsSummary[]>,\n\t\t\trequired: true,\n\t\t},\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\tloadingMore: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\ttemporaryExecution: {\n\t\t\ttype: Object as PropType<IExecutionsSummary>,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tVIEWS,\n\t\t\tfilter: {} as ExecutionFilterType,\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapStores(useUIStore, useWorkflowsStore),\n\t},\n\twatch: {\n\t\t$route(to: Route, from: Route) {\n\t\t\tif (from.name === VIEWS.EXECUTION_PREVIEW && to.name === VIEWS.EXECUTION_HOME) {\n\t\t\t\t// Skip parent route when navigating through executions with back button\n\t\t\t\tthis.$router.go(-1);\n\t\t\t}\n\t\t},\n\t\t'workflowsStore.activeWorkflowExecution'() {\n\t\t\tthis.checkListSize();\n\t\t\tthis.scrollToActiveCard();\n\t\t},\n\t},\n\tmounted() {\n\t\t// On larger screens, we need to load more then first page of executions\n\t\t// for the scroll bar to appear and infinite scrolling is enabled\n\t\tthis.checkListSize();\n\t\tthis.scrollToActiveCard();\n\t},\n\tmethods: {\n\t\tloadMore(limit = 20): void {\n\t\t\tif (!this.loading) {\n\t\t\t\tconst executionsListRef = this.$refs.executionList as HTMLElement | undefined;\n\t\t\t\tif (executionsListRef) {\n\t\t\t\t\tconst diff =\n\t\t\t\t\t\texecutionsListRef.offsetHeight -\n\t\t\t\t\t\t(executionsListRef.scrollHeight - executionsListRef.scrollTop);\n\t\t\t\t\tif (diff > -10 && diff < 10) {\n\t\t\t\t\t\tthis.$emit('loadMore', limit);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tonRetryExecution(payload: object) {\n\t\t\tthis.$emit('retryExecution', payload);\n\t\t},\n\t\tonRefresh(): void {\n\t\t\tthis.$emit('refresh');\n\t\t},\n\t\tonFilterChanged(filter: ExecutionFilterType) {\n\t\t\tthis.$emit('filterUpdated', filter);\n\t\t},\n\t\treloadExecutions(): void {\n\t\t\tthis.$emit('reloadExecutions');\n\t\t},\n\t\tcheckListSize(): void {\n\t\t\tconst sidebarContainerRef = this.$refs.container as HTMLElement | undefined;\n\t\t\tconst currentExecutionCardRefs = this.$refs[\n\t\t\t\t`execution-${this.workflowsStore.activeWorkflowExecution?.id}`\n\t\t\t] as ExecutionCardRef[] | undefined;\n\n\t\t\t// Find out how many execution card can fit into list\n\t\t\t// and load more if needed\n\t\t\tif (sidebarContainerRef && currentExecutionCardRefs?.length) {\n\t\t\t\tconst cardElement = currentExecutionCardRefs[0].$el as HTMLElement;\n\t\t\t\tconst listCapacity = Math.ceil(sidebarContainerRef.clientHeight / cardElement.clientHeight);\n\n\t\t\t\tif (listCapacity > this.executions.length) {\n\t\t\t\t\tthis.$emit('loadMore', listCapacity - this.executions.length);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tscrollToActiveCard(): void {\n\t\t\tconst executionsListRef = this.$refs.executionList as HTMLElement | undefined;\n\t\t\tconst currentExecutionCardRefs = this.$refs[\n\t\t\t\t`execution-${this.workflowsStore.activeWorkflowExecution?.id}`\n\t\t\t] as ExecutionCardRef[] | undefined;\n\n\t\t\tif (\n\t\t\t\texecutionsListRef &&\n\t\t\t\tcurrentExecutionCardRefs?.length &&\n\t\t\t\tthis.workflowsStore.activeWorkflowExecution\n\t\t\t) {\n\t\t\t\tconst cardElement = currentExecutionCardRefs[0].$el as HTMLElement;\n\t\t\t\tconst cardRect = cardElement.getBoundingClientRect();\n\t\t\t\tconst LIST_HEADER_OFFSET = 200;\n\t\t\t\tif (cardRect.top > executionsListRef.offsetHeight) {\n\t\t\t\t\texecutionsListRef.scrollTo({ top: cardRect.top - LIST_HEADER_OFFSET });\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n});\n</script>\n\n<style module lang=\"scss\">\n.container {\n\tflex: 310px 0 0;\n\tbackground-color: var(--color-background-xlight);\n\tborder-right: var(--border-base);\n\tpadding: var(--spacing-l) 0 var(--spacing-l) var(--spacing-l);\n\tz-index: 1;\n\tdisplay: flex;\n\tflex-direction: column;\n\toverflow: hidden;\n}\n\n.heading {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: baseline;\n\tpadding-right: var(--spacing-l);\n}\n\n.controls {\n\tpadding: var(--spacing-s) 0 var(--spacing-xs);\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tpadding-right: var(--spacing-m);\n\n\tbutton {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n}\n\n.executionList {\n\tflex: 1;\n\toverflow: auto;\n\tmargin-bottom: var(--spacing-m);\n\tbackground-color: var(--color-background-xlight) !important;\n\n\t// Scrolling fader\n\t&::before {\n\t\tposition: absolute;\n\t\tdisplay: block;\n\t\twidth: 270px;\n\t\theight: 6px;\n\t\tbackground: linear-gradient(to bottom, rgba(251, 251, 251, 1) 0%, rgba(251, 251, 251, 0) 100%);\n\t\tz-index: 999;\n\t}\n\n\t// Lower first execution card so fader is not visible when not scrolled\n\t& > div:first-child {\n\t\tmargin-top: 3px;\n\t}\n}\n\n.infoAccordion {\n\tposition: absolute;\n\tbottom: 0;\n\tmargin-left: calc(-1 * var(--spacing-l));\n\tborder-top: var(--border-base);\n\n\t& > div {\n\t\twidth: 309px;\n\t\tbackground-color: var(--color-background-light);\n\t\tmargin-top: 0 !important;\n\t}\n}\n\n.noResultsContainer {\n\twidth: 100%;\n\tmargin-top: var(--spacing-2xl);\n\ttext-align: center;\n}\n</style>\n\n<style lang=\"scss\" scoped>\n.executions-sidebar {\n\t:deep(.el-skeleton__item) {\n\t\theight: 60px;\n\t\tborder-radius: 0;\n\t}\n}\n</style>\n","<template>\n\t<div :class=\"$style.container\">\n\t\t<executions-sidebar\n\t\t\t:executions=\"executions\"\n\t\t\t:loading=\"loading && !executions.length\"\n\t\t\t:loadingMore=\"loadingMore\"\n\t\t\t:temporaryExecution=\"temporaryExecution\"\n\t\t\t:auto-refresh=\"autoRefresh\"\n\t\t\t@update:autoRefresh=\"onAutoRefreshToggle\"\n\t\t\t@reloadExecutions=\"setExecutions\"\n\t\t\t@filterUpdated=\"onFilterUpdated\"\n\t\t\t@loadMore=\"onLoadMore\"\n\t\t\t@retryExecution=\"onRetryExecution\"\n\t\t/>\n\t\t<div :class=\"$style.content\" v-if=\"!hidePreview\">\n\t\t\t<router-view\n\t\t\t\tname=\"executionPreview\"\n\t\t\t\t@deleteCurrentExecution=\"onDeleteCurrentExecution\"\n\t\t\t\t@retryExecution=\"onRetryExecution\"\n\t\t\t\t@stopExecution=\"onStopExecution\"\n\t\t\t/>\n\t\t</div>\n\t</div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport { mapStores } from 'pinia';\n\nimport ExecutionsSidebar from '@/components/ExecutionsView/ExecutionsSidebar.vue';\nimport {\n\tMAIN_HEADER_TABS,\n\tMODAL_CANCEL,\n\tMODAL_CONFIRM,\n\tPLACEHOLDER_EMPTY_WORKFLOW_ID,\n\tVIEWS,\n\tWEBHOOK_NODE_TYPE,\n} from '@/constants';\nimport type {\n\tExecutionFilterType,\n\tIExecutionsListResponse,\n\tINodeUi,\n\tITag,\n\tIWorkflowDb,\n} from '@/Interface';\nimport type {\n\tIExecutionsSummary,\n\tIConnection,\n\tIConnections,\n\tIDataObject,\n\tINodeTypeDescription,\n\tINodeTypeNameVersion,\n} from 'n8n-workflow';\nimport { NodeHelpers } from 'n8n-workflow';\nimport { useMessage } from '@/composables/useMessage';\nimport { useToast } from '@/composables/useToast';\nimport { v4 as uuid } from 'uuid';\nimport type { Route } from 'vue-router';\nimport { executionHelpers } from '@/mixins/executionsHelpers';\nimport { range as _range } from 'lodash-es';\nimport { debounceHelper } from '@/mixins/debounce';\nimport { NO_NETWORK_ERROR_CODE } from '@/utils/apiUtils';\nimport { getNodeViewTab } from '@/utils/canvasUtils';\nimport { workflowHelpers } from '@/mixins/workflowHelpers';\nimport { useWorkflowsStore } from '@/stores/workflows.store';\nimport { useUIStore } from '@/stores/ui.store';\nimport { useSettingsStore } from '@/stores/settings.store';\nimport { useNodeTypesStore } from '@/stores/nodeTypes.store';\nimport { useTagsStore } from '@/stores/tags.store';\nimport { executionFilterToQueryFilter } from '@/utils/executionUtils';\n\n// Number of execution pages that are fetched before temporary execution card is shown\nconst MAX_LOADING_ATTEMPTS = 5;\n// Number of executions fetched on each page\nconst LOAD_MORE_PAGE_SIZE = 100;\n\nexport default defineComponent({\n\tname: 'executions-list',\n\tmixins: [executionHelpers, debounceHelper, workflowHelpers],\n\tcomponents: {\n\t\tExecutionsSidebar,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tloading: false,\n\t\t\tloadingMore: false,\n\t\t\tfilter: {} as ExecutionFilterType,\n\t\t\ttemporaryExecution: null as IExecutionsSummary | null,\n\t\t\tautoRefresh: false,\n\t\t\tautoRefreshTimeout: undefined as undefined | NodeJS.Timer,\n\t\t};\n\t},\n\tsetup() {\n\t\treturn {\n\t\t\t...useToast(),\n\t\t\t...useMessage(),\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapStores(useTagsStore, useNodeTypesStore, useSettingsStore, useUIStore, useWorkflowsStore),\n\t\thidePreview(): boolean {\n\t\t\tconst activeNotPresent =\n\t\t\t\tthis.filterApplied && !this.executions.find((ex) => ex.id === this.activeExecution?.id);\n\t\t\treturn this.loading || !this.executions.length || activeNotPresent;\n\t\t},\n\t\tfilterApplied(): boolean {\n\t\t\treturn this.filter.status !== 'all';\n\t\t},\n\t\tworkflowDataNotLoaded(): boolean {\n\t\t\treturn (\n\t\t\t\tthis.workflowsStore.workflowId === PLACEHOLDER_EMPTY_WORKFLOW_ID &&\n\t\t\t\tthis.workflowsStore.workflowName === ''\n\t\t\t);\n\t\t},\n\t\tloadedFinishedExecutionsCount(): number {\n\t\t\treturn this.workflowsStore.getAllLoadedFinishedExecutions.length;\n\t\t},\n\t\ttotalFinishedExecutionsCount(): number {\n\t\t\treturn this.workflowsStore.getTotalFinishedExecutionsCount;\n\t\t},\n\t\trequestFilter(): IDataObject {\n\t\t\treturn executionFilterToQueryFilter({\n\t\t\t\t...this.filter,\n\t\t\t\tworkflowId: this.currentWorkflow,\n\t\t\t});\n\t\t},\n\t},\n\twatch: {\n\t\t$route(to: Route, from: Route) {\n\t\t\tif (to.params.name) {\n\t\t\t\tconst workflowChanged = from.params.name !== to.params.name;\n\t\t\t\tvoid this.initView(workflowChanged);\n\t\t\t}\n\n\t\t\tif (to.params.executionId) {\n\t\t\t\tconst execution = this.workflowsStore.getExecutionDataById(to.params.executionId);\n\t\t\t\tif (execution) {\n\t\t\t\t\tthis.workflowsStore.activeWorkflowExecution = execution;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n\tasync beforeRouteLeave(to, from, next) {\n\t\tthis.stopAutoRefreshInterval();\n\t\tif (getNodeViewTab(to) === MAIN_HEADER_TABS.WORKFLOW) {\n\t\t\tnext();\n\t\t\treturn;\n\t\t}\n\t\tif (this.uiStore.stateIsDirty) {\n\t\t\tconst confirmModal = await this.confirm(\n\t\t\t\tthis.$locale.baseText('generic.unsavedWork.confirmMessage.message'),\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$locale.baseText('generic.unsavedWork.confirmMessage.headline'),\n\t\t\t\t\ttype: 'warning',\n\t\t\t\t\tconfirmButtonText: this.$locale.baseText(\n\t\t\t\t\t\t'generic.unsavedWork.confirmMessage.confirmButtonText',\n\t\t\t\t\t),\n\t\t\t\t\tcancelButtonText: this.$locale.baseText(\n\t\t\t\t\t\t'generic.unsavedWork.confirmMessage.cancelButtonText',\n\t\t\t\t\t),\n\t\t\t\t\tshowClose: true,\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tif (confirmModal === MODAL_CONFIRM) {\n\t\t\t\tconst saved = await this.saveCurrentWorkflow({}, false);\n\t\t\t\tif (saved) {\n\t\t\t\t\tawait this.settingsStore.fetchPromptsData();\n\t\t\t\t}\n\t\t\t\tthis.uiStore.stateIsDirty = false;\n\t\t\t\tnext();\n\t\t\t} else if (confirmModal === MODAL_CANCEL) {\n\t\t\t\tthis.uiStore.stateIsDirty = false;\n\t\t\t\tnext();\n\t\t\t}\n\t\t} else {\n\t\t\tnext();\n\t\t}\n\t},\n\tasync mounted() {\n\t\tthis.loading = true;\n\t\tconst workflowUpdated = this.$route.params.name !== this.workflowsStore.workflowId;\n\t\tconst onNewWorkflow =\n\t\t\tthis.$route.params.name === 'new' &&\n\t\t\tthis.workflowsStore.workflowId === PLACEHOLDER_EMPTY_WORKFLOW_ID;\n\t\tconst shouldUpdate = workflowUpdated && !onNewWorkflow;\n\t\tawait this.initView(shouldUpdate);\n\t\tif (!shouldUpdate) {\n\t\t\tif (this.workflowsStore.currentWorkflowExecutions.length > 0) {\n\t\t\t\tconst workflowExecutions = await this.loadExecutions();\n\t\t\t\tthis.workflowsStore.addToCurrentExecutions(workflowExecutions);\n\t\t\t\tawait this.setActiveExecution();\n\t\t\t} else {\n\t\t\t\tawait this.setExecutions();\n\t\t\t}\n\t\t}\n\n\t\tthis.autoRefresh = this.uiStore.executionSidebarAutoRefresh;\n\t\tvoid this.startAutoRefreshInterval();\n\t\tdocument.addEventListener('visibilitychange', this.onDocumentVisibilityChange);\n\n\t\tthis.loading = false;\n\t},\n\tbeforeUnmount() {\n\t\tthis.stopAutoRefreshInterval();\n\t\tdocument.removeEventListener('visibilitychange', this.onDocumentVisibilityChange);\n\t},\n\tmethods: {\n\t\tasync initView(loadWorkflow: boolean): Promise<void> {\n\t\t\tif (loadWorkflow) {\n\t\t\t\tawait this.nodeTypesStore.loadNodeTypesIfNotLoaded();\n\t\t\t\tawait this.openWorkflow(this.$route.params.name);\n\t\t\t\tthis.uiStore.nodeViewInitialized = false;\n\t\t\t\tif (this.workflowsStore.currentWorkflowExecutions.length === 0) {\n\t\t\t\t\tawait this.setExecutions();\n\t\t\t\t}\n\t\t\t\tif (this.activeExecution) {\n\t\t\t\t\tthis.$router\n\t\t\t\t\t\t.push({\n\t\t\t\t\t\t\tname: VIEWS.EXECUTION_PREVIEW,\n\t\t\t\t\t\t\tparams: { name: this.currentWorkflow, executionId: this.activeExecution.id },\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.catch(() => {});\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tasync onLoadMore(): Promise<void> {\n\t\t\tif (!this.loadingMore) {\n\t\t\t\tawait this.callDebounced('loadMore', { debounceTime: 1000 });\n\t\t\t}\n\t\t},\n\t\tasync loadMore(limit = 20): Promise<void> {\n\t\t\tif (\n\t\t\t\tthis.filter.status === 'running' ||\n\t\t\t\tthis.loadedFinishedExecutionsCount >= this.totalFinishedExecutionsCount\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.loadingMore = true;\n\n\t\t\tlet lastId: string | undefined;\n\t\t\tif (this.executions.length !== 0) {\n\t\t\t\tconst lastItem = this.executions.slice(-1)[0];\n\t\t\t\tlastId = lastItem.id;\n\t\t\t}\n\n\t\t\tlet data: IExecutionsListResponse;\n\t\t\ttry {\n\t\t\t\tdata = await this.workflowsStore.getPastExecutions(this.requestFilter, limit, lastId);\n\t\t\t} catch (error) {\n\t\t\t\tthis.loadingMore = false;\n\t\t\t\tthis.showError(error, this.$locale.baseText('executionsList.showError.loadMore.title'));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdata.results = data.results.map((execution) => {\n\t\t\t\t// @ts-ignore\n\t\t\t\treturn { ...execution, mode: execution.mode };\n\t\t\t});\n\t\t\tconst currentExecutions = [...this.executions];\n\t\t\tfor (const newExecution of data.results) {\n\t\t\t\tif (currentExecutions.find((ex) => ex.id === newExecution.id) === undefined) {\n\t\t\t\t\tcurrentExecutions.push(newExecution);\n\t\t\t\t}\n\t\t\t\t// If we loaded temp execution, put it into it's place and remove from top of the list\n\t\t\t\tif (newExecution.id === this.temporaryExecution?.id) {\n\t\t\t\t\tthis.temporaryExecution = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.workflowsStore.currentWorkflowExecutions = currentExecutions;\n\t\t\tthis.loadingMore = false;\n\t\t},\n\t\tasync onDeleteCurrentExecution(): Promise<void> {\n\t\t\tthis.loading = true;\n\t\t\ttry {\n\t\t\t\tconst executionIndex = this.executions.findIndex(\n\t\t\t\t\t(execution: IExecutionsSummary) => execution.id === this.$route.params.executionId,\n\t\t\t\t);\n\t\t\t\tconst nextExecution =\n\t\t\t\t\tthis.executions[executionIndex + 1] ||\n\t\t\t\t\tthis.executions[executionIndex - 1] ||\n\t\t\t\t\tthis.executions[0];\n\n\t\t\t\tawait this.workflowsStore.deleteExecutions({ ids: [this.$route.params.executionId] });\n\t\t\t\tif (this.temporaryExecution?.id === this.$route.params.executionId) {\n\t\t\t\t\tthis.temporaryExecution = null;\n\t\t\t\t}\n\t\t\t\tif (this.executions.length > 0) {\n\t\t\t\t\tawait this.$router\n\t\t\t\t\t\t.push({\n\t\t\t\t\t\t\tname: VIEWS.EXECUTION_PREVIEW,\n\t\t\t\t\t\t\tparams: { name: this.currentWorkflow, executionId: nextExecution.id },\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.catch(() => {});\n\t\t\t\t\tthis.workflowsStore.activeWorkflowExecution = nextExecution;\n\t\t\t\t} else {\n\t\t\t\t\t// If there are no executions left, show empty state and clear active execution from the store\n\t\t\t\t\tthis.workflowsStore.activeWorkflowExecution = null;\n\t\t\t\t\tawait this.$router.push({\n\t\t\t\t\t\tname: VIEWS.EXECUTION_HOME,\n\t\t\t\t\t\tparams: { name: this.currentWorkflow },\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tawait this.setExecutions();\n\t\t\t} catch (error) {\n\t\t\t\tthis.loading = false;\n\t\t\t\tthis.showError(\n\t\t\t\t\terror,\n\t\t\t\t\tthis.$locale.baseText('executionsList.showError.handleDeleteSelected.title'),\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.loading = false;\n\n\t\t\tthis.showMessage({\n\t\t\t\ttitle: this.$locale.baseText('executionsList.showMessage.handleDeleteSelected.title'),\n\t\t\t\ttype: 'success',\n\t\t\t});\n\t\t},\n\t\tasync onStopExecution(): Promise<void> {\n\t\t\tconst activeExecutionId = this.$route.params.executionId;\n\n\t\t\ttry {\n\t\t\t\tawait this.workflowsStore.stopCurrentExecution(activeExecutionId);\n\n\t\t\t\tthis.showMessage({\n\t\t\t\t\ttitle: this.$locale.baseText('executionsList.showMessage.stopExecution.title'),\n\t\t\t\t\tmessage: this.$locale.baseText('executionsList.showMessage.stopExecution.message', {\n\t\t\t\t\t\tinterpolate: { activeExecutionId },\n\t\t\t\t\t}),\n\t\t\t\t\ttype: 'success',\n\t\t\t\t});\n\n\t\t\t\tawait this.loadAutoRefresh();\n\t\t\t} catch (error) {\n\t\t\t\tthis.showError(\n\t\t\t\t\terror,\n\t\t\t\t\tthis.$locale.baseText('executionsList.showError.stopExecution.title'),\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\tasync onFilterUpdated(filter: ExecutionFilterType) {\n\t\t\tthis.filter = filter;\n\t\t\tawait this.setExecutions();\n\t\t},\n\t\tasync setExecutions(): Promise<void> {\n\t\t\tthis.workflowsStore.currentWorkflowExecutions = await this.loadExecutions();\n\t\t\tawait this.setActiveExecution();\n\t\t},\n\n\t\tasync startAutoRefreshInterval() {\n\t\t\tif (this.autoRefresh) {\n\t\t\t\tawait this.loadAutoRefresh();\n\t\t\t\tthis.stopAutoRefreshInterval();\n\t\t\t\tthis.autoRefreshTimeout = setTimeout(() => {\n\t\t\t\t\tvoid this.startAutoRefreshInterval();\n\t\t\t\t}, 4000);\n\t\t\t}\n\t\t},\n\t\tstopAutoRefreshInterval() {\n\t\t\tif (this.autoRefreshTimeout) {\n\t\t\t\tclearTimeout(this.autoRefreshTimeout);\n\t\t\t\tthis.autoRefreshTimeout = undefined;\n\t\t\t}\n\t\t},\n\t\tonAutoRefreshToggle(value: boolean): void {\n\t\t\tthis.autoRefresh = value;\n\t\t\tthis.uiStore.executionSidebarAutoRefresh = this.autoRefresh;\n\n\t\t\tthis.stopAutoRefreshInterval(); // Clear any previously existing intervals (if any - there shouldn't)\n\t\t\tvoid this.startAutoRefreshInterval();\n\t\t},\n\t\tonDocumentVisibilityChange() {\n\t\t\tif (document.visibilityState === 'hidden') {\n\t\t\t\tvoid this.stopAutoRefreshInterval();\n\t\t\t} else {\n\t\t\t\tvoid this.startAutoRefreshInterval();\n\t\t\t}\n\t\t},\n\t\tasync loadAutoRefresh(): Promise<void> {\n\t\t\t// Most of the auto-refresh logic is taken from the `ExecutionsList` component\n\t\t\tconst fetchedExecutions: IExecutionsSummary[] = await this.loadExecutions();\n\t\t\tlet existingExecutions: IExecutionsSummary[] = [...this.executions];\n\t\t\tconst alreadyPresentExecutionIds = existingExecutions.map((exec) => parseInt(exec.id, 10));\n\t\t\tlet lastId = 0;\n\t\t\tconst gaps = [] as number[];\n\t\t\tlet updatedActiveExecution = null;\n\n\t\t\tfor (let i = fetchedExecutions.length - 1; i >= 0; i--) {\n\t\t\t\tconst currentItem = fetchedExecutions[i];\n\t\t\t\tconst currentId = parseInt(currentItem.id, 10);\n\t\t\t\tif (lastId !== 0 && !isNaN(currentId)) {\n\t\t\t\t\tif (currentId - lastId > 1) {\n\t\t\t\t\t\tconst range = _range(lastId + 1, currentId);\n\t\t\t\t\t\tgaps.push(...range);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlastId = parseInt(currentItem.id, 10) || 0;\n\n\t\t\t\tconst executionIndex = alreadyPresentExecutionIds.indexOf(currentId);\n\t\t\t\tif (executionIndex !== -1) {\n\t\t\t\t\tconst existingExecution = existingExecutions.find((ex) => ex.id === currentItem.id);\n\t\t\t\t\tconst existingStillRunning =\n\t\t\t\t\t\t(existingExecution && existingExecution.finished === false) ||\n\t\t\t\t\t\texistingExecution?.stoppedAt === undefined;\n\t\t\t\t\tconst currentFinished =\n\t\t\t\t\t\tcurrentItem.finished === true || currentItem.stoppedAt !== undefined;\n\n\t\t\t\t\tif (existingStillRunning && currentFinished) {\n\t\t\t\t\t\texistingExecutions[executionIndex] = currentItem;\n\t\t\t\t\t\tif (currentItem.id === this.activeExecution?.id) {\n\t\t\t\t\t\t\tupdatedActiveExecution = currentItem;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tlet j;\n\t\t\t\tfor (j = existingExecutions.length - 1; j >= 0; j--) {\n\t\t\t\t\tif (currentId < parseInt(existingExecutions[j].id, 10)) {\n\t\t\t\t\t\texistingExecutions.splice(j + 1, 0, currentItem);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (j === -1) {\n\t\t\t\t\texistingExecutions.unshift(currentItem);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\texistingExecutions = existingExecutions.filter(\n\t\t\t\t(execution) =>\n\t\t\t\t\t!gaps.includes(parseInt(execution.id, 10)) && lastId >= parseInt(execution.id, 10),\n\t\t\t);\n\t\t\tthis.workflowsStore.currentWorkflowExecutions = existingExecutions;\n\t\t\tif (updatedActiveExecution !== null) {\n\t\t\t\tthis.workflowsStore.activeWorkflowExecution = updatedActiveExecution;\n\t\t\t} else {\n\t\t\t\tconst activeInList = existingExecutions.some((ex) => ex.id === this.activeExecution?.id);\n\t\t\t\tif (!activeInList && this.executions.length > 0 && !this.temporaryExecution) {\n\t\t\t\t\tthis.$router\n\t\t\t\t\t\t.push({\n\t\t\t\t\t\t\tname: VIEWS.EXECUTION_PREVIEW,\n\t\t\t\t\t\t\tparams: { name: this.currentWorkflow, executionId: this.executions[0].id },\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.catch(() => {});\n\t\t\t\t} else if (this.executions.length === 0) {\n\t\t\t\t\tthis.$router.push({ name: VIEWS.EXECUTION_HOME }).catch(() => {});\n\t\t\t\t\tthis.workflowsStore.activeWorkflowExecution = null;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tasync loadExecutions(): Promise<IExecutionsSummary[]> {\n\t\t\tif (!this.currentWorkflow) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\ttry {\n\t\t\t\treturn await this.workflowsStore.loadCurrentWorkflowExecutions(this.requestFilter);\n\t\t\t} catch (error) {\n\t\t\t\tif (error.errorCode === NO_NETWORK_ERROR_CODE) {\n\t\t\t\t\tthis.showMessage(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttitle: this.$locale.baseText('executionsList.showError.refreshData.title'),\n\t\t\t\t\t\t\tmessage: error.message,\n\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t\tduration: 3500,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis.showError(\n\t\t\t\t\t\terror,\n\t\t\t\t\t\tthis.$locale.baseText('executionsList.showError.refreshData.title'),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn [];\n\t\t\t}\n\t\t},\n\t\tasync setActiveExecution(): Promise<void> {\n\t\t\tconst activeExecutionId = this.$route.params.executionId;\n\t\t\tif (activeExecutionId) {\n\t\t\t\tconst execution = this.workflowsStore.getExecutionDataById(activeExecutionId);\n\t\t\t\tif (execution) {\n\t\t\t\t\tthis.workflowsStore.activeWorkflowExecution = execution;\n\t\t\t\t} else {\n\t\t\t\t\tawait this.tryToFindExecution(activeExecutionId);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there is no execution in the route, select the first one\n\t\t\tif (\n\t\t\t\tthis.workflowsStore.activeWorkflowExecution === null &&\n\t\t\t\tthis.executions.length > 0 &&\n\t\t\t\t!this.temporaryExecution\n\t\t\t) {\n\t\t\t\tthis.workflowsStore.activeWorkflowExecution = this.executions[0];\n\n\t\t\t\tif (this.$route.name === VIEWS.EXECUTION_HOME) {\n\t\t\t\t\tthis.$router\n\t\t\t\t\t\t.push({\n\t\t\t\t\t\t\tname: VIEWS.EXECUTION_PREVIEW,\n\t\t\t\t\t\t\tparams: { name: this.currentWorkflow, executionId: this.executions[0].id },\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.catch(() => {});\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tasync tryToFindExecution(executionId: string, attemptCount = 0): Promise<void> {\n\t\t\t// First check if executions exists in the DB at all\n\t\t\tif (attemptCount === 0) {\n\t\t\t\tconst existingExecution = await this.workflowsStore.fetchExecutionDataById(executionId);\n\t\t\t\tif (!existingExecution) {\n\t\t\t\t\tthis.workflowsStore.activeWorkflowExecution = null;\n\t\t\t\t\tthis.showError(\n\t\t\t\t\t\tnew Error(\n\t\t\t\t\t\t\tthis.$locale.baseText('executionView.notFound.message', {\n\t\t\t\t\t\t\t\tinterpolate: { executionId },\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tthis.$locale.baseText('nodeView.showError.openExecution.title'),\n\t\t\t\t\t);\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tthis.temporaryExecution = existingExecution as IExecutionsSummary;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// stop if the execution wasn't found in the first 1000 lookups\n\t\t\tif (attemptCount >= MAX_LOADING_ATTEMPTS) {\n\t\t\t\tif (this.temporaryExecution) {\n\t\t\t\t\tthis.workflowsStore.activeWorkflowExecution = this.temporaryExecution;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.workflowsStore.activeWorkflowExecution = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Fetch next batch of executions\n\t\t\tawait this.loadMore(LOAD_MORE_PAGE_SIZE);\n\t\t\tconst execution = this.workflowsStore.getExecutionDataById(executionId);\n\t\t\tif (!execution) {\n\t\t\t\t// If it's not there load next until found\n\t\t\t\tawait this.$nextTick();\n\t\t\t\t// But skip fetching execution data since we at this point know it exists\n\t\t\t\tawait this.tryToFindExecution(executionId, attemptCount + 1);\n\t\t\t} else {\n\t\t\t\t// When found set execution as active\n\t\t\t\tthis.workflowsStore.activeWorkflowExecution = execution;\n\t\t\t\tthis.temporaryExecution = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t},\n\t\tasync openWorkflow(workflowId: string): Promise<void> {\n\t\t\tawait this.loadActiveWorkflows();\n\n\t\t\tlet data: IWorkflowDb | undefined;\n\t\t\ttry {\n\t\t\t\tdata = await this.workflowsStore.fetchWorkflow(workflowId);\n\t\t\t} catch (error) {\n\t\t\t\tthis.showError(error, this.$locale.baseText('nodeView.showError.openWorkflow.title'));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (data === undefined) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\tthis.$locale.baseText('nodeView.workflowWithIdCouldNotBeFound', {\n\t\t\t\t\t\tinterpolate: { workflowId },\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t}\n\t\t\tawait this.addNodes(data.nodes, data.connections);\n\n\t\t\tthis.workflowsStore.setActive(data.active || false);\n\t\t\tthis.workflowsStore.setWorkflowId(workflowId);\n\t\t\tthis.workflowsStore.setWorkflowName({ newName: data.name, setStateDirty: false });\n\t\t\tthis.workflowsStore.setWorkflowSettings(data.settings || {});\n\t\t\tthis.workflowsStore.setWorkflowPinData(data.pinData || {});\n\t\t\tconst tags = (data.tags || []) as ITag[];\n\t\t\tconst tagIds = tags.map((tag) => tag.id);\n\t\t\tthis.workflowsStore.setWorkflowTagIds(tagIds || []);\n\t\t\tthis.workflowsStore.setWorkflowVersionId(data.versionId);\n\n\t\t\tthis.tagsStore.upsertTags(tags);\n\n\t\t\tvoid this.$externalHooks().run('workflow.open', { workflowId, workflowName: data.name });\n\t\t\tthis.uiStore.stateIsDirty = false;\n\t\t},\n\t\tasync addNodes(nodes: INodeUi[], connections?: IConnections) {\n\t\t\tif (!nodes?.length) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tawait this.loadNodesProperties(\n\t\t\t\tnodes.map((node) => ({ name: node.type, version: node.typeVersion })),\n\t\t\t);\n\n\t\t\tlet nodeType: INodeTypeDescription | null;\n\t\t\tnodes.forEach((node) => {\n\t\t\t\tif (!node.id) {\n\t\t\t\t\tnode.id = uuid();\n\t\t\t\t}\n\n\t\t\t\tnodeType = this.nodeTypesStore.getNodeType(node.type, node.typeVersion);\n\n\t\t\t\t// Make sure that some properties always exist\n\t\t\t\tif (!node.hasOwnProperty('disabled')) {\n\t\t\t\t\tnode.disabled = false;\n\t\t\t\t}\n\n\t\t\t\tif (!node.hasOwnProperty('parameters')) {\n\t\t\t\t\tnode.parameters = {};\n\t\t\t\t}\n\n\t\t\t\t// Load the defaul parameter values because only values which differ\n\t\t\t\t// from the defaults get saved\n\t\t\t\tif (nodeType !== null) {\n\t\t\t\t\tlet nodeParameters = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnodeParameters = NodeHelpers.getNodeParameters(\n\t\t\t\t\t\t\tnodeType.properties,\n\t\t\t\t\t\t\tnode.parameters,\n\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\tthis.$locale.baseText('nodeView.thereWasAProblemLoadingTheNodeParametersOfNode') +\n\t\t\t\t\t\t\t\t`: \"${node.name}\"`,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconsole.error(e);\n\t\t\t\t\t}\n\t\t\t\t\tnode.parameters = nodeParameters !== null ? nodeParameters : {};\n\n\t\t\t\t\t// if it's a webhook and the path is empty set the UUID as the default path\n\t\t\t\t\tif (node.type === WEBHOOK_NODE_TYPE && node.parameters.path === '') {\n\t\t\t\t\t\tnode.parameters.path = node.webhookId as string;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.workflowsStore.addNode(node);\n\t\t\t});\n\n\t\t\t// Load the connections\n\t\t\tif (connections !== undefined) {\n\t\t\t\tlet connectionData;\n\t\t\t\tfor (const sourceNode of Object.keys(connections)) {\n\t\t\t\t\tfor (const type of Object.keys(connections[sourceNode])) {\n\t\t\t\t\t\tfor (\n\t\t\t\t\t\t\tlet sourceIndex = 0;\n\t\t\t\t\t\t\tsourceIndex < connections[sourceNode][type].length;\n\t\t\t\t\t\t\tsourceIndex++\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tconst outwardConnections = connections[sourceNode][type][sourceIndex];\n\t\t\t\t\t\t\tif (!outwardConnections) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\toutwardConnections.forEach((targetData) => {\n\t\t\t\t\t\t\t\tconnectionData = [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tnode: sourceNode,\n\t\t\t\t\t\t\t\t\t\ttype,\n\t\t\t\t\t\t\t\t\t\tindex: sourceIndex,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tnode: targetData.node,\n\t\t\t\t\t\t\t\t\t\ttype: targetData.type,\n\t\t\t\t\t\t\t\t\t\tindex: targetData.index,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t] as [IConnection, IConnection];\n\n\t\t\t\t\t\t\t\tthis.workflowsStore.addConnection({\n\t\t\t\t\t\t\t\t\tconnection: connectionData,\n\t\t\t\t\t\t\t\t\tsetStateDirty: false,\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tasync loadNodesProperties(nodeInfos: INodeTypeNameVersion[]): Promise<void> {\n\t\t\tconst allNodes: INodeTypeDescription[] = this.nodeTypesStore.allNodeTypes;\n\n\t\t\tconst nodesToBeFetched: INodeTypeNameVersion[] = [];\n\t\t\tallNodes.forEach((node) => {\n\t\t\t\tconst nodeVersions = Array.isArray(node.version) ? node.version : [node.version];\n\t\t\t\tif (\n\t\t\t\t\t!!nodeInfos.find((n) => n.name === node.name && nodeVersions.includes(n.version)) &&\n\t\t\t\t\t!node.hasOwnProperty('properties')\n\t\t\t\t) {\n\t\t\t\t\tnodesToBeFetched.push({\n\t\t\t\t\t\tname: node.name,\n\t\t\t\t\t\tversion: Array.isArray(node.version) ? node.version.slice(-1)[0] : node.version,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (nodesToBeFetched.length > 0) {\n\t\t\t\t// Only call API if node information is actually missing\n\t\t\t\tawait this.nodeTypesStore.getNodesInformation(nodesToBeFetched);\n\t\t\t}\n\t\t},\n\t\tasync loadActiveWorkflows(): Promise<void> {\n\t\t\tawait this.workflowsStore.fetchActiveWorkflows();\n\t\t},\n\t\tasync onRetryExecution(payload: { execution: IExecutionsSummary; command: string }) {\n\t\t\tconst loadWorkflow = payload.command === 'current-workflow';\n\n\t\t\tthis.showMessage({\n\t\t\t\ttitle: this.$locale.baseText('executionDetails.runningMessage'),\n\t\t\t\ttype: 'info',\n\t\t\t\tduration: 2000,\n\t\t\t});\n\t\t\tawait this.retryExecution(payload.execution, loadWorkflow);\n\t\t\tawait this.loadAutoRefresh();\n\n\t\t\tthis.$telemetry.track('User clicked retry execution button', {\n\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t\texecution_id: payload.execution.id,\n\t\t\t\tretry_type: loadWorkflow ? 'current' : 'original',\n\t\t\t});\n\t\t},\n\t\tasync retryExecution(execution: IExecutionsSummary, loadWorkflow?: boolean) {\n\t\t\ttry {\n\t\t\t\tconst retrySuccessful = await this.workflowsStore.retryExecution(\n\t\t\t\t\texecution.id,\n\t\t\t\t\tloadWorkflow,\n\t\t\t\t);\n\n\t\t\t\tif (retrySuccessful) {\n\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\ttitle: this.$locale.baseText('executionsList.showMessage.retrySuccessfulTrue.title'),\n\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\ttitle: this.$locale.baseText('executionsList.showMessage.retrySuccessfulFalse.title'),\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tthis.showError(\n\t\t\t\t\terror,\n\t\t\t\t\tthis.$locale.baseText('executionsList.showError.retryExecution.title'),\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t},\n});\n</script>\n\n<style module lang=\"scss\">\n.container {\n\tdisplay: flex;\n\theight: 100%;\n\twidth: 100%;\n}\n\n.content {\n\tflex: 1;\n}\n</style>\n"],"names":["_sfc_main$2","defineComponent","executionHelpers","ExecutionTime","VIEWS","action","_resolveComponent","_normalizeClass","_ctx","_createVNode","_component_router_link","_withCtx","_createElementVNode","_component_n8n_text","_createBlock","_component_n8n_spinner","_createCommentVNode","_createTextVNode","_toDisplayString","_openBlock","_component_execution_time","_createElementBlock","_hoisted_1","_component_n8n_action_dropdown","_component_n8n_tooltip","_component_font_awesome_icon","_sfc_main$1","ExecutionCard","ExecutionsInfoAccordion","ExecutionFilter","mapStores","useUIStore","useWorkflowsStore","to","from","limit","executionsListRef","diff","payload","filter","sidebarContainerRef","currentExecutionCardRefs","_a","cardElement","listCapacity","cardRect","LIST_HEADER_OFFSET","_hoisted_2","_component_executions_info_accordion","_component_n8n_heading","_component_el_checkbox","_cache","$event","_component_execution_filter","_component_execution_card","_Fragment","_renderList","execution","_component_n8n_loading","MAX_LOADING_ATTEMPTS","LOAD_MORE_PAGE_SIZE","_sfc_main","debounceHelper","workflowHelpers","ExecutionsSidebar","useToast","useMessage","useTagsStore","useNodeTypesStore","useSettingsStore","activeNotPresent","ex","PLACEHOLDER_EMPTY_WORKFLOW_ID","executionFilterToQueryFilter","workflowChanged","next","getNodeViewTab","MAIN_HEADER_TABS","confirmModal","MODAL_CONFIRM","MODAL_CANCEL","workflowUpdated","onNewWorkflow","shouldUpdate","workflowExecutions","loadWorkflow","lastId","data","error","currentExecutions","newExecution","executionIndex","nextExecution","activeExecutionId","value","fetchedExecutions","existingExecutions","alreadyPresentExecutionIds","exec","gaps","updatedActiveExecution","i","currentItem","currentId","range","_range","existingExecution","existingStillRunning","currentFinished","j","NO_NETWORK_ERROR_CODE","executionId","attemptCount","workflowId","tags","tagIds","tag","nodes","connections","node","nodeType","uuid","nodeParameters","NodeHelpers.getNodeParameters","e","WEBHOOK_NODE_TYPE","connectionData","sourceNode","type","sourceIndex","outwardConnections","targetData","nodeInfos","allNodes","nodesToBeFetched","nodeVersions","_component_executions_sidebar","_component_router_view"],"mappings":"2nDA2FA,MAAAA,GAAeC,EAAgB,CAC9B,KAAM,iBACN,OAAQ,CAACC,CAAgB,EACzB,WAAY,CACX,cAAAC,CACD,EACA,MAAO,CACC,MAAA,CACN,MAAAC,CAAA,CAEF,EACA,MAAO,CACN,UAAW,CACV,KAAM,OACN,SAAU,EACX,EACA,UAAW,CACV,KAAM,QACN,QAAS,EACV,EAC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