n8n-editor-ui 1.90.1 → 1.92.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AnimatedSpinner-ChThynSJ.js → AnimatedSpinner-CtKKeDrz.js} +1 -1
- package/dist/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-WGp2Kuen.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-DR6h_xsK.js} +1 -1
- package/dist/assets/{AuthView-Dlhn_SQ-.js → AuthView-mKkzBRxh.js} +2 -2
- package/dist/assets/{CanvasChatSwitch-BuBg7TJP.js → CanvasChatSwitch-Bu2VD2kp.js} +24 -12
- package/dist/assets/{ChangePasswordView-BKYXOoDf.js → ChangePasswordView-D5UI1v-J.js} +3 -3
- package/dist/assets/CollectionParameter-BeCTpZ-q.js +4 -0
- package/dist/assets/{CredentialsView-BNWIgrLb.js → CredentialsView-B78eNJO5.js} +10 -9
- package/dist/assets/{DemoFooter-DR6r_2qR.js → DemoFooter-DP26HpCu.js} +8 -8
- package/dist/assets/{ErrorView-Bu8Mt5FH.js → ErrorView-C3fvEdCg.js} +1 -1
- package/dist/assets/{ExecutionsTime.vue_vue_type_script_setup_true_lang-DvtOOOhh.js → ExecutionsTime.vue_vue_type_script_setup_true_lang-BBpwYdHY.js} +2 -2
- package/dist/assets/{ExecutionsView-C0WZAIi0.js → ExecutionsView-BvlDZwIs.js} +11 -10
- package/dist/assets/{FileSaver.min-Cm0u4qyc.js → FileSaver.min-BzAtcQXX.js} +1 -1
- package/dist/assets/{FixedCollectionParameter-KmRZtBiP.js → FixedCollectionParameter-CS5zXMAh.js} +1 -1
- package/dist/assets/{ForgotMyPasswordView-GH7SqEFu.js → ForgotMyPasswordView-CVQ7pcIG.js} +3 -3
- package/dist/assets/{InsightsChartAverageRuntime-SeBUN06R.js → InsightsChartAverageRuntime-Boh0SMb3.js} +7 -6
- package/dist/assets/{InsightsChartFailed-TYjH8LwV.js → InsightsChartFailed-IZ-KYOU9.js} +7 -6
- package/dist/assets/{InsightsChartFailureRate-D41Jv-6v.js → InsightsChartFailureRate-2fWw3p0L.js} +7 -6
- package/dist/assets/{InsightsChartTimeSaved-TLPDAmPx.js → InsightsChartTimeSaved-B2pLVys1.js} +7 -6
- package/dist/assets/{InsightsChartTotal-CaKTe2mv.js → InsightsChartTotal-2QD4wPLR.js} +7 -6
- package/dist/assets/{InsightsDashboard-DPVczYm3.css → InsightsDashboard-Bx4vx9gz.css} +16 -0
- package/dist/assets/InsightsDashboard-CbiFbJ8w.js +372 -0
- package/dist/assets/{InsightsPaywall-Z4Y0nO-i.js → InsightsPaywall-5d-cSdiS.js} +1 -1
- package/dist/assets/{InsightsSummary-FixbpmPJ.css → InsightsSummary-CdlaUpAt.css} +25 -25
- package/dist/assets/{InsightsSummary-DzYli0Pu.js → InsightsSummary-gldDQ9rg.js} +16 -17
- package/dist/assets/{InsightsTableWorkflows-CUHAG57c.js → InsightsTableWorkflows-_eTCUNCX.js} +2 -2
- package/dist/assets/{Logo-Dxp4M9dy.js → Logo-Dl2xVRIu.js} +1 -1
- package/dist/assets/{LogsPanel-zIrTNE6j.js → LogsPanel-JnYirDqa.js} +520 -436
- package/dist/assets/{LogsPanel-DmPMCt9w.css → LogsPanel-mTaFEGk_.css} +208 -98
- package/dist/assets/{MainHeader-D4cIIoUA.js → MainHeader-Bk29pgmL.js} +122 -295
- package/dist/assets/MainHeader-CEPLiR-5.css +1044 -0
- package/dist/assets/{MainSidebar-BtW-9UPT.js → MainSidebar-BM5ku_wM.js} +11 -11
- package/dist/assets/{MainSidebar-CKMiDGvH.css → MainSidebar-zZpP3qQ0.css} +13 -12
- package/dist/assets/{NodeCreation-thD32mA1.js → NodeCreation-BEjdAYc_.js} +4 -4
- package/dist/assets/{NodeCreator-B4mHaU45.js → NodeCreator-cEUgbAI9.js} +14 -4
- package/dist/assets/{NodeDetailsView-cO3Ci9jH.js → NodeDetailsView-D4O9dKTA.js} +93 -68
- package/dist/assets/{NodeDetailsView-CGgV4Pn_.css → NodeDetailsView-DsFLtbxi.css} +20 -20
- package/dist/assets/{NodeView-E5b1ClVD.js → NodeView-DDSOUm8E.js} +152 -34
- package/dist/assets/{ProjectCardBadge-LnLKqSK-.js → ProjectCardBadge-BNn2hiMe.js} +1 -1
- package/dist/assets/{ProjectHeader-DC02ZuZ0.js → ProjectHeader-CaEZ2OPj.js} +1 -1
- package/dist/assets/{ProjectSettings-Zr1UOp7s.js → ProjectSettings-otA8E-yW.js} +2 -2
- package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-CM7WIpD3.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-C3JbZMCk.js} +1 -1
- package/dist/assets/{ResourcesListLayout-DTsuHdYx.js → ResourcesListLayout-1d9Ic6VX.js} +2 -2
- package/dist/assets/{ResourcesListLayout-CglK2dXR.css → ResourcesListLayout-CtGME7aU.css} +8 -8
- package/dist/assets/{RunData-DepHcD2K.css → RunData-BjlZgIyx.css} +102 -73
- package/dist/assets/{RunData-Ds-U68nr.js → RunData-Bx47sNQp.js} +690 -398
- package/dist/assets/{RunDataAi-BF2gZZGr.css → RunDataAi-D9VLFXIf.css} +10 -51
- package/dist/assets/{RunDataAi-DdK11EHU.js → RunDataAi-DOac7nwD.js} +27 -310
- package/dist/assets/{RunDataJson-Txw0lqay.css → RunDataJson-BH9HLoGC.css} +12 -8
- package/dist/assets/{RunDataJson-B2WU5od1.js → RunDataJson-Pev6yNEV.js} +20 -14
- package/dist/assets/{RunDataJsonActions-DqZ2X1yJ.js → RunDataJsonActions-Co4xgmVq.js} +1 -1
- package/dist/assets/RunDataParsedAiContent-9EEUzCKp.css +176 -0
- package/dist/assets/RunDataParsedAiContent-D6MNLmT3.js +148 -0
- package/dist/assets/{RunDataSearch-CQsyZvGK.js → RunDataSearch-C8orcAlP.js} +1 -1
- package/dist/assets/{RunDataTable-DyUvXWfl.css → RunDataTable-CUxj7dHx.css} +47 -39
- package/dist/assets/{RunDataTable-BO0R4JT_.js → RunDataTable-oi_l8dhA.js} +41 -30
- package/dist/assets/{SamlOnboarding-CmwMX5y2.js → SamlOnboarding-CT5J6dx0.js} +3 -3
- package/dist/assets/{SettingsApiView-D6uBbi9-.js → SettingsApiView-CupjcI9v.js} +1 -1
- package/dist/assets/{SettingsCommunityNodesView-CJODtx_K.js → SettingsCommunityNodesView-B5K2VLyJ.js} +4 -4
- package/dist/assets/{SettingsExternalSecrets-CVk14P_P.js → SettingsExternalSecrets-BidJCf_t.js} +1 -1
- package/dist/assets/{SettingsLdapView-pg71FErj.js → SettingsLdapView-Cva6akhW.js} +1 -1
- package/dist/assets/{SettingsLogStreamingView-DUOI3Xb9.js → SettingsLogStreamingView-Cy-rAKUO.js} +1 -1
- package/dist/assets/{SettingsPersonalView-BFnOmBPC.js → SettingsPersonalView-ZJ1Syok2.js} +14 -13
- package/dist/assets/{SettingsSourceControl-BUNmxcvB.js → SettingsSourceControl-CMtqqlkO.js} +1 -1
- package/dist/assets/{SettingsSso-Dx8Qw_2Z.js → SettingsSso-Bi3OpykL.js} +1 -1
- package/dist/assets/{SettingsUsageAndPlan-DTk86tXU.js → SettingsUsageAndPlan-C5TbwZhP.js} +1 -1
- package/dist/assets/{SettingsUsersView-BviXcl30.js → SettingsUsersView-BHuP5k0A.js} +1 -1
- package/dist/assets/{SettingsView-fzPdUijx.js → SettingsView-DPIIqaKN.js} +1 -1
- package/dist/assets/{SetupView-DUTx1JXK.js → SetupView-C4V9j6sh.js} +3 -3
- package/dist/assets/{SetupWorkflowCredentialsButton-fApxCGHh.js → SetupWorkflowCredentialsButton-BZ9ILQUp.js} +1 -1
- package/dist/assets/{SetupWorkflowFromTemplateView-C5t9fEKF.js → SetupWorkflowFromTemplateView-3uV3zSU2.js} +3 -3
- package/dist/assets/{SigninView-BRVoXQRW.js → SigninView-DWZHdCjG.js} +3 -3
- package/dist/assets/{SignoutView-Duh6wb4Y.js → SignoutView-DbduXAir.js} +1 -1
- package/dist/assets/{SignupView-DMkpTtjs.js → SignupView-DWq6VACk.js} +3 -3
- package/dist/assets/{TemplateDetails-Df9_jph6.js → TemplateDetails-BckqE6GK.js} +1 -1
- package/dist/assets/{TemplateList-qSnJvw0K.js → TemplateList-Bw0JeBMP.js} +1 -1
- package/dist/assets/{TemplatesCollectionView--ccYXaCo.js → TemplatesCollectionView-CAKT-mpV.js} +5 -5
- package/dist/assets/{TemplatesSearchView-D1YgHKld.js → TemplatesSearchView-I2a5us58.js} +3 -3
- package/dist/assets/{TemplatesView-B9CwObHN.js → TemplatesView-6EwGFFJK.js} +1 -1
- package/dist/assets/{TemplatesWorkflowView-DtLpUF59.js → TemplatesWorkflowView-C8xYMhwu.js} +5 -5
- package/dist/assets/{TestDefinitionEditView-DFcBlKnN.js → TestDefinitionEditView-CNd3Cuzq.js} +8 -8
- package/dist/assets/{TestDefinitionListView-C_mbolTO.js → TestDefinitionListView-BwTWIaAM.js} +1 -1
- package/dist/assets/{TestDefinitionNewView-CvyM6TLE.js → TestDefinitionNewView-BQas0_G1.js} +2 -2
- package/dist/assets/{TestDefinitionRootView-BXzJY0cY.js → TestDefinitionRootView-D971MFye.js} +1 -1
- package/dist/assets/{VariablesView-BHFJj5IU.js → VariablesView-DcBBuFxh.js} +3 -3
- package/dist/assets/{WorkerView-CgIksFjP.js → WorkerView-DSgBNIeb.js} +6 -6
- package/dist/assets/WorkflowActivator-CPCbgb_n.js +776 -0
- package/dist/assets/{MainHeader-CWA2JfVJ.css → WorkflowActivator-DAyH7N29.css} +74 -434
- package/dist/assets/{WorkflowExecutionsInfoAccordion-BcBLZ_Ul.js → WorkflowExecutionsInfoAccordion-Bc6vzAZu.js} +1 -1
- package/dist/assets/{WorkflowExecutionsLandingPage-B9ByHnbR.js → WorkflowExecutionsLandingPage-BPPS4V9i.js} +2 -2
- package/dist/assets/{WorkflowExecutionsPreview-DCE7TYLh.js → WorkflowExecutionsPreview-Bbb5MB8Z.js} +6 -6
- package/dist/assets/{WorkflowExecutionsView-DFoBpdS7.js → WorkflowExecutionsView-Pz-7iHJY.js} +11 -9
- package/dist/assets/{WorkflowHistory-DolmPUM2.js → WorkflowHistory-Czo9IuI6.js} +4 -4
- package/dist/assets/{WorkflowOnboardingView-DQW48M8_.js → WorkflowOnboardingView-B8DdkfJ5.js} +1 -1
- package/dist/assets/{WorkflowPreview-BFR6V9SO.js → WorkflowPreview-eVlO1itk.js} +1 -1
- package/dist/assets/{WorkflowsView-CsM69PSv.css → WorkflowsView-B2_HJCJ5.css} +28 -162
- package/dist/assets/{WorkflowsView-B-feKuLZ.js → WorkflowsView-Cr2D0vym.js} +124 -217
- package/dist/assets/{chartjs.utils-BcXTJ2Te.js → chartjs.utils-Dk1WO3Mr.js} +2 -2
- package/dist/assets/{dateFormatter-CZI1kGYK.js → dateFormatter-C8N5khiG.js} +5 -5
- package/dist/assets/{easyAiWorkflowUtils-ChToD_Yl.js → easyAiWorkflowUtils-CLqHnasO.js} +1 -1
- package/dist/assets/{global-link-actions-OGaZVwsw.js → global-link-actions-BvoZh8u9.js} +1 -1
- package/dist/assets/{import-curl-CAszzwx1.js → import-curl-BpxkGYMX.js} +1 -1
- package/dist/assets/{index-BpdkKRP4.js → index-B6eunbxp.js} +14227 -11881
- package/dist/assets/{index-7WdERzqm.js → index-Br8T1Gn6.js} +1 -1
- package/dist/assets/{index-C5OXOcIJ.css → index-DCpy4nCU.css} +6147 -4061
- package/dist/assets/{pickBy-mYqFOFbh.js → pickBy-8Urz9lDY.js} +1 -1
- package/dist/assets/{templateActions-BX9arLbc.js → templateActions-DzjysjbQ.js} +1 -1
- package/dist/assets/{useBeforeUnload-K7nQ15Rk.js → useBeforeUnload-DxrN8vOO.js} +1 -1
- package/dist/assets/{useCanvasMapping-D_UPCxYX.js → useCanvasMapping-C2BQB9QB.js} +270 -112
- package/dist/assets/{useCanvasMapping-C--wac6H.css → useCanvasMapping-cuXLM-h-.css} +185 -4
- package/dist/assets/{useCanvasOperations-D6VFiC3b.js → useCanvasOperations-DaP5jKbH.js} +4 -3
- package/dist/assets/{useClearExecutionButtonVisible-D_0O6f0X.js → useClearExecutionButtonVisible-BV-jMf2m.js} +2 -2
- package/dist/assets/{useExecutionDebugging-BNMaKOh7.js → useExecutionDebugging-0pPCimcw.js} +1 -1
- package/dist/assets/{useExecutionHelpers-DN5HqPqY.js → useExecutionHelpers-DIvhViMz.js} +2 -2
- package/dist/assets/{useImportCurlCommand-BSL596XF.js → useImportCurlCommand-BWf4R83s.js} +19 -10
- package/dist/assets/usePushConnection-Pobjq0U9.js +632 -0
- package/dist/assets/{useTestDefinitionForm-CIhrxyve.js → useTestDefinitionForm-BA3IS_2B.js} +1 -1
- package/dist/assets/{useWorkflowActivate-pZ62ib_C.js → useWorkflowActivate-DFqvrpj6.js} +1 -1
- package/dist/assets/useWorkflowSaving-BACesUoL.js +66 -0
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/vite.config.mts +15 -1
- package/dist/assets/CollectionParameter-CQXiWluX.js +0 -4
- package/dist/assets/InsightsDashboard-o3JS9fjz.js +0 -178
- package/dist/assets/WorkflowActivator-BX59FxTZ.css +0 -260
- package/dist/assets/WorkflowActivator-O6i5XAk2.js +0 -231
- package/dist/assets/usePushConnection-BdV7ILvK.js +0 -535
|
@@ -1,535 +0,0 @@
|
|
|
1
|
-
import { dk as makeRestApiRequest, S as defineStore, a1 as useRootStore, d as defineComponent, cc as resolveDirective, i as createElementBlock, g as openBlock, aC as withDirectives, k as createBaseVNode, t as toDisplayString, m as unref, c as useI18n, a7 as useWorkflowHelpers, bz as useNodeHelpers, a as useToast, bN as useCredentialsStore, by as useNodeTypesStore, T as usePushConnectionStore, p as useSettingsStore, L as useUIStore, U as useWorkflowsStore, dl as useAssistantStore, r as ref, dm as clearPopupWindowState, ai as useTelemetry, dn as parse, dp as hasTrimmedItem, dq as codeNodeEditorEventBus, am as WORKFLOW_SETTINGS_MODAL_KEY, dr as generateNodesGraph, as as h, ds as getTriggerNodeServiceName, dt as hasTrimmedData, aR as useExternalHooks, du as useSchemaPreviewStore } from "./index-BpdkKRP4.js";
|
|
2
|
-
import { g as globalLinkActionsEventBus } from "./global-link-actions-OGaZVwsw.js";
|
|
3
|
-
import { g as getEasyAiWorkflowJson } from "./easyAiWorkflowUtils-ChToD_Yl.js";
|
|
4
|
-
const GET_STATUS_ENDPOINT = "/orchestration/worker/status";
|
|
5
|
-
const sendGetWorkerStatus = async (context) => {
|
|
6
|
-
await makeRestApiRequest(context, "POST", GET_STATUS_ENDPOINT);
|
|
7
|
-
};
|
|
8
|
-
const WORKER_HISTORY_LENGTH = 100;
|
|
9
|
-
const STALE_SECONDS = 120 * 1e3;
|
|
10
|
-
const useOrchestrationStore = defineStore("orchestrationManager", {
|
|
11
|
-
state: () => ({
|
|
12
|
-
initialStatusReceived: false,
|
|
13
|
-
workers: {},
|
|
14
|
-
workersHistory: {},
|
|
15
|
-
workersLastUpdated: {},
|
|
16
|
-
statusInterval: null
|
|
17
|
-
}),
|
|
18
|
-
actions: {
|
|
19
|
-
updateWorkerStatus(data) {
|
|
20
|
-
this.workers[data.senderId] = data;
|
|
21
|
-
if (!this.workersHistory[data.senderId]) {
|
|
22
|
-
this.workersHistory[data.senderId] = [];
|
|
23
|
-
}
|
|
24
|
-
this.workersHistory[data.senderId].push({ data, timestamp: Date.now() });
|
|
25
|
-
if (this.workersHistory[data.senderId].length > WORKER_HISTORY_LENGTH) {
|
|
26
|
-
this.workersHistory[data.senderId].shift();
|
|
27
|
-
}
|
|
28
|
-
this.workersLastUpdated[data.senderId] = Date.now();
|
|
29
|
-
this.initialStatusReceived = true;
|
|
30
|
-
},
|
|
31
|
-
removeStaleWorkers() {
|
|
32
|
-
for (const id in this.workersLastUpdated) {
|
|
33
|
-
if (this.workersLastUpdated[id] + STALE_SECONDS < Date.now()) {
|
|
34
|
-
delete this.workers[id];
|
|
35
|
-
delete this.workersHistory[id];
|
|
36
|
-
delete this.workersLastUpdated[id];
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
startWorkerStatusPolling() {
|
|
41
|
-
const rootStore = useRootStore();
|
|
42
|
-
if (!this.statusInterval) {
|
|
43
|
-
this.statusInterval = setInterval(async () => {
|
|
44
|
-
await sendGetWorkerStatus(rootStore.restApiContext);
|
|
45
|
-
this.removeStaleWorkers();
|
|
46
|
-
}, 1e3);
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
stopWorkerStatusPolling() {
|
|
50
|
-
if (this.statusInterval) {
|
|
51
|
-
clearInterval(this.statusInterval);
|
|
52
|
-
this.statusInterval = null;
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
getWorkerLastUpdated(workerId) {
|
|
56
|
-
return this.workersLastUpdated[workerId] ?? 0;
|
|
57
|
-
},
|
|
58
|
-
getWorkerStatus(workerId) {
|
|
59
|
-
return this.workers[workerId];
|
|
60
|
-
},
|
|
61
|
-
getWorkerStatusHistory(workerId) {
|
|
62
|
-
return this.workersHistory[workerId] ?? [];
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
const _hoisted_1 = { "data-test-id": "sanitized-error-message" };
|
|
67
|
-
const _hoisted_2 = ["data-action-parameter-node"];
|
|
68
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
69
|
-
__name: "NodeExecutionErrorMessage",
|
|
70
|
-
props: {
|
|
71
|
-
nodeName: {},
|
|
72
|
-
errorMessage: {}
|
|
73
|
-
},
|
|
74
|
-
setup(__props) {
|
|
75
|
-
const i18n = useI18n();
|
|
76
|
-
return (_ctx, _cache) => {
|
|
77
|
-
const _directive_n8n_html = resolveDirective("n8n-html");
|
|
78
|
-
return openBlock(), createElementBlock("div", null, [
|
|
79
|
-
withDirectives(createBaseVNode("span", _hoisted_1, null, 512), [
|
|
80
|
-
[_directive_n8n_html, _ctx.errorMessage]
|
|
81
|
-
]),
|
|
82
|
-
_cache[0] || (_cache[0] = createBaseVNode("br", null, null, -1)),
|
|
83
|
-
createBaseVNode("a", {
|
|
84
|
-
"data-action": "openNodeDetail",
|
|
85
|
-
"data-action-parameter-node": _ctx.nodeName
|
|
86
|
-
}, toDisplayString(unref(i18n).baseText("node.executionError.openNode")), 9, _hoisted_2)
|
|
87
|
-
]);
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
function usePushConnection({ router }) {
|
|
92
|
-
const workflowHelpers = useWorkflowHelpers({ router });
|
|
93
|
-
const nodeHelpers = useNodeHelpers();
|
|
94
|
-
const toast = useToast();
|
|
95
|
-
const i18n = useI18n();
|
|
96
|
-
const telemetry = useTelemetry();
|
|
97
|
-
const credentialsStore = useCredentialsStore();
|
|
98
|
-
const nodeTypesStore = useNodeTypesStore();
|
|
99
|
-
const orchestrationManagerStore = useOrchestrationStore();
|
|
100
|
-
const pushStore = usePushConnectionStore();
|
|
101
|
-
const settingsStore = useSettingsStore();
|
|
102
|
-
const uiStore = useUIStore();
|
|
103
|
-
const workflowsStore = useWorkflowsStore();
|
|
104
|
-
const assistantStore = useAssistantStore();
|
|
105
|
-
const retryTimeout = ref(null);
|
|
106
|
-
const pushMessageQueue = ref([]);
|
|
107
|
-
const removeEventListener = ref(null);
|
|
108
|
-
function initialize() {
|
|
109
|
-
removeEventListener.value = pushStore.addEventListener((message) => {
|
|
110
|
-
void pushMessageReceived(message);
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
function terminate() {
|
|
114
|
-
if (typeof removeEventListener.value === "function") {
|
|
115
|
-
removeEventListener.value();
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
function queuePushMessage(event, retryAttempts) {
|
|
119
|
-
pushMessageQueue.value.push({ message: event, retriesLeft: retryAttempts });
|
|
120
|
-
if (retryTimeout.value === null) {
|
|
121
|
-
retryTimeout.value = setTimeout(processWaitingPushMessages, 20);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
async function processWaitingPushMessages() {
|
|
125
|
-
if (retryTimeout.value !== null) {
|
|
126
|
-
clearTimeout(retryTimeout.value);
|
|
127
|
-
retryTimeout.value = null;
|
|
128
|
-
}
|
|
129
|
-
const queueLength = pushMessageQueue.value.length;
|
|
130
|
-
for (let i = 0; i < queueLength; i++) {
|
|
131
|
-
const messageData = pushMessageQueue.value.shift();
|
|
132
|
-
const result = await pushMessageReceived(messageData.message, true);
|
|
133
|
-
if (!result) {
|
|
134
|
-
messageData.retriesLeft -= 1;
|
|
135
|
-
if (messageData.retriesLeft > 0) {
|
|
136
|
-
pushMessageQueue.value.unshift(messageData);
|
|
137
|
-
}
|
|
138
|
-
break;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
if (pushMessageQueue.value.length !== 0 && retryTimeout.value === null) {
|
|
142
|
-
retryTimeout.value = setTimeout(processWaitingPushMessages, 25);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
async function pushMessageReceived(receivedData, isRetry) {
|
|
146
|
-
const retryAttempts = 5;
|
|
147
|
-
if (receivedData.type === "sendWorkerStatusMessage") {
|
|
148
|
-
const pushData = receivedData.data;
|
|
149
|
-
orchestrationManagerStore.updateWorkerStatus(pushData.status);
|
|
150
|
-
return true;
|
|
151
|
-
}
|
|
152
|
-
if (receivedData.type === "sendConsoleMessage") {
|
|
153
|
-
const pushData = receivedData.data;
|
|
154
|
-
console.log(pushData.source, ...pushData.messages);
|
|
155
|
-
return true;
|
|
156
|
-
}
|
|
157
|
-
if (!["testWebhookReceived"].includes(receivedData.type) && isRetry !== true && pushMessageQueue.value.length) {
|
|
158
|
-
queuePushMessage(receivedData, retryAttempts);
|
|
159
|
-
return false;
|
|
160
|
-
}
|
|
161
|
-
if (receivedData.type === "executionStarted") {
|
|
162
|
-
if (!workflowsStore.activeExecutionId) {
|
|
163
|
-
workflowsStore.setActiveExecutionId(receivedData.data.executionId);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
if (receivedData.type === "nodeExecuteAfter" || receivedData.type === "nodeExecuteBefore" || receivedData.type === "executionStarted") {
|
|
167
|
-
if (!uiStore.isActionActive.workflowRunning) {
|
|
168
|
-
return false;
|
|
169
|
-
}
|
|
170
|
-
const pushData = receivedData.data;
|
|
171
|
-
if (workflowsStore.activeExecutionId !== pushData.executionId) {
|
|
172
|
-
if (isRetry !== true) {
|
|
173
|
-
queuePushMessage(receivedData, retryAttempts);
|
|
174
|
-
}
|
|
175
|
-
return false;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
if (receivedData.type === "workflowFailedToActivate" && workflowsStore.workflowId === receivedData.data.workflowId) {
|
|
179
|
-
workflowsStore.setWorkflowInactive(receivedData.data.workflowId);
|
|
180
|
-
workflowsStore.setActive(false);
|
|
181
|
-
toast.showError(
|
|
182
|
-
new Error(receivedData.data.errorMessage),
|
|
183
|
-
i18n.baseText("workflowActivator.showError.title", {
|
|
184
|
-
interpolate: { newStateName: "activated" }
|
|
185
|
-
}) + ":"
|
|
186
|
-
);
|
|
187
|
-
return true;
|
|
188
|
-
}
|
|
189
|
-
if (receivedData.type === "workflowActivated") {
|
|
190
|
-
workflowsStore.setWorkflowActive(receivedData.data.workflowId);
|
|
191
|
-
return true;
|
|
192
|
-
}
|
|
193
|
-
if (receivedData.type === "workflowDeactivated") {
|
|
194
|
-
workflowsStore.setWorkflowInactive(receivedData.data.workflowId);
|
|
195
|
-
return true;
|
|
196
|
-
}
|
|
197
|
-
if (receivedData.type === "executionFinished" || receivedData.type === "executionRecovered") {
|
|
198
|
-
if (!uiStore.isActionActive.workflowRunning) {
|
|
199
|
-
return false;
|
|
200
|
-
}
|
|
201
|
-
if (receivedData.type === "executionFinished") {
|
|
202
|
-
clearPopupWindowState();
|
|
203
|
-
const workflow2 = workflowsStore.getWorkflowById(receivedData.data.workflowId);
|
|
204
|
-
if (workflow2?.meta?.templateId) {
|
|
205
|
-
const easyAiWorkflowJson = getEasyAiWorkflowJson();
|
|
206
|
-
const isEasyAIWorkflow = workflow2.meta.templateId === easyAiWorkflowJson.meta.templateId;
|
|
207
|
-
if (isEasyAIWorkflow) {
|
|
208
|
-
telemetry.track(
|
|
209
|
-
"User executed test AI workflow",
|
|
210
|
-
{
|
|
211
|
-
status: receivedData.data.status
|
|
212
|
-
},
|
|
213
|
-
{ withPostHog: true }
|
|
214
|
-
);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
const { executionId } = receivedData.data;
|
|
219
|
-
if (executionId !== workflowsStore.activeExecutionId) {
|
|
220
|
-
if (isRetry !== true) {
|
|
221
|
-
queuePushMessage(receivedData, retryAttempts);
|
|
222
|
-
}
|
|
223
|
-
return false;
|
|
224
|
-
}
|
|
225
|
-
let showedSuccessToast = false;
|
|
226
|
-
let executionData;
|
|
227
|
-
if (receivedData.type === "executionFinished" && receivedData.data.rawData) {
|
|
228
|
-
const { workflowId, status, rawData } = receivedData.data;
|
|
229
|
-
executionData = {
|
|
230
|
-
workflowId,
|
|
231
|
-
data: parse(rawData),
|
|
232
|
-
status,
|
|
233
|
-
startedAt: workflowsStore.workflowExecutionData?.startedAt ?? /* @__PURE__ */ new Date(),
|
|
234
|
-
stoppedAt: /* @__PURE__ */ new Date()
|
|
235
|
-
};
|
|
236
|
-
} else {
|
|
237
|
-
uiStore.setProcessingExecutionResults(true);
|
|
238
|
-
if (receivedData.type === "executionFinished" && receivedData.data.status === "success") {
|
|
239
|
-
workflowHelpers.setDocumentTitle(
|
|
240
|
-
workflowsStore.getWorkflowById(receivedData.data.workflowId)?.name,
|
|
241
|
-
"IDLE"
|
|
242
|
-
);
|
|
243
|
-
uiStore.removeActiveAction("workflowRunning");
|
|
244
|
-
toast.showMessage({
|
|
245
|
-
title: i18n.baseText("pushConnection.workflowExecutedSuccessfully"),
|
|
246
|
-
type: "success"
|
|
247
|
-
});
|
|
248
|
-
showedSuccessToast = true;
|
|
249
|
-
}
|
|
250
|
-
let execution;
|
|
251
|
-
try {
|
|
252
|
-
execution = await workflowsStore.fetchExecutionDataById(executionId);
|
|
253
|
-
if (!execution?.data) {
|
|
254
|
-
uiStore.setProcessingExecutionResults(false);
|
|
255
|
-
return false;
|
|
256
|
-
}
|
|
257
|
-
executionData = {
|
|
258
|
-
workflowId: execution.workflowId,
|
|
259
|
-
data: parse(execution.data),
|
|
260
|
-
status: execution.status,
|
|
261
|
-
startedAt: workflowsStore.workflowExecutionData?.startedAt,
|
|
262
|
-
stoppedAt: receivedData.type === "executionFinished" ? /* @__PURE__ */ new Date() : void 0
|
|
263
|
-
};
|
|
264
|
-
} catch {
|
|
265
|
-
uiStore.setProcessingExecutionResults(false);
|
|
266
|
-
return false;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
const iRunExecutionData = {
|
|
270
|
-
startData: executionData.data?.startData,
|
|
271
|
-
resultData: executionData.data?.resultData ?? { runData: {} },
|
|
272
|
-
executionData: executionData.data?.executionData
|
|
273
|
-
};
|
|
274
|
-
if (workflowsStore.workflowExecutionData?.workflowId === executionData.workflowId) {
|
|
275
|
-
const activeRunData = workflowsStore.workflowExecutionData?.data?.resultData?.runData;
|
|
276
|
-
if (activeRunData) {
|
|
277
|
-
for (const key of Object.keys(activeRunData)) {
|
|
278
|
-
if (hasTrimmedItem(activeRunData[key])) continue;
|
|
279
|
-
iRunExecutionData.resultData.runData[key] = activeRunData[key];
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
uiStore.setProcessingExecutionResults(false);
|
|
284
|
-
let runDataExecutedErrorMessage = getExecutionError(iRunExecutionData);
|
|
285
|
-
if (executionData.status === "crashed") {
|
|
286
|
-
runDataExecutedErrorMessage = i18n.baseText("pushConnection.executionFailed.message");
|
|
287
|
-
} else if (executionData.status === "canceled") {
|
|
288
|
-
runDataExecutedErrorMessage = i18n.baseText(
|
|
289
|
-
"executionsList.showMessage.stopExecution.message",
|
|
290
|
-
{
|
|
291
|
-
interpolate: { activeExecutionId: workflowsStore.activeExecutionId }
|
|
292
|
-
}
|
|
293
|
-
);
|
|
294
|
-
}
|
|
295
|
-
const lineNumber = iRunExecutionData.resultData?.error?.lineNumber;
|
|
296
|
-
codeNodeEditorEventBus.emit("highlightLine", lineNumber ?? "last");
|
|
297
|
-
const workflow = workflowHelpers.getCurrentWorkflow();
|
|
298
|
-
if (executionData.data?.waitTill !== void 0) {
|
|
299
|
-
const workflowSettings = workflowsStore.workflowSettings;
|
|
300
|
-
const saveManualExecutions = settingsStore.saveManualExecutions;
|
|
301
|
-
const isSavingExecutions = workflowSettings.saveManualExecutions === void 0 ? saveManualExecutions : workflowSettings.saveManualExecutions;
|
|
302
|
-
if (!isSavingExecutions) {
|
|
303
|
-
globalLinkActionsEventBus.emit("registerGlobalLinkAction", {
|
|
304
|
-
key: "open-settings",
|
|
305
|
-
action: async () => {
|
|
306
|
-
if (workflowsStore.isNewWorkflow) await workflowHelpers.saveAsNewWorkflow();
|
|
307
|
-
uiStore.openModal(WORKFLOW_SETTINGS_MODAL_KEY);
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
workflowHelpers.setDocumentTitle(workflow.name, "IDLE");
|
|
312
|
-
} else if (executionData.status === "error" || executionData.status === "canceled") {
|
|
313
|
-
workflowHelpers.setDocumentTitle(workflow.name, "ERROR");
|
|
314
|
-
if (iRunExecutionData.resultData.error?.name === "ExpressionError" && iRunExecutionData.resultData.error.functionality === "pairedItem") {
|
|
315
|
-
const error = iRunExecutionData.resultData.error;
|
|
316
|
-
void workflowHelpers.getWorkflowDataToSave().then((workflowData) => {
|
|
317
|
-
const eventData = {
|
|
318
|
-
caused_by_credential: false,
|
|
319
|
-
error_message: error.description,
|
|
320
|
-
error_title: error.message,
|
|
321
|
-
error_type: error.context.type,
|
|
322
|
-
node_graph_string: JSON.stringify(
|
|
323
|
-
generateNodesGraph(
|
|
324
|
-
workflowData,
|
|
325
|
-
workflowHelpers.getNodeTypes()
|
|
326
|
-
).nodeGraph
|
|
327
|
-
),
|
|
328
|
-
workflow_id: workflowsStore.workflowId
|
|
329
|
-
};
|
|
330
|
-
if (error.context.nodeCause && ["paired_item_no_info", "paired_item_invalid_info"].includes(
|
|
331
|
-
error.context.type
|
|
332
|
-
)) {
|
|
333
|
-
const node = workflow.getNode(error.context.nodeCause);
|
|
334
|
-
if (node) {
|
|
335
|
-
eventData.is_pinned = !!workflow.getPinDataOfNode(node.name);
|
|
336
|
-
eventData.mode = node.parameters.mode;
|
|
337
|
-
eventData.node_type = node.type;
|
|
338
|
-
eventData.operation = node.parameters.operation;
|
|
339
|
-
eventData.resource = node.parameters.resource;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
telemetry.track("Instance FE emitted paired item error", eventData, {
|
|
343
|
-
withPostHog: true
|
|
344
|
-
});
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
if (iRunExecutionData.resultData.error?.name === "SubworkflowOperationError") {
|
|
348
|
-
const error = iRunExecutionData.resultData.error;
|
|
349
|
-
workflowsStore.subWorkflowExecutionError = error;
|
|
350
|
-
toast.showMessage({
|
|
351
|
-
title: error.message,
|
|
352
|
-
message: error.description,
|
|
353
|
-
type: "error",
|
|
354
|
-
duration: 0
|
|
355
|
-
});
|
|
356
|
-
} else if ((iRunExecutionData.resultData.error?.name === "NodeOperationError" || iRunExecutionData.resultData.error?.name === "NodeApiError") && iRunExecutionData.resultData.error.functionality === "configuration-node") {
|
|
357
|
-
let title;
|
|
358
|
-
const nodeError = iRunExecutionData.resultData.error;
|
|
359
|
-
if (nodeError.node.name) {
|
|
360
|
-
title = `Error in sub-node ‘${nodeError.node.name}‘`;
|
|
361
|
-
} else {
|
|
362
|
-
title = "Problem executing workflow";
|
|
363
|
-
}
|
|
364
|
-
toast.showMessage({
|
|
365
|
-
title,
|
|
366
|
-
message: h(_sfc_main, {
|
|
367
|
-
errorMessage: nodeError?.description ?? runDataExecutedErrorMessage,
|
|
368
|
-
nodeName: nodeError.node.name
|
|
369
|
-
}),
|
|
370
|
-
type: "error",
|
|
371
|
-
duration: 0
|
|
372
|
-
});
|
|
373
|
-
} else {
|
|
374
|
-
if (executionData.status === "canceled") {
|
|
375
|
-
toast.showMessage({
|
|
376
|
-
title: i18n.baseText("nodeView.showMessage.stopExecutionTry.title"),
|
|
377
|
-
type: "success"
|
|
378
|
-
});
|
|
379
|
-
} else {
|
|
380
|
-
let title;
|
|
381
|
-
if (iRunExecutionData.resultData.lastNodeExecuted) {
|
|
382
|
-
title = `Problem in node ‘${iRunExecutionData.resultData.lastNodeExecuted}‘`;
|
|
383
|
-
} else {
|
|
384
|
-
title = "Problem executing workflow";
|
|
385
|
-
}
|
|
386
|
-
toast.showMessage({
|
|
387
|
-
title,
|
|
388
|
-
message: runDataExecutedErrorMessage,
|
|
389
|
-
type: "error",
|
|
390
|
-
duration: 0
|
|
391
|
-
});
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
} else {
|
|
395
|
-
workflowHelpers.setDocumentTitle(workflow.name, "IDLE");
|
|
396
|
-
const execution = workflowsStore.getWorkflowExecution;
|
|
397
|
-
if (execution?.executedNode) {
|
|
398
|
-
const node = workflowsStore.getNodeByName(execution.executedNode);
|
|
399
|
-
const nodeType = node && nodeTypesStore.getNodeType(node.type, node.typeVersion);
|
|
400
|
-
const nodeOutput = execution && execution.executedNode && execution.data?.resultData?.runData?.[execution.executedNode];
|
|
401
|
-
if (nodeType?.polling && !nodeOutput) {
|
|
402
|
-
toast.showMessage({
|
|
403
|
-
title: i18n.baseText("pushConnection.pollingNode.dataNotFound", {
|
|
404
|
-
interpolate: {
|
|
405
|
-
service: getTriggerNodeServiceName(nodeType)
|
|
406
|
-
}
|
|
407
|
-
}),
|
|
408
|
-
message: i18n.baseText("pushConnection.pollingNode.dataNotFound.message", {
|
|
409
|
-
interpolate: {
|
|
410
|
-
service: getTriggerNodeServiceName(nodeType)
|
|
411
|
-
}
|
|
412
|
-
}),
|
|
413
|
-
type: "success"
|
|
414
|
-
});
|
|
415
|
-
} else {
|
|
416
|
-
toast.showMessage({
|
|
417
|
-
title: i18n.baseText("pushConnection.nodeExecutedSuccessfully"),
|
|
418
|
-
type: "success"
|
|
419
|
-
});
|
|
420
|
-
}
|
|
421
|
-
} else if (!showedSuccessToast) {
|
|
422
|
-
toast.showMessage({
|
|
423
|
-
title: i18n.baseText("pushConnection.workflowExecutedSuccessfully"),
|
|
424
|
-
type: "success"
|
|
425
|
-
});
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
if (workflowsStore.getWorkflowRunData && !hasTrimmedData(workflowsStore.getWorkflowRunData)) {
|
|
429
|
-
iRunExecutionData.resultData.runData = workflowsStore.getWorkflowRunData;
|
|
430
|
-
}
|
|
431
|
-
workflowsStore.executingNode.length = 0;
|
|
432
|
-
workflowsStore.setWorkflowExecutionData(executionData);
|
|
433
|
-
uiStore.removeActiveAction("workflowRunning");
|
|
434
|
-
nodeHelpers.updateNodesExecutionIssues();
|
|
435
|
-
const lastNodeExecuted = iRunExecutionData.resultData.lastNodeExecuted;
|
|
436
|
-
let itemsCount = 0;
|
|
437
|
-
if (lastNodeExecuted && iRunExecutionData.resultData.runData[lastNodeExecuted] && !runDataExecutedErrorMessage) {
|
|
438
|
-
itemsCount = iRunExecutionData.resultData.runData[lastNodeExecuted][0].data.main[0].length;
|
|
439
|
-
}
|
|
440
|
-
workflowsStore.setActiveExecutionId(null);
|
|
441
|
-
void useExternalHooks().run("pushConnection.executionFinished", {
|
|
442
|
-
itemsCount,
|
|
443
|
-
nodeName: iRunExecutionData.resultData.lastNodeExecuted,
|
|
444
|
-
errorMessage: runDataExecutedErrorMessage,
|
|
445
|
-
runDataExecutedStartData: iRunExecutionData.startData,
|
|
446
|
-
resultDataError: iRunExecutionData.resultData.error
|
|
447
|
-
});
|
|
448
|
-
} else if (receivedData.type === "executionWaiting") ;
|
|
449
|
-
else if (receivedData.type === "executionStarted") {
|
|
450
|
-
if (workflowsStore.workflowExecutionData?.data && receivedData.data.flattedRunData) {
|
|
451
|
-
workflowsStore.workflowExecutionData.data.resultData.runData = parse(
|
|
452
|
-
receivedData.data.flattedRunData
|
|
453
|
-
);
|
|
454
|
-
}
|
|
455
|
-
} else if (receivedData.type === "nodeExecuteAfter") {
|
|
456
|
-
const pushData = receivedData.data;
|
|
457
|
-
if (pushData.itemCount && pushData.data?.data?.main && Array.isArray(pushData.data.data.main[0]) && pushData.data.data.main[0].length < pushData.itemCount) {
|
|
458
|
-
pushData.data.data.main[0]?.push(...new Array(pushData.itemCount - 1).fill({ json: {} }));
|
|
459
|
-
}
|
|
460
|
-
workflowsStore.updateNodeExecutionData(pushData);
|
|
461
|
-
void assistantStore.onNodeExecution(pushData);
|
|
462
|
-
void useSchemaPreviewStore().trackSchemaPreviewExecution(pushData);
|
|
463
|
-
} else if (receivedData.type === "nodeExecuteBefore") {
|
|
464
|
-
workflowsStore.setNodeExecuting(receivedData.data);
|
|
465
|
-
} else if (receivedData.type === "testWebhookDeleted") {
|
|
466
|
-
const pushData = receivedData.data;
|
|
467
|
-
if (pushData.workflowId === workflowsStore.workflowId) {
|
|
468
|
-
workflowsStore.executionWaitingForWebhook = false;
|
|
469
|
-
uiStore.removeActiveAction("workflowRunning");
|
|
470
|
-
}
|
|
471
|
-
} else if (receivedData.type === "testWebhookReceived") {
|
|
472
|
-
const pushData = receivedData.data;
|
|
473
|
-
if (pushData.workflowId === workflowsStore.workflowId) {
|
|
474
|
-
workflowsStore.executionWaitingForWebhook = false;
|
|
475
|
-
workflowsStore.setActiveExecutionId(pushData.executionId);
|
|
476
|
-
}
|
|
477
|
-
void processWaitingPushMessages();
|
|
478
|
-
} else if (receivedData.type === "reloadNodeType") {
|
|
479
|
-
await nodeTypesStore.getNodeTypes();
|
|
480
|
-
await nodeTypesStore.getFullNodesProperties([receivedData.data]);
|
|
481
|
-
} else if (receivedData.type === "removeNodeType") {
|
|
482
|
-
const pushData = receivedData.data;
|
|
483
|
-
const nodesToBeRemoved = [pushData];
|
|
484
|
-
await credentialsStore.fetchCredentialTypes(false).then(() => {
|
|
485
|
-
nodeTypesStore.removeNodeTypes(nodesToBeRemoved);
|
|
486
|
-
});
|
|
487
|
-
} else if (receivedData.type === "nodeDescriptionUpdated") {
|
|
488
|
-
await nodeTypesStore.getNodeTypes();
|
|
489
|
-
await credentialsStore.fetchCredentialTypes(true);
|
|
490
|
-
}
|
|
491
|
-
return true;
|
|
492
|
-
}
|
|
493
|
-
function getExecutionError(data) {
|
|
494
|
-
const error = data.resultData.error;
|
|
495
|
-
let errorMessage;
|
|
496
|
-
if (data.resultData.lastNodeExecuted && error) {
|
|
497
|
-
errorMessage = error.message || error.description;
|
|
498
|
-
} else {
|
|
499
|
-
errorMessage = i18n.baseText("pushConnection.executionError", {
|
|
500
|
-
interpolate: { error: "!" }
|
|
501
|
-
});
|
|
502
|
-
if (error?.message) {
|
|
503
|
-
let nodeName;
|
|
504
|
-
if ("node" in error) {
|
|
505
|
-
nodeName = typeof error.node === "string" ? error.node : error.node.name;
|
|
506
|
-
}
|
|
507
|
-
const receivedError = nodeName ? `${nodeName}: ${error.message}` : error.message;
|
|
508
|
-
errorMessage = i18n.baseText("pushConnection.executionError", {
|
|
509
|
-
interpolate: {
|
|
510
|
-
error: `.${i18n.baseText("pushConnection.executionError.details", {
|
|
511
|
-
interpolate: {
|
|
512
|
-
details: receivedError
|
|
513
|
-
}
|
|
514
|
-
})}`
|
|
515
|
-
}
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
return errorMessage;
|
|
520
|
-
}
|
|
521
|
-
return {
|
|
522
|
-
initialize,
|
|
523
|
-
terminate,
|
|
524
|
-
pushMessageReceived,
|
|
525
|
-
queuePushMessage,
|
|
526
|
-
processWaitingPushMessages,
|
|
527
|
-
pushMessageQueue,
|
|
528
|
-
retryTimeout
|
|
529
|
-
};
|
|
530
|
-
}
|
|
531
|
-
export {
|
|
532
|
-
WORKER_HISTORY_LENGTH as W,
|
|
533
|
-
useOrchestrationStore as a,
|
|
534
|
-
usePushConnection as u
|
|
535
|
-
};
|