n8n-editor-ui 1.47.1 → 1.47.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +76 -76
- package/dist/assets/{AuthView-CMxdNKZJ.js → AuthView-B_jZMnGj.js} +2 -2
- package/dist/assets/{AuthView-CMxdNKZJ.js.map → AuthView-B_jZMnGj.js.map} +1 -1
- package/dist/assets/{CanvasControls-3FMjwMqA.js → CanvasControls-ns1B0A0j.js} +2 -2
- package/dist/assets/{CanvasControls-3FMjwMqA.js.map → CanvasControls-ns1B0A0j.js.map} +1 -1
- package/dist/assets/{ChangePasswordView-_NkkcUVb.js → ChangePasswordView-BDsuHv0B.js} +2 -2
- package/dist/assets/{ChangePasswordView-_NkkcUVb.js.map → ChangePasswordView-BDsuHv0B.js.map} +1 -1
- package/dist/assets/{CollectionParameter-BXMOfisf.js → CollectionParameter-Br-xtutZ.js} +2 -2
- package/dist/assets/CollectionParameter-Br-xtutZ.js.map +1 -0
- package/dist/assets/{CredentialsView-B2UF3tK_.js → CredentialsView-DnJ_jhDo.js} +2 -2
- package/dist/assets/{CredentialsView-B2UF3tK_.js.map → CredentialsView-DnJ_jhDo.js.map} +1 -1
- package/dist/assets/{ErrorView-B_lpOlen.js → ErrorView-BfV5e5ko.js} +2 -2
- package/dist/assets/{ErrorView-B_lpOlen.js.map → ErrorView-BfV5e5ko.js.map} +1 -1
- package/dist/assets/{ExecutionsFilter-dNFZor7l.js → ExecutionsFilter-0XcXH83H.js} +2 -2
- package/dist/assets/{ExecutionsFilter-dNFZor7l.js.map → ExecutionsFilter-0XcXH83H.js.map} +1 -1
- package/dist/assets/{ExecutionsView-BYe-KERG.js → ExecutionsView-aFiZuLVt.js} +2 -2
- package/dist/assets/{ExecutionsView-BYe-KERG.js.map → ExecutionsView-aFiZuLVt.js.map} +1 -1
- package/dist/assets/{ForgotMyPasswordView-D97J06wc.js → ForgotMyPasswordView-64X9tXq4.js} +2 -2
- package/dist/assets/{ForgotMyPasswordView-D97J06wc.js.map → ForgotMyPasswordView-64X9tXq4.js.map} +1 -1
- package/dist/assets/{MainHeader-CT4nF2mY.js → MainHeader-Ch0Iz_7s.js} +2 -2
- package/dist/assets/{MainHeader-CT4nF2mY.js.map → MainHeader-Ch0Iz_7s.js.map} +1 -1
- package/dist/assets/{MainSidebar-CTg5wPzP.js → MainSidebar-3ee-tTgz.js} +2 -2
- package/dist/assets/{MainSidebar-CTg5wPzP.js.map → MainSidebar-3ee-tTgz.js.map} +1 -1
- package/dist/assets/{NodeCreation-BF_L2-99.js → NodeCreation-PrQGENrl.js} +3 -3
- package/dist/assets/{NodeCreation-BF_L2-99.js.map → NodeCreation-PrQGENrl.js.map} +1 -1
- package/dist/assets/{NodeCreator-B_yCtSu6.js → NodeCreator-DlK1669m.js} +2 -2
- package/dist/assets/{NodeCreator-B_yCtSu6.js.map → NodeCreator-DlK1669m.js.map} +1 -1
- package/dist/assets/{NodeDetailsView-ggolOsHM.js → NodeDetailsView-DcV7LI-g.js} +4 -4
- package/dist/assets/{NodeDetailsView-ggolOsHM.js.map → NodeDetailsView-DcV7LI-g.js.map} +1 -1
- package/dist/assets/{NodeView-B2MlTl6g.js → NodeView-D_kbUfVN.js} +3 -3
- package/dist/assets/{NodeView-B2MlTl6g.js.map → NodeView-D_kbUfVN.js.map} +1 -1
- package/dist/assets/{NodeView.v2-D_CKj9CS.js → NodeView.v2-D_Wbnl01.js} +3 -3
- package/dist/assets/{NodeView.v2-D_CKj9CS.js.map → NodeView.v2-D_Wbnl01.js.map} +1 -1
- package/dist/assets/{ProjectCardBadge.vue_vue_type_script_setup_true_lang-DdHOM703.js → ProjectCardBadge.vue_vue_type_script_setup_true_lang-6oVL0vKx.js} +2 -2
- package/dist/assets/{ProjectCardBadge.vue_vue_type_script_setup_true_lang-DdHOM703.js.map → ProjectCardBadge.vue_vue_type_script_setup_true_lang-6oVL0vKx.js.map} +1 -1
- package/dist/assets/{ProjectSettings-DpJesEZX.js → ProjectSettings-CfcplqBX.js} +2 -2
- package/dist/assets/{ProjectSettings-DpJesEZX.js.map → ProjectSettings-CfcplqBX.js.map} +1 -1
- package/dist/assets/{ProjectTabs-D7nNxtFO.js → ProjectTabs-5ZO9YR8J.js} +2 -2
- package/dist/assets/{ProjectTabs-D7nNxtFO.js.map → ProjectTabs-5ZO9YR8J.js.map} +1 -1
- package/dist/assets/{PushConnectionTracker-YJuy57g2.js → PushConnectionTracker-Bp-RjnYr.js} +2 -2
- package/dist/assets/{PushConnectionTracker-YJuy57g2.js.map → PushConnectionTracker-Bp-RjnYr.js.map} +1 -1
- package/dist/assets/{ResourcesListLayout-mZ4ijKRB.js → ResourcesListLayout-B4W1PSHT.js} +2 -2
- package/dist/assets/{ResourcesListLayout-mZ4ijKRB.js.map → ResourcesListLayout-B4W1PSHT.js.map} +1 -1
- package/dist/assets/{RunDataAi-D0m0Vg_p.js → RunDataAi-C3XiqNZa.js} +2 -2
- package/dist/assets/{RunDataAi-D0m0Vg_p.js.map → RunDataAi-C3XiqNZa.js.map} +1 -1
- package/dist/assets/{RunDataJson-DkHNIqVj.js → RunDataJson-CMcOD-78.js} +3 -3
- package/dist/assets/{RunDataJson-DkHNIqVj.js.map → RunDataJson-CMcOD-78.js.map} +1 -1
- package/dist/assets/{RunDataJsonActions-Cgxcpw8t.js → RunDataJsonActions-BQBpmtOi.js} +2 -2
- package/dist/assets/{RunDataJsonActions-Cgxcpw8t.js.map → RunDataJsonActions-BQBpmtOi.js.map} +1 -1
- package/dist/assets/{RunDataSchema-C6aZoC0a.js → RunDataSchema-CF4YH-8y.js} +2 -2
- package/dist/assets/{RunDataSchema-C6aZoC0a.js.map → RunDataSchema-CF4YH-8y.js.map} +1 -1
- package/dist/assets/{RunDataSearch-D2CDg21N.js → RunDataSearch-DwB8g_cE.js} +2 -2
- package/dist/assets/{RunDataSearch-D2CDg21N.js.map → RunDataSearch-DwB8g_cE.js.map} +1 -1
- package/dist/assets/{RunDataTable-D597NRFD.js → RunDataTable-BVAuNDP9.js} +2 -2
- package/dist/assets/{RunDataTable-D597NRFD.js.map → RunDataTable-BVAuNDP9.js.map} +1 -1
- package/dist/assets/{SamlOnboarding-Me669myi.js → SamlOnboarding-Csd8l-7T.js} +2 -2
- package/dist/assets/{SamlOnboarding-Me669myi.js.map → SamlOnboarding-Csd8l-7T.js.map} +1 -1
- package/dist/assets/{SettingsApiView-DV8pIHDw.js → SettingsApiView-DnvdV7dx.js} +2 -2
- package/dist/assets/{SettingsApiView-DV8pIHDw.js.map → SettingsApiView-DnvdV7dx.js.map} +1 -1
- package/dist/assets/{SettingsCommunityNodesView-D_gtSdk3.js → SettingsCommunityNodesView-C11a_Ybs.js} +2 -2
- package/dist/assets/{SettingsCommunityNodesView-D_gtSdk3.js.map → SettingsCommunityNodesView-C11a_Ybs.js.map} +1 -1
- package/dist/assets/{SettingsExternalSecrets-xprYKjAW.js → SettingsExternalSecrets-IIReUcRG.js} +2 -2
- package/dist/assets/{SettingsExternalSecrets-xprYKjAW.js.map → SettingsExternalSecrets-IIReUcRG.js.map} +1 -1
- package/dist/assets/{SettingsFakeDoorView-CKaSOYh5.js → SettingsFakeDoorView-BOUfBJS8.js} +2 -2
- package/dist/assets/{SettingsFakeDoorView-CKaSOYh5.js.map → SettingsFakeDoorView-BOUfBJS8.js.map} +1 -1
- package/dist/assets/{SettingsLdapView-BBCv2tmk.js → SettingsLdapView-BaSjQ4cy.js} +2 -2
- package/dist/assets/{SettingsLdapView-BBCv2tmk.js.map → SettingsLdapView-BaSjQ4cy.js.map} +1 -1
- package/dist/assets/{SettingsLogStreamingView-HRIp8kyL.js → SettingsLogStreamingView-COGhA1hN.js} +2 -2
- package/dist/assets/{SettingsLogStreamingView-HRIp8kyL.js.map → SettingsLogStreamingView-COGhA1hN.js.map} +1 -1
- package/dist/assets/{SettingsPersonalView-CsUb3SvK.js → SettingsPersonalView-BJGgPTwa.js} +2 -2
- package/dist/assets/{SettingsPersonalView-CsUb3SvK.js.map → SettingsPersonalView-BJGgPTwa.js.map} +1 -1
- package/dist/assets/{SettingsSourceControl-BkPpVGsk.js → SettingsSourceControl-DkdSLuvp.js} +2 -2
- package/dist/assets/{SettingsSourceControl-BkPpVGsk.js.map → SettingsSourceControl-DkdSLuvp.js.map} +1 -1
- package/dist/assets/{SettingsSso-BueUV3RH.js → SettingsSso-DA9AOKH5.js} +2 -2
- package/dist/assets/{SettingsSso-BueUV3RH.js.map → SettingsSso-DA9AOKH5.js.map} +1 -1
- package/dist/assets/{SettingsUsageAndPlan-DzDC9m54.js → SettingsUsageAndPlan-BVPtlthH.js} +2 -2
- package/dist/assets/{SettingsUsageAndPlan-DzDC9m54.js.map → SettingsUsageAndPlan-BVPtlthH.js.map} +1 -1
- package/dist/assets/{SettingsUsersView-CTd5MQLw.js → SettingsUsersView-BuKt4ZDO.js} +2 -2
- package/dist/assets/{SettingsUsersView-CTd5MQLw.js.map → SettingsUsersView-BuKt4ZDO.js.map} +1 -1
- package/dist/assets/{SettingsView-DMxqsNh0.js → SettingsView-DJ78VuiY.js} +2 -2
- package/dist/assets/{SettingsView-DMxqsNh0.js.map → SettingsView-DJ78VuiY.js.map} +1 -1
- package/dist/assets/{SetupView-tkyttChl.js → SetupView-C70Dkfed.js} +2 -2
- package/dist/assets/{SetupView-tkyttChl.js.map → SetupView-C70Dkfed.js.map} +1 -1
- package/dist/assets/{SetupWorkflowCredentialsButton-B3HZvKQp.js → SetupWorkflowCredentialsButton-CEQ1LrFl.js} +2 -2
- package/dist/assets/{SetupWorkflowCredentialsButton-B3HZvKQp.js.map → SetupWorkflowCredentialsButton-CEQ1LrFl.js.map} +1 -1
- package/dist/assets/{SetupWorkflowFromTemplateView-DL3b-TZS.js → SetupWorkflowFromTemplateView-BUzzXtBr.js} +2 -2
- package/dist/assets/{SetupWorkflowFromTemplateView-DL3b-TZS.js.map → SetupWorkflowFromTemplateView-BUzzXtBr.js.map} +1 -1
- package/dist/assets/{SigninView-BPLGsvzz.js → SigninView-B3CNL-yp.js} +2 -2
- package/dist/assets/{SigninView-BPLGsvzz.js.map → SigninView-B3CNL-yp.js.map} +1 -1
- package/dist/assets/{SignoutView-BySf9D7k.js → SignoutView-svcLavkC.js} +2 -2
- package/dist/assets/{SignoutView-BySf9D7k.js.map → SignoutView-svcLavkC.js.map} +1 -1
- package/dist/assets/{SignupView-EU3JWt4T.js → SignupView-DJWRTPKF.js} +2 -2
- package/dist/assets/{SignupView-EU3JWt4T.js.map → SignupView-DJWRTPKF.js.map} +1 -1
- package/dist/assets/{TemplateDetails-Cemx-ozB.js → TemplateDetails-BnbiWxo-.js} +2 -2
- package/dist/assets/{TemplateDetails-Cemx-ozB.js.map → TemplateDetails-BnbiWxo-.js.map} +1 -1
- package/dist/assets/{TemplateList-h3b91b7e.js → TemplateList-By-t2s0M.js} +2 -2
- package/dist/assets/{TemplateList-h3b91b7e.js.map → TemplateList-By-t2s0M.js.map} +1 -1
- package/dist/assets/{TemplatesCollectionView-aBX3f7Pp.js → TemplatesCollectionView-D2L1fmSc.js} +2 -2
- package/dist/assets/{TemplatesCollectionView-aBX3f7Pp.js.map → TemplatesCollectionView-D2L1fmSc.js.map} +1 -1
- package/dist/assets/{TemplatesSearchView-DyoC9WUR.js → TemplatesSearchView-Bmr6Nd6g.js} +2 -2
- package/dist/assets/{TemplatesSearchView-DyoC9WUR.js.map → TemplatesSearchView-Bmr6Nd6g.js.map} +1 -1
- package/dist/assets/{TemplatesView-GQmC_sY8.js → TemplatesView-BbunSn-s.js} +2 -2
- package/dist/assets/{TemplatesView-GQmC_sY8.js.map → TemplatesView-BbunSn-s.js.map} +1 -1
- package/dist/assets/{TemplatesWorkflowView-C-0pXdDh.js → TemplatesWorkflowView-XxBIlMWY.js} +2 -2
- package/dist/assets/{TemplatesWorkflowView-C-0pXdDh.js.map → TemplatesWorkflowView-XxBIlMWY.js.map} +1 -1
- package/dist/assets/{VariablesView-BO5fdkwt.js → VariablesView-ZY5xLmKI.js} +2 -2
- package/dist/assets/{VariablesView-BO5fdkwt.js.map → VariablesView-ZY5xLmKI.js.map} +1 -1
- package/dist/assets/{WorkerView-C3Rdbsfq.js → WorkerView-DV19-i1-.js} +2 -2
- package/dist/assets/{WorkerView-C3Rdbsfq.js.map → WorkerView-DV19-i1-.js.map} +1 -1
- package/dist/assets/{WorkflowActivator-DQXSsw0V.js → WorkflowActivator-BXWURYao.js} +2 -2
- package/dist/assets/{WorkflowActivator-DQXSsw0V.js.map → WorkflowActivator-BXWURYao.js.map} +1 -1
- package/dist/assets/{WorkflowExecutionsInfoAccordion-DJPF47om.js → WorkflowExecutionsInfoAccordion-aldNazgt.js} +2 -2
- package/dist/assets/{WorkflowExecutionsInfoAccordion-DJPF47om.js.map → WorkflowExecutionsInfoAccordion-aldNazgt.js.map} +1 -1
- package/dist/assets/{WorkflowExecutionsLandingPage-DoSsHWxH.js → WorkflowExecutionsLandingPage-CaAameTk.js} +2 -2
- package/dist/assets/{WorkflowExecutionsLandingPage-DoSsHWxH.js.map → WorkflowExecutionsLandingPage-CaAameTk.js.map} +1 -1
- package/dist/assets/{WorkflowExecutionsPreview-Dt23N5A4.js → WorkflowExecutionsPreview-Bb-wJtr-.js} +2 -2
- package/dist/assets/{WorkflowExecutionsPreview-Dt23N5A4.js.map → WorkflowExecutionsPreview-Bb-wJtr-.js.map} +1 -1
- package/dist/assets/{WorkflowExecutionsView-CpAIVxYQ.js → WorkflowExecutionsView-D7nlOP1-.js} +2 -2
- package/dist/assets/{WorkflowExecutionsView-CpAIVxYQ.js.map → WorkflowExecutionsView-D7nlOP1-.js.map} +1 -1
- package/dist/assets/{WorkflowHistory-D1-E_J_s.js → WorkflowHistory-C6zCGFoY.js} +2 -2
- package/dist/assets/{WorkflowHistory-D1-E_J_s.js.map → WorkflowHistory-C6zCGFoY.js.map} +1 -1
- package/dist/assets/{WorkflowOnboardingView-fzAZuVh5.js → WorkflowOnboardingView-Bu_Oqtr7.js} +2 -2
- package/dist/assets/{WorkflowOnboardingView-fzAZuVh5.js.map → WorkflowOnboardingView-Bu_Oqtr7.js.map} +1 -1
- package/dist/assets/{WorkflowPreview-BkL2jDRm.js → WorkflowPreview-CVwpKdpj.js} +2 -2
- package/dist/assets/{WorkflowPreview-BkL2jDRm.js.map → WorkflowPreview-CVwpKdpj.js.map} +1 -1
- package/dist/assets/{WorkflowsView-rbygROmM.js → WorkflowsView-DVeAZ2zW.js} +2 -2
- package/dist/assets/{WorkflowsView-rbygROmM.js.map → WorkflowsView-DVeAZ2zW.js.map} +1 -1
- package/dist/assets/{cloud-B90x0-JC.js → cloud-BRhZDk2r.js} +2 -2
- package/dist/assets/{cloud-B90x0-JC.js.map → cloud-BRhZDk2r.js.map} +1 -1
- package/dist/assets/{collaboration.store-ElxCV91F.js → collaboration.store-Ol7bcCFc.js} +2 -2
- package/dist/assets/{collaboration.store-ElxCV91F.js.map → collaboration.store-Ol7bcCFc.js.map} +1 -1
- package/dist/assets/{index-BE0Xl-jy.js → index-1OxaEeO3.js} +4 -4
- package/dist/assets/{index-BE0Xl-jy.js.map → index-1OxaEeO3.js.map} +1 -1
- package/dist/assets/{nodeCreator.store-Q1T99YCl.js → nodeCreator.store-FIsc3SCx.js} +2 -2
- package/dist/assets/{nodeCreator.store-Q1T99YCl.js.map → nodeCreator.store-FIsc3SCx.js.map} +1 -1
- package/dist/assets/{templateActions-B7R6qRak.js → templateActions-w_1vSarr.js} +2 -2
- package/dist/assets/{templateActions-B7R6qRak.js.map → templateActions-w_1vSarr.js.map} +1 -1
- package/dist/assets/{useExecutionDebugging-BJ0CgMh8.js → useExecutionDebugging-EHinBq_u.js} +2 -2
- package/dist/assets/{useExecutionDebugging-BJ0CgMh8.js.map → useExecutionDebugging-EHinBq_u.js.map} +1 -1
- package/dist/assets/{useExecutionHelpers-D3294Pbg.js → useExecutionHelpers-LeKoU_T-.js} +2 -2
- package/dist/assets/{useExecutionHelpers-D3294Pbg.js.map → useExecutionHelpers-LeKoU_T-.js.map} +1 -1
- package/dist/assets/{usePushConnection-CsYeEXN4.js → usePushConnection-PQgFeT_8.js} +2 -2
- package/dist/assets/{usePushConnection-CsYeEXN4.js.map → usePushConnection-PQgFeT_8.js.map} +1 -1
- package/dist/assets/{useUserHelpers-CzNhI0vP.js → useUserHelpers-DZtbUAMm.js} +2 -2
- package/dist/assets/{useUserHelpers-CzNhI0vP.js.map → useUserHelpers-DZtbUAMm.js.map} +1 -1
- package/dist/assets/{useWorkflowActivate-D8iK20ua.js → useWorkflowActivate-npf1npdP.js} +2 -2
- package/dist/assets/{useWorkflowActivate-D8iK20ua.js.map → useWorkflowActivate-npf1npdP.js.map} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/CollectionParameter-BXMOfisf.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{aH as _,e as V,af as l}from"./vendor-Dv5OeN6t.js";import{u as S,j as I,b as W,e as B,E as C,A as P,V as L,l as v,cI as A,cJ as E,G as O,x as U,H as R}from"./index-
|
|
2
|
-
//# sourceMappingURL=useExecutionDebugging-
|
|
1
|
+
import{aH as _,e as V,af as l}from"./vendor-Dv5OeN6t.js";import{u as S,j as I,b as W,e as B,E as C,A as P,V as L,l as v,cI as A,cJ as E,G as O,x as U,H as R}from"./index-1OxaEeO3.js";const K=()=>{const h=O(),T=_(),t=U(),N=R(),g=S(),s=I(),M=W(),c=B(),k=V(()=>M.isEnterpriseFeatureEnabled(C.DebugInEditor));return{applyExecutionData:async o=>{var D;const a=await s.getExecution(o),m=s.getCurrentWorkflow(),f=s.getNodes();if(!((D=a==null?void 0:a.data)!=null&&D.resultData))return;const{runData:b}=a.data.resultData,p=Object.keys(b),u=p.filter(e=>!f.some(i=>i.name===e)),y=Object.keys(s.workflow.pinData??{}),d=p.filter(e=>y.includes(e));if(d.length>0){const e=l("p",[t.baseText("nodeView.confirmMessage.debug.message"),l("ul",{class:"mt-l ml-l"},d.map(n=>l("li",n)))]);if(await N.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"})===P)d.forEach(n=>{const r=s.getNodeByName(n);r&&s.unpinData({node:r})});else{await T.push({name:L.EXECUTION_PREVIEW,params:{name:m.id,executionId:o}});return}}s.setWorkflowExecutionData(a);const w=f.filter(e=>!m.getParentNodes(e.name).length);let x=0;w.forEach(e=>{var n,r;const i=(r=(n=b[e.name])==null?void 0:n[0].data)==null?void 0:r.main[0];i&&(x++,s.pinData({node:e,data:i}))}),g.showToast({title:t.baseText("nodeView.showMessage.debug.title"),message:t.baseText("nodeView.showMessage.debug.content"),type:"info"}),u.length&&g.showToast({title:t.baseText("nodeView.showMessage.debug.missingNodes.title"),message:t.baseText("nodeView.showMessage.debug.missingNodes.content",{interpolate:{nodeNames:u.join(", ")}}),type:"warning"}),h.track("User clicked debug execution button",{instance_id:v().instanceId,exec_status:A(a)?a.status:"",override_pinned_data:w.length===x,all_exec_data_imported:u.length===0})},handleDebugLinkClick:o=>{if(!k.value){c.openModalWithData({name:E,data:{title:t.baseText(c.contextBasedTranslationKeys.feature.unavailable.title),footerButtonAction:()=>{c.closeModal(E),c.goToUpgrade("debug","upgrade-debug")}}}),o.preventDefault(),o.stopPropagation();return}s.isInDebugMode=!1}}};export{K as u};
|
|
2
|
+
//# sourceMappingURL=useExecutionDebugging-EHinBq_u.js.map
|
package/dist/assets/{useExecutionDebugging-BJ0CgMh8.js.map → useExecutionDebugging-EHinBq_u.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExecutionDebugging-
|
|
1
|
+
{"version":3,"file":"useExecutionDebugging-EHinBq_u.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';\nimport { useTelemetry } from './useTelemetry';\nimport { useRootStore } from '@/stores/root.store';\nimport { isFullExecutionResponse } from '@/utils/typeGuards';\n\nexport const useExecutionDebugging = () => {\n\tconst telemetry = useTelemetry();\n\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\tconst pinnableNodes = workflowNodes.filter(\n\t\t\t(node: INodeUi) => !workflow.getParentNodes(node.name).length,\n\t\t);\n\n\t\tlet pinnings = 0;\n\n\t\tpinnableNodes.forEach((node: INodeUi) => {\n\t\t\tconst nodeData = runData[node.name]?.[0].data?.main[0];\n\t\t\tif (nodeData) {\n\t\t\t\tpinnings++;\n\t\t\t\tworkflowsStore.pinData({\n\t\t\t\t\tnode,\n\t\t\t\t\tdata: nodeData,\n\t\t\t\t});\n\t\t\t}\n\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\n\t\ttelemetry.track('User clicked debug execution button', {\n\t\t\tinstance_id: useRootStore().instanceId,\n\t\t\texec_status: isFullExecutionResponse(execution) ? execution.status : '',\n\t\t\toverride_pinned_data: pinnableNodes.length === pinnings,\n\t\t\tall_exec_data_imported: missingNodeNames.length === 0,\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","telemetry","useTelemetry","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","pinnableNodes","pinnings","nodeData","_b","useRootStore","isFullExecutionResponse","event","DEBUG_PAYWALL_MODAL_KEY"],"mappings":"uLAmBO,MAAMA,EAAwB,IAAM,CAC1C,MAAMC,EAAYC,IAEZC,EAASC,IACTC,EAAOC,IACPC,EAAUC,IACVC,EAAQC,IACRC,EAAiBC,IACjBC,EAAgBC,IAChBC,EAAUC,IAEVC,EAAiBC,EAAS,IAC/BL,EAAc,2BAA2BM,EAAyB,aAAa,CAAA,EAgIzE,MAAA,CACN,mBA9H0B,MAAOC,GAAuC,OACxE,MAAMC,EAAY,MAAMV,EAAe,aAAaS,CAAW,EACzDE,EAAWX,EAAe,qBAC1BY,EAAgBZ,EAAe,WAEjC,GAAA,GAACa,EAAAH,GAAA,YAAAA,EAAW,OAAX,MAAAG,EAAiB,YACrB,OAGD,KAAM,CAAE,QAAAC,CAAY,EAAAJ,EAAU,KAAK,WAE7BK,EAAqB,OAAO,KAAKD,CAAO,EACxCE,EAAmBD,EAAmB,OAC1CE,GAAS,CAACL,EAAc,KAAMM,GAASA,EAAK,OAASD,CAAI,CAAA,EAKrDE,EAA0B,OAAO,KAAKnB,EAAe,SAAS,SAAW,CAAA,CAAE,EAC3EoB,EAA0BL,EAAmB,OAAQE,GAC1DE,EAAwB,SAASF,CAAI,CAAA,EAGlC,GAAAG,EAAwB,OAAS,EAAG,CACjC,MAAAC,EAAiBC,EAAE,IAAK,CAC7B5B,EAAK,SAAS,uCAAuC,EACrD4B,EACC,KACA,CAAE,MAAO,WAAY,EACrBF,EAAwB,IAAKH,GAASK,EAAE,KAAML,CAAI,CAAC,CACpD,C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Be,EAAc,SAAWC,EAC/C,uBAAwBV,EAAiB,SAAW,CAAA,CACpD,CAAA,EAwBD,qBArB6Be,GAAuB,CAChD,GAAA,CAACzB,EAAe,MAAO,CAC1BF,EAAQ,kBAAkB,CACzB,KAAM4B,EACN,KAAM,CACL,MAAOtC,EAAK,SAASU,EAAQ,4BAA4B,QAAQ,YAAY,KAAK,EAClF,mBAAoB,IAAM,CACzBA,EAAQ,WAAW4B,CAAuB,EACrC5B,EAAQ,YAAY,QAAS,eAAe,CAClD,CACD,CAAA,CACA,EACD2B,EAAM,eAAe,EACrBA,EAAM,gBAAgB,EACtB,MACD,CACA/B,EAAe,cAAgB,EAAA,CAK/B,CAEF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as u}from"./dateFormatter-CfbOITvW.js";import{x as l}from"./index-
|
|
2
|
-
//# sourceMappingURL=useExecutionHelpers-
|
|
1
|
+
import{c as u}from"./dateFormatter-CfbOITvW.js";import{x as l}from"./index-1OxaEeO3.js";function c(){const e=l();function r(t){const s={name:"unknown",startTime:n(t.startedAt),label:"Status unknown",runningTime:""};if(t.status==="waiting"?(s.name="waiting",s.label=e.baseText("executionsList.waiting")):t.status==="canceled"?s.label=e.baseText("executionsList.canceled"):t.status==="running"||t.status==="new"?(s.name="running",s.label=e.baseText("executionsList.running")):t.status==="success"?(s.name="success",s.label=e.baseText("executionsList.succeeded")):(t.status==="error"||t.status==="crashed")&&(s.name="error",s.label=e.baseText("executionsList.error")),t.status||(t.status="unknown"),t.startedAt&&t.stoppedAt){const a=t.stoppedAt?new Date(t.stoppedAt).getTime():Date.now();s.runningTime=e.displayTimer(a-new Date(t.startedAt).getTime(),!0)}return s}function n(t){const{date:s,time:a}=u(t);return e.baseText("executionsList.started",{interpolate:{time:a,date:s}})}function i(t){return["crashed","error"].includes(t.status)&&!t.retryOf&&!t.retrySuccessId}return{getUIDetails:r,formatDate:n,isExecutionRetriable:i}}export{c as u};
|
|
2
|
+
//# sourceMappingURL=useExecutionHelpers-LeKoU_T-.js.map
|
package/dist/assets/{useExecutionHelpers-D3294Pbg.js.map → useExecutionHelpers-LeKoU_T-.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExecutionHelpers-
|
|
1
|
+
{"version":3,"file":"useExecutionHelpers-LeKoU_T-.js","sources":["../../src/composables/useExecutionHelpers.ts"],"sourcesContent":["import type { ExecutionSummary } from 'n8n-workflow';\nimport { convertToDisplayDate } from '@/utils/formatters/dateFormatter';\nimport { useI18n } from '@/composables/useI18n';\n\nexport interface IExecutionUIData {\n\tname: string;\n\tlabel: string;\n\tstartTime: string;\n\trunningTime: string;\n}\n\nexport function useExecutionHelpers() {\n\tconst i18n = useI18n();\n\n\tfunction getUIDetails(execution: ExecutionSummary): IExecutionUIData {\n\t\tconst status = {\n\t\t\tname: 'unknown',\n\t\t\tstartTime: formatDate(execution.startedAt),\n\t\t\tlabel: 'Status unknown',\n\t\t\trunningTime: '',\n\t\t};\n\n\t\tif (execution.status === 'waiting') {\n\t\t\tstatus.name = 'waiting';\n\t\t\tstatus.label = i18n.baseText('executionsList.waiting');\n\t\t} else if (execution.status === 'canceled') {\n\t\t\tstatus.label = i18n.baseText('executionsList.canceled');\n\t\t} else if (execution.status === 'running' || execution.status === 'new') {\n\t\t\tstatus.name = 'running';\n\t\t\tstatus.label = i18n.baseText('executionsList.running');\n\t\t} else if (execution.status === 'success') {\n\t\t\tstatus.name = 'success';\n\t\t\tstatus.label = i18n.baseText('executionsList.succeeded');\n\t\t} else if (execution.status === 'error' || execution.status === 'crashed') {\n\t\t\tstatus.name = 'error';\n\t\t\tstatus.label = i18n.baseText('executionsList.error');\n\t\t}\n\n\t\tif (!execution.status) execution.status = 'unknown';\n\n\t\tif (execution.startedAt && execution.stoppedAt) {\n\t\t\tconst stoppedAt = execution.stoppedAt ? new Date(execution.stoppedAt).getTime() : Date.now();\n\t\t\tstatus.runningTime = i18n.displayTimer(\n\t\t\t\tstoppedAt - new Date(execution.startedAt).getTime(),\n\t\t\t\ttrue,\n\t\t\t);\n\t\t}\n\n\t\treturn status;\n\t}\n\n\tfunction formatDate(fullDate: Date | string | number) {\n\t\tconst { date, time } = convertToDisplayDate(fullDate);\n\t\treturn i18n.baseText('executionsList.started', { interpolate: { time, date } });\n\t}\n\n\tfunction isExecutionRetriable(execution: ExecutionSummary): boolean {\n\t\treturn (\n\t\t\t['crashed', 'error'].includes(execution.status) &&\n\t\t\t!execution.retryOf &&\n\t\t\t!execution.retrySuccessId\n\t\t);\n\t}\n\n\treturn {\n\t\tgetUIDetails,\n\t\tformatDate,\n\t\tisExecutionRetriable,\n\t};\n}\n"],"names":["useExecutionHelpers","i18n","useI18n","getUIDetails","execution","status","formatDate","stoppedAt","fullDate","date","time","convertToDisplayDate","isExecutionRetriable"],"mappings":"wFAWO,SAASA,GAAsB,CACrC,MAAMC,EAAOC,IAEb,SAASC,EAAaC,EAA+C,CACpE,MAAMC,EAAS,CACd,KAAM,UACN,UAAWC,EAAWF,EAAU,SAAS,EACzC,MAAO,iBACP,YAAa,EAAA,EAqBV,GAlBAA,EAAU,SAAW,WACxBC,EAAO,KAAO,UACPA,EAAA,MAAQJ,EAAK,SAAS,wBAAwB,GAC3CG,EAAU,SAAW,WACxBC,EAAA,MAAQJ,EAAK,SAAS,yBAAyB,EAC5CG,EAAU,SAAW,WAAaA,EAAU,SAAW,OACjEC,EAAO,KAAO,UACPA,EAAA,MAAQJ,EAAK,SAAS,wBAAwB,GAC3CG,EAAU,SAAW,WAC/BC,EAAO,KAAO,UACPA,EAAA,MAAQJ,EAAK,SAAS,0BAA0B,IAC7CG,EAAU,SAAW,SAAWA,EAAU,SAAW,aAC/DC,EAAO,KAAO,QACPA,EAAA,MAAQJ,EAAK,SAAS,sBAAsB,GAG/CG,EAAU,SAAQA,EAAU,OAAS,WAEtCA,EAAU,WAAaA,EAAU,UAAW,CACzC,MAAAG,EAAYH,EAAU,UAAY,IAAI,KAAKA,EAAU,SAAS,EAAE,QAAA,EAAY,KAAK,IAAI,EAC3FC,EAAO,YAAcJ,EAAK,aACzBM,EAAY,IAAI,KAAKH,EAAU,SAAS,EAAE,QAAQ,EAClD,EAAA,CAEF,CAEO,OAAAC,CACR,CAEA,SAASC,EAAWE,EAAkC,CACrD,KAAM,CAAE,KAAAC,EAAM,KAAAC,CAAK,EAAIC,EAAqBH,CAAQ,EAC7C,OAAAP,EAAK,SAAS,yBAA0B,CAAE,YAAa,CAAE,KAAAS,EAAM,KAAAD,CAAK,CAAA,CAAG,CAC/E,CAEA,SAASG,EAAqBR,EAAsC,CACnE,MACC,CAAC,UAAW,OAAO,EAAE,SAASA,EAAU,MAAM,GAC9C,CAACA,EAAU,SACX,CAACA,EAAU,cAEb,CAEO,MAAA,CACN,aAAAD,EACA,WAAAG,EACA,qBAAAM,CAAA,CAEF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{dq as ke,l as me,q as xe,ap as ye,u as Ee,aR as Se,a4 as ve,b as Ie,bd as Ne,e as Te,j as De,dr as We,ds as be,C as Ae,ar as ie,a3 as Me,I as Re,x as Ce,G as _e}from"./index-BE0Xl-jy.js";import{an as Le}from"./n8n-4UEsHtUL.js";import{p as He}from"./flatted-DN8lQ2XG.js";import{d as Oe}from"./pinia-sugP77Im.js";import{u as Pe,a as Ue}from"./collaboration.store-ElxCV91F.js";import{r as A}from"./vendor-Dv5OeN6t.js";const Fe="/orchestration/worker/status",Ge=async r=>{await ke(r,"POST",Fe)},$e=100,Be=120*1e3,qe=Oe("orchestrationManager",{state:()=>({initialStatusReceived:!1,workers:{},workersHistory:{},workersLastUpdated:{},statusInterval:null}),actions:{updateWorkerStatus(r){this.workers[r.workerId]=r,this.workersHistory[r.workerId]||(this.workersHistory[r.workerId]=[]),this.workersHistory[r.workerId].push({data:r,timestamp:Date.now()}),this.workersHistory[r.workerId].length>$e&&this.workersHistory[r.workerId].shift(),this.workersLastUpdated[r.workerId]=Date.now(),this.initialStatusReceived=!0},removeStaleWorkers(){for(const r in this.workersLastUpdated)this.workersLastUpdated[r]+Be<Date.now()&&(delete this.workers[r],delete this.workersHistory[r],delete this.workersLastUpdated[r])},startWorkerStatusPolling(){const r=me();this.statusInterval||(this.statusInterval=setInterval(async()=>{await Ge(r.restApiContext),this.removeStaleWorkers()},1e3))},stopWorkerStatusPolling(){this.statusInterval&&(clearInterval(this.statusInterval),this.statusInterval=null)},getWorkerLastUpdated(r){return this.workersLastUpdated[r]??0},getWorkerStatus(r){return this.workers[r]},getWorkerStatusHistory(r){return this.workersHistory[r]??[]}}});function Qe({router:r}){const S=xe({router:r}),ue=ye(),D=Re(),w=Ee(),l=Ce(),le=_e(),M=Pe(),R=Se(),E=ve(),de=qe(),ce=Ue(),fe=Ie(),we=Ne(),x=Te(),a=De(),h=A(null),m=A([]),v=A(null);function pe(){v.value=ce.addEventListener(e=>{W(e)}),M.initialize()}function ge(){M.terminate(),typeof v.value=="function"&&v.value()}function I(e,n){m.value.push({message:e,retriesLeft:n}),h.value===null&&(h.value=setTimeout(N,20))}async function N(){h.value!==null&&(clearTimeout(h.value),h.value=null);const e=m.value.length;for(let n=0;n<e;n++){const c=m.value.shift();if(!await W(c.message,!0)){c.retriesLeft-=1,c.retriesLeft>0&&m.value.unshift(c);break}}m.value.length!==0&&h.value===null&&(h.value=setTimeout(N,25))}async function W(e,n){var T,C,_,L,H,O,P,U,F,G,$,B,q,j,K,V,z,Y,J,Q,X,Z,ee,te,oe,se,ae,re;if(e.type==="sendWorkerStatusMessage"){const s=e.data;return de.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)&&n!==!0&&m.value.length)return I(e,5),!1;if(e.type==="nodeExecuteAfter"||e.type==="nodeExecuteBefore"){if(!x.isActionActive("workflowRunning"))return!1;const s=e.data;if(a.activeExecutionId!==s.executionId)return n!==!0&&I(event,5),!1}let k;if(e.type==="executionRecovered"){const s=(T=e.data)==null?void 0:T.executionId;if(x.isActionActive("workflowRunning")&&a.activeExecutionId===s){const t=await a.fetchExecutionDataById(a.activeExecutionId);if(t!=null&&t.data){t.data=He(t.data);const g={startData:(C=t.data)==null?void 0:C.startData,resultData:((_=t.data)==null?void 0:_.resultData)??{runData:{}},executionData:(L=t.data)==null?void 0:L.executionData};if(((H=a.workflowExecutionData)==null?void 0:H.workflowId)===t.workflowId){const f=(U=(P=(O=a.workflowExecutionData)==null?void 0:O.data)==null?void 0:P.resultData)==null?void 0:U.runData;if(f)for(const y of Object.keys(f))g.resultData.runData[y]=f[y]}const b={data:g,finished:t.finished,mode:t.mode,waitTill:(F=t.data)==null?void 0:F.waitTill,startedAt:t.startedAt,stoppedAt:t.stoppedAt,status:"crashed"};t.data&&(k={executionId:t.id,data:b})}}}if(e.type==="workflowFailedToActivate"&&a.workflowId===e.data.workflowId)return a.setWorkflowInactive(e.data.workflowId),a.setActive(!1),w.showError(new Error(e.data.errorMessage),l.baseText("workflowActivator.showError.title",{interpolate:{newStateName:"activated"}})+":"),!0;if(e.type==="workflowActivated")return a.setWorkflowActive(e.data.workflowId),!0;if(e.type==="workflowDeactivated")return a.setWorkflowInactive(e.data.workflowId),!0;if(e.type==="executionFinished"||e.type==="executionRecovered"){let s;e.type==="executionRecovered"&&k!==void 0?s=k:s=e.data;const{activeExecutionId:p}=a;if(p===s.executionId){const o=(B=($=(G=a.workflowExecutionData)==null?void 0:G.data)==null?void 0:$.resultData)==null?void 0:B.runData;if(o)for(const i of Object.keys(o))((J=(Y=(z=(V=(K=(j=(q=s.data.data.resultData.runData[i])==null?void 0:q[0])==null?void 0:j.data)==null?void 0:K.main)==null?void 0:V[0])==null?void 0:z[0])==null?void 0:Y.json)==null?void 0:J.isArtificialRecoveredEventItem)===!0&&o[i].length>0&&(s.data.data.resultData.runData[i]=o[i]);a.finishActiveExecution(s)}if(!x.isActionActive("workflowRunning"))return!1;if(p!==s.executionId)return n!==!0&&I(event,5),!1;const t=s.data;let g=he(t.data);t.status==="crashed"?g=l.baseText("pushConnection.executionFailed.message"):t.status==="canceled"&&(g=l.baseText("executionsList.showMessage.stopExecution.message",{interpolate:{activeExecutionId:p}}));const b=(Z=(X=(Q=t==null?void 0:t.data)==null?void 0:Q.resultData)==null?void 0:X.error)==null?void 0:Z.lineNumber;We.emit("error-line-number",b||"final");const f=S.getCurrentWorkflow();if(t.waitTill!==void 0){const o=a.workflowSettings,i=fe.saveManualExecutions,u=o.saveManualExecutions===void 0?i:o.saveManualExecutions;let d;u?d=`<a href="/workflow/${f.id}/executions/${p}">View the execution</a> to see what happened after this node.`:(be.emit("registerGlobalLinkAction",{key:"open-settings",action:async()=>{a.isNewWorkflow&&await S.saveAsNewWorkflow(),x.openModal(Ae)}}),d='<a data-action="open-settings">Turn on saving manual executions</a> and run again to see what happened after this node.'),D.titleSet(f.name,"IDLE"),w.showToast({title:"Workflow started waiting",message:`${d} <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(D.titleSet(f.name,"ERROR"),((ee=t.data.resultData.error)==null?void 0:ee.name)==="ExpressionError"&&t.data.resultData.error.context.functionality==="pairedItem"){const o=t.data.resultData.error;S.getWorkflowDataToSave().then(i=>{const u={caused_by_credential:!1,error_message:o.description,error_title:o.message,error_type:o.context.type,node_graph_string:JSON.stringify(Le(i,S.getNodeTypes()).nodeGraph),workflow_id:a.workflowId};if(o.context.nodeCause&&["paired_item_no_info","paired_item_invalid_info"].includes(o.context.type)){const d=f.getNode(o.context.nodeCause);d&&(u.is_pinned=!!f.getPinDataOfNode(d.name),u.mode=d.parameters.mode,u.node_type=d.type,u.operation=d.parameters.operation,u.resource=d.parameters.resource)}le.track("Instance FE emitted paired item error",u,{withPostHog:!0})})}if(((te=t.data.resultData.error)==null?void 0:te.name)==="SubworkflowOperationError"){const o=t.data.resultData.error;a.subWorkflowExecutionError=o,w.showMessage({title:o.message,message:o.description,type:"error",duration:0})}else if(((oe=t.data.resultData.error)==null?void 0:oe.name)==="NodeOperationError"&&t.data.resultData.error.functionality==="configuration-node"){let o;const i=t.data.resultData.error;i.node.name?o=`Error in sub-node ‘${i.node.name}‘`:o="Problem executing workflow",w.showMessage({title:o,message:((i==null?void 0:i.description)??g)+l.baseText("pushConnection.executionError.openNode",{interpolate:{node:i.node.name}}),type:"error",duration:0,dangerouslyUseHTMLString:!0})}else{let o;t.mode==="manual"&&t.status==="canceled"?w.showMessage({title:l.baseText("nodeView.showMessage.stopExecutionTry.title"),type:"success"}):(t.data.resultData.lastNodeExecuted?o=`Problem in node ‘${t.data.resultData.lastNodeExecuted}‘`:o="Problem executing workflow",w.showMessage({title:o,message:g,type:"error",duration:0,dangerouslyUseHTMLString:!0}))}}else{D.titleSet(f.name,"IDLE");const o=a.getWorkflowExecution;if(o!=null&&o.executedNode){const i=a.getNodeByName(o.executedNode),u=i&&E.getNodeType(i.type,i.typeVersion),d=o&&o.executedNode&&((re=(ae=(se=o.data)==null?void 0:se.resultData)==null?void 0:ae.runData)==null?void 0:re[o.executedNode]);u!=null&&u.polling&&!d?w.showMessage({title:l.baseText("pushConnection.pollingNode.dataNotFound",{interpolate:{service:ie(u)}}),message:l.baseText("pushConnection.pollingNode.dataNotFound.message",{interpolate:{service:ie(u)}}),type:"success"}):w.showMessage({title:l.baseText("pushConnection.nodeExecutedSuccessfully"),type:"success"})}else w.showMessage({title:l.baseText("pushConnection.workflowExecutedSuccessfully"),type:"success"})}a.getWorkflowRunData&&(t.data.resultData.runData=a.getWorkflowRunData),a.executingNode.length=0,a.setWorkflowExecutionData(t),x.removeActiveAction("workflowRunning"),ue.updateNodesExecutionIssues();const y=t.data.resultData.lastNodeExecuted;let ne=0;y&&t.data.resultData.runData[y]&&!g&&(ne=t.data.resultData.runData[y][0].data.main[0].length),Me().run("pushConnection.executionFinished",{itemsCount:ne,nodeName:t.data.resultData.lastNodeExecuted,errorMessage:g,runDataExecutedStartData:t.data.startData,resultDataError:t.data.resultData.error}),t.data.resultData.error||we.trackSuccessfulWorkflowExecution(t)}else if(e.type==="executionStarted"){const s=e.data,p={id:s.executionId,finished:!1,status:"running",mode:s.mode,startedAt:s.startedAt,retryOf:s.retryOf,workflowId:s.workflowId,workflowName:s.workflowName};a.addActiveExecution(p)}else if(e.type==="nodeExecuteAfter"){const s=e.data;a.addNodeExecutionData(s),a.removeExecutingNode(s.nodeName)}else if(e.type==="nodeExecuteBefore"){const s=e.data;a.addExecutingNode(s.nodeName)}else if(e.type==="testWebhookDeleted")e.data.workflowId===a.workflowId&&(a.executionWaitingForWebhook=!1,x.removeActiveAction("workflowRunning"));else if(e.type==="testWebhookReceived"){const s=e.data;s.workflowId===a.workflowId&&(a.executionWaitingForWebhook=!1,a.activeExecutionId=s.executionId),N()}else if(e.type==="reloadNodeType")await E.getNodeTypes(),await E.getFullNodesProperties([e.data]);else if(e.type==="removeNodeType"){const p=[e.data];await R.fetchCredentialTypes(!1).then(()=>{E.removeNodeTypes(p)})}else e.type==="nodeDescriptionUpdated"&&(await E.getNodeTypes(),await R.fetchCredentialTypes(!0));return!0}function he(e){const n=e.resultData.error;let c;if(e.resultData.lastNodeExecuted&&n)c=n.message||n.description;else if(c=l.baseText("pushConnection.executionError",{interpolate:{error:"!"}}),n!=null&&n.message){let k;"node"in n&&(k=typeof n.node=="string"?n.node:n.node.name);const T=k?`${k}: ${n.message}`:n.message;c=l.baseText("pushConnection.executionError",{interpolate:{error:`.${l.baseText("pushConnection.executionError.details",{interpolate:{details:T}})}`}})}return c}return{initialize:pe,terminate:ge,pushMessageReceived:W,queuePushMessage:I,processWaitingPushMessages:N,pushMessageQueue:m,removeEventListener:v,retryTimeout:h}}export{$e as W,qe as a,Qe as u};
|
|
2
|
-
//# sourceMappingURL=usePushConnection-
|
|
1
|
+
import{dq as ke,l as me,q as xe,ap as ye,u as Ee,aR as Se,a4 as ve,b as Ie,bd as Ne,e as Te,j as De,dr as We,ds as be,C as Ae,ar as ie,a3 as Me,I as Re,x as Ce,G as _e}from"./index-1OxaEeO3.js";import{an as Le}from"./n8n-4UEsHtUL.js";import{p as He}from"./flatted-DN8lQ2XG.js";import{d as Oe}from"./pinia-sugP77Im.js";import{u as Pe,a as Ue}from"./collaboration.store-Ol7bcCFc.js";import{r as A}from"./vendor-Dv5OeN6t.js";const Fe="/orchestration/worker/status",Ge=async r=>{await ke(r,"POST",Fe)},$e=100,Be=120*1e3,qe=Oe("orchestrationManager",{state:()=>({initialStatusReceived:!1,workers:{},workersHistory:{},workersLastUpdated:{},statusInterval:null}),actions:{updateWorkerStatus(r){this.workers[r.workerId]=r,this.workersHistory[r.workerId]||(this.workersHistory[r.workerId]=[]),this.workersHistory[r.workerId].push({data:r,timestamp:Date.now()}),this.workersHistory[r.workerId].length>$e&&this.workersHistory[r.workerId].shift(),this.workersLastUpdated[r.workerId]=Date.now(),this.initialStatusReceived=!0},removeStaleWorkers(){for(const r in this.workersLastUpdated)this.workersLastUpdated[r]+Be<Date.now()&&(delete this.workers[r],delete this.workersHistory[r],delete this.workersLastUpdated[r])},startWorkerStatusPolling(){const r=me();this.statusInterval||(this.statusInterval=setInterval(async()=>{await Ge(r.restApiContext),this.removeStaleWorkers()},1e3))},stopWorkerStatusPolling(){this.statusInterval&&(clearInterval(this.statusInterval),this.statusInterval=null)},getWorkerLastUpdated(r){return this.workersLastUpdated[r]??0},getWorkerStatus(r){return this.workers[r]},getWorkerStatusHistory(r){return this.workersHistory[r]??[]}}});function Qe({router:r}){const S=xe({router:r}),ue=ye(),D=Re(),w=Ee(),l=Ce(),le=_e(),M=Pe(),R=Se(),E=ve(),de=qe(),ce=Ue(),fe=Ie(),we=Ne(),x=Te(),a=De(),h=A(null),m=A([]),v=A(null);function pe(){v.value=ce.addEventListener(e=>{W(e)}),M.initialize()}function ge(){M.terminate(),typeof v.value=="function"&&v.value()}function I(e,n){m.value.push({message:e,retriesLeft:n}),h.value===null&&(h.value=setTimeout(N,20))}async function N(){h.value!==null&&(clearTimeout(h.value),h.value=null);const e=m.value.length;for(let n=0;n<e;n++){const c=m.value.shift();if(!await W(c.message,!0)){c.retriesLeft-=1,c.retriesLeft>0&&m.value.unshift(c);break}}m.value.length!==0&&h.value===null&&(h.value=setTimeout(N,25))}async function W(e,n){var T,C,_,L,H,O,P,U,F,G,$,B,q,j,K,V,z,Y,J,Q,X,Z,ee,te,oe,se,ae,re;if(e.type==="sendWorkerStatusMessage"){const s=e.data;return de.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)&&n!==!0&&m.value.length)return I(e,5),!1;if(e.type==="nodeExecuteAfter"||e.type==="nodeExecuteBefore"){if(!x.isActionActive("workflowRunning"))return!1;const s=e.data;if(a.activeExecutionId!==s.executionId)return n!==!0&&I(event,5),!1}let k;if(e.type==="executionRecovered"){const s=(T=e.data)==null?void 0:T.executionId;if(x.isActionActive("workflowRunning")&&a.activeExecutionId===s){const t=await a.fetchExecutionDataById(a.activeExecutionId);if(t!=null&&t.data){t.data=He(t.data);const g={startData:(C=t.data)==null?void 0:C.startData,resultData:((_=t.data)==null?void 0:_.resultData)??{runData:{}},executionData:(L=t.data)==null?void 0:L.executionData};if(((H=a.workflowExecutionData)==null?void 0:H.workflowId)===t.workflowId){const f=(U=(P=(O=a.workflowExecutionData)==null?void 0:O.data)==null?void 0:P.resultData)==null?void 0:U.runData;if(f)for(const y of Object.keys(f))g.resultData.runData[y]=f[y]}const b={data:g,finished:t.finished,mode:t.mode,waitTill:(F=t.data)==null?void 0:F.waitTill,startedAt:t.startedAt,stoppedAt:t.stoppedAt,status:"crashed"};t.data&&(k={executionId:t.id,data:b})}}}if(e.type==="workflowFailedToActivate"&&a.workflowId===e.data.workflowId)return a.setWorkflowInactive(e.data.workflowId),a.setActive(!1),w.showError(new Error(e.data.errorMessage),l.baseText("workflowActivator.showError.title",{interpolate:{newStateName:"activated"}})+":"),!0;if(e.type==="workflowActivated")return a.setWorkflowActive(e.data.workflowId),!0;if(e.type==="workflowDeactivated")return a.setWorkflowInactive(e.data.workflowId),!0;if(e.type==="executionFinished"||e.type==="executionRecovered"){let s;e.type==="executionRecovered"&&k!==void 0?s=k:s=e.data;const{activeExecutionId:p}=a;if(p===s.executionId){const o=(B=($=(G=a.workflowExecutionData)==null?void 0:G.data)==null?void 0:$.resultData)==null?void 0:B.runData;if(o)for(const i of Object.keys(o))((J=(Y=(z=(V=(K=(j=(q=s.data.data.resultData.runData[i])==null?void 0:q[0])==null?void 0:j.data)==null?void 0:K.main)==null?void 0:V[0])==null?void 0:z[0])==null?void 0:Y.json)==null?void 0:J.isArtificialRecoveredEventItem)===!0&&o[i].length>0&&(s.data.data.resultData.runData[i]=o[i]);a.finishActiveExecution(s)}if(!x.isActionActive("workflowRunning"))return!1;if(p!==s.executionId)return n!==!0&&I(event,5),!1;const t=s.data;let g=he(t.data);t.status==="crashed"?g=l.baseText("pushConnection.executionFailed.message"):t.status==="canceled"&&(g=l.baseText("executionsList.showMessage.stopExecution.message",{interpolate:{activeExecutionId:p}}));const b=(Z=(X=(Q=t==null?void 0:t.data)==null?void 0:Q.resultData)==null?void 0:X.error)==null?void 0:Z.lineNumber;We.emit("error-line-number",b||"final");const f=S.getCurrentWorkflow();if(t.waitTill!==void 0){const o=a.workflowSettings,i=fe.saveManualExecutions,u=o.saveManualExecutions===void 0?i:o.saveManualExecutions;let d;u?d=`<a href="/workflow/${f.id}/executions/${p}">View the execution</a> to see what happened after this node.`:(be.emit("registerGlobalLinkAction",{key:"open-settings",action:async()=>{a.isNewWorkflow&&await S.saveAsNewWorkflow(),x.openModal(Ae)}}),d='<a data-action="open-settings">Turn on saving manual executions</a> and run again to see what happened after this node.'),D.titleSet(f.name,"IDLE"),w.showToast({title:"Workflow started waiting",message:`${d} <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(D.titleSet(f.name,"ERROR"),((ee=t.data.resultData.error)==null?void 0:ee.name)==="ExpressionError"&&t.data.resultData.error.context.functionality==="pairedItem"){const o=t.data.resultData.error;S.getWorkflowDataToSave().then(i=>{const u={caused_by_credential:!1,error_message:o.description,error_title:o.message,error_type:o.context.type,node_graph_string:JSON.stringify(Le(i,S.getNodeTypes()).nodeGraph),workflow_id:a.workflowId};if(o.context.nodeCause&&["paired_item_no_info","paired_item_invalid_info"].includes(o.context.type)){const d=f.getNode(o.context.nodeCause);d&&(u.is_pinned=!!f.getPinDataOfNode(d.name),u.mode=d.parameters.mode,u.node_type=d.type,u.operation=d.parameters.operation,u.resource=d.parameters.resource)}le.track("Instance FE emitted paired item error",u,{withPostHog:!0})})}if(((te=t.data.resultData.error)==null?void 0:te.name)==="SubworkflowOperationError"){const o=t.data.resultData.error;a.subWorkflowExecutionError=o,w.showMessage({title:o.message,message:o.description,type:"error",duration:0})}else if(((oe=t.data.resultData.error)==null?void 0:oe.name)==="NodeOperationError"&&t.data.resultData.error.functionality==="configuration-node"){let o;const i=t.data.resultData.error;i.node.name?o=`Error in sub-node ‘${i.node.name}‘`:o="Problem executing workflow",w.showMessage({title:o,message:((i==null?void 0:i.description)??g)+l.baseText("pushConnection.executionError.openNode",{interpolate:{node:i.node.name}}),type:"error",duration:0,dangerouslyUseHTMLString:!0})}else{let o;t.mode==="manual"&&t.status==="canceled"?w.showMessage({title:l.baseText("nodeView.showMessage.stopExecutionTry.title"),type:"success"}):(t.data.resultData.lastNodeExecuted?o=`Problem in node ‘${t.data.resultData.lastNodeExecuted}‘`:o="Problem executing workflow",w.showMessage({title:o,message:g,type:"error",duration:0,dangerouslyUseHTMLString:!0}))}}else{D.titleSet(f.name,"IDLE");const o=a.getWorkflowExecution;if(o!=null&&o.executedNode){const i=a.getNodeByName(o.executedNode),u=i&&E.getNodeType(i.type,i.typeVersion),d=o&&o.executedNode&&((re=(ae=(se=o.data)==null?void 0:se.resultData)==null?void 0:ae.runData)==null?void 0:re[o.executedNode]);u!=null&&u.polling&&!d?w.showMessage({title:l.baseText("pushConnection.pollingNode.dataNotFound",{interpolate:{service:ie(u)}}),message:l.baseText("pushConnection.pollingNode.dataNotFound.message",{interpolate:{service:ie(u)}}),type:"success"}):w.showMessage({title:l.baseText("pushConnection.nodeExecutedSuccessfully"),type:"success"})}else w.showMessage({title:l.baseText("pushConnection.workflowExecutedSuccessfully"),type:"success"})}a.getWorkflowRunData&&(t.data.resultData.runData=a.getWorkflowRunData),a.executingNode.length=0,a.setWorkflowExecutionData(t),x.removeActiveAction("workflowRunning"),ue.updateNodesExecutionIssues();const y=t.data.resultData.lastNodeExecuted;let ne=0;y&&t.data.resultData.runData[y]&&!g&&(ne=t.data.resultData.runData[y][0].data.main[0].length),Me().run("pushConnection.executionFinished",{itemsCount:ne,nodeName:t.data.resultData.lastNodeExecuted,errorMessage:g,runDataExecutedStartData:t.data.startData,resultDataError:t.data.resultData.error}),t.data.resultData.error||we.trackSuccessfulWorkflowExecution(t)}else if(e.type==="executionStarted"){const s=e.data,p={id:s.executionId,finished:!1,status:"running",mode:s.mode,startedAt:s.startedAt,retryOf:s.retryOf,workflowId:s.workflowId,workflowName:s.workflowName};a.addActiveExecution(p)}else if(e.type==="nodeExecuteAfter"){const s=e.data;a.addNodeExecutionData(s),a.removeExecutingNode(s.nodeName)}else if(e.type==="nodeExecuteBefore"){const s=e.data;a.addExecutingNode(s.nodeName)}else if(e.type==="testWebhookDeleted")e.data.workflowId===a.workflowId&&(a.executionWaitingForWebhook=!1,x.removeActiveAction("workflowRunning"));else if(e.type==="testWebhookReceived"){const s=e.data;s.workflowId===a.workflowId&&(a.executionWaitingForWebhook=!1,a.activeExecutionId=s.executionId),N()}else if(e.type==="reloadNodeType")await E.getNodeTypes(),await E.getFullNodesProperties([e.data]);else if(e.type==="removeNodeType"){const p=[e.data];await R.fetchCredentialTypes(!1).then(()=>{E.removeNodeTypes(p)})}else e.type==="nodeDescriptionUpdated"&&(await E.getNodeTypes(),await R.fetchCredentialTypes(!0));return!0}function he(e){const n=e.resultData.error;let c;if(e.resultData.lastNodeExecuted&&n)c=n.message||n.description;else if(c=l.baseText("pushConnection.executionError",{interpolate:{error:"!"}}),n!=null&&n.message){let k;"node"in n&&(k=typeof n.node=="string"?n.node:n.node.name);const T=k?`${k}: ${n.message}`:n.message;c=l.baseText("pushConnection.executionError",{interpolate:{error:`.${l.baseText("pushConnection.executionError.details",{interpolate:{details:T}})}`}})}return c}return{initialize:pe,terminate:ge,pushMessageReceived:W,queuePushMessage:I,processWaitingPushMessages:N,pushMessageQueue:m,removeEventListener:v,retryTimeout:h}}export{$e as W,qe as a,Qe as u};
|
|
2
|
+
//# sourceMappingURL=usePushConnection-PQgFeT_8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePushConnection-CsYeEXN4.js","sources":["../../src/api/orchestration.ts","../../src/stores/orchestration.store.ts","../../src/composables/usePushConnection.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 './root.store';\nimport { sendGetWorkerStatus } from '../api/orchestration';\n\nexport const WORKER_HISTORY_LENGTH = 100;\nconst STALE_SECONDS = 120 * 1000;\n\nexport interface IOrchestrationStoreState {\n\tinitialStatusReceived: boolean;\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\tinitialStatusReceived: false,\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\n\t\t\tthis.initialStatusReceived = true;\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.restApiContext);\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 { useNodeHelpers } from '@/composables/useNodeHelpers';\nimport { useTitleChange } from '@/composables/useTitleChange';\nimport { useToast } from '@/composables/useToast';\n\nimport type {\n\tExpressionError,\n\tIDataObject,\n\tINodeTypeNameVersion,\n\tIRun,\n\tIRunExecutionData,\n\tIWorkflowBase,\n\tSubworkflowOperationError,\n\tIExecuteContextData,\n\tNodeOperationError,\n\tINodeTypeDescription,\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 { 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 { ref } from 'vue';\nimport { useOrchestrationStore } from '@/stores/orchestration.store';\nimport { usePushConnectionStore } from '@/stores/pushConnection.store';\nimport { useCollaborationStore } from '@/stores/collaboration.store';\nimport { useExternalHooks } from '@/composables/useExternalHooks';\nimport type { useRouter } from 'vue-router';\nimport { useWorkflowHelpers } from '@/composables/useWorkflowHelpers';\nimport { useI18n } from '@/composables/useI18n';\nimport { useTelemetry } from '@/composables/useTelemetry';\nimport type { PushMessageQueueItem } from '@/types';\n\nexport function usePushConnection({ router }: { router: ReturnType<typeof useRouter> }) {\n\tconst workflowHelpers = useWorkflowHelpers({ router });\n\tconst nodeHelpers = useNodeHelpers();\n\tconst titleChange = useTitleChange();\n\tconst toast = useToast();\n\tconst i18n = useI18n();\n\tconst telemetry = useTelemetry();\n\n\tconst collaborationStore = useCollaborationStore();\n\tconst credentialsStore = useCredentialsStore();\n\tconst nodeTypesStore = useNodeTypesStore();\n\tconst orchestrationManagerStore = useOrchestrationStore();\n\tconst pushStore = usePushConnectionStore();\n\tconst settingsStore = useSettingsStore();\n\tconst segmentStore = useSegment();\n\tconst uiStore = useUIStore();\n\tconst workflowsStore = useWorkflowsStore();\n\n\tconst retryTimeout = ref<NodeJS.Timeout | null>(null);\n\tconst pushMessageQueue = ref<PushMessageQueueItem[]>([]);\n\tconst removeEventListener = ref<(() => void) | null>(null);\n\n\tfunction initialize() {\n\t\tremoveEventListener.value = pushStore.addEventListener((message) => {\n\t\t\tvoid pushMessageReceived(message);\n\t\t});\n\t\tcollaborationStore.initialize();\n\t}\n\n\tfunction terminate() {\n\t\tcollaborationStore.terminate();\n\t\tif (typeof removeEventListener.value === 'function') {\n\t\t\tremoveEventListener.value();\n\t\t}\n\t}\n\n\t/**\n\t * Sometimes the push message is faster as the result from\n\t * the REST API so we do not know yet what execution ID\n\t * is currently active. So internally resend the message\n\t * a few more times\n\t */\n\tfunction queuePushMessage(event: IPushData, retryAttempts: number) {\n\t\tpushMessageQueue.value.push({ message: event, retriesLeft: retryAttempts });\n\n\t\tif (retryTimeout.value === null) {\n\t\t\tretryTimeout.value = setTimeout(processWaitingPushMessages, 20);\n\t\t}\n\t}\n\n\t/**\n\t * Process the push messages which are waiting in the queue\n\t */\n\tasync function processWaitingPushMessages() {\n\t\tif (retryTimeout.value !== null) {\n\t\t\tclearTimeout(retryTimeout.value);\n\t\t\tretryTimeout.value = null;\n\t\t}\n\n\t\tconst queueLength = pushMessageQueue.value.length;\n\t\tfor (let i = 0; i < queueLength; i++) {\n\t\t\tconst messageData = pushMessageQueue.value.shift() as PushMessageQueueItem;\n\n\t\t\tconst result = await pushMessageReceived(messageData.message, true);\n\t\t\tif (!result) {\n\t\t\t\t// Was not successful\n\t\t\t\tmessageData.retriesLeft -= 1;\n\n\t\t\t\tif (messageData.retriesLeft > 0) {\n\t\t\t\t\t// If still retries are left add it back and stop execution\n\t\t\t\t\tpushMessageQueue.value.unshift(messageData);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (pushMessageQueue.value.length !== 0 && retryTimeout.value === null) {\n\t\t\tretryTimeout.value = setTimeout(processWaitingPushMessages, 25);\n\t\t}\n\t}\n\n\t/**\n\t * Process a newly received message\n\t */\n\tasync function pushMessageReceived(receivedData: IPushData, isRetry?: boolean): Promise<boolean> {\n\t\tconst retryAttempts = 5;\n\n\t\tif (receivedData.type === 'sendWorkerStatusMessage') {\n\t\t\tconst pushData = receivedData.data;\n\t\t\torchestrationManagerStore.updateWorkerStatus(pushData.status);\n\t\t\treturn true;\n\t\t}\n\n\t\tif (receivedData.type === 'sendConsoleMessage') {\n\t\t\tconst pushData = receivedData.data;\n\t\t\tconsole.log(pushData.source, ...pushData.messages);\n\t\t\treturn true;\n\t\t}\n\n\t\tif (\n\t\t\t!['testWebhookReceived'].includes(receivedData.type) &&\n\t\t\tisRetry !== true &&\n\t\t\tpushMessageQueue.value.length\n\t\t) {\n\t\t\t// If there are already messages in the queue add the new one that all of them\n\t\t\t// get executed in order\n\t\t\tqueuePushMessage(receivedData, retryAttempts);\n\t\t\treturn false;\n\t\t}\n\n\t\tif (receivedData.type === 'nodeExecuteAfter' || receivedData.type === 'nodeExecuteBefore') {\n\t\t\tif (!uiStore.isActionActive('workflowRunning')) {\n\t\t\t\t// No workflow is running so ignore the messages\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst pushData = receivedData.data;\n\t\t\tif (workflowsStore.activeExecutionId !== pushData.executionId) {\n\t\t\t\t// The data is not for the currently active execution or\n\t\t\t\t// we do not have the execution id yet.\n\t\t\t\tif (isRetry !== true) {\n\t\t\t\t\tqueuePushMessage(event as unknown as IPushData, retryAttempts);\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// recovered execution data is handled like executionFinished data, however for security reasons\n\t\t// we need to fetch the data from the server again rather than push it to all clients\n\t\tlet recoveredPushData: IPushDataExecutionFinished | undefined = undefined;\n\t\tif (receivedData.type === 'executionRecovered') {\n\t\t\tconst recoveredExecutionId = receivedData.data?.executionId;\n\t\t\tconst isWorkflowRunning = uiStore.isActionActive('workflowRunning');\n\t\t\tif (isWorkflowRunning && workflowsStore.activeExecutionId === recoveredExecutionId) {\n\t\t\t\t// pull execution data for the recovered execution from the server\n\t\t\t\tconst executionData = await workflowsStore.fetchExecutionDataById(\n\t\t\t\t\tworkflowsStore.activeExecutionId,\n\t\t\t\t);\n\t\t\t\tif (executionData?.data) {\n\t\t\t\t\t// data comes in as 'flatten' object, so we need to parse it\n\t\t\t\t\texecutionData.data = parse(executionData.data as unknown as string) as IRunExecutionData;\n\t\t\t\t\tconst iRunExecutionData: IRunExecutionData = {\n\t\t\t\t\t\tstartData: executionData.data?.startData,\n\t\t\t\t\t\tresultData: executionData.data?.resultData ?? { runData: {} },\n\t\t\t\t\t\texecutionData: executionData.data?.executionData,\n\t\t\t\t\t};\n\t\t\t\t\tif (workflowsStore.workflowExecutionData?.workflowId === executionData.workflowId) {\n\t\t\t\t\t\tconst activeRunData = workflowsStore.workflowExecutionData?.data?.resultData?.runData;\n\t\t\t\t\t\tif (activeRunData) {\n\t\t\t\t\t\t\tfor (const key of Object.keys(activeRunData)) {\n\t\t\t\t\t\t\t\tiRunExecutionData.resultData.runData[key] = activeRunData[key];\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\tconst iRun: IRun = {\n\t\t\t\t\t\tdata: iRunExecutionData,\n\t\t\t\t\t\tfinished: executionData.finished,\n\t\t\t\t\t\tmode: executionData.mode,\n\t\t\t\t\t\twaitTill: executionData.data?.waitTill,\n\t\t\t\t\t\tstartedAt: executionData.startedAt,\n\t\t\t\t\t\tstoppedAt: executionData.stoppedAt,\n\t\t\t\t\t\tstatus: 'crashed',\n\t\t\t\t\t};\n\t\t\t\t\tif (executionData.data) {\n\t\t\t\t\t\trecoveredPushData = {\n\t\t\t\t\t\t\texecutionId: executionData.id,\n\t\t\t\t\t\t\tdata: iRun,\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\n\t\tif (\n\t\t\treceivedData.type === 'workflowFailedToActivate' &&\n\t\t\tworkflowsStore.workflowId === receivedData.data.workflowId\n\t\t) {\n\t\t\tworkflowsStore.setWorkflowInactive(receivedData.data.workflowId);\n\t\t\tworkflowsStore.setActive(false);\n\n\t\t\ttoast.showError(\n\t\t\t\tnew Error(receivedData.data.errorMessage),\n\t\t\t\ti18n.baseText('workflowActivator.showError.title', {\n\t\t\t\t\tinterpolate: { newStateName: 'activated' },\n\t\t\t\t}) + ':',\n\t\t\t);\n\n\t\t\treturn true;\n\t\t}\n\n\t\tif (receivedData.type === 'workflowActivated') {\n\t\t\tworkflowsStore.setWorkflowActive(receivedData.data.workflowId);\n\t\t\treturn true;\n\t\t}\n\n\t\tif (receivedData.type === 'workflowDeactivated') {\n\t\t\tworkflowsStore.setWorkflowInactive(receivedData.data.workflowId);\n\t\t\treturn true;\n\t\t}\n\n\t\tif (receivedData.type === 'executionFinished' || receivedData.type === 'executionRecovered') {\n\t\t\t// The workflow finished executing\n\t\t\tlet pushData: IPushDataExecutionFinished;\n\t\t\tif (receivedData.type === 'executionRecovered' && recoveredPushData !== undefined) {\n\t\t\t\tpushData = recoveredPushData;\n\t\t\t} else {\n\t\t\t\tpushData = receivedData.data as IPushDataExecutionFinished;\n\t\t\t}\n\n\t\t\tconst { activeExecutionId } = workflowsStore;\n\t\t\tif (activeExecutionId === pushData.executionId) {\n\t\t\t\tconst activeRunData = workflowsStore.workflowExecutionData?.data?.resultData?.runData;\n\t\t\t\tif (activeRunData) {\n\t\t\t\t\tfor (const key of Object.keys(activeRunData)) {\n\t\t\t\t\t\tif (\n\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?.isArtificialRecoveredEventItem === true &&\n\t\t\t\t\t\t\tactiveRunData[key].length > 0\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\tpushData.data.data.resultData.runData[key] = activeRunData[key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tworkflowsStore.finishActiveExecution(pushData);\n\t\t\t}\n\n\t\t\tif (!uiStore.isActionActive('workflowRunning')) {\n\t\t\t\t// No workflow is running so ignore the messages\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (activeExecutionId !== pushData.executionId) {\n\t\t\t\t// The workflow which did finish execution did either not get started\n\t\t\t\t// by this session or we do not have the execution id yet.\n\t\t\t\tif (isRetry !== true) {\n\t\t\t\t\tqueuePushMessage(event as unknown as IPushData, retryAttempts);\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst runDataExecuted = pushData.data;\n\n\t\t\tlet runDataExecutedErrorMessage = getExecutionError(runDataExecuted.data);\n\n\t\t\tif (runDataExecuted.status === 'crashed') {\n\t\t\t\trunDataExecutedErrorMessage = i18n.baseText('pushConnection.executionFailed.message');\n\t\t\t} else if (runDataExecuted.status === 'canceled') {\n\t\t\t\trunDataExecutedErrorMessage = i18n.baseText(\n\t\t\t\t\t'executionsList.showMessage.stopExecution.message',\n\t\t\t\t\t{\n\t\t\t\t\t\tinterpolate: { activeExecutionId },\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst lineNumber = runDataExecuted?.data?.resultData?.error?.lineNumber;\n\n\t\t\tcodeNodeEditorEventBus.emit('error-line-number', lineNumber || 'final');\n\n\t\t\tconst workflow = workflowHelpers.getCurrentWorkflow();\n\t\t\tif (runDataExecuted.waitTill !== undefined) {\n\t\t\t\tconst workflowSettings = workflowsStore.workflowSettings;\n\t\t\t\tconst saveManualExecutions = settingsStore.saveManualExecutions;\n\n\t\t\t\tconst isSavingExecutions =\n\t\t\t\t\tworkflowSettings.saveManualExecutions === undefined\n\t\t\t\t\t\t? saveManualExecutions\n\t\t\t\t\t\t: workflowSettings.saveManualExecutions;\n\n\t\t\t\tlet action;\n\t\t\t\tif (!isSavingExecutions) {\n\t\t\t\t\tglobalLinkActionsEventBus.emit('registerGlobalLinkAction', {\n\t\t\t\t\t\tkey: 'open-settings',\n\t\t\t\t\t\taction: async () => {\n\t\t\t\t\t\t\tif (workflowsStore.isNewWorkflow) await workflowHelpers.saveAsNewWorkflow();\n\t\t\t\t\t\t\tuiStore.openModal(WORKFLOW_SETTINGS_MODAL_KEY);\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\n\t\t\t\t\taction =\n\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} else {\n\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}\n\n\t\t\t\t// Workflow did start but had been put to wait\n\t\t\t\ttitleChange.titleSet(workflow.name as string, 'IDLE');\n\t\t\t\ttoast.showToast({\n\t\t\t\t\ttitle: 'Workflow started waiting',\n\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\ttype: 'success',\n\t\t\t\t\tduration: 0,\n\t\t\t\t});\n\t\t\t} else if (runDataExecuted.finished !== true) {\n\t\t\t\ttitleChange.titleSet(workflow.name as string, 'ERROR');\n\n\t\t\t\tif (\n\t\t\t\t\trunDataExecuted.data.resultData.error?.name === 'ExpressionError' &&\n\t\t\t\t\t(runDataExecuted.data.resultData.error as ExpressionError).context.functionality ===\n\t\t\t\t\t\t'pairedItem'\n\t\t\t\t) {\n\t\t\t\t\tconst error = runDataExecuted.data.resultData.error as ExpressionError;\n\n\t\t\t\t\tvoid workflowHelpers.getWorkflowDataToSave().then((workflowData) => {\n\t\t\t\t\t\tconst eventData: IDataObject = {\n\t\t\t\t\t\t\tcaused_by_credential: false,\n\t\t\t\t\t\t\terror_message: error.description,\n\t\t\t\t\t\t\terror_title: error.message,\n\t\t\t\t\t\t\terror_type: error.context.type,\n\t\t\t\t\t\t\tnode_graph_string: JSON.stringify(\n\t\t\t\t\t\t\t\tTelemetryHelpers.generateNodesGraph(\n\t\t\t\t\t\t\t\t\tworkflowData as IWorkflowBase,\n\t\t\t\t\t\t\t\t\tworkflowHelpers.getNodeTypes(),\n\t\t\t\t\t\t\t\t).nodeGraph,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tworkflow_id: workflowsStore.workflowId,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\terror.context.nodeCause &&\n\t\t\t\t\t\t\t['paired_item_no_info', 'paired_item_invalid_info'].includes(\n\t\t\t\t\t\t\t\terror.context.type as string,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tconst node = workflow.getNode(error.context.nodeCause as string);\n\n\t\t\t\t\t\t\tif (node) {\n\t\t\t\t\t\t\t\teventData.is_pinned = !!workflow.getPinDataOfNode(node.name);\n\t\t\t\t\t\t\t\teventData.mode = node.parameters.mode;\n\t\t\t\t\t\t\t\teventData.node_type = node.type;\n\t\t\t\t\t\t\t\teventData.operation = node.parameters.operation;\n\t\t\t\t\t\t\t\teventData.resource = node.parameters.resource;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttelemetry.track('Instance FE emitted paired item error', eventData, {\n\t\t\t\t\t\t\twithPostHog: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (runDataExecuted.data.resultData.error?.name === 'SubworkflowOperationError') {\n\t\t\t\t\tconst error = runDataExecuted.data.resultData.error as SubworkflowOperationError;\n\n\t\t\t\t\tworkflowsStore.subWorkflowExecutionError = error;\n\n\t\t\t\t\ttoast.showMessage({\n\t\t\t\t\t\ttitle: error.message,\n\t\t\t\t\t\tmessage: error.description,\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\tduration: 0,\n\t\t\t\t\t});\n\t\t\t\t} else if (\n\t\t\t\t\trunDataExecuted.data.resultData.error?.name === 'NodeOperationError' &&\n\t\t\t\t\t(runDataExecuted.data.resultData.error as NodeOperationError).functionality ===\n\t\t\t\t\t\t'configuration-node'\n\t\t\t\t) {\n\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\tlet title: string;\n\t\t\t\t\tconst nodeError = runDataExecuted.data.resultData.error as NodeOperationError;\n\t\t\t\t\tif (nodeError.node.name) {\n\t\t\t\t\t\ttitle = `Error in sub-node ‘${nodeError.node.name}‘`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttitle = 'Problem executing workflow';\n\t\t\t\t\t}\n\n\t\t\t\t\ttoast.showMessage({\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t(nodeError?.description ?? runDataExecutedErrorMessage) +\n\t\t\t\t\t\t\ti18n.baseText('pushConnection.executionError.openNode', {\n\t\t\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\t\t\tnode: nodeError.node.name,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\tduration: 0,\n\t\t\t\t\t\tdangerouslyUseHTMLString: true,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tlet title: string;\n\t\t\t\t\tconst isManualExecutionCancelled =\n\t\t\t\t\t\trunDataExecuted.mode === 'manual' && runDataExecuted.status === 'canceled';\n\n\t\t\t\t\t// Do not show the error message if the workflow got canceled manually\n\t\t\t\t\tif (isManualExecutionCancelled) {\n\t\t\t\t\t\ttoast.showMessage({\n\t\t\t\t\t\t\ttitle: i18n.baseText('nodeView.showMessage.stopExecutionTry.title'),\n\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (runDataExecuted.data.resultData.lastNodeExecuted) {\n\t\t\t\t\t\t\ttitle = `Problem in node ‘${runDataExecuted.data.resultData.lastNodeExecuted}‘`;\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\ttoast.showMessage({\n\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\tmessage: runDataExecutedErrorMessage,\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}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Workflow did execute without a problem\n\t\t\t\ttitleChange.titleSet(workflow.name as string, 'IDLE');\n\n\t\t\t\tconst execution = workflowsStore.getWorkflowExecution;\n\t\t\t\tif (execution?.executedNode) {\n\t\t\t\t\tconst node = workflowsStore.getNodeByName(execution.executedNode);\n\t\t\t\t\tconst nodeType = node && nodeTypesStore.getNodeType(node.type, node.typeVersion);\n\t\t\t\t\tconst nodeOutput =\n\t\t\t\t\t\texecution &&\n\t\t\t\t\t\texecution.executedNode &&\n\t\t\t\t\t\texecution.data?.resultData?.runData?.[execution.executedNode];\n\t\t\t\t\tif (nodeType?.polling && !nodeOutput) {\n\t\t\t\t\t\ttoast.showMessage({\n\t\t\t\t\t\t\ttitle: i18n.baseText('pushConnection.pollingNode.dataNotFound', {\n\t\t\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\t\t\tservice: getTriggerNodeServiceName(nodeType),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tmessage: i18n.baseText('pushConnection.pollingNode.dataNotFound.message', {\n\t\t\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\t\t\tservice: getTriggerNodeServiceName(nodeType),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttoast.showMessage({\n\t\t\t\t\t\t\ttitle: i18n.baseText('pushConnection.nodeExecutedSuccessfully'),\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} else {\n\t\t\t\t\ttoast.showMessage({\n\t\t\t\t\t\ttitle: i18n.baseText('pushConnection.workflowExecutedSuccessfully'),\n\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// It does not push the runData as it got already pushed with each\n\t\t\t// node that did finish. For that reason copy in here the data\n\t\t\t// which we already have.\n\t\t\tif (workflowsStore.getWorkflowRunData) {\n\t\t\t\trunDataExecuted.data.resultData.runData = workflowsStore.getWorkflowRunData;\n\t\t\t}\n\n\t\t\tworkflowsStore.executingNode.length = 0;\n\t\t\tworkflowsStore.setWorkflowExecutionData(runDataExecuted as IExecutionResponse);\n\t\t\tuiStore.removeActiveAction('workflowRunning');\n\n\t\t\t// Set the node execution issues on all the nodes which produced an error so that\n\t\t\t// it can be displayed in the node-view\n\t\t\tnodeHelpers.updateNodesExecutionIssues();\n\n\t\t\tconst lastNodeExecuted: string | undefined = runDataExecuted.data.resultData.lastNodeExecuted;\n\t\t\tlet itemsCount = 0;\n\t\t\tif (\n\t\t\t\tlastNodeExecuted &&\n\t\t\t\trunDataExecuted.data.resultData.runData[lastNodeExecuted] &&\n\t\t\t\t!runDataExecutedErrorMessage\n\t\t\t) {\n\t\t\t\titemsCount =\n\t\t\t\t\trunDataExecuted.data.resultData.runData[lastNodeExecuted][0].data!.main[0]!.length;\n\t\t\t}\n\n\t\t\tvoid useExternalHooks().run('pushConnection.executionFinished', {\n\t\t\t\titemsCount,\n\t\t\t\tnodeName: runDataExecuted.data.resultData.lastNodeExecuted,\n\t\t\t\terrorMessage: runDataExecutedErrorMessage,\n\t\t\t\trunDataExecutedStartData: runDataExecuted.data.startData,\n\t\t\t\tresultDataError: runDataExecuted.data.resultData.error,\n\t\t\t});\n\t\t\tif (!runDataExecuted.data.resultData.error) {\n\t\t\t\tsegmentStore.trackSuccessfulWorkflowExecution(runDataExecuted);\n\t\t\t}\n\t\t} else if (receivedData.type === 'executionStarted') {\n\t\t\tconst pushData = receivedData.data;\n\n\t\t\tconst executionData: IExecutionsCurrentSummaryExtended = {\n\t\t\t\tid: pushData.executionId,\n\t\t\t\tfinished: false,\n\t\t\t\tstatus: 'running',\n\t\t\t\tmode: pushData.mode,\n\t\t\t\tstartedAt: pushData.startedAt,\n\t\t\t\tretryOf: pushData.retryOf,\n\t\t\t\tworkflowId: pushData.workflowId,\n\t\t\t\tworkflowName: pushData.workflowName,\n\t\t\t};\n\n\t\t\tworkflowsStore.addActiveExecution(executionData);\n\t\t} else if (receivedData.type === 'nodeExecuteAfter') {\n\t\t\t// A node finished to execute. Add its data\n\t\t\tconst pushData = receivedData.data;\n\t\t\tworkflowsStore.addNodeExecutionData(pushData);\n\t\t\tworkflowsStore.removeExecutingNode(pushData.nodeName);\n\t\t} else if (receivedData.type === 'nodeExecuteBefore') {\n\t\t\t// A node started to be executed. Set it as executing.\n\t\t\tconst pushData = receivedData.data;\n\t\t\tworkflowsStore.addExecutingNode(pushData.nodeName);\n\t\t} else if (receivedData.type === 'testWebhookDeleted') {\n\t\t\t// A test-webhook was deleted\n\t\t\tconst pushData = receivedData.data;\n\n\t\t\tif (pushData.workflowId === workflowsStore.workflowId) {\n\t\t\t\tworkflowsStore.executionWaitingForWebhook = false;\n\t\t\t\tuiStore.removeActiveAction('workflowRunning');\n\t\t\t}\n\t\t} else if (receivedData.type === 'testWebhookReceived') {\n\t\t\t// A test-webhook did get called\n\t\t\tconst pushData = receivedData.data;\n\n\t\t\tif (pushData.workflowId === workflowsStore.workflowId) {\n\t\t\t\tworkflowsStore.executionWaitingForWebhook = false;\n\t\t\t\tworkflowsStore.activeExecutionId = pushData.executionId;\n\t\t\t}\n\n\t\t\tvoid processWaitingPushMessages();\n\t\t} else if (receivedData.type === 'reloadNodeType') {\n\t\t\tawait nodeTypesStore.getNodeTypes();\n\t\t\tawait nodeTypesStore.getFullNodesProperties([receivedData.data]);\n\t\t} else if (receivedData.type === 'removeNodeType') {\n\t\t\tconst pushData = receivedData.data;\n\n\t\t\tconst nodesToBeRemoved: INodeTypeNameVersion[] = [pushData];\n\n\t\t\t// Force reload of all credential types\n\t\t\tawait credentialsStore.fetchCredentialTypes(false).then(() => {\n\t\t\t\tnodeTypesStore.removeNodeTypes(nodesToBeRemoved as INodeTypeDescription[]);\n\t\t\t});\n\t\t} else if (receivedData.type === 'nodeDescriptionUpdated') {\n\t\t\tawait nodeTypesStore.getNodeTypes();\n\t\t\tawait credentialsStore.fetchCredentialTypes(true);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction getExecutionError(data: IRunExecutionData | IExecuteContextData) {\n\t\tconst error = data.resultData.error;\n\n\t\tlet errorMessage: string;\n\n\t\tif (data.resultData.lastNodeExecuted && error) {\n\t\t\terrorMessage = error.message || error.description;\n\t\t} else {\n\t\t\terrorMessage = i18n.baseText('pushConnection.executionError', {\n\t\t\t\tinterpolate: { error: '!' },\n\t\t\t});\n\n\t\t\tif (error?.message) {\n\t\t\t\tlet nodeName: string | undefined;\n\t\t\t\tif ('node' in error) {\n\t\t\t\t\tnodeName = typeof error.node === 'string' ? error.node : error.node!.name;\n\t\t\t\t}\n\n\t\t\t\tconst receivedError = nodeName ? `${nodeName}: ${error.message}` : error.message;\n\t\t\t\terrorMessage = i18n.baseText('pushConnection.executionError', {\n\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\terror: `.${i18n.baseText('pushConnection.executionError.details', {\n\t\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\t\tdetails: receivedError,\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\n\t\treturn errorMessage;\n\t}\n\n\treturn {\n\t\tinitialize,\n\t\tterminate,\n\t\tpushMessageReceived,\n\t\tqueuePushMessage,\n\t\tprocessWaitingPushMessages,\n\t\tpushMessageQueue,\n\t\tremoveEventListener,\n\t\tretryTimeout,\n\t};\n}\n"],"names":["GET_STATUS_ENDPOINT","sendGetWorkerStatus","context","makeRestApiRequest","WORKER_HISTORY_LENGTH","STALE_SECONDS","useOrchestrationStore","defineStore","data","id","rootStore","useRootStore","workerId","usePushConnection","router","workflowHelpers","useWorkflowHelpers","nodeHelpers","useNodeHelpers","titleChange","useTitleChange","toast","useToast","i18n","useI18n","telemetry","useTelemetry","collaborationStore","useCollaborationStore","credentialsStore","useCredentialsStore","nodeTypesStore","useNodeTypesStore","orchestrationManagerStore","pushStore","usePushConnectionStore","settingsStore","useSettingsStore","segmentStore","useSegment","uiStore","useUIStore","workflowsStore","useWorkflowsStore","retryTimeout","ref","pushMessageQueue","removeEventListener","initialize","message","pushMessageReceived","terminate","queuePushMessage","event","retryAttempts","processWaitingPushMessages","queueLength","i","messageData","receivedData","isRetry","pushData","recoveredPushData","recoveredExecutionId","_a","executionData","parse","iRunExecutionData","_b","_c","_d","_e","activeRunData","_h","_g","_f","key","iRun","_i","activeExecutionId","_l","_k","_j","_s","_r","_q","_p","_o","_n","_m","runDataExecuted","runDataExecutedErrorMessage","getExecutionError","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","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,EAAe,eACf,MAAAF,EAAiB,qBAAqB,EAAI,GAG1C,MAAA,EACR,CAEA,SAAS+D,GAAkBpF,EAA+C,CACnE,MAAAkG,EAAQlG,EAAK,WAAW,MAE1B,IAAAsH,EAEA,GAAAtH,EAAK,WAAW,kBAAoBkG,EACxBoB,EAAApB,EAAM,SAAWA,EAAM,oBAEvBoB,EAAAvG,EAAK,SAAS,gCAAiC,CAC7D,YAAa,CAAE,MAAO,GAAI,CAAA,CAC1B,EAEGmF,GAAA,MAAAA,EAAO,QAAS,CACf,IAAAqB,EACA,SAAUrB,IACbqB,EAAW,OAAOrB,EAAM,MAAS,SAAWA,EAAM,KAAOA,EAAM,KAAM,MAGhE,MAAAsB,EAAgBD,EAAW,GAAGA,CAAQ,KAAKrB,EAAM,OAAO,GAAKA,EAAM,QAC1DoB,EAAAvG,EAAK,SAAS,gCAAiC,CAC7D,YAAa,CACZ,MAAO,IAAIA,EAAK,SAAS,wCAAyC,CACjE,YAAa,CACZ,QAASyG,CACV,CACA,CAAA,CAAC,EACH,CAAA,CACA,CACF,CAGM,OAAAF,CACR,CAEO,MAAA,CACN,WAAA9E,GACA,UAAAG,GACA,oBAAAD,EACA,iBAAAE,EACA,2BAAAG,EACA,iBAAAT,EACA,oBAAAC,EACA,aAAAH,CAAA,CAEF"}
|
|
1
|
+
{"version":3,"file":"usePushConnection-PQgFeT_8.js","sources":["../../src/api/orchestration.ts","../../src/stores/orchestration.store.ts","../../src/composables/usePushConnection.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 './root.store';\nimport { sendGetWorkerStatus } from '../api/orchestration';\n\nexport const WORKER_HISTORY_LENGTH = 100;\nconst STALE_SECONDS = 120 * 1000;\n\nexport interface IOrchestrationStoreState {\n\tinitialStatusReceived: boolean;\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\tinitialStatusReceived: false,\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\n\t\t\tthis.initialStatusReceived = true;\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.restApiContext);\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 { useNodeHelpers } from '@/composables/useNodeHelpers';\nimport { useTitleChange } from '@/composables/useTitleChange';\nimport { useToast } from '@/composables/useToast';\n\nimport type {\n\tExpressionError,\n\tIDataObject,\n\tINodeTypeNameVersion,\n\tIRun,\n\tIRunExecutionData,\n\tIWorkflowBase,\n\tSubworkflowOperationError,\n\tIExecuteContextData,\n\tNodeOperationError,\n\tINodeTypeDescription,\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 { 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 { ref } from 'vue';\nimport { useOrchestrationStore } from '@/stores/orchestration.store';\nimport { usePushConnectionStore } from '@/stores/pushConnection.store';\nimport { useCollaborationStore } from '@/stores/collaboration.store';\nimport { useExternalHooks } from '@/composables/useExternalHooks';\nimport type { useRouter } from 'vue-router';\nimport { useWorkflowHelpers } from '@/composables/useWorkflowHelpers';\nimport { useI18n } from '@/composables/useI18n';\nimport { useTelemetry } from '@/composables/useTelemetry';\nimport type { PushMessageQueueItem } from '@/types';\n\nexport function usePushConnection({ router }: { router: ReturnType<typeof useRouter> }) {\n\tconst workflowHelpers = useWorkflowHelpers({ router });\n\tconst nodeHelpers = useNodeHelpers();\n\tconst titleChange = useTitleChange();\n\tconst toast = useToast();\n\tconst i18n = useI18n();\n\tconst telemetry = useTelemetry();\n\n\tconst collaborationStore = useCollaborationStore();\n\tconst credentialsStore = useCredentialsStore();\n\tconst nodeTypesStore = useNodeTypesStore();\n\tconst orchestrationManagerStore = useOrchestrationStore();\n\tconst pushStore = usePushConnectionStore();\n\tconst settingsStore = useSettingsStore();\n\tconst segmentStore = useSegment();\n\tconst uiStore = useUIStore();\n\tconst workflowsStore = useWorkflowsStore();\n\n\tconst retryTimeout = ref<NodeJS.Timeout | null>(null);\n\tconst pushMessageQueue = ref<PushMessageQueueItem[]>([]);\n\tconst removeEventListener = ref<(() => void) | null>(null);\n\n\tfunction initialize() {\n\t\tremoveEventListener.value = pushStore.addEventListener((message) => {\n\t\t\tvoid pushMessageReceived(message);\n\t\t});\n\t\tcollaborationStore.initialize();\n\t}\n\n\tfunction terminate() {\n\t\tcollaborationStore.terminate();\n\t\tif (typeof removeEventListener.value === 'function') {\n\t\t\tremoveEventListener.value();\n\t\t}\n\t}\n\n\t/**\n\t * Sometimes the push message is faster as the result from\n\t * the REST API so we do not know yet what execution ID\n\t * is currently active. So internally resend the message\n\t * a few more times\n\t */\n\tfunction queuePushMessage(event: IPushData, retryAttempts: number) {\n\t\tpushMessageQueue.value.push({ message: event, retriesLeft: retryAttempts });\n\n\t\tif (retryTimeout.value === null) {\n\t\t\tretryTimeout.value = setTimeout(processWaitingPushMessages, 20);\n\t\t}\n\t}\n\n\t/**\n\t * Process the push messages which are waiting in the queue\n\t */\n\tasync function processWaitingPushMessages() {\n\t\tif (retryTimeout.value !== null) {\n\t\t\tclearTimeout(retryTimeout.value);\n\t\t\tretryTimeout.value = null;\n\t\t}\n\n\t\tconst queueLength = pushMessageQueue.value.length;\n\t\tfor (let i = 0; i < queueLength; i++) {\n\t\t\tconst messageData = pushMessageQueue.value.shift() as PushMessageQueueItem;\n\n\t\t\tconst result = await pushMessageReceived(messageData.message, true);\n\t\t\tif (!result) {\n\t\t\t\t// Was not successful\n\t\t\t\tmessageData.retriesLeft -= 1;\n\n\t\t\t\tif (messageData.retriesLeft > 0) {\n\t\t\t\t\t// If still retries are left add it back and stop execution\n\t\t\t\t\tpushMessageQueue.value.unshift(messageData);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (pushMessageQueue.value.length !== 0 && retryTimeout.value === null) {\n\t\t\tretryTimeout.value = setTimeout(processWaitingPushMessages, 25);\n\t\t}\n\t}\n\n\t/**\n\t * Process a newly received message\n\t */\n\tasync function pushMessageReceived(receivedData: IPushData, isRetry?: boolean): Promise<boolean> {\n\t\tconst retryAttempts = 5;\n\n\t\tif (receivedData.type === 'sendWorkerStatusMessage') {\n\t\t\tconst pushData = receivedData.data;\n\t\t\torchestrationManagerStore.updateWorkerStatus(pushData.status);\n\t\t\treturn true;\n\t\t}\n\n\t\tif (receivedData.type === 'sendConsoleMessage') {\n\t\t\tconst pushData = receivedData.data;\n\t\t\tconsole.log(pushData.source, ...pushData.messages);\n\t\t\treturn true;\n\t\t}\n\n\t\tif (\n\t\t\t!['testWebhookReceived'].includes(receivedData.type) &&\n\t\t\tisRetry !== true &&\n\t\t\tpushMessageQueue.value.length\n\t\t) {\n\t\t\t// If there are already messages in the queue add the new one that all of them\n\t\t\t// get executed in order\n\t\t\tqueuePushMessage(receivedData, retryAttempts);\n\t\t\treturn false;\n\t\t}\n\n\t\tif (receivedData.type === 'nodeExecuteAfter' || receivedData.type === 'nodeExecuteBefore') {\n\t\t\tif (!uiStore.isActionActive('workflowRunning')) {\n\t\t\t\t// No workflow is running so ignore the messages\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst pushData = receivedData.data;\n\t\t\tif (workflowsStore.activeExecutionId !== pushData.executionId) {\n\t\t\t\t// The data is not for the currently active execution or\n\t\t\t\t// we do not have the execution id yet.\n\t\t\t\tif (isRetry !== true) {\n\t\t\t\t\tqueuePushMessage(event as unknown as IPushData, retryAttempts);\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// recovered execution data is handled like executionFinished data, however for security reasons\n\t\t// we need to fetch the data from the server again rather than push it to all clients\n\t\tlet recoveredPushData: IPushDataExecutionFinished | undefined = undefined;\n\t\tif (receivedData.type === 'executionRecovered') {\n\t\t\tconst recoveredExecutionId = receivedData.data?.executionId;\n\t\t\tconst isWorkflowRunning = uiStore.isActionActive('workflowRunning');\n\t\t\tif (isWorkflowRunning && workflowsStore.activeExecutionId === recoveredExecutionId) {\n\t\t\t\t// pull execution data for the recovered execution from the server\n\t\t\t\tconst executionData = await workflowsStore.fetchExecutionDataById(\n\t\t\t\t\tworkflowsStore.activeExecutionId,\n\t\t\t\t);\n\t\t\t\tif (executionData?.data) {\n\t\t\t\t\t// data comes in as 'flatten' object, so we need to parse it\n\t\t\t\t\texecutionData.data = parse(executionData.data as unknown as string) as IRunExecutionData;\n\t\t\t\t\tconst iRunExecutionData: IRunExecutionData = {\n\t\t\t\t\t\tstartData: executionData.data?.startData,\n\t\t\t\t\t\tresultData: executionData.data?.resultData ?? { runData: {} },\n\t\t\t\t\t\texecutionData: executionData.data?.executionData,\n\t\t\t\t\t};\n\t\t\t\t\tif (workflowsStore.workflowExecutionData?.workflowId === executionData.workflowId) {\n\t\t\t\t\t\tconst activeRunData = workflowsStore.workflowExecutionData?.data?.resultData?.runData;\n\t\t\t\t\t\tif (activeRunData) {\n\t\t\t\t\t\t\tfor (const key of Object.keys(activeRunData)) {\n\t\t\t\t\t\t\t\tiRunExecutionData.resultData.runData[key] = activeRunData[key];\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\tconst iRun: IRun = {\n\t\t\t\t\t\tdata: iRunExecutionData,\n\t\t\t\t\t\tfinished: executionData.finished,\n\t\t\t\t\t\tmode: executionData.mode,\n\t\t\t\t\t\twaitTill: executionData.data?.waitTill,\n\t\t\t\t\t\tstartedAt: executionData.startedAt,\n\t\t\t\t\t\tstoppedAt: executionData.stoppedAt,\n\t\t\t\t\t\tstatus: 'crashed',\n\t\t\t\t\t};\n\t\t\t\t\tif (executionData.data) {\n\t\t\t\t\t\trecoveredPushData = {\n\t\t\t\t\t\t\texecutionId: executionData.id,\n\t\t\t\t\t\t\tdata: iRun,\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\n\t\tif (\n\t\t\treceivedData.type === 'workflowFailedToActivate' &&\n\t\t\tworkflowsStore.workflowId === receivedData.data.workflowId\n\t\t) {\n\t\t\tworkflowsStore.setWorkflowInactive(receivedData.data.workflowId);\n\t\t\tworkflowsStore.setActive(false);\n\n\t\t\ttoast.showError(\n\t\t\t\tnew Error(receivedData.data.errorMessage),\n\t\t\t\ti18n.baseText('workflowActivator.showError.title', {\n\t\t\t\t\tinterpolate: { newStateName: 'activated' },\n\t\t\t\t}) + ':',\n\t\t\t);\n\n\t\t\treturn true;\n\t\t}\n\n\t\tif (receivedData.type === 'workflowActivated') {\n\t\t\tworkflowsStore.setWorkflowActive(receivedData.data.workflowId);\n\t\t\treturn true;\n\t\t}\n\n\t\tif (receivedData.type === 'workflowDeactivated') {\n\t\t\tworkflowsStore.setWorkflowInactive(receivedData.data.workflowId);\n\t\t\treturn true;\n\t\t}\n\n\t\tif (receivedData.type === 'executionFinished' || receivedData.type === 'executionRecovered') {\n\t\t\t// The workflow finished executing\n\t\t\tlet pushData: IPushDataExecutionFinished;\n\t\t\tif (receivedData.type === 'executionRecovered' && recoveredPushData !== undefined) {\n\t\t\t\tpushData = recoveredPushData;\n\t\t\t} else {\n\t\t\t\tpushData = receivedData.data as IPushDataExecutionFinished;\n\t\t\t}\n\n\t\t\tconst { activeExecutionId } = workflowsStore;\n\t\t\tif (activeExecutionId === pushData.executionId) {\n\t\t\t\tconst activeRunData = workflowsStore.workflowExecutionData?.data?.resultData?.runData;\n\t\t\t\tif (activeRunData) {\n\t\t\t\t\tfor (const key of Object.keys(activeRunData)) {\n\t\t\t\t\t\tif (\n\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?.isArtificialRecoveredEventItem === true &&\n\t\t\t\t\t\t\tactiveRunData[key].length > 0\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\tpushData.data.data.resultData.runData[key] = activeRunData[key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tworkflowsStore.finishActiveExecution(pushData);\n\t\t\t}\n\n\t\t\tif (!uiStore.isActionActive('workflowRunning')) {\n\t\t\t\t// No workflow is running so ignore the messages\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (activeExecutionId !== pushData.executionId) {\n\t\t\t\t// The workflow which did finish execution did either not get started\n\t\t\t\t// by this session or we do not have the execution id yet.\n\t\t\t\tif (isRetry !== true) {\n\t\t\t\t\tqueuePushMessage(event as unknown as IPushData, retryAttempts);\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst runDataExecuted = pushData.data;\n\n\t\t\tlet runDataExecutedErrorMessage = getExecutionError(runDataExecuted.data);\n\n\t\t\tif (runDataExecuted.status === 'crashed') {\n\t\t\t\trunDataExecutedErrorMessage = i18n.baseText('pushConnection.executionFailed.message');\n\t\t\t} else if (runDataExecuted.status === 'canceled') {\n\t\t\t\trunDataExecutedErrorMessage = i18n.baseText(\n\t\t\t\t\t'executionsList.showMessage.stopExecution.message',\n\t\t\t\t\t{\n\t\t\t\t\t\tinterpolate: { activeExecutionId },\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst lineNumber = runDataExecuted?.data?.resultData?.error?.lineNumber;\n\n\t\t\tcodeNodeEditorEventBus.emit('error-line-number', lineNumber || 'final');\n\n\t\t\tconst workflow = workflowHelpers.getCurrentWorkflow();\n\t\t\tif (runDataExecuted.waitTill !== undefined) {\n\t\t\t\tconst workflowSettings = workflowsStore.workflowSettings;\n\t\t\t\tconst saveManualExecutions = settingsStore.saveManualExecutions;\n\n\t\t\t\tconst isSavingExecutions =\n\t\t\t\t\tworkflowSettings.saveManualExecutions === undefined\n\t\t\t\t\t\t? saveManualExecutions\n\t\t\t\t\t\t: workflowSettings.saveManualExecutions;\n\n\t\t\t\tlet action;\n\t\t\t\tif (!isSavingExecutions) {\n\t\t\t\t\tglobalLinkActionsEventBus.emit('registerGlobalLinkAction', {\n\t\t\t\t\t\tkey: 'open-settings',\n\t\t\t\t\t\taction: async () => {\n\t\t\t\t\t\t\tif (workflowsStore.isNewWorkflow) await workflowHelpers.saveAsNewWorkflow();\n\t\t\t\t\t\t\tuiStore.openModal(WORKFLOW_SETTINGS_MODAL_KEY);\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\n\t\t\t\t\taction =\n\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} else {\n\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}\n\n\t\t\t\t// Workflow did start but had been put to wait\n\t\t\t\ttitleChange.titleSet(workflow.name as string, 'IDLE');\n\t\t\t\ttoast.showToast({\n\t\t\t\t\ttitle: 'Workflow started waiting',\n\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\ttype: 'success',\n\t\t\t\t\tduration: 0,\n\t\t\t\t});\n\t\t\t} else if (runDataExecuted.finished !== true) {\n\t\t\t\ttitleChange.titleSet(workflow.name as string, 'ERROR');\n\n\t\t\t\tif (\n\t\t\t\t\trunDataExecuted.data.resultData.error?.name === 'ExpressionError' &&\n\t\t\t\t\t(runDataExecuted.data.resultData.error as ExpressionError).context.functionality ===\n\t\t\t\t\t\t'pairedItem'\n\t\t\t\t) {\n\t\t\t\t\tconst error = runDataExecuted.data.resultData.error as ExpressionError;\n\n\t\t\t\t\tvoid workflowHelpers.getWorkflowDataToSave().then((workflowData) => {\n\t\t\t\t\t\tconst eventData: IDataObject = {\n\t\t\t\t\t\t\tcaused_by_credential: false,\n\t\t\t\t\t\t\terror_message: error.description,\n\t\t\t\t\t\t\terror_title: error.message,\n\t\t\t\t\t\t\terror_type: error.context.type,\n\t\t\t\t\t\t\tnode_graph_string: JSON.stringify(\n\t\t\t\t\t\t\t\tTelemetryHelpers.generateNodesGraph(\n\t\t\t\t\t\t\t\t\tworkflowData as IWorkflowBase,\n\t\t\t\t\t\t\t\t\tworkflowHelpers.getNodeTypes(),\n\t\t\t\t\t\t\t\t).nodeGraph,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tworkflow_id: workflowsStore.workflowId,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\terror.context.nodeCause &&\n\t\t\t\t\t\t\t['paired_item_no_info', 'paired_item_invalid_info'].includes(\n\t\t\t\t\t\t\t\terror.context.type as string,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tconst node = workflow.getNode(error.context.nodeCause as string);\n\n\t\t\t\t\t\t\tif (node) {\n\t\t\t\t\t\t\t\teventData.is_pinned = !!workflow.getPinDataOfNode(node.name);\n\t\t\t\t\t\t\t\teventData.mode = node.parameters.mode;\n\t\t\t\t\t\t\t\teventData.node_type = node.type;\n\t\t\t\t\t\t\t\teventData.operation = node.parameters.operation;\n\t\t\t\t\t\t\t\teventData.resource = node.parameters.resource;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttelemetry.track('Instance FE emitted paired item error', eventData, {\n\t\t\t\t\t\t\twithPostHog: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (runDataExecuted.data.resultData.error?.name === 'SubworkflowOperationError') {\n\t\t\t\t\tconst error = runDataExecuted.data.resultData.error as SubworkflowOperationError;\n\n\t\t\t\t\tworkflowsStore.subWorkflowExecutionError = error;\n\n\t\t\t\t\ttoast.showMessage({\n\t\t\t\t\t\ttitle: error.message,\n\t\t\t\t\t\tmessage: error.description,\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\tduration: 0,\n\t\t\t\t\t});\n\t\t\t\t} else if (\n\t\t\t\t\trunDataExecuted.data.resultData.error?.name === 'NodeOperationError' &&\n\t\t\t\t\t(runDataExecuted.data.resultData.error as NodeOperationError).functionality ===\n\t\t\t\t\t\t'configuration-node'\n\t\t\t\t) {\n\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\tlet title: string;\n\t\t\t\t\tconst nodeError = runDataExecuted.data.resultData.error as NodeOperationError;\n\t\t\t\t\tif (nodeError.node.name) {\n\t\t\t\t\t\ttitle = `Error in sub-node ‘${nodeError.node.name}‘`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttitle = 'Problem executing workflow';\n\t\t\t\t\t}\n\n\t\t\t\t\ttoast.showMessage({\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t(nodeError?.description ?? runDataExecutedErrorMessage) +\n\t\t\t\t\t\t\ti18n.baseText('pushConnection.executionError.openNode', {\n\t\t\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\t\t\tnode: nodeError.node.name,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\tduration: 0,\n\t\t\t\t\t\tdangerouslyUseHTMLString: true,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tlet title: string;\n\t\t\t\t\tconst isManualExecutionCancelled =\n\t\t\t\t\t\trunDataExecuted.mode === 'manual' && runDataExecuted.status === 'canceled';\n\n\t\t\t\t\t// Do not show the error message if the workflow got canceled manually\n\t\t\t\t\tif (isManualExecutionCancelled) {\n\t\t\t\t\t\ttoast.showMessage({\n\t\t\t\t\t\t\ttitle: i18n.baseText('nodeView.showMessage.stopExecutionTry.title'),\n\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (runDataExecuted.data.resultData.lastNodeExecuted) {\n\t\t\t\t\t\t\ttitle = `Problem in node ‘${runDataExecuted.data.resultData.lastNodeExecuted}‘`;\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\ttoast.showMessage({\n\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\tmessage: runDataExecutedErrorMessage,\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}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Workflow did execute without a problem\n\t\t\t\ttitleChange.titleSet(workflow.name as string, 'IDLE');\n\n\t\t\t\tconst execution = workflowsStore.getWorkflowExecution;\n\t\t\t\tif (execution?.executedNode) {\n\t\t\t\t\tconst node = workflowsStore.getNodeByName(execution.executedNode);\n\t\t\t\t\tconst nodeType = node && nodeTypesStore.getNodeType(node.type, node.typeVersion);\n\t\t\t\t\tconst nodeOutput =\n\t\t\t\t\t\texecution &&\n\t\t\t\t\t\texecution.executedNode &&\n\t\t\t\t\t\texecution.data?.resultData?.runData?.[execution.executedNode];\n\t\t\t\t\tif (nodeType?.polling && !nodeOutput) {\n\t\t\t\t\t\ttoast.showMessage({\n\t\t\t\t\t\t\ttitle: i18n.baseText('pushConnection.pollingNode.dataNotFound', {\n\t\t\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\t\t\tservice: getTriggerNodeServiceName(nodeType),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tmessage: i18n.baseText('pushConnection.pollingNode.dataNotFound.message', {\n\t\t\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\t\t\tservice: getTriggerNodeServiceName(nodeType),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttoast.showMessage({\n\t\t\t\t\t\t\ttitle: i18n.baseText('pushConnection.nodeExecutedSuccessfully'),\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} else {\n\t\t\t\t\ttoast.showMessage({\n\t\t\t\t\t\ttitle: i18n.baseText('pushConnection.workflowExecutedSuccessfully'),\n\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// It does not push the runData as it got already pushed with each\n\t\t\t// node that did finish. For that reason copy in here the data\n\t\t\t// which we already have.\n\t\t\tif (workflowsStore.getWorkflowRunData) {\n\t\t\t\trunDataExecuted.data.resultData.runData = workflowsStore.getWorkflowRunData;\n\t\t\t}\n\n\t\t\tworkflowsStore.executingNode.length = 0;\n\t\t\tworkflowsStore.setWorkflowExecutionData(runDataExecuted as IExecutionResponse);\n\t\t\tuiStore.removeActiveAction('workflowRunning');\n\n\t\t\t// Set the node execution issues on all the nodes which produced an error so that\n\t\t\t// it can be displayed in the node-view\n\t\t\tnodeHelpers.updateNodesExecutionIssues();\n\n\t\t\tconst lastNodeExecuted: string | undefined = runDataExecuted.data.resultData.lastNodeExecuted;\n\t\t\tlet itemsCount = 0;\n\t\t\tif (\n\t\t\t\tlastNodeExecuted &&\n\t\t\t\trunDataExecuted.data.resultData.runData[lastNodeExecuted] &&\n\t\t\t\t!runDataExecutedErrorMessage\n\t\t\t) {\n\t\t\t\titemsCount =\n\t\t\t\t\trunDataExecuted.data.resultData.runData[lastNodeExecuted][0].data!.main[0]!.length;\n\t\t\t}\n\n\t\t\tvoid useExternalHooks().run('pushConnection.executionFinished', {\n\t\t\t\titemsCount,\n\t\t\t\tnodeName: runDataExecuted.data.resultData.lastNodeExecuted,\n\t\t\t\terrorMessage: runDataExecutedErrorMessage,\n\t\t\t\trunDataExecutedStartData: runDataExecuted.data.startData,\n\t\t\t\tresultDataError: runDataExecuted.data.resultData.error,\n\t\t\t});\n\t\t\tif (!runDataExecuted.data.resultData.error) {\n\t\t\t\tsegmentStore.trackSuccessfulWorkflowExecution(runDataExecuted);\n\t\t\t}\n\t\t} else if (receivedData.type === 'executionStarted') {\n\t\t\tconst pushData = receivedData.data;\n\n\t\t\tconst executionData: IExecutionsCurrentSummaryExtended = {\n\t\t\t\tid: pushData.executionId,\n\t\t\t\tfinished: false,\n\t\t\t\tstatus: 'running',\n\t\t\t\tmode: pushData.mode,\n\t\t\t\tstartedAt: pushData.startedAt,\n\t\t\t\tretryOf: pushData.retryOf,\n\t\t\t\tworkflowId: pushData.workflowId,\n\t\t\t\tworkflowName: pushData.workflowName,\n\t\t\t};\n\n\t\t\tworkflowsStore.addActiveExecution(executionData);\n\t\t} else if (receivedData.type === 'nodeExecuteAfter') {\n\t\t\t// A node finished to execute. Add its data\n\t\t\tconst pushData = receivedData.data;\n\t\t\tworkflowsStore.addNodeExecutionData(pushData);\n\t\t\tworkflowsStore.removeExecutingNode(pushData.nodeName);\n\t\t} else if (receivedData.type === 'nodeExecuteBefore') {\n\t\t\t// A node started to be executed. Set it as executing.\n\t\t\tconst pushData = receivedData.data;\n\t\t\tworkflowsStore.addExecutingNode(pushData.nodeName);\n\t\t} else if (receivedData.type === 'testWebhookDeleted') {\n\t\t\t// A test-webhook was deleted\n\t\t\tconst pushData = receivedData.data;\n\n\t\t\tif (pushData.workflowId === workflowsStore.workflowId) {\n\t\t\t\tworkflowsStore.executionWaitingForWebhook = false;\n\t\t\t\tuiStore.removeActiveAction('workflowRunning');\n\t\t\t}\n\t\t} else if (receivedData.type === 'testWebhookReceived') {\n\t\t\t// A test-webhook did get called\n\t\t\tconst pushData = receivedData.data;\n\n\t\t\tif (pushData.workflowId === workflowsStore.workflowId) {\n\t\t\t\tworkflowsStore.executionWaitingForWebhook = false;\n\t\t\t\tworkflowsStore.activeExecutionId = pushData.executionId;\n\t\t\t}\n\n\t\t\tvoid processWaitingPushMessages();\n\t\t} else if (receivedData.type === 'reloadNodeType') {\n\t\t\tawait nodeTypesStore.getNodeTypes();\n\t\t\tawait nodeTypesStore.getFullNodesProperties([receivedData.data]);\n\t\t} else if (receivedData.type === 'removeNodeType') {\n\t\t\tconst pushData = receivedData.data;\n\n\t\t\tconst nodesToBeRemoved: INodeTypeNameVersion[] = [pushData];\n\n\t\t\t// Force reload of all credential types\n\t\t\tawait credentialsStore.fetchCredentialTypes(false).then(() => {\n\t\t\t\tnodeTypesStore.removeNodeTypes(nodesToBeRemoved as INodeTypeDescription[]);\n\t\t\t});\n\t\t} else if (receivedData.type === 'nodeDescriptionUpdated') {\n\t\t\tawait nodeTypesStore.getNodeTypes();\n\t\t\tawait credentialsStore.fetchCredentialTypes(true);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction getExecutionError(data: IRunExecutionData | IExecuteContextData) {\n\t\tconst error = data.resultData.error;\n\n\t\tlet errorMessage: string;\n\n\t\tif (data.resultData.lastNodeExecuted && error) {\n\t\t\terrorMessage = error.message || error.description;\n\t\t} else {\n\t\t\terrorMessage = i18n.baseText('pushConnection.executionError', {\n\t\t\t\tinterpolate: { error: '!' },\n\t\t\t});\n\n\t\t\tif (error?.message) {\n\t\t\t\tlet nodeName: string | undefined;\n\t\t\t\tif ('node' in error) {\n\t\t\t\t\tnodeName = typeof error.node === 'string' ? error.node : error.node!.name;\n\t\t\t\t}\n\n\t\t\t\tconst receivedError = nodeName ? `${nodeName}: ${error.message}` : error.message;\n\t\t\t\terrorMessage = i18n.baseText('pushConnection.executionError', {\n\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\terror: `.${i18n.baseText('pushConnection.executionError.details', {\n\t\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\t\tdetails: receivedError,\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\n\t\treturn errorMessage;\n\t}\n\n\treturn {\n\t\tinitialize,\n\t\tterminate,\n\t\tpushMessageReceived,\n\t\tqueuePushMessage,\n\t\tprocessWaitingPushMessages,\n\t\tpushMessageQueue,\n\t\tremoveEventListener,\n\t\tretryTimeout,\n\t};\n}\n"],"names":["GET_STATUS_ENDPOINT","sendGetWorkerStatus","context","makeRestApiRequest","WORKER_HISTORY_LENGTH","STALE_SECONDS","useOrchestrationStore","defineStore","data","id","rootStore","useRootStore","workerId","usePushConnection","router","workflowHelpers","useWorkflowHelpers","nodeHelpers","useNodeHelpers","titleChange","useTitleChange","toast","useToast","i18n","useI18n","telemetry","useTelemetry","collaborationStore","useCollaborationStore","credentialsStore","useCredentialsStore","nodeTypesStore","useNodeTypesStore","orchestrationManagerStore","pushStore","usePushConnectionStore","settingsStore","useSettingsStore","segmentStore","useSegment","uiStore","useUIStore","workflowsStore","useWorkflowsStore","retryTimeout","ref","pushMessageQueue","removeEventListener","initialize","message","pushMessageReceived","terminate","queuePushMessage","event","retryAttempts","processWaitingPushMessages","queueLength","i","messageData","receivedData","isRetry","pushData","recoveredPushData","recoveredExecutionId","_a","executionData","parse","iRunExecutionData","_b","_c","_d","_e","activeRunData","_h","_g","_f","key","iRun","_i","activeExecutionId","_l","_k","_j","_s","_r","_q","_p","_o","_n","_m","runDataExecuted","runDataExecutedErrorMessage","getExecutionError","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","useExternalHooks","nodesToBeRemoved","errorMessage","nodeName","receivedError"],"mappings":"saAGA,MAAMA,GAAsB,+BAEfC,GAAsB,MAAOC,GAA4C,CAC/E,MAAAC,GAAmBD,EAAS,OAAQF,EAAmB,CAC9D,ECFaI,GAAwB,IAC/BC,GAAgB,IAAM,IAiBfC,GAAwBC,GAAY,uBAAwB,CACxE,MAAO,KAAiC,CACvC,sBAAuB,GACvB,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,MAE9C,KAAK,sBAAwB,EAC9B,EACA,oBAAqB,CACT,UAAAC,KAAM,KAAK,mBACjB,KAAK,mBAAmBA,CAAE,EAAIJ,GAAgB,KAAK,QAC/C,OAAA,KAAK,QAAQI,CAAE,EACf,O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ourceMappingURL=useUserHelpers-
|
|
1
|
+
import{t as m}from"./index-1OxaEeO3.js";function l(o,c){const a=e=>{const r=o.resolve({name:e});return s(r)},u=()=>s(c),s=e=>{var t,n;const r=(t=e.meta)==null?void 0:t.middleware,i=(n=e.meta)==null?void 0:n.middlewareOptions;return r?m(r,i):!0};return{canUserAccessRouteByName:a,canUserAccessCurrentRoute:u,canUserAccessRoute:s}}export{l as u};
|
|
2
|
+
//# sourceMappingURL=useUserHelpers-DZtbUAMm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUserHelpers-
|
|
1
|
+
{"version":3,"file":"useUserHelpers-DZtbUAMm.js","sources":["../../src/composables/useUserHelpers.ts"],"sourcesContent":["import type { RouteLocation, RouteLocationNormalizedLoaded, Router } from 'vue-router';\nimport { hasPermission } from '@/utils/rbac/permissions';\nimport type { PermissionTypeOptions } from '@/types/rbac';\n\nexport function useUserHelpers(router: Router, route: RouteLocationNormalizedLoaded) {\n\tconst canUserAccessRouteByName = (name: string) => {\n\t\tconst resolvedRoute = router.resolve({ name });\n\n\t\treturn canUserAccessRoute(resolvedRoute);\n\t};\n\n\tconst canUserAccessCurrentRoute = () => {\n\t\treturn canUserAccessRoute(route);\n\t};\n\n\tconst canUserAccessRoute = (route: RouteLocation) => {\n\t\tconst middleware = route.meta?.middleware;\n\t\tconst middlewareOptions = route.meta?.middlewareOptions;\n\n\t\tif (!middleware) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn hasPermission(middleware, middlewareOptions as PermissionTypeOptions | undefined);\n\t};\n\n\treturn {\n\t\tcanUserAccessRouteByName,\n\t\tcanUserAccessCurrentRoute,\n\t\tcanUserAccessRoute,\n\t};\n}\n"],"names":["useUserHelpers","router","route","canUserAccessRouteByName","name","resolvedRoute","canUserAccessRoute","canUserAccessCurrentRoute","middleware","middlewareOptions","hasPermission"],"mappings":"wCAIgB,SAAAA,EAAeC,EAAgBC,EAAsC,CAC9E,MAAAC,EAA4BC,GAAiB,CAClD,MAAMC,EAAgBJ,EAAO,QAAQ,CAAE,KAAAG,CAAM,CAAA,EAE7C,OAAOE,EAAmBD,CAAa,CAAA,EAGlCE,EAA4B,IAC1BD,EAAmBJ,CAAK,EAG1BI,EAAsBJ,GAAyB,SAC9C,MAAAM,GAAaN,EAAAA,EAAM,OAANA,YAAAA,EAAY,WACzBO,GAAoBP,EAAAA,EAAM,OAANA,YAAAA,EAAY,kBAEtC,OAAKM,EAIEE,EAAcF,EAAYC,CAAsD,EAH/E,EAG+E,EAGjF,MAAA,CACN,yBAAAN,EACA,0BAAAI,EACA,mBAAAD,CAAA,CAEF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as T,j as _,e as g,u as h,p as m,P as y,a3 as k,X as x,du as O,dv as L,G as M,x as N}from"./index-
|
|
2
|
-
//# sourceMappingURL=useWorkflowActivate-
|
|
1
|
+
import{q as T,j as _,e as g,u as h,p as m,P as y,a3 as k,X as x,du as O,dv as L,G as M,x as N}from"./index-1OxaEeO3.js";import{r as D,aH as H}from"./vendor-Dv5OeN6t.js";function F(){const s=D(!1),d=H(),u=T({router:d}),t=_(),w=g(),W=M(),a=h(),r=N(),p=m(),n=async(l,o,I)=>{s.value=!0;const E=t.nodesIssuesExist;let e=l;if(!e||e===y){if(!await u.saveCurrentWorkflow()){s.value=!1;return}e=t.workflowId}const i=e===t.workflowId,c=t.activeWorkflows.includes(e),f={workflow_id:e,is_active:o,previous_status:c,ndv_input:I==="ndv"};W.track("User set workflow active status",f),k().run("workflowActivate.updateWorkflowActivation",f);try{if(c&&o){a.showMessage({title:r.baseText("workflowActivator.workflowIsActive"),type:"success"}),s.value=!1;return}if(i&&E&&o){a.showMessage({title:r.baseText("workflowActivator.showMessage.activeChangedNodesIssuesExistTrue.title"),message:r.baseText("workflowActivator.showMessage.activeChangedNodesIssuesExistTrue.message"),type:"error"}),s.value=!1;return}await u.updateWorkflow({workflowId:e,active:o},!w.stateIsDirty)}catch(v){const C=o?"activated":"deactivated";a.showError(v,r.baseText("workflowActivator.showError.title",{interpolate:{newStateName:C}})+":"),s.value=!1;return}const A=i?"workflow.activeChangeCurrent":"workflow.activeChange";k().run(A,{workflowId:e,active:o}),s.value=!1,i&&(o&&x(O).value!=="true"?w.openModal(L):await p.fetchPromptsData())};return{activateCurrentWorkflow:async l=>{const o=t.workflowId;return await n(o,!0,l)},updateWorkflowActivation:n,updatingWorkflowActivation:s}}export{F as u};
|
|
2
|
+
//# sourceMappingURL=useWorkflowActivate-npf1npdP.js.map
|
package/dist/assets/{useWorkflowActivate-D8iK20ua.js.map → useWorkflowActivate-npf1npdP.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWorkflowActivate-
|
|
1
|
+
{"version":3,"file":"useWorkflowActivate-npf1npdP.js","sources":["../../src/composables/useWorkflowActivate.ts"],"sourcesContent":["import { useStorage } from '@/composables/useStorage';\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 { useWorkflowsStore } from '@/stores/workflows.store';\nimport { useExternalHooks } from '@/composables/useExternalHooks';\nimport { useRouter } from 'vue-router';\nimport { useWorkflowHelpers } from '@/composables/useWorkflowHelpers';\nimport { useTelemetry } from '@/composables/useTelemetry';\nimport { useToast } from '@/composables/useToast';\nimport { useI18n } from '@/composables/useI18n';\nimport { ref } from 'vue';\nimport { useNpsSurveyStore } from '@/stores/npsSurvey.store';\n\nexport function useWorkflowActivate() {\n\tconst updatingWorkflowActivation = ref(false);\n\n\tconst router = useRouter();\n\tconst workflowHelpers = useWorkflowHelpers({ router });\n\tconst workflowsStore = useWorkflowsStore();\n\tconst uiStore = useUIStore();\n\tconst telemetry = useTelemetry();\n\tconst toast = useToast();\n\tconst i18n = useI18n();\n\tconst npsSurveyStore = useNpsSurveyStore();\n\n\t//methods\n\n\tconst updateWorkflowActivation = async (\n\t\tworkflowId: string | undefined,\n\t\tnewActiveState: boolean,\n\t\ttelemetrySource?: string,\n\t) => {\n\t\tupdatingWorkflowActivation.value = true;\n\t\tconst nodesIssuesExist = workflowsStore.nodesIssuesExist;\n\n\t\tlet currWorkflowId: string | undefined = workflowId;\n\t\tif (!currWorkflowId || currWorkflowId === PLACEHOLDER_EMPTY_WORKFLOW_ID) {\n\t\t\tconst saved = await workflowHelpers.saveCurrentWorkflow();\n\t\t\tif (!saved) {\n\t\t\t\tupdatingWorkflowActivation.value = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcurrWorkflowId = workflowsStore.workflowId;\n\t\t}\n\t\tconst isCurrentWorkflow = currWorkflowId === workflowsStore.workflowId;\n\n\t\tconst activeWorkflows = workflowsStore.activeWorkflows;\n\t\tconst isWorkflowActive = activeWorkflows.includes(currWorkflowId);\n\n\t\tconst telemetryPayload = {\n\t\t\tworkflow_id: currWorkflowId,\n\t\t\tis_active: newActiveState,\n\t\t\tprevious_status: isWorkflowActive,\n\t\t\tndv_input: telemetrySource === 'ndv',\n\t\t};\n\t\ttelemetry.track('User set workflow active status', telemetryPayload);\n\t\tvoid useExternalHooks().run('workflowActivate.updateWorkflowActivation', telemetryPayload);\n\n\t\ttry {\n\t\t\tif (isWorkflowActive && newActiveState) {\n\t\t\t\ttoast.showMessage({\n\t\t\t\t\ttitle: i18n.baseText('workflowActivator.workflowIsActive'),\n\t\t\t\t\ttype: 'success',\n\t\t\t\t});\n\t\t\t\tupdatingWorkflowActivation.value = false;\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (isCurrentWorkflow && nodesIssuesExist && newActiveState) {\n\t\t\t\ttoast.showMessage({\n\t\t\t\t\ttitle: i18n.baseText(\n\t\t\t\t\t\t'workflowActivator.showMessage.activeChangedNodesIssuesExistTrue.title',\n\t\t\t\t\t),\n\t\t\t\t\tmessage: i18n.baseText(\n\t\t\t\t\t\t'workflowActivator.showMessage.activeChangedNodesIssuesExistTrue.message',\n\t\t\t\t\t),\n\t\t\t\t\ttype: 'error',\n\t\t\t\t});\n\n\t\t\t\tupdatingWorkflowActivation.value = false;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tawait workflowHelpers.updateWorkflow(\n\t\t\t\t{ workflowId: currWorkflowId, active: newActiveState },\n\t\t\t\t!uiStore.stateIsDirty,\n\t\t\t);\n\t\t} catch (error) {\n\t\t\tconst newStateName = newActiveState ? 'activated' : 'deactivated';\n\t\t\ttoast.showError(\n\t\t\t\terror,\n\t\t\t\ti18n.baseText('workflowActivator.showError.title', {\n\t\t\t\t\tinterpolate: { newStateName },\n\t\t\t\t}) + ':',\n\t\t\t);\n\t\t\tupdatingWorkflowActivation.value = false;\n\t\t\treturn;\n\t\t}\n\n\t\tconst activationEventName = isCurrentWorkflow\n\t\t\t? 'workflow.activeChangeCurrent'\n\t\t\t: 'workflow.activeChange';\n\t\tvoid useExternalHooks().run(activationEventName, {\n\t\t\tworkflowId: currWorkflowId,\n\t\t\tactive: newActiveState,\n\t\t});\n\n\t\tupdatingWorkflowActivation.value = false;\n\n\t\tif (isCurrentWorkflow) {\n\t\t\tif (newActiveState && useStorage(LOCAL_STORAGE_ACTIVATION_FLAG).value !== 'true') {\n\t\t\t\tuiStore.openModal(WORKFLOW_ACTIVE_MODAL_KEY);\n\t\t\t} else {\n\t\t\t\tawait npsSurveyStore.fetchPromptsData();\n\t\t\t}\n\t\t}\n\t};\n\n\tconst activateCurrentWorkflow = async (telemetrySource?: string) => {\n\t\tconst workflowId = workflowsStore.workflowId;\n\t\treturn await updateWorkflowActivation(workflowId, true, telemetrySource);\n\t};\n\n\treturn {\n\t\tactivateCurrentWorkflow,\n\t\tupdateWorkflowActivation,\n\t\tupdatingWorkflowActivation,\n\t};\n}\n"],"names":["useWorkflowActivate","updatingWorkflowActivation","ref","router","useRouter","workflowHelpers","useWorkflowHelpers","workflowsStore","useWorkflowsStore","uiStore","useUIStore","telemetry","useTelemetry","toast","useToast","i18n","useI18n","npsSurveyStore","useNpsSurveyStore","updateWorkflowActivation","workflowId","newActiveState","telemetrySource","nodesIssuesExist","currWorkflowId","PLACEHOLDER_EMPTY_WORKFLOW_ID","isCurrentWorkflow","isWorkflowActive","telemetryPayload","useExternalHooks","error","newStateName","activationEventName","useStorage","LOCAL_STORAGE_ACTIVATION_FLAG","WORKFLOW_ACTIVE_MODAL_KEY"],"mappings":"yKAkBO,SAASA,GAAsB,CAC/B,MAAAC,EAA6BC,EAAI,EAAK,EAEtCC,EAASC,IACTC,EAAkBC,EAAmB,CAAE,OAAAH,CAAQ,CAAA,EAC/CI,EAAiBC,IACjBC,EAAUC,IACVC,EAAYC,IACZC,EAAQC,IACRC,EAAOC,IACPC,EAAiBC,IAIjBC,EAA2B,MAChCC,EACAC,EACAC,IACI,CACJrB,EAA2B,MAAQ,GACnC,MAAMsB,EAAmBhB,EAAe,iBAExC,IAAIiB,EAAqCJ,EACrC,GAAA,CAACI,GAAkBA,IAAmBC,EAA+B,CAExE,GAAI,CADU,MAAMpB,EAAgB,sBACxB,CACXJ,EAA2B,MAAQ,GACnC,MACD,CACAuB,EAAiBjB,EAAe,UACjC,CACM,MAAAmB,EAAoBF,IAAmBjB,EAAe,WAGtDoB,EADkBpB,EAAe,gBACE,SAASiB,CAAc,EAE1DI,EAAmB,CACxB,YAAaJ,EACb,UAAWH,EACX,gBAAiBM,EACjB,UAAWL,IAAoB,KAAA,EAEtBX,EAAA,MAAM,kCAAmCiB,CAAgB,EAC9DC,EAAiB,EAAE,IAAI,4CAA6CD,CAAgB,EAErF,GAAA,CACH,GAAID,GAAoBN,EAAgB,CACvCR,EAAM,YAAY,CACjB,MAAOE,EAAK,SAAS,oCAAoC,EACzD,KAAM,SAAA,CACN,EACDd,EAA2B,MAAQ,GAEnC,MACD,CAEI,GAAAyB,GAAqBH,GAAoBF,EAAgB,CAC5DR,EAAM,YAAY,CACjB,MAAOE,EAAK,SACX,uEACD,EACA,QAASA,EAAK,SACb,yEACD,EACA,KAAM,OAAA,CACN,EAEDd,EAA2B,MAAQ,GACnC,MACD,CAEA,MAAMI,EAAgB,eACrB,CAAE,WAAYmB,EAAgB,OAAQH,CAAe,EACrD,CAACZ,EAAQ,YAAA,QAEFqB,EAAO,CACT,MAAAC,EAAeV,EAAiB,YAAc,cAC9CR,EAAA,UACLiB,EACAf,EAAK,SAAS,oCAAqC,CAClD,YAAa,CAAE,aAAAgB,CAAa,CAC5B,CAAA,EAAI,GAAA,EAEN9B,EAA2B,MAAQ,GACnC,MACD,CAEM,MAAA+B,EAAsBN,EACzB,+BACA,wBACEG,EAAA,EAAmB,IAAIG,EAAqB,CAChD,WAAYR,EACZ,OAAQH,CAAA,CACR,EAEDpB,EAA2B,MAAQ,GAE/ByB,IACCL,GAAkBY,EAAWC,CAA6B,EAAE,QAAU,OACzEzB,EAAQ,UAAU0B,CAAyB,EAE3C,MAAMlB,EAAe,mBAEvB,EAQM,MAAA,CACN,wBAN+B,MAAOK,GAA6B,CACnE,MAAMF,EAAab,EAAe,WAClC,OAAO,MAAMY,EAAyBC,EAAY,GAAME,CAAe,CAAA,EAKvE,yBAAAH,EACA,2BAAAlB,CAAA,CAEF"}
|
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-
|
|
15
|
+
<script type="module" crossorigin src="/%7B%7BBASE_PATH%7D%7D/assets/index-1OxaEeO3.js"></script>
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/%7B%7BBASE_PATH%7D%7D/assets/vendor-Dv5OeN6t.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/%7B%7BBASE_PATH%7D%7D/assets/axios-Mm4CS0gO.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="/%7B%7BBASE_PATH%7D%7D/assets/esprima-next-nhoSXAeq.js">
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CollectionParameter-BXMOfisf.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|