@oomol-lab/open-flow 0.1.0-beta.61 → 0.1.0-beta.62
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/browser/{createResourceDialog-D71fO68i.js → createResourceDialog-DZgJsr3e.js} +2 -2
- package/dist/browser/{flowChanges-DSA0FxxN.js → flowChanges-CzYIVevI.js} +2244 -2172
- package/dist/browser/{flowWorkspace-0sUJ5JhQ.js → flowWorkspace-BgZaFKZm.js} +179 -57
- package/dist/browser/{icons-DVJvrj1H.js → icons-CajfDpy_.js} +2879 -2879
- package/dist/browser/preview.js +453 -140
- package/dist/browser/workbench.css +4 -20
- package/dist/browser/workbench.js +78 -11
- package/dist/browser/{workbenchSelect-cr4-mKq3.js → workbenchSelect-H9wzEFkH.js} +1 -1
- package/dist/command/index.js +37 -37
- package/dist/common/authoring.d.ts +1 -1
- package/dist/common/control-api-conformance.js +2149 -2084
- package/dist/common/control-api-errors.d.ts +0 -4
- package/dist/common/control-api.d.ts +10 -11
- package/dist/common/control-api.js +2495 -2755
- package/dist/common/control-requests.js +23 -15
- package/dist/common/liveDetails.d.ts +138 -0
- package/dist/common/mcp.d.ts +1 -33
- package/dist/common/mcp.js +287 -238
- package/package.json +1 -1
- package/skills/open-flow/SKILL.md +6 -3
- package/skills/open-flow/references/flow-authoring.md +28 -24
- package/dist/common/publicationResources.d.ts +0 -29
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, r as __exportAll, t as __commonJSMin } from "./rolldown-runtime-CEgmsyvS.js";
|
|
2
|
-
import { $t as
|
|
2
|
+
import { $t as DropdownMenuContent, A as datePickerValue, An as zh_TW_default$1, At as followWorkbenchLink, Bn as errorNotice, Bt as VirtualScrollArea, C as valueForEditor, Cn as Badge, D as calendarChange, Dn as createI18n$1, E as typeOfSchema, En as SourceSelect, F as feishuResourceKind, Fn as fr_default$1, Ft as PopoverPanelContent, G as semanticNodeIcon, Gt as Empty, H as resourceData, Ht as InputGroup, I as supportsFeishuChatFilter, In as en_default$1, It as PopoverTitle, J as providerIcon, Jt as EmptyHeader, K as triggerNodeIcon, Kn as resolutionOutputPorts, Kt as EmptyContent, Ln as I18n, Lt as PopoverTrigger, Mn as ru_default$1, Mt as PopoverContent, Nn as ko_default$1, Nt as PopoverDescription, O as calendarDate, On as uiLocales, P as indexAddNodeOptions, Pn as ja_default$1, Pt as PopoverHeader, Q as useIconifyData, Qn as triggerConfigValues, Qt as DropdownMenuCheckboxItem, R as mapSource, Rn as FeishuEventPicker, Rt as NativeScrollArea, S as schemaForEditor, Sn as useMenuRootContext, T as isUnconstrainedSchema, Tn as SourceForm, U as resourceValue, Ut as InputGroupAddon, V as observeResource, Vt as Z$2, W as designerGraph, Wn as decodeResultList, Wt as InputGroupInput, X as IconifyProvider, Xn as isJsonObject, Xt as EmptyTitle, Y as ContentIcon, Yn as triggerOutputDefinitions, Yt as EmptyMedia, Z as useIconifyCollectionLoader, Zn as triggerConfigValue, Zt as DropdownMenu, _n as MenuItem, _r as Checkbox, an as DropdownMenuSeparator, ar as openApiTask, b as editorComponent, bn as useContextMenuRootContext, cn as DropdownMenuSubTrigger, cr as serverAddress, ct as diagnosticNodeId, dn as findRootOwnerId, dt as connectionCatalog, en as DropdownMenuGroup, et as canCancelRun, fn as useCompositeItem, gn as MenuPopup, gr as controlErrorCode, hn as MenuPortal, in as DropdownMenuRadioItem, ir as openApiFieldIssues, j as isDateFormat, jn as zh_CN_default$1, jt as Popover, k as datePickerChange, kn as waitBranchDescription, kt as IdTooltip, ln as DropdownMenuTrigger, lr as servers, lt as schemaMismatchMessage, mn as MenuPositioner, n as agentTool, nn as DropdownMenuLabel, nr as listOperations, nt as revisionView, on as DropdownMenuSub, or as securityOptions, pn as MenuRoot, q as actionSummary, qn as sourceOutputLabel, qt as EmptyDescription, rn as DropdownMenuRadioGroup, rr as object, sn as DropdownMenuSubContent, sr as selectOperation, st as diagnosticMessage, tn as DropdownMenuItem, tt as hasRunFilter, un as isElementDisabled, ur as inputValue, vn as MenuGroup, vr as useAriaLabelledBy, w as getDefaultValue, x as editorGroups, xn as MenuRootContext, y as defaultValueEditorSchema, yn as ContextMenuRootContext, yr as IconThemeContext, zn as EventSourceSetup, zt as ScrollArea } from "./flowChanges-CzYIVevI.js";
|
|
3
3
|
import { a as derive, c as strictEqual, i as compute, l as val, n as attachSetter, r as combine, s as readonlyVal } from "./dist-bO8nvHFH.js";
|
|
4
4
|
import { c as useLang, i as isString, l as useTranslate, n as isBoolean, o as I18nProvider, r as isPlainObject, s as useI18n, t as isArray$1, u as useVal } from "./dist-BFmpkX4P.js";
|
|
5
|
-
import { $
|
|
5
|
+
import { $r as inputPress, Ai as useButton, At as IndexGuessBehavior, Bi as isElement, Br as transitionStatusMapping, Bt as HORIZONTAL_KEYS, C as FieldDescription, Ci as clsx, Cr as stopEvent$1, Ct as SelectContent, Di as NOOP, Dn as useFloatingRootContext, Dr as getTarget, Dt as SelectTrigger, E as FieldLabel, Ei as EMPTY_OBJECT, Er as contains, Et as SelectSeparator, Fi as useIsoLayoutEffect, Fn as useDismiss, Fr as createLucideIcon, Ft as ARROW_LEFT, Gr as cancelOpen, Gt as isNativeInput, Hr as useValueChanged, Ht as MODIFIER_KEYS, I as matchesSchema, In as useClick, Ir as useTransitionStatus, It as ARROW_RIGHT, Jr as escapeKey, Jt as useAnchoredPopupScrollLock, Kn as DROPDOWN_COLLISION_AVOIDANCE, Kr as clearPress, Kt as scrollIntoViewIfNeeded, L as schemaObject, Li as useStableCallback, Ln as FloatingFocusManager, Lr as useOpenChangeComplete, Lt as ARROW_UP, M as decisionTask, Mr as useLabelableId, Mt as ALL_KEYS, N as defaultDecisionQuestion, Ni as formatErrorMessage, Nr as ChevronDown, Nt as ARROW_DOWN, O as decodeRevisionContent, Or as isAndroid, Ot as SelectValue, P as limitDecisionQuestions, Pi as mergeProps, Pt as ARROW_KEYS, Q as operatorsForType, Qn as useStore$1, Qr as inputClear, Qt as useAnchorPositioning, R as variableInputCompatible, Ri as useRefWithInit, S as Field, Si as cva, Sn as useInteractions, Sr as isListIndexDisabled, St as SelectChevron, T as FieldGroup, Ti as EMPTY_ARRAY$1, Tr as activeElement, Tt as SelectItem, U as nodeNameIssue, Ur as createChangeEventDetails, Ut as VERTICAL_KEYS, Vt as HORIZONTAL_KEYS_WITH_EXTRA_KEYS, Wn as FloatingPortal, Wr as createGenericEventDetails, Wt as VERTICAL_KEYS_WITH_EXTRA_KEYS, X as nodeInputMappings, Xt as getDisabledMountTransitionStyles, Yn as addEventListener, Yt as usePositioner, Z as operandHandle, Zn as Store, Zr as inputChange, Zt as InternalBackdrop, _ as TooltipPositioner, _i as visuallyHiddenInput, _n as selectedValueIncludes, _r as getGridCellIndices, a as DialogDescription, an as pressableTriggerOpenStateMapping, ar as useOnFirstRender, at as webhookSupportsBody, b as TooltipRoot, bi as buttonVariants, br as getMinListIndex, c as DialogTitle, ci as useLabelableContext, cn as useOpenInteractionType, d as TooltipContent, di as useFieldRootContext, dn as stringifyAsLabel, ei as itemPress, en as useDirection, et as unaryOperator, f as TooltipProvider, fi as useBaseUiId, fn as stringifyAsValue, g as TooltipPopup, gi as visuallyHidden, gn as removeItem, gr as getGridCellIndexOfCorner, h as TooltipArrow, hi as fieldValidityMapping, hn as findItemIndex, hr as findNonDisabledListIndex, i as DialogContent, in as popupStateMapping, ir as useValueAsRef, it as webhookMethods, j as decisionQuestionIssues, ji as CompositeRootContext, jr as ownerDocument, jt as useCompositeListItem, k as decisionLimits, ki as useMergedRefs, kr as isFirefox, l as DialogTrigger, li as useFormContext, ln as hasNullItemLabel, lr as useTimeout, m as createTooltipHandle, mi as DEFAULT_FIELD_STATE_ATTRIBUTES, mn as defaultItemEquality, mr as createGridCellMap, n as Dialog, ni as none$1, nn as inertValue, nr as require_builtin_esm_external_require_react, on as triggerOpenStateMapping, or as Label, p as TooltipTrigger, pi as useId$1, pn as compareItemEquality, q as comparisonIssue, qr as closePress, rn as getPseudoElementBounds, rr as createSelector, rt as dequal, si as triggerPress, sn as resolveAriaLabelledBy, sr as Input$1, t as Icon, ti as listNavigation, tn as CompositeList, tr as require_with_selector, tt as valueType, u as Tooltip, ui as useRegisterFieldControl, un as isGroupedItems, v as TooltipPortal, vi as useControlled, vr as getGridNavigatedIndex, vt as string, w as FieldError, wi as useRenderElement, wr as isInteractiveElement, wt as SelectGroup, x as Spinner, xi as cn$1, xn as useListNavigation, xr as isIndexOutOfListBounds, xt as Select$1, y as TooltipTrigger$1, yi as Button$1, yn as useTypeahead, yr as getMaxListIndex, zr as TransitionStatusDataAttributes } from "./icons-CajfDpy_.js";
|
|
6
6
|
import { a as renameObjectField, i as objectValue, l as resolveUiLanguage, n as isJsonValue, o as setObjectField, r as jsonDataTypes, s as valueType$1, t as initialValue } from "./value-DL_poNiC.js";
|
|
7
7
|
import { n as compile, r as validate } from "./flowRunInputEditorStore-Dsxyfwae.js";
|
|
8
|
-
import { t as WorkbenchSelect } from "./workbenchSelect-
|
|
8
|
+
import { t as WorkbenchSelect } from "./workbenchSelect-H9wzEFkH.js";
|
|
9
9
|
import * as React from "react";
|
|
10
10
|
import reactExports, { Children, Fragment, Suspense, createContext, forwardRef, isValidElement, lazy, memo, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
11
11
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -33884,6 +33884,160 @@ function TriggerSummary({ trigger, display }) {
|
|
|
33884
33884
|
});
|
|
33885
33885
|
}
|
|
33886
33886
|
//#endregion
|
|
33887
|
+
//#region src/workbench/browser/runtime/publications/triggerStatus.tsx
|
|
33888
|
+
function triggerLabel(binding, enabled, t) {
|
|
33889
|
+
if (binding.currentPublicationId == null) return t("publication.retired");
|
|
33890
|
+
if (!enabled) return t("publication.suspended");
|
|
33891
|
+
if (binding.listener?.health == "healthy" && (binding.health == "failed" || binding.health == "needs_reauth")) return t("publication.listenerDegraded");
|
|
33892
|
+
switch (binding.listener?.health == "failed" || binding.listener?.health == "needs_reauth" ? binding.listener.health : binding.health) {
|
|
33893
|
+
case "healthy": return t("publication.active");
|
|
33894
|
+
case "failed": return t("publication.failed");
|
|
33895
|
+
case "needs_reauth": return t("publication.needsReauth");
|
|
33896
|
+
case "initializing": return t("publication.reconciling");
|
|
33897
|
+
case "suspended": return t("publication.suspended");
|
|
33898
|
+
}
|
|
33899
|
+
}
|
|
33900
|
+
function triggerClass(binding, enabled) {
|
|
33901
|
+
if (binding.currentPublicationId == null || !enabled) return "neutral";
|
|
33902
|
+
if (binding.listener?.health == "healthy" && (binding.health == "failed" || binding.health == "needs_reauth")) return "running";
|
|
33903
|
+
switch (binding.listener?.health == "failed" || binding.listener?.health == "needs_reauth" ? binding.listener.health : binding.health) {
|
|
33904
|
+
case "healthy": return "success";
|
|
33905
|
+
case "failed":
|
|
33906
|
+
case "needs_reauth": return "danger";
|
|
33907
|
+
case "initializing": return "running";
|
|
33908
|
+
case "suspended": return "neutral";
|
|
33909
|
+
}
|
|
33910
|
+
}
|
|
33911
|
+
function TriggerStatus({ binding, enabled }) {
|
|
33912
|
+
const t = useTranslate();
|
|
33913
|
+
return /* @__PURE__ */ jsx("span", {
|
|
33914
|
+
className: "trigger-binding-state " + triggerClass(binding, enabled),
|
|
33915
|
+
children: triggerLabel(binding, enabled, t)
|
|
33916
|
+
});
|
|
33917
|
+
}
|
|
33918
|
+
function ListenerHealth({ binding, enabled }) {
|
|
33919
|
+
const t = useTranslate();
|
|
33920
|
+
if (binding.listener == null || binding.currentPublicationId == null || !enabled) return null;
|
|
33921
|
+
return /* @__PURE__ */ jsxs("p", {
|
|
33922
|
+
className: "trigger-recovery",
|
|
33923
|
+
children: [t(binding.listener.health == "healthy" ? "publication.listenerScanning" : binding.listener.health == "needs_reauth" ? "publication.needsReauthDescription" : "publication.listenerScanFailed"), binding.listener.lastErrorCode == null ? "" : ` (${binding.listener.lastErrorCode})`]
|
|
33924
|
+
});
|
|
33925
|
+
}
|
|
33926
|
+
//#endregion
|
|
33927
|
+
//#region src/workbench/browser/runtime/publications/webhookEndpoint.tsx
|
|
33928
|
+
function WebhookCopyButton({ endpointUrl, iconOnly = false }) {
|
|
33929
|
+
const t = useTranslate();
|
|
33930
|
+
const [copyResult, setCopyResult] = useState();
|
|
33931
|
+
const [container, setContainer] = useState(null);
|
|
33932
|
+
useEffect(() => {
|
|
33933
|
+
if (copyResult !== "copied") return;
|
|
33934
|
+
const timer = globalThis.setTimeout(() => setCopyResult(void 0), 1500);
|
|
33935
|
+
return () => globalThis.clearTimeout(timer);
|
|
33936
|
+
}, [copyResult]);
|
|
33937
|
+
const label = t(copyResult === "copied" ? "publication.webhookCopied" : copyResult === "failed" ? "webhookDeployment.copyFailed" : "publication.webhookCopy");
|
|
33938
|
+
const copy = async () => {
|
|
33939
|
+
try {
|
|
33940
|
+
await navigator.clipboard.writeText(endpointUrl);
|
|
33941
|
+
setCopyResult("copied");
|
|
33942
|
+
} catch {
|
|
33943
|
+
setCopyResult("failed");
|
|
33944
|
+
}
|
|
33945
|
+
};
|
|
33946
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
33947
|
+
className: "inline-flex shrink-0 flex-col gap-2",
|
|
33948
|
+
ref: setContainer,
|
|
33949
|
+
children: [iconOnly ? /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
33950
|
+
render: /* @__PURE__ */ jsx(Button$1, {
|
|
33951
|
+
"aria-label": label,
|
|
33952
|
+
size: "icon-sm",
|
|
33953
|
+
variant: "ghost",
|
|
33954
|
+
onClick: copy
|
|
33955
|
+
}),
|
|
33956
|
+
children: /* @__PURE__ */ jsx("i", {
|
|
33957
|
+
"aria-hidden": "true",
|
|
33958
|
+
className: copyResult === "copied" ? "i-lucide-light:check text-base" : "i-lucide-light:copy text-base"
|
|
33959
|
+
})
|
|
33960
|
+
}), /* @__PURE__ */ jsx(TooltipContent, {
|
|
33961
|
+
container,
|
|
33962
|
+
side: "bottom",
|
|
33963
|
+
align: "end",
|
|
33964
|
+
children: label
|
|
33965
|
+
})] }) : /* @__PURE__ */ jsx(Button$1, {
|
|
33966
|
+
size: "sm",
|
|
33967
|
+
variant: "outline",
|
|
33968
|
+
onClick: copy,
|
|
33969
|
+
children: t(copyResult === "copied" ? "publication.webhookCopied" : "publication.webhookCopy")
|
|
33970
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
33971
|
+
className: iconOnly || copyResult !== "failed" ? "sr-only" : "text-xs text-destructive",
|
|
33972
|
+
role: "status",
|
|
33973
|
+
children: copyResult == null ? "" : label
|
|
33974
|
+
})]
|
|
33975
|
+
});
|
|
33976
|
+
}
|
|
33977
|
+
function WebhookEndpoint({ endpointUrl }) {
|
|
33978
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
33979
|
+
className: "flex min-w-0 items-start gap-2",
|
|
33980
|
+
children: [/* @__PURE__ */ jsx("code", {
|
|
33981
|
+
className: "min-w-0 flex-1 select-text break-all text-foreground text-xs leading-5",
|
|
33982
|
+
children: endpointUrl
|
|
33983
|
+
}), /* @__PURE__ */ jsx(WebhookCopyButton, { endpointUrl }, endpointUrl)]
|
|
33984
|
+
});
|
|
33985
|
+
}
|
|
33986
|
+
//#endregion
|
|
33987
|
+
//#region src/workbench/browser/runtime/editor/webhookDeployment.tsx
|
|
33988
|
+
function WebhookDeployment({ binding, status, enabled, hasUnpublishedChanges, onRetry }) {
|
|
33989
|
+
const t = useTranslate();
|
|
33990
|
+
const current = binding?.currentPublicationId != null;
|
|
33991
|
+
const ready = status === "loaded" && current;
|
|
33992
|
+
return /* @__PURE__ */ jsx(InspectorSection, {
|
|
33993
|
+
title: /* @__PURE__ */ jsxs("span", {
|
|
33994
|
+
className: "flex w-full items-center justify-between gap-2",
|
|
33995
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
33996
|
+
className: "flex flex-wrap items-center gap-2",
|
|
33997
|
+
children: [/* @__PURE__ */ jsx("span", { children: t("webhookDeployment.title") }), ready && /* @__PURE__ */ jsx(TriggerStatus, {
|
|
33998
|
+
binding,
|
|
33999
|
+
enabled
|
|
34000
|
+
})]
|
|
34001
|
+
}), ready && binding.endpointUrl != null && /* @__PURE__ */ jsx(WebhookCopyButton, {
|
|
34002
|
+
endpointUrl: binding.endpointUrl,
|
|
34003
|
+
iconOnly: true
|
|
34004
|
+
}, binding.endpointUrl)]
|
|
34005
|
+
}),
|
|
34006
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
34007
|
+
className: "flex min-w-0 flex-col gap-2 text-xs",
|
|
34008
|
+
children: status === "failed" ? /* @__PURE__ */ jsxs("div", {
|
|
34009
|
+
className: "flex items-center justify-between gap-2",
|
|
34010
|
+
role: "status",
|
|
34011
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
34012
|
+
className: "text-muted-foreground",
|
|
34013
|
+
children: t("webhookDeployment.loadFailed")
|
|
34014
|
+
}), /* @__PURE__ */ jsx(Button$1, {
|
|
34015
|
+
size: "sm",
|
|
34016
|
+
variant: "outline",
|
|
34017
|
+
onClick: onRetry,
|
|
34018
|
+
children: t("connectorAccess.retry")
|
|
34019
|
+
})]
|
|
34020
|
+
}) : status !== "loaded" ? /* @__PURE__ */ jsx("p", {
|
|
34021
|
+
className: "m-0 text-muted-foreground",
|
|
34022
|
+
role: "status",
|
|
34023
|
+
children: t("publication.loadingTrigger")
|
|
34024
|
+
}) : !current ? /* @__PURE__ */ jsx("p", {
|
|
34025
|
+
className: "m-0 text-muted-foreground",
|
|
34026
|
+
children: t("webhookDeployment.unpublished")
|
|
34027
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [binding.endpointUrl != null ? /* @__PURE__ */ jsx("code", {
|
|
34028
|
+
className: "min-w-0 select-text break-all text-foreground text-xs leading-5",
|
|
34029
|
+
children: binding.endpointUrl
|
|
34030
|
+
}) : /* @__PURE__ */ jsx("p", {
|
|
34031
|
+
className: "m-0 text-muted-foreground",
|
|
34032
|
+
children: t("webhookDeployment.pending")
|
|
34033
|
+
}), hasUnpublishedChanges && /* @__PURE__ */ jsx("p", {
|
|
34034
|
+
className: "m-0 text-muted-foreground",
|
|
34035
|
+
children: t("webhookDeployment.unpublishedChanges")
|
|
34036
|
+
})] })
|
|
34037
|
+
})
|
|
34038
|
+
});
|
|
34039
|
+
}
|
|
34040
|
+
//#endregion
|
|
33887
34041
|
//#region src/workbench/browser/runtime/editor/webhookEditor.tsx
|
|
33888
34042
|
function deferInspection(check, signal) {
|
|
33889
34043
|
return new Promise((resolve, reject) => {
|
|
@@ -34293,7 +34447,7 @@ function inputUpstreamSources({ revision, sourceNodeIcons, selection, store, han
|
|
|
34293
34447
|
}
|
|
34294
34448
|
};
|
|
34295
34449
|
}
|
|
34296
|
-
function NodeInspector({ variables = {
|
|
34450
|
+
function NodeInspector({ webhookDeployment, variables = {
|
|
34297
34451
|
enabled: false,
|
|
34298
34452
|
loaded: false,
|
|
34299
34453
|
loading: false,
|
|
@@ -34341,6 +34495,7 @@ function NodeInspector({ variables = {
|
|
|
34341
34495
|
className: "inspector-content",
|
|
34342
34496
|
ref: content,
|
|
34343
34497
|
children: [
|
|
34498
|
+
selection?.kind === "trigger" && selection.trigger.kind === "webhook" && webhookDeployment != null && /* @__PURE__ */ jsx(WebhookDeployment, { ...webhookDeployment }, selection.id),
|
|
34344
34499
|
readOnly && connector != null && /* @__PURE__ */ jsx(SavedConnectionReference, {
|
|
34345
34500
|
action: connector.action,
|
|
34346
34501
|
connectionId: connector.connectionId
|
|
@@ -53563,18 +53718,6 @@ function WorkbenchCanvasActions({ addNodeControl, history, pickerOpen, disabled,
|
|
|
53563
53718
|
}
|
|
53564
53719
|
//#endregion
|
|
53565
53720
|
//#region src/workbench/browser/runtime/publications/liveTriggers.tsx
|
|
53566
|
-
function triggerLabel(binding, enabled, t) {
|
|
53567
|
-
if (binding.currentPublicationId == null) return t("publication.retired");
|
|
53568
|
-
if (!enabled) return t("publication.suspended");
|
|
53569
|
-
if (binding.listener?.health == "healthy" && (binding.health == "failed" || binding.health == "needs_reauth")) return t("publication.listenerDegraded");
|
|
53570
|
-
switch (binding.listener?.health == "failed" || binding.listener?.health == "needs_reauth" ? binding.listener.health : binding.health) {
|
|
53571
|
-
case "healthy": return t("publication.active");
|
|
53572
|
-
case "failed": return t("publication.failed");
|
|
53573
|
-
case "needs_reauth": return t("publication.needsReauth");
|
|
53574
|
-
case "initializing": return t("publication.reconciling");
|
|
53575
|
-
case "suspended": return t("publication.suspended");
|
|
53576
|
-
}
|
|
53577
|
-
}
|
|
53578
53721
|
function activityLabel(kind, t) {
|
|
53579
53722
|
switch (kind) {
|
|
53580
53723
|
case "delivery.failed": return t("publication.activityDeliveryFailed");
|
|
@@ -53590,32 +53733,6 @@ function triggerName(binding, revision) {
|
|
|
53590
53733
|
if (revision == null || binding.currentRevisionId != revision.revision.revisionId) return binding.triggerNodeId;
|
|
53591
53734
|
return revision.trigger(binding.triggerNodeId)?.name ?? binding.triggerNodeId;
|
|
53592
53735
|
}
|
|
53593
|
-
function triggerClass(binding, enabled) {
|
|
53594
|
-
if (binding.currentPublicationId == null || !enabled) return "neutral";
|
|
53595
|
-
if (binding.listener?.health == "healthy" && (binding.health == "failed" || binding.health == "needs_reauth")) return "running";
|
|
53596
|
-
switch (binding.listener?.health == "failed" || binding.listener?.health == "needs_reauth" ? binding.listener.health : binding.health) {
|
|
53597
|
-
case "healthy": return "success";
|
|
53598
|
-
case "failed":
|
|
53599
|
-
case "needs_reauth": return "danger";
|
|
53600
|
-
case "initializing": return "running";
|
|
53601
|
-
case "suspended": return "neutral";
|
|
53602
|
-
}
|
|
53603
|
-
}
|
|
53604
|
-
function TriggerStatus({ binding, enabled }) {
|
|
53605
|
-
const t = useTranslate();
|
|
53606
|
-
return /* @__PURE__ */ jsx("span", {
|
|
53607
|
-
className: "trigger-binding-state " + triggerClass(binding, enabled),
|
|
53608
|
-
children: triggerLabel(binding, enabled, t)
|
|
53609
|
-
});
|
|
53610
|
-
}
|
|
53611
|
-
function ListenerHealth({ binding, enabled }) {
|
|
53612
|
-
const t = useTranslate();
|
|
53613
|
-
if (binding.listener == null || binding.currentPublicationId == null || !enabled) return null;
|
|
53614
|
-
return /* @__PURE__ */ jsxs("p", {
|
|
53615
|
-
className: "trigger-recovery",
|
|
53616
|
-
children: [t(binding.listener.health == "healthy" ? "publication.listenerScanning" : binding.listener.health == "needs_reauth" ? "publication.needsReauthDescription" : "publication.listenerScanFailed"), binding.listener.lastErrorCode == null ? "" : ` (${binding.listener.lastErrorCode})`]
|
|
53617
|
-
});
|
|
53618
|
-
}
|
|
53619
53736
|
function LiveTriggers({ store }) {
|
|
53620
53737
|
const language = useLang();
|
|
53621
53738
|
const t = useTranslate();
|
|
@@ -53624,7 +53741,7 @@ function LiveTriggers({ store }) {
|
|
|
53624
53741
|
const activitiesLoading = useVal(store.publications.$.activitiesLoading);
|
|
53625
53742
|
const activitiesLoadingMore = useVal(store.publications.$.activitiesLoadingMore);
|
|
53626
53743
|
const activitiesNextCursor = useVal(store.publications.$.activitiesNextCursor);
|
|
53627
|
-
const bindings = useVal(store.publications.$.bindings);
|
|
53744
|
+
const { bindings } = useVal(store.publications.$.bindings);
|
|
53628
53745
|
const detail = useVal(store.publications.$.detail);
|
|
53629
53746
|
const detailLoading = useVal(store.publications.$.detailLoading);
|
|
53630
53747
|
const selectedTriggerId = useVal(store.publications.$.selectedTriggerId);
|
|
@@ -53632,8 +53749,6 @@ function LiveTriggers({ store }) {
|
|
|
53632
53749
|
const testResult = useVal(store.publications.$.testResult);
|
|
53633
53750
|
const enabled = useVal(store.workspace.$.live)?.status == "runnable";
|
|
53634
53751
|
const revision = useVal(store.workspace.$.revision);
|
|
53635
|
-
const [copiedEndpoint, setCopiedEndpoint] = useState();
|
|
53636
|
-
useEffect(() => setCopiedEndpoint(void 0), [detail?.binding.endpointUrl]);
|
|
53637
53752
|
const [root, setRoot] = useState(null);
|
|
53638
53753
|
const opener = useRef(null);
|
|
53639
53754
|
const portal = useCallback((element) => setRoot(element?.closest(".open-flow-workbench") ?? null), []);
|
|
@@ -53719,18 +53834,7 @@ function LiveTriggers({ store }) {
|
|
|
53719
53834
|
}),
|
|
53720
53835
|
detail.binding.endpointUrl != null && /* @__PURE__ */ jsxs("div", {
|
|
53721
53836
|
className: "trigger-webhook",
|
|
53722
|
-
children: [/* @__PURE__ */ jsx("span", { children: t("publication.webhookUrl") }), /* @__PURE__ */
|
|
53723
|
-
title: detail.binding.endpointUrl,
|
|
53724
|
-
children: detail.binding.endpointUrl
|
|
53725
|
-
}), /* @__PURE__ */ jsx(Button$1, {
|
|
53726
|
-
onClick: async () => {
|
|
53727
|
-
await navigator.clipboard.writeText(detail.binding.endpointUrl);
|
|
53728
|
-
setCopiedEndpoint(detail.binding.endpointUrl);
|
|
53729
|
-
},
|
|
53730
|
-
size: "sm",
|
|
53731
|
-
variant: "outline",
|
|
53732
|
-
children: t(copiedEndpoint == detail.binding.endpointUrl ? "publication.webhookCopied" : "publication.webhookCopy")
|
|
53733
|
-
})] })]
|
|
53837
|
+
children: [/* @__PURE__ */ jsx("span", { children: t("publication.webhookUrl") }), /* @__PURE__ */ jsx(WebhookEndpoint, { endpointUrl: detail.binding.endpointUrl }, detail.binding.endpointUrl)]
|
|
53734
53838
|
}),
|
|
53735
53839
|
/* @__PURE__ */ jsxs("div", {
|
|
53736
53840
|
className: "trigger-binding-detail-sections",
|
|
@@ -57511,6 +57615,17 @@ function RunDrawerContainer({ onOpenRuns, onClose, onConfigureConnector, open, s
|
|
|
57511
57615
|
var NodeInspectorContainer = memo(function NodeInspectorContainer({ store, focus, disabled, revision, selection, theme }) {
|
|
57512
57616
|
const t = useTranslate();
|
|
57513
57617
|
const language = useLang();
|
|
57618
|
+
const bindings = useVal(store.publications.$.bindings);
|
|
57619
|
+
const live = useVal(store.workspace.$.live);
|
|
57620
|
+
const webhookId = selection?.kind == "trigger" && selection.trigger.kind == "webhook" ? selection.id : void 0;
|
|
57621
|
+
const flowId = revision.revision.flowId;
|
|
57622
|
+
useEffect(() => {
|
|
57623
|
+
if (webhookId != null) store.publications.loadBindings(flowId);
|
|
57624
|
+
}, [
|
|
57625
|
+
store,
|
|
57626
|
+
flowId,
|
|
57627
|
+
webhookId
|
|
57628
|
+
]);
|
|
57514
57629
|
const variableNames = useVal(store.$.variableNames);
|
|
57515
57630
|
const variableNamesLoaded = useVal(store.$.variableNamesLoaded);
|
|
57516
57631
|
const variableNamesLoading = useVal(store.$.variableNamesLoading);
|
|
@@ -57559,6 +57674,13 @@ var NodeInspectorContainer = memo(function NodeInspectorContainer({ store, focus
|
|
|
57559
57674
|
store.triggers.catalog.get();
|
|
57560
57675
|
}, [language, store]);
|
|
57561
57676
|
return /* @__PURE__ */ jsx(NodeInspector, {
|
|
57677
|
+
webhookDeployment: webhookId == null ? void 0 : {
|
|
57678
|
+
binding: bindings.bindings.find((binding) => binding.flowId == flowId && binding.triggerNodeId == webhookId && binding.kind == "webhook"),
|
|
57679
|
+
status: bindings.flowId === flowId ? bindings.status : "idle",
|
|
57680
|
+
enabled: live?.status == "runnable",
|
|
57681
|
+
hasUnpublishedChanges: live?.hasUnpublishedChanges ?? false,
|
|
57682
|
+
onRetry: () => void store.publications.loadBindings(flowId)
|
|
57683
|
+
},
|
|
57562
57684
|
variables: {
|
|
57563
57685
|
enabled: store.variablesEnabled,
|
|
57564
57686
|
names: variableNames,
|