@oomol-lab/open-flow 0.1.0-beta.61 → 0.1.0-beta.63
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-BAJXbzNH.js} +20 -7
- package/dist/browser/flow-authoring.js +8 -7
- package/dist/browser/flow-change-schema.d.ts +1 -0
- package/dist/browser/flow-change.d.ts +1 -0
- package/dist/browser/flow-change.js +8 -7
- package/dist/browser/{flowChanges-DSA0FxxN.js → flowChanges-DpZOQuJE.js} +3001 -2588
- package/dist/browser/{flowRunInputEditorStore-Dsxyfwae.js → flowRunInputEditorStore-B2Rw4VsT.js} +1 -1
- package/dist/browser/{flowWorkspace-0sUJ5JhQ.js → flowWorkspace-B7a5NNA_.js} +217 -83
- package/dist/browser/{icons-DVJvrj1H.js → icons-Db2Jb2iX.js} +2907 -2887
- package/dist/browser/preview.css +5 -6
- package/dist/browser/preview.js +889 -541
- package/dist/browser/{typeScriptSession-fXPMFGjW.js → typeScriptSession-D0bjYDeg.js} +1 -1
- package/dist/browser/ui.css +4 -5
- package/dist/browser/ui.js +2 -2
- package/dist/browser/{value-DL_poNiC.js → value-BADHeZ9I.js} +12 -1
- package/dist/browser/workbench-contract.d.ts +10 -0
- package/dist/browser/workbench.css +9 -26
- package/dist/browser/workbench.d.ts +5 -3
- package/dist/browser/workbench.js +272 -178
- package/dist/browser/{workbenchSelect-cr4-mKq3.js → workbenchSelect-C-jf6NIM.js} +1 -1
- package/dist/command/index.js +45 -44
- package/dist/common/authoring.d.ts +1 -1
- package/dist/common/authoringSchema.d.ts +1 -0
- package/dist/common/connector-action.d.ts +1 -0
- package/dist/common/connector-action.js +15 -12
- package/dist/common/control-api-conformance.js +1371 -1207
- package/dist/common/control-api-errors.d.ts +0 -4
- package/dist/common/control-api.d.ts +18 -11
- package/dist/common/control-api.js +2053 -2274
- package/dist/common/control-requests.d.ts +6 -0
- package/dist/common/control-requests.js +64 -33
- package/dist/common/decision.js +8 -7
- package/dist/common/flow-connectionUsage.d.ts +1 -0
- package/dist/common/flow-encoding.d.ts +1 -0
- package/dist/common/flow-encoding.js +202 -10
- package/dist/common/flow-semantics.js +64 -46
- package/dist/common/flow-workflowFile.d.ts +23 -0
- package/dist/common/integration-trigger.js +8 -7
- package/dist/common/liveDetails.d.ts +138 -0
- package/dist/common/localization.d.ts +1 -0
- package/dist/common/localization.js +12 -1
- package/dist/common/mcp.d.ts +55 -26
- package/dist/common/mcp.js +377 -245
- package/dist/common/openapi.js +8 -7
- package/dist/common/poll-trigger.js +8 -7
- package/dist/common/runtime-contract.js +1 -1
- package/dist/common/scheduler.d.ts +22 -2
- package/dist/common/scheduler.js +354 -83
- package/dist/common/trigger-config.d.ts +2 -0
- package/dist/common/webhook-trigger.js +8 -7
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
- package/skills/open-flow/SKILL.md +6 -3
- package/skills/open-flow/references/flow-authoring.md +48 -24
- package/dist/common/publicationResources.d.ts +0 -29
package/dist/browser/{flowRunInputEditorStore-Dsxyfwae.js → flowRunInputEditorStore-B2Rw4VsT.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as __toCommonJS, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "./rolldown-runtime-CEgmsyvS.js";
|
|
2
2
|
import { i as compute, l as val } from "./dist-bO8nvHFH.js";
|
|
3
|
-
import { i as objectValue,
|
|
3
|
+
import { i as objectValue, n as isJsonValue, o as setObjectField, u as resolveUiLanguage } from "./value-BADHeZ9I.js";
|
|
4
4
|
//#region ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js
|
|
5
5
|
var require_code$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -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 { $ as useIconifyData, $t as DropdownMenu, A as datePickerValue, An as uiLocales, At as WorkflowExportMenuItem, Bn as FeishuEventPicker, Bt as NativeScrollArea, C as valueForEditor, Cn as MenuRootContext, Cr as Checkbox, D as calendarChange, Dn as SourceForm, E as typeOfSchema, F as feishuResourceKind, Fn as ko_default$1, Ft as PopoverDescription, G as designerGraph, Gt as InputGroupAddon, H as resourceData, Hn as errorNotice, Ht as VirtualScrollArea, I as supportsFeishuChatFilter, In as ja_default$1, It as PopoverHeader, J as actionSummary, Jn as resolutionOutputPorts, Jt as EmptyContent, K as semanticNodeIcon, Kn as decodeResultList, Kt as InputGroupInput, Ln as fr_default$1, Lt as PopoverPanelContent, Mn as zh_TW_default$1, Mt as followWorkbenchLink, Nn as zh_CN_default$1, Nt as Popover, O as calendarDate, On as SourceSelect, P as indexAddNodeOptions, Pn as ru_default$1, Pt as PopoverContent, Q as useIconifyCollectionLoader, Qn as isJsonObject, Qt as EmptyTitle, R as mapSource, Rn as en_default$1, Rt as PopoverTitle, S as schemaForEditor, Sn as useContextMenuRootContext, Sr as controlErrorCode, T as isUnconstrainedSchema, Tn as Badge, Tr as IconThemeContext, U as resourceValue, Ut as Z$2, V as observeResource, Vn as EventSourceSetup, Vt as ScrollArea, Wt as InputGroup, X as ContentIcon, Xt as EmptyHeader, Y as providerIcon, Yn as sourceOutputLabel, Yt as EmptyDescription, Z as IconifyProvider, Zn as triggerOutputDefinitions, Zt as EmptyMedia, _n as MenuPortal, an as DropdownMenuRadioGroup, ar as triggerConfigValue, b as editorComponent, bn as MenuGroup, cn as DropdownMenuSub, cr as listOperations, ct as diagnosticMessage, dn as DropdownMenuTrigger, dr as openApiTask, en as DropdownMenuCheckboxItem, fn as isElementDisabled, fr as securityOptions, ft as connectionCatalog, gn as MenuPositioner, gr as inputValue, hn as MenuRoot, hr as servers, in as DropdownMenuLabel, j as isDateFormat, jn as waitBranchDescription, jt as IdTooltip, k as datePickerChange, kn as createI18n$1, ln as DropdownMenuSubContent, lr as object, lt as diagnosticNodeId, mn as useCompositeItem, mr as serverAddress, n as agentTool, nn as DropdownMenuGroup, nt as hasRunFilter, on as DropdownMenuRadioItem, or as triggerConfigValues, pn as findRootOwnerId, pr as selectOperation, q as triggerNodeIcon, qt as Empty, rn as DropdownMenuItem, rt as revisionView, sn as DropdownMenuSeparator, tn as DropdownMenuContent, tt as canCancelRun, un as DropdownMenuSubTrigger, ur as openApiFieldIssues, ut as schemaMismatchMessage, vn as MenuPopup, w as getDefaultValue, wn as useMenuRootContext, wr as useAriaLabelledBy, x as editorGroups, xn as ContextMenuRootContext, y as defaultValueEditorSchema, yn as MenuItem, zn as I18n, zt as PopoverTrigger } from "./flowChanges-DpZOQuJE.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 { $ as
|
|
6
|
-
import { a as renameObjectField, i as objectValue,
|
|
7
|
-
import { n as compile, r as validate } from "./flowRunInputEditorStore-
|
|
8
|
-
import { t as WorkbenchSelect } from "./workbenchSelect-
|
|
5
|
+
import { $ as operandHandle, $n as Store, $r as inputChange, $t as InternalBackdrop, A as decisionLimits, Ar as isAndroid, At as SelectValue, Bi as useRefWithInit, C as FieldDescription, Ci as cn$1, Cn as useListNavigation, Cr as isIndexOutOfListBounds, Ct as Select$1, Di as EMPTY_ARRAY$1, Dr as activeElement, Dt as SelectItem, E as FieldLabel, Ei as useRenderElement, Er as isInteractiveElement, Et as SelectGroup, F as limitDecisionQuestions, Fi as formatErrorMessage, Fr as ChevronDown, Ft as ARROW_DOWN, Gr as createChangeEventDetails, Gt as VERTICAL_KEYS, Hi as isElement, Hr as transitionStatusMapping, Ht as HORIZONTAL_KEYS, Ii as mergeProps, It as ARROW_KEYS, Jn as DROPDOWN_COLLISION_AVOIDANCE, Jr as clearPress, Jt as scrollIntoViewIfNeeded, Kn as FloatingPortal, Kr as createGenericEventDetails, Kt as VERTICAL_KEYS_WITH_EXTRA_KEYS, L as matchesSchema, Li as useIsoLayoutEffect, Ln as useDismiss, Lr as createLucideIcon, Lt as ARROW_LEFT, M as decisionQuestionIssues, Mi as useButton, Mt as IndexGuessBehavior, N as decisionTask, Ni as CompositeRootContext, Nr as ownerDocument, Nt as useCompositeListItem, O as decodeRevisionContent, Oi as EMPTY_OBJECT, Or as contains, Ot as SelectSeparator, P as defaultDecisionQuestion, Pr as useLabelableId, Pt as ALL_KEYS, Q as nodeInputMappings, Qt as getDisabledMountTransitionStyles, R as schemaObject, Rn as useClick, Rr as useTransitionStatus, Rt as ARROW_RIGHT, S as Field, Si as buttonVariants, Sr as getMinListIndex, T as FieldGroup, Ti as clsx, Tr as stopEvent$1, Tt as SelectContent, Ut as HORIZONTAL_KEYS_WITH_EXTRA_KEYS, Vr as TransitionStatusDataAttributes, W as nodeNameIssue, Wr as useValueChanged, Wt as MODIFIER_KEYS, Xr as escapeKey, Xt as useAnchoredPopupScrollLock, Y as comparisonIssue, Yr as closePress, Zn as addEventListener, Zt as usePositioner, _ as TooltipPositioner, _i as fieldValidityMapping, _n as findItemIndex, _r as findNonDisabledListIndex, a as DialogDescription, an as getPseudoElementBounds, ar as createSelector, at as dequal, b as TooltipRoot, bi as useControlled, br as getGridNavigatedIndex, bt as string, c as DialogTitle, cn as triggerOpenStateMapping, cr as Label, d as TooltipContent, di as useFormContext, dn as hasNullItemLabel, dr as useTimeout, ei as inputClear, en as useAnchorPositioning, er as useStore$1, et as operatorsForType, f as TooltipProvider, fi as useRegisterFieldControl, fn as isGroupedItems, g as TooltipPopup, gi as DEFAULT_FIELD_STATE_ATTRIBUTES, gn as defaultItemEquality, gr as createGridCellMap, h as TooltipArrow, hi as useId$1, hn as compareItemEquality, i as DialogContent, ii as none$1, in as inertValue, ir as require_builtin_esm_external_require_react, ji as useMergedRefs, jr as isFirefox, ki as NOOP, kn as useFloatingRootContext, kr as getTarget, kt as SelectTrigger, l as DialogTrigger, li as triggerPress, ln as resolveAriaLabelledBy, lr as Input$1, m as createTooltipHandle, mi as useBaseUiId, mn as stringifyAsValue, n as Dialog, ni as itemPress, nn as useDirection, nt as unaryOperator, on as popupStateMapping, or as useValueAsRef, ot as webhookMethods, p as TooltipTrigger, pi as useFieldRootContext, pn as stringifyAsLabel, qr as cancelOpen, qt as isNativeInput, ri as listNavigation, rn as CompositeList, rr as require_with_selector, rt as valueType, sn as pressableTriggerOpenStateMapping, sr as useOnFirstRender, st as webhookSupportsBody, t as Icon, ti as inputPress, u as Tooltip, ui as useLabelableContext, un as useOpenInteractionType, v as TooltipPortal, vi as visuallyHidden, vn as removeItem, vr as getGridCellIndexOfCorner, w as FieldError, wi as cva, wn as useInteractions, wr as isListIndexDisabled, wt as SelectChevron, x as Spinner, xi as Button$1, xn as useTypeahead, xr as getMaxListIndex, y as TooltipTrigger$1, yi as visuallyHiddenInput, yn as selectedValueIncludes, yr as getGridCellIndices, z as variableInputCompatible, zi as useStableCallback, zn as FloatingFocusManager, zr as useOpenChangeComplete, zt as ARROW_UP } from "./icons-Db2Jb2iX.js";
|
|
6
|
+
import { a as renameObjectField, i as objectValue, n as isJsonValue, o as setObjectField, r as jsonDataTypes, s as valueType$1, t as initialValue, u as resolveUiLanguage } from "./value-BADHeZ9I.js";
|
|
7
|
+
import { n as compile, r as validate } from "./flowRunInputEditorStore-B2Rw4VsT.js";
|
|
8
|
+
import { t as WorkbenchSelect } from "./workbenchSelect-C-jf6NIM.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";
|
|
@@ -22060,7 +22060,7 @@ function CodeEditor({ ariaDescribedBy, ariaLabel, diagnostics, disabled, errorLa
|
|
|
22060
22060
|
darkMode.current = darkMode$;
|
|
22061
22061
|
setFailed(false);
|
|
22062
22062
|
setLoading(true);
|
|
22063
|
-
const extension = import("./typeScriptSession-
|
|
22063
|
+
const extension = import("./typeScriptSession-D0bjYDeg.js").then(({ loadTypeScriptExtension }) => loadTypeScriptExtension(uri, typingRef.current, () => prepareCompletionRef.current?.())).catch(() => void 0);
|
|
22064
22064
|
claimEditor(uri).then((nextRelease) => {
|
|
22065
22065
|
release = nextRelease;
|
|
22066
22066
|
if (disposed) {
|
|
@@ -22147,7 +22147,7 @@ function CodeEditor({ ariaDescribedBy, ariaLabel, diagnostics, disabled, errorLa
|
|
|
22147
22147
|
editor.current?.updateOptions({ ariaDescribedBy });
|
|
22148
22148
|
}, [ariaDescribedBy]);
|
|
22149
22149
|
useEffect(() => {
|
|
22150
|
-
import("./typeScriptSession-
|
|
22150
|
+
import("./typeScriptSession-D0bjYDeg.js").then(({ updateTypeScriptTyping }) => updateTypeScriptTyping(uri, typing)).catch(noop$1);
|
|
22151
22151
|
}, [typing, uri]);
|
|
22152
22152
|
useEffect(() => {
|
|
22153
22153
|
if (location != null) editor.current?.revealPosition?.(location.line, location.column);
|
|
@@ -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",
|
|
@@ -57293,7 +57397,7 @@ var blockedReasonKey = {
|
|
|
57293
57397
|
busy: "workspace.publishActionInProgress",
|
|
57294
57398
|
publishing: "workspace.publishInProgress"
|
|
57295
57399
|
};
|
|
57296
|
-
function WorkspacePublishIsland({ hasPublications, onOpenPublications, onOpenRuns, onPublish, state }) {
|
|
57400
|
+
function WorkspacePublishIsland({ hasPublications, onOpenPublications, onExport, onOpenRuns, onPublish, state }) {
|
|
57297
57401
|
const t = useTranslate();
|
|
57298
57402
|
const [popupContainer, setPopupContainer] = useState(null);
|
|
57299
57403
|
const [confirming, setConfirming] = useState(false);
|
|
@@ -57393,28 +57497,36 @@ function WorkspacePublishIsland({ hasPublications, onOpenPublications, onOpenRun
|
|
|
57393
57497
|
container: popupContainer,
|
|
57394
57498
|
side: "bottom",
|
|
57395
57499
|
sideOffset: 8,
|
|
57396
|
-
children: [
|
|
57397
|
-
|
|
57398
|
-
|
|
57399
|
-
|
|
57400
|
-
|
|
57401
|
-
|
|
57402
|
-
|
|
57403
|
-
|
|
57404
|
-
|
|
57405
|
-
|
|
57406
|
-
|
|
57407
|
-
|
|
57500
|
+
children: [
|
|
57501
|
+
onExport != null && /* @__PURE__ */ jsx(WorkflowExportMenuItem, {
|
|
57502
|
+
className: "gap-2 px-2 py-[5px]",
|
|
57503
|
+
disabled: state == "busy" || state == "publishing",
|
|
57504
|
+
onClick: onExport
|
|
57505
|
+
}),
|
|
57506
|
+
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
57507
|
+
className: "gap-2 px-2 py-[5px]",
|
|
57508
|
+
disabled: hasPublications !== true,
|
|
57509
|
+
onClick: onOpenPublications,
|
|
57510
|
+
children: [/* @__PURE__ */ jsx("i", {
|
|
57511
|
+
"aria-hidden": "true",
|
|
57512
|
+
className: "i-lucide-light:cloud-upload size-4 shrink-0 text-foreground/70"
|
|
57513
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
57514
|
+
className: "grid gap-0.5",
|
|
57515
|
+
children: [/* @__PURE__ */ jsx("span", { children: historyLabel }), historyHint != null && /* @__PURE__ */ jsx("span", {
|
|
57516
|
+
className: "text-[11px] text-muted-foreground",
|
|
57517
|
+
children: historyHint
|
|
57518
|
+
})]
|
|
57408
57519
|
})]
|
|
57409
|
-
})
|
|
57410
|
-
|
|
57411
|
-
|
|
57412
|
-
|
|
57413
|
-
|
|
57414
|
-
|
|
57415
|
-
|
|
57416
|
-
|
|
57417
|
-
|
|
57520
|
+
}),
|
|
57521
|
+
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
57522
|
+
className: "gap-2 px-2 py-[5px]",
|
|
57523
|
+
onClick: onOpenRuns,
|
|
57524
|
+
children: [/* @__PURE__ */ jsx("i", {
|
|
57525
|
+
"aria-hidden": "true",
|
|
57526
|
+
className: "i-lucide-light:history size-4 shrink-0 text-foreground/70"
|
|
57527
|
+
}), runsLabel]
|
|
57528
|
+
})
|
|
57529
|
+
]
|
|
57418
57530
|
})] })]
|
|
57419
57531
|
});
|
|
57420
57532
|
}
|
|
@@ -57511,6 +57623,17 @@ function RunDrawerContainer({ onOpenRuns, onClose, onConfigureConnector, open, s
|
|
|
57511
57623
|
var NodeInspectorContainer = memo(function NodeInspectorContainer({ store, focus, disabled, revision, selection, theme }) {
|
|
57512
57624
|
const t = useTranslate();
|
|
57513
57625
|
const language = useLang();
|
|
57626
|
+
const bindings = useVal(store.publications.$.bindings);
|
|
57627
|
+
const live = useVal(store.workspace.$.live);
|
|
57628
|
+
const webhookId = selection?.kind == "trigger" && selection.trigger.kind == "webhook" ? selection.id : void 0;
|
|
57629
|
+
const flowId = revision.revision.flowId;
|
|
57630
|
+
useEffect(() => {
|
|
57631
|
+
if (webhookId != null) store.publications.loadBindings(flowId);
|
|
57632
|
+
}, [
|
|
57633
|
+
store,
|
|
57634
|
+
flowId,
|
|
57635
|
+
webhookId
|
|
57636
|
+
]);
|
|
57514
57637
|
const variableNames = useVal(store.$.variableNames);
|
|
57515
57638
|
const variableNamesLoaded = useVal(store.$.variableNamesLoaded);
|
|
57516
57639
|
const variableNamesLoading = useVal(store.$.variableNamesLoading);
|
|
@@ -57559,6 +57682,13 @@ var NodeInspectorContainer = memo(function NodeInspectorContainer({ store, focus
|
|
|
57559
57682
|
store.triggers.catalog.get();
|
|
57560
57683
|
}, [language, store]);
|
|
57561
57684
|
return /* @__PURE__ */ jsx(NodeInspector, {
|
|
57685
|
+
webhookDeployment: webhookId == null ? void 0 : {
|
|
57686
|
+
binding: bindings.bindings.find((binding) => binding.flowId == flowId && binding.triggerNodeId == webhookId && binding.kind == "webhook"),
|
|
57687
|
+
status: bindings.flowId === flowId ? bindings.status : "idle",
|
|
57688
|
+
enabled: live?.status == "runnable",
|
|
57689
|
+
hasUnpublishedChanges: live?.hasUnpublishedChanges ?? false,
|
|
57690
|
+
onRetry: () => void store.publications.loadBindings(flowId)
|
|
57691
|
+
},
|
|
57562
57692
|
variables: {
|
|
57563
57693
|
enabled: store.variablesEnabled,
|
|
57564
57694
|
names: variableNames,
|
|
@@ -57767,6 +57897,10 @@ function FlowEditor({ navigationIsland, onRun, onRunStarted, onCloseRuns, onConf
|
|
|
57767
57897
|
},
|
|
57768
57898
|
open: diagnosticsOpen
|
|
57769
57899
|
}), /* @__PURE__ */ jsx(WorkspacePublishIsland, {
|
|
57900
|
+
onExport: () => {
|
|
57901
|
+
const id = store.workspace.$.flowId.value;
|
|
57902
|
+
if (id != null) store.workspace.exportFlow(id);
|
|
57903
|
+
},
|
|
57770
57904
|
hasPublications: live == null ? void 0 : live.publication != null,
|
|
57771
57905
|
onOpenPublications,
|
|
57772
57906
|
onOpenRuns,
|