@loopstack/loopstack-studio 0.21.1 → 0.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/select.js +2 -2
- package/dist/events/sse-client-events.js +7 -0
- package/dist/features/debug/components/pipeline-flow/WorkflowGraph.js +5 -5
- package/dist/features/health/LocalHealthCheck.js +80 -67
- package/dist/features/workbench/NavigationItems.js +1 -1
- package/dist/features/workbench/WorkflowItem.js +2 -2
- package/dist/features/workbench/WorkflowList.js +12 -12
- package/dist/features/workbench/components/WorkflowHistoryItem.js +11 -11
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +1 -1
- package/dist/features/workspaces/Workspaces.js +90 -90
- package/dist/hooks/useAuth.js +25 -4
- package/dist/hooks/useDocuments.js +1 -1
- package/dist/hooks/useNamespaces.js +1 -1
- package/dist/hooks/useWorkflows.js +1 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +3 -1
- package/dist/node_modules/lodash/_Symbol.js +7 -0
- package/dist/node_modules/lodash/_baseGetTag.js +13 -0
- package/dist/node_modules/lodash/_baseTrim.js +11 -0
- package/dist/node_modules/lodash/_freeGlobal.js +6 -0
- package/dist/node_modules/lodash/_getRawTag.js +17 -0
- package/dist/node_modules/lodash/_objectToString.js +10 -0
- package/dist/node_modules/lodash/_root.js +8 -0
- package/dist/node_modules/lodash/_trimmedEndIndex.js +11 -0
- package/dist/node_modules/lodash/debounce.js +53 -0
- package/dist/node_modules/lodash/isObject.js +10 -0
- package/dist/node_modules/lodash/isObjectLike.js +9 -0
- package/dist/node_modules/lodash/isSymbol.js +12 -0
- package/dist/node_modules/lodash/now.js +10 -0
- package/dist/node_modules/lodash/toNumber.js +22 -0
- package/dist/pages/EmbedWorkbenchPage.js +1 -1
- package/dist/pages/PipelineDebugPage.js +1 -1
- package/dist/providers/InvalidationEventsProvider.js +43 -0
- package/dist/providers/SseProvider.js +44 -0
- package/package.json +2 -2
|
@@ -36,7 +36,7 @@ function SelectTrigger(s) {
|
|
|
36
36
|
let u = c(13), d, f, p, m;
|
|
37
37
|
u[0] === s ? (d = u[1], f = u[2], p = u[3], m = u[4]) : ({className: f, size: m, children: d, ...p} = s, u[0] = s, u[1] = d, u[2] = f, u[3] = p, u[4] = m);
|
|
38
38
|
let h = m === void 0 ? "default" : m, g;
|
|
39
|
-
u[5] === f ? g = u[6] : (g = cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", f), u[5] = f, u[6] = g);
|
|
39
|
+
u[5] === f ? g = u[6] : (g = cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit cursor-pointer items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", f), u[5] = f, u[6] = g);
|
|
40
40
|
let _;
|
|
41
41
|
u[7] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ jsx(SelectPrimitive.Icon, {
|
|
42
42
|
asChild: !0,
|
|
@@ -97,7 +97,7 @@ function SelectItem(l) {
|
|
|
97
97
|
let u = c(13), d, f, p;
|
|
98
98
|
u[0] === l ? (d = u[1], f = u[2], p = u[3]) : ({className: f, children: d, ...p} = l, u[0] = l, u[1] = d, u[2] = f, u[3] = p);
|
|
99
99
|
let m;
|
|
100
|
-
u[4] === f ? m = u[5] : (m = cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-
|
|
100
|
+
u[4] === f ? m = u[5] : (m = cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", f), u[4] = f, u[5] = m);
|
|
101
101
|
let h;
|
|
102
102
|
u[6] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ jsx("span", {
|
|
103
103
|
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { buildWorkflowGraph, getTransitions } from "../../lib/flow-utils.js";
|
|
2
1
|
import { useWorkflow } from "../../../../hooks/useWorkflows.js";
|
|
2
|
+
import { buildWorkflowGraph, getTransitions } from "../../lib/flow-utils.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import React, { useEffect, useRef } from "react";
|
|
5
5
|
function countTransitions(e) {
|
|
@@ -16,17 +16,17 @@ var WorkflowGraph_default = (s) => {
|
|
|
16
16
|
], l[0] = h.isLoading, l[1] = m, l[2] = d.id, l[3] = v, l[4] = y) : (v = l[3], y = l[4]), useEffect(v, y);
|
|
17
17
|
let b;
|
|
18
18
|
l[5] !== p || l[6] !== u || l[7] !== f || l[8] !== d.id || l[9] !== g ? (b = () => {
|
|
19
|
-
let
|
|
19
|
+
let e = f ? getTransitions(f) : [], o = JSON.stringify({
|
|
20
20
|
p: countTransitions(u),
|
|
21
21
|
w: countTransitions(g),
|
|
22
|
-
c:
|
|
22
|
+
c: e.length,
|
|
23
23
|
history: g?.history?.length,
|
|
24
24
|
place: g?.place
|
|
25
25
|
});
|
|
26
26
|
if (o !== _.current) {
|
|
27
27
|
_.current = o;
|
|
28
|
-
let { nodes:
|
|
29
|
-
p(d.id,
|
|
28
|
+
let { nodes: a, edges: s } = buildWorkflowGraph(u, g, d.id, e, "LR");
|
|
29
|
+
p(d.id, a, s);
|
|
30
30
|
}
|
|
31
31
|
}, l[5] = p, l[6] = u, l[7] = f, l[8] = d.id, l[9] = g, l[10] = b) : b = l[10];
|
|
32
32
|
let x;
|
|
@@ -2,12 +2,11 @@ import { ApiClientEvents } from "../../events/api-client-events.js";
|
|
|
2
2
|
import { eventBus } from "../../services/eventEmitter.js";
|
|
3
3
|
import "../../services/index.js";
|
|
4
4
|
import { useStudio } from "../../providers/StudioProvider.js";
|
|
5
|
-
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "../../components/ui/sheet.js";
|
|
6
5
|
import { useGetHealthInfo, useWorkerAuth, useWorkerAuthTokenRefresh } from "../../hooks/useAuth.js";
|
|
7
6
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
8
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { useQueryClient } from "@tanstack/react-query";
|
|
10
|
-
import { RefreshCw } from "lucide-react";
|
|
9
|
+
import { RefreshCw, X } from "lucide-react";
|
|
11
10
|
const Escalation = {
|
|
12
11
|
None: 0,
|
|
13
12
|
Refresh: 1,
|
|
@@ -16,80 +15,94 @@ const Escalation = {
|
|
|
16
15
|
Connection: 4
|
|
17
16
|
};
|
|
18
17
|
var LocalHealthCheck_default = () => {
|
|
19
|
-
let { environment:
|
|
20
|
-
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
}, []),
|
|
28
|
-
|
|
29
|
-
}, []),
|
|
18
|
+
let { environment: g } = useStudio(), [_, v] = useState(Escalation.None), y = useWorkerAuth(), b = useWorkerAuthTokenRefresh(), x = useGetHealthInfo(!1), S = useQueryClient(), C = useRef(b);
|
|
19
|
+
C.current = b;
|
|
20
|
+
let w = useRef(y);
|
|
21
|
+
w.current = y;
|
|
22
|
+
let T = useRef(x);
|
|
23
|
+
T.current = x;
|
|
24
|
+
let E = useCallback(() => {
|
|
25
|
+
T.current.refetch();
|
|
26
|
+
}, []), D = useCallback(() => {
|
|
27
|
+
C.current.mutate();
|
|
28
|
+
}, []), O = useCallback(async () => {
|
|
30
29
|
try {
|
|
31
|
-
let
|
|
32
|
-
|
|
30
|
+
let e = "local";
|
|
31
|
+
g.getIdToken && (e = await g.getIdToken()), w.current.mutate({ hubLoginRequestDto: { idToken: e } });
|
|
33
32
|
} catch {
|
|
34
|
-
|
|
33
|
+
v(Escalation.Debug);
|
|
35
34
|
}
|
|
36
|
-
}, [
|
|
37
|
-
|
|
38
|
-
if (
|
|
39
|
-
let
|
|
40
|
-
return () => clearInterval(
|
|
41
|
-
}, [
|
|
42
|
-
|
|
43
|
-
}, [
|
|
44
|
-
|
|
45
|
-
}, [
|
|
46
|
-
|
|
47
|
-
}, [
|
|
48
|
-
|
|
49
|
-
}, [
|
|
50
|
-
|
|
51
|
-
}, [
|
|
52
|
-
|
|
35
|
+
}, [g]);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (_ !== Escalation.Connection) return;
|
|
38
|
+
let e = setInterval(E, 5e3);
|
|
39
|
+
return () => clearInterval(e);
|
|
40
|
+
}, [_, E]), useEffect(() => {
|
|
41
|
+
x.data && (v(Escalation.None), S.invalidateQueries());
|
|
42
|
+
}, [x.data, S]), useEffect(() => {
|
|
43
|
+
b.error && v(Escalation.Login);
|
|
44
|
+
}, [b.error]), useEffect(() => {
|
|
45
|
+
b.data?.status === 200 && v(Escalation.None);
|
|
46
|
+
}, [b.data]), useEffect(() => {
|
|
47
|
+
y.error && v(Escalation.Debug);
|
|
48
|
+
}, [y.error]), useEffect(() => {
|
|
49
|
+
y.data?.status === 200 && v(Escalation.None);
|
|
50
|
+
}, [y.data]), useEffect(() => {
|
|
51
|
+
_ === Escalation.Refresh ? D() : _ === Escalation.Login && O();
|
|
53
52
|
}, [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
_,
|
|
54
|
+
D,
|
|
55
|
+
O
|
|
57
56
|
]), useEffect(() => {
|
|
58
|
-
let
|
|
59
|
-
|
|
60
|
-
}),
|
|
61
|
-
|
|
57
|
+
let m = eventBus.on(ApiClientEvents.UNAUTHORIZED, () => {
|
|
58
|
+
v(Escalation.Refresh);
|
|
59
|
+
}), h = eventBus.on(ApiClientEvents.ERR_NETWORK, () => {
|
|
60
|
+
v(Escalation.Connection);
|
|
62
61
|
});
|
|
63
62
|
return () => {
|
|
64
|
-
|
|
63
|
+
m(), h();
|
|
65
64
|
};
|
|
66
|
-
}, [])
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
65
|
+
}, []);
|
|
66
|
+
let [k, A] = useState(!1), j = _ >= Escalation.Debug && !k;
|
|
67
|
+
return useEffect(() => {
|
|
68
|
+
_ < Escalation.Debug && A(!1);
|
|
69
|
+
}, [_]), j ? /* @__PURE__ */ jsx("div", {
|
|
70
|
+
className: "bg-destructive/10 border-destructive/30 fixed inset-x-0 bottom-0 z-50 border-t px-4 py-3",
|
|
71
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
72
|
+
className: "flex items-center justify-between",
|
|
73
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
74
|
+
className: "flex items-center gap-3",
|
|
75
|
+
children: [/* @__PURE__ */ jsx("div", { className: "bg-destructive h-2 w-2 rounded-full" }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
|
|
76
|
+
className: "text-foreground text-sm font-semibold",
|
|
77
|
+
children: "Connection issues detected"
|
|
78
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
79
|
+
className: "text-muted-foreground text-xs",
|
|
80
|
+
children: [
|
|
81
|
+
"Please make sure the environment",
|
|
82
|
+
" ",
|
|
83
|
+
/* @__PURE__ */ jsxs("strong", { children: [
|
|
84
|
+
g.name,
|
|
85
|
+
" (",
|
|
86
|
+
g.id,
|
|
87
|
+
")"
|
|
88
|
+
] }),
|
|
89
|
+
" ",
|
|
90
|
+
"is properly configured and running."
|
|
91
|
+
]
|
|
92
|
+
})] })]
|
|
93
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
94
|
+
className: "flex items-center gap-2",
|
|
95
|
+
children: [_ === Escalation.Connection && /* @__PURE__ */ jsxs("button", {
|
|
96
|
+
onClick: E,
|
|
97
|
+
className: "bg-primary flex items-center gap-2 rounded-md px-3 py-1.5 text-sm text-white transition-colors disabled:cursor-not-allowed disabled:opacity-50",
|
|
98
|
+
children: [/* @__PURE__ */ jsx(RefreshCw, { className: `h-3 w-3 ${x.isLoading ? "animate-spin" : ""}` }), "Retry"]
|
|
99
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
100
|
+
onClick: () => A(!0),
|
|
101
|
+
className: "text-muted-foreground hover:text-foreground rounded-xs p-1 transition-colors",
|
|
102
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
90
103
|
})]
|
|
91
|
-
})
|
|
104
|
+
})]
|
|
92
105
|
})
|
|
93
|
-
});
|
|
106
|
+
}) : null;
|
|
94
107
|
};
|
|
95
108
|
export { LocalHealthCheck_default as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useStudio } from "../../providers/StudioProvider.js";
|
|
2
|
+
import { useFetchWorkflowsByNamespace } from "../../hooks/useWorkflows.js";
|
|
2
3
|
import { Skeleton } from "../../components/ui/skeleton.js";
|
|
3
4
|
import { SidebarMenuSubItem } from "../../components/ui/sidebar.js";
|
|
4
|
-
import { useFetchWorkflowsByNamespace } from "../../hooks/useWorkflows.js";
|
|
5
5
|
import { WorkbenchContextProvider } from "./providers/WorkbenchContextProvider.js";
|
|
6
6
|
import NavigationItem_default from "./components/NavigationItem.js";
|
|
7
7
|
import { useScroll } from "./providers/ScrollProvider.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { useFilterDocuments } from "../../hooks/useDocuments.js";
|
|
2
|
+
import { useWorkflow } from "../../hooks/useWorkflows.js";
|
|
1
3
|
import { cn } from "../../lib/utils.js";
|
|
2
4
|
import ErrorSnackbar_default from "../../components/snackbars/ErrorSnackbar.js";
|
|
3
5
|
import LoadingCentered_default from "../../components/LoadingCentered.js";
|
|
4
6
|
import { useRunPipeline } from "../../hooks/useProcessor.js";
|
|
5
7
|
import DocumentList_default from "./components/DocumentList.js";
|
|
6
8
|
import WorkflowForms_default from "./components/WorkflowForms.js";
|
|
7
|
-
import { useFilterDocuments } from "../../hooks/useDocuments.js";
|
|
8
|
-
import { useWorkflow } from "../../hooks/useWorkflows.js";
|
|
9
9
|
import ErrorAlert_default from "../../components/content/ErrorAlert.js";
|
|
10
10
|
import WorkflowButtons_default from "./components/buttons/WorkflowButtons.js";
|
|
11
11
|
import React, { useCallback, useEffect, useMemo } from "react";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { useFetchWorkflowsByPipeline } from "../../hooks/useWorkflows.js";
|
|
1
2
|
import { cn } from "../../lib/utils.js";
|
|
2
3
|
import { Button } from "../../components/ui/button.js";
|
|
3
4
|
import ErrorSnackbar_default from "../../components/snackbars/ErrorSnackbar.js";
|
|
4
5
|
import LoadingCentered_default from "../../components/LoadingCentered.js";
|
|
5
|
-
import { useFetchWorkflowsByPipeline } from "../../hooks/useWorkflows.js";
|
|
6
6
|
import WorkflowItem_default from "./WorkflowItem.js";
|
|
7
7
|
import { useScrollToBottom } from "./hooks/useAutoScrollBottom.js";
|
|
8
8
|
import { useIntersectionObserver } from "./hooks/useIntersectionObserver.js";
|
|
@@ -23,15 +23,15 @@ var WorkflowList_default = (S) => {
|
|
|
23
23
|
}, C[1] = j) : j = C[1];
|
|
24
24
|
let [M, N] = useState(j), { activeId: P, observe: F } = useIntersectionObserver("0px 0px 0px 0px"), { listRef: I, scrollTo: L } = useScrollToListItem(), { canScrollDown: R, scrollToBottom: z } = useScrollToBottom(), B = useContext(WorkbenchContextProvider), V, H;
|
|
25
25
|
C[2] !== P || C[3] !== B ? (V = () => {
|
|
26
|
-
B && B.setActiveSectionId && B.state.activeSectionId !== P && (B.setActiveSectionId(P), P && A((
|
|
27
|
-
...
|
|
26
|
+
B && B.setActiveSectionId && B.state.activeSectionId !== P && (B.setActiveSectionId(P), P && A((t) => ({
|
|
27
|
+
...t,
|
|
28
28
|
[P]: !0
|
|
29
29
|
})));
|
|
30
30
|
}, H = [P, B], C[2] = P, C[3] = B, C[4] = V, C[5] = H) : (V = C[4], H = C[5]), useEffect(V, H);
|
|
31
31
|
let U, W;
|
|
32
32
|
C[6] !== P || C[7] !== T.data ? (U = () => {
|
|
33
33
|
if (T.data && T.data.length > 0) {
|
|
34
|
-
let
|
|
34
|
+
let t = T.data.length - 1, y = T.data[t], b = `section-${y.index}-${y.id}`;
|
|
35
35
|
A({
|
|
36
36
|
[b]: !0,
|
|
37
37
|
...P && P !== b ? { [P]: !0 } : {}
|
|
@@ -39,10 +39,10 @@ var WorkflowList_default = (S) => {
|
|
|
39
39
|
}
|
|
40
40
|
}, W = [T.data, P], C[6] = P, C[7] = T.data, C[8] = U, C[9] = W) : (U = C[8], W = C[9]), useEffect(U, W);
|
|
41
41
|
let G;
|
|
42
|
-
C[10] === Symbol.for("react.memo_cache_sentinel") ? (G = (
|
|
42
|
+
C[10] === Symbol.for("react.memo_cache_sentinel") ? (G = (t) => {
|
|
43
43
|
A((y) => ({
|
|
44
44
|
...y,
|
|
45
|
-
[
|
|
45
|
+
[t]: !y[t]
|
|
46
46
|
}));
|
|
47
47
|
}, C[10] = G) : G = C[10];
|
|
48
48
|
let K = G, q;
|
|
@@ -61,10 +61,10 @@ var WorkflowList_default = (S) => {
|
|
|
61
61
|
C[18] !== P || C[19] !== k || C[20] !== T.data || C[21] !== I || C[22] !== F || C[23] !== E || C[24] !== w || C[25] !== L || C[26] !== M ? (X = T.data ? /* @__PURE__ */ jsx("div", {
|
|
62
62
|
className: "mb-10",
|
|
63
63
|
ref: I,
|
|
64
|
-
children: /* @__PURE__ */ jsx("div", { children: T.data.map((
|
|
65
|
-
let b = `section-${
|
|
64
|
+
children: /* @__PURE__ */ jsx("div", { children: T.data.map((t) => {
|
|
65
|
+
let b = `section-${t.index}-${t.id}`, x = P === b;
|
|
66
66
|
return /* @__PURE__ */ jsxs("div", {
|
|
67
|
-
ref: (
|
|
67
|
+
ref: (t) => F(t),
|
|
68
68
|
"data-id": b,
|
|
69
69
|
className: "space-y-0",
|
|
70
70
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -77,7 +77,7 @@ var WorkflowList_default = (S) => {
|
|
|
77
77
|
/* @__PURE__ */ jsx(LayersIcon, { className: cn("size-4", x ? "text-primary" : "text-muted-foreground") }),
|
|
78
78
|
/* @__PURE__ */ jsx("span", {
|
|
79
79
|
className: cn("text-base font-medium transition-colors flex-1", x ? "text-primary" : "text-muted-foreground text-gray-400"),
|
|
80
|
-
children:
|
|
80
|
+
children: t.title ?? t.blockName
|
|
81
81
|
}),
|
|
82
82
|
x && /* @__PURE__ */ jsx(WorkbenchSettingsModal_default, {
|
|
83
83
|
settings: M,
|
|
@@ -91,12 +91,12 @@ var WorkflowList_default = (S) => {
|
|
|
91
91
|
className: "max-w-4xl pl-9",
|
|
92
92
|
children: /* @__PURE__ */ jsx(WorkflowItem_default, {
|
|
93
93
|
pipeline: w,
|
|
94
|
-
workflowId:
|
|
94
|
+
workflowId: t.id,
|
|
95
95
|
scrollTo: L,
|
|
96
96
|
settings: M
|
|
97
97
|
})
|
|
98
98
|
})]
|
|
99
|
-
},
|
|
99
|
+
}, t.id);
|
|
100
100
|
}) })
|
|
101
101
|
}) : null, C[18] = P, C[19] = k, C[20] = T.data, C[21] = I, C[22] = F, C[23] = E, C[24] = w, C[25] = L, C[26] = M, C[27] = X) : X = C[27];
|
|
102
102
|
let Z;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { useWorkflow } from "../../../hooks/useWorkflows.js";
|
|
1
2
|
import { cn } from "../../../lib/utils.js";
|
|
2
3
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../components/ui/collapsible.js";
|
|
3
4
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../components/ui/tooltip.js";
|
|
4
5
|
import { SidebarMenuButton, SidebarMenuItem, SidebarMenuSub } from "../../../components/ui/sidebar.js";
|
|
5
|
-
import { useWorkflow } from "../../../hooks/useWorkflows.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
7
|
import React from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -11,14 +11,14 @@ import { format } from "date-fns";
|
|
|
11
11
|
var WorkflowHistoryItem_default = (x) => {
|
|
12
12
|
let S = c(19), { workflowId: C, workflow: w } = x, T = useWorkflow(C), E = T.data?.history;
|
|
13
13
|
if (T.isLoading) {
|
|
14
|
-
let
|
|
15
|
-
return S[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
14
|
+
let e;
|
|
15
|
+
return S[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsxs(SidebarMenuButton, {
|
|
16
16
|
className: "opacity-50",
|
|
17
17
|
children: [/* @__PURE__ */ jsx(Loader2, { className: "h-3 w-3 animate-spin" }), /* @__PURE__ */ jsx("span", {
|
|
18
18
|
className: "text-sm",
|
|
19
19
|
children: "Loading..."
|
|
20
20
|
})]
|
|
21
|
-
}) }), S[0] =
|
|
21
|
+
}) }), S[0] = e) : e = S[0], e;
|
|
22
22
|
}
|
|
23
23
|
if (!E?.length) return null;
|
|
24
24
|
let D;
|
|
@@ -62,10 +62,10 @@ var WorkflowHistoryItem_default = (x) => {
|
|
|
62
62
|
}), S[9] = P) : P = S[9];
|
|
63
63
|
let F;
|
|
64
64
|
if (S[10] !== E) {
|
|
65
|
-
let
|
|
66
|
-
S[12] === E.length ?
|
|
67
|
-
console.log(
|
|
68
|
-
let g =
|
|
65
|
+
let e;
|
|
66
|
+
S[12] === E.length ? e = S[13] : (e = (e, h) => {
|
|
67
|
+
console.log(e);
|
|
68
|
+
let g = e.data?.transition, _ = Object.keys(e.data?.tools ?? {}), v = h === E.length - 1, y = e.data?.place ?? g?.to ?? "unknown", b = g?.id;
|
|
69
69
|
return /* @__PURE__ */ jsxs("div", {
|
|
70
70
|
className: "group/entry relative flex gap-3 py-1 pl-0",
|
|
71
71
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -114,13 +114,13 @@ var WorkflowHistoryItem_default = (x) => {
|
|
|
114
114
|
className: "flex items-center gap-0.5",
|
|
115
115
|
children: [/* @__PURE__ */ jsx(Clock, { className: "h-3 w-3" }), /* @__PURE__ */ jsx("span", {
|
|
116
116
|
className: "tabular-nums",
|
|
117
|
-
children: format(new Date(
|
|
117
|
+
children: format(new Date(e.timestamp), "HH:mm:ss")
|
|
118
118
|
})]
|
|
119
119
|
})]
|
|
120
120
|
})]
|
|
121
121
|
})]
|
|
122
|
-
},
|
|
123
|
-
}, S[12] = E.length, S[13] =
|
|
122
|
+
}, e.version);
|
|
123
|
+
}, S[12] = E.length, S[13] = e), F = E.map(e), S[10] = E, S[11] = F;
|
|
124
124
|
} else F = S[11];
|
|
125
125
|
let I;
|
|
126
126
|
S[14] === F ? I = S[15] : (I = /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx(SidebarMenuSub, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useStudio } from "../../../../providers/StudioProvider.js";
|
|
2
|
+
import { useDeleteWorkflow } from "../../../../hooks/useWorkflows.js";
|
|
2
3
|
import { Button } from "../../../../components/ui/button.js";
|
|
3
4
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "../../../../components/ui/alert-dialog.js";
|
|
4
5
|
import { useRunPipeline } from "../../../../hooks/useProcessor.js";
|
|
5
|
-
import { useDeleteWorkflow } from "../../../../hooks/useWorkflows.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
7
|
import React from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -14,52 +14,52 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
import { useSearchParams } from "react-router-dom";
|
|
15
15
|
import { Star } from "lucide-react";
|
|
16
16
|
var Workspaces_default = () => {
|
|
17
|
-
let n = c(65), { CreateWorkspace: Oe } = useComponentOverrides(), r = Oe ?? CreateWorkspace_default, { router:
|
|
17
|
+
let n = c(65), { CreateWorkspace: Oe, EditWorkspace: ke } = useComponentOverrides(), r = Oe ?? CreateWorkspace_default, i = ke ?? CreateWorkspace_default, { router: Ae } = useStudio(), [a] = useSearchParams(), [o, je] = useState(0), [s, Me] = useState(10), [l, Ne] = useState("createdAt"), [u, Pe] = useState("ASC"), [d, Fe] = useState(), f;
|
|
18
18
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (f = {}, n[0] = f) : f = n[0];
|
|
19
|
-
let [p,
|
|
19
|
+
let [p, Ie] = useState(f), Le = useDebounce(d, 500), [m, h] = useState(!1), [g, Re] = useState(void 0), _, v;
|
|
20
20
|
n[1] === a ? (_ = n[2], v = n[3]) : (_ = () => {
|
|
21
21
|
a.get("create") === "true" && h(!0);
|
|
22
22
|
}, v = [a], n[1] = a, n[2] = _, n[3] = v), useEffect(_, v);
|
|
23
|
-
let y = useWorkspaceConfig(), b = useFilterWorkspaces(
|
|
24
|
-
n[4] === x ?
|
|
23
|
+
let y = useWorkspaceConfig(), b = useFilterWorkspaces(Le, p, l, u, o, s), x = useDeleteWorkspace(), ze = useBatchDeleteWorkspaces(), S = useSetFavouriteWorkspace(), C;
|
|
24
|
+
n[4] === x ? C = n[5] : (C = (e) => {
|
|
25
25
|
x.mutate(e);
|
|
26
|
-
}, n[4] = x, n[5] =
|
|
27
|
-
let
|
|
28
|
-
n[6] ===
|
|
29
|
-
|
|
30
|
-
}, n[6] =
|
|
26
|
+
}, n[4] = x, n[5] = C);
|
|
27
|
+
let w = C, T;
|
|
28
|
+
n[6] === ze ? T = n[7] : (T = (e) => {
|
|
29
|
+
ze.mutate(e);
|
|
30
|
+
}, n[6] = ze, n[7] = T);
|
|
31
31
|
let E = T, D;
|
|
32
32
|
n[8] === Symbol.for("react.memo_cache_sentinel") ? (D = () => {
|
|
33
33
|
h(!0);
|
|
34
34
|
}, n[8] = D) : D = n[8];
|
|
35
|
-
let
|
|
35
|
+
let Be = D, O;
|
|
36
36
|
n[9] === Symbol.for("react.memo_cache_sentinel") ? (O = () => {
|
|
37
37
|
h(!1);
|
|
38
38
|
}, n[9] = O) : O = n[9];
|
|
39
|
-
let
|
|
40
|
-
n[10] ===
|
|
41
|
-
|
|
42
|
-
}, n[10] =
|
|
39
|
+
let Ve = O, k;
|
|
40
|
+
n[10] === Ae ? k = n[11] : (k = (e) => {
|
|
41
|
+
Ae.navigateToWorkspace(e);
|
|
42
|
+
}, n[10] = Ae, n[11] = k);
|
|
43
43
|
let A = k, j;
|
|
44
44
|
n[12] === Symbol.for("react.memo_cache_sentinel") ? (j = (e) => {
|
|
45
|
-
|
|
45
|
+
Re(e);
|
|
46
46
|
}, n[12] = j) : j = n[12];
|
|
47
|
-
let
|
|
47
|
+
let He = j, M;
|
|
48
48
|
n[13] === Symbol.for("react.memo_cache_sentinel") ? (M = () => {
|
|
49
|
-
h(!1),
|
|
49
|
+
h(!1), Re(void 0);
|
|
50
50
|
}, n[13] = M) : M = n[13];
|
|
51
|
-
let
|
|
52
|
-
n[14] === b.data?.data ?
|
|
53
|
-
let
|
|
54
|
-
n[16] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
51
|
+
let Ue = M, N = y.isPending || b.isPending, P = b.error ?? y.error ?? null, F;
|
|
52
|
+
n[14] === b.data?.data ? F = n[15] : (F = b.data?.data ?? [], n[14] = b.data?.data, n[15] = F);
|
|
53
|
+
let I = b.data?.total ?? 0, L;
|
|
54
|
+
n[16] === Symbol.for("react.memo_cache_sentinel") ? (L = {
|
|
55
55
|
id: "id",
|
|
56
56
|
label: "ID",
|
|
57
57
|
minWidth: 30,
|
|
58
58
|
format: _temp
|
|
59
|
-
}, n[16] =
|
|
60
|
-
let
|
|
61
|
-
n[17] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
62
|
-
|
|
59
|
+
}, n[16] = L) : L = n[16];
|
|
60
|
+
let R;
|
|
61
|
+
n[17] === Symbol.for("react.memo_cache_sentinel") ? (R = [
|
|
62
|
+
L,
|
|
63
63
|
{
|
|
64
64
|
id: "title",
|
|
65
65
|
label: "Title",
|
|
@@ -69,7 +69,7 @@ var Workspaces_default = () => {
|
|
|
69
69
|
children: /* @__PURE__ */ jsx(Badge, {
|
|
70
70
|
variant: "outline",
|
|
71
71
|
className: "hover:bg-primary/10 cursor-pointer",
|
|
72
|
-
onClick: () =>
|
|
72
|
+
onClick: () => Ie((t) => ({
|
|
73
73
|
...t,
|
|
74
74
|
blockName: e
|
|
75
75
|
})),
|
|
@@ -89,110 +89,110 @@ var Workspaces_default = () => {
|
|
|
89
89
|
minWidth: 100,
|
|
90
90
|
format: _temp4
|
|
91
91
|
}
|
|
92
|
-
], n[17] =
|
|
93
|
-
let L;
|
|
94
|
-
n[18] === Symbol.for("react.memo_cache_sentinel") ? (L = {}, n[18] = L) : L = n[18];
|
|
95
|
-
let R;
|
|
96
|
-
n[19] === Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ jsx(Star, { className: "h-4 w-4" }), n[19] = R) : R = n[19];
|
|
92
|
+
], n[17] = R) : R = n[17];
|
|
97
93
|
let z;
|
|
98
|
-
n[
|
|
94
|
+
n[18] === Symbol.for("react.memo_cache_sentinel") ? (z = {}, n[18] = z) : z = n[18];
|
|
95
|
+
let B;
|
|
96
|
+
n[19] === Symbol.for("react.memo_cache_sentinel") ? (B = /* @__PURE__ */ jsx(Star, { className: "h-4 w-4" }), n[19] = B) : B = n[19];
|
|
97
|
+
let V;
|
|
98
|
+
n[20] === S ? V = n[21] : (V = {
|
|
99
99
|
id: "add-favourite",
|
|
100
100
|
label: "Add to favourites",
|
|
101
|
-
icon:
|
|
101
|
+
icon: B,
|
|
102
102
|
condition: _temp5,
|
|
103
103
|
action: (e) => {
|
|
104
|
-
|
|
104
|
+
S.mutate({
|
|
105
105
|
id: e.id,
|
|
106
106
|
isFavourite: !0
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
}, n[20] =
|
|
110
|
-
let
|
|
111
|
-
n[22] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
112
|
-
let
|
|
113
|
-
n[23] ===
|
|
109
|
+
}, n[20] = S, n[21] = V);
|
|
110
|
+
let H;
|
|
111
|
+
n[22] === Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ jsx(Star, { className: "h-4 w-4 fill-current" }), n[22] = H) : H = n[22];
|
|
112
|
+
let U;
|
|
113
|
+
n[23] === S ? U = n[24] : (U = {
|
|
114
114
|
id: "remove-favourite",
|
|
115
115
|
label: "Remove from favourites",
|
|
116
|
-
icon:
|
|
116
|
+
icon: H,
|
|
117
117
|
condition: _temp6,
|
|
118
118
|
action: (e) => {
|
|
119
|
-
|
|
119
|
+
S.mutate({
|
|
120
120
|
id: e.id,
|
|
121
121
|
isFavourite: !1
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
|
-
}, n[23] =
|
|
125
|
-
let
|
|
126
|
-
n[25] !==
|
|
127
|
-
let
|
|
128
|
-
n[28] !== p || n[29] !== E || n[30] !==
|
|
129
|
-
loading:
|
|
130
|
-
error:
|
|
131
|
-
items:
|
|
132
|
-
totalItems:
|
|
133
|
-
setPage:
|
|
134
|
-
setRowsPerPage:
|
|
135
|
-
setOrderBy:
|
|
136
|
-
setOrder:
|
|
137
|
-
setSearchTerm:
|
|
138
|
-
setFilters:
|
|
124
|
+
}, n[23] = S, n[24] = U);
|
|
125
|
+
let W;
|
|
126
|
+
n[25] !== V || n[26] !== U ? (W = [V, U], n[25] = V, n[26] = U, n[27] = W) : W = n[27];
|
|
127
|
+
let We = W, G;
|
|
128
|
+
n[28] !== p || n[29] !== E || n[30] !== w || n[31] !== A || n[32] !== u || n[33] !== l || n[34] !== o || n[35] !== s || n[36] !== d || n[37] !== N || n[38] !== P || n[39] !== F || n[40] !== I || n[41] !== We ? (G = /* @__PURE__ */ jsx(ListView_default, {
|
|
129
|
+
loading: N,
|
|
130
|
+
error: P,
|
|
131
|
+
items: F,
|
|
132
|
+
totalItems: I,
|
|
133
|
+
setPage: je,
|
|
134
|
+
setRowsPerPage: Me,
|
|
135
|
+
setOrderBy: Ne,
|
|
136
|
+
setOrder: Pe,
|
|
137
|
+
setSearchTerm: Fe,
|
|
138
|
+
setFilters: Ie,
|
|
139
139
|
orderBy: l,
|
|
140
140
|
order: u,
|
|
141
141
|
searchTerm: d,
|
|
142
142
|
filters: p,
|
|
143
143
|
page: o,
|
|
144
144
|
rowsPerPage: s,
|
|
145
|
-
deleteItem:
|
|
145
|
+
deleteItem: w,
|
|
146
146
|
onClick: A,
|
|
147
|
-
handleNew:
|
|
148
|
-
handleEdit:
|
|
147
|
+
handleNew: Be,
|
|
148
|
+
handleEdit: He,
|
|
149
149
|
enableBatchActions: !0,
|
|
150
150
|
batchDelete: E,
|
|
151
|
-
columns:
|
|
152
|
-
filterConfig:
|
|
153
|
-
rowActions:
|
|
154
|
-
}), n[28] = p, n[29] = E, n[30] =
|
|
155
|
-
let G;
|
|
156
|
-
n[43] === y.data ? G = n[44] : (G = y.data ?? [], n[43] = y.data, n[44] = G);
|
|
151
|
+
columns: R,
|
|
152
|
+
filterConfig: z,
|
|
153
|
+
rowActions: We
|
|
154
|
+
}), n[28] = p, n[29] = E, n[30] = w, n[31] = A, n[32] = u, n[33] = l, n[34] = o, n[35] = s, n[36] = d, n[37] = N, n[38] = P, n[39] = F, n[40] = I, n[41] = We, n[42] = G) : G = n[42];
|
|
157
155
|
let K;
|
|
158
|
-
n[
|
|
156
|
+
n[43] === y.data ? K = n[44] : (K = y.data ?? [], n[43] = y.data, n[44] = K);
|
|
157
|
+
let q;
|
|
158
|
+
n[45] !== r || n[46] !== K ? (q = /* @__PURE__ */ jsx(DialogContent, {
|
|
159
159
|
className: "max-w-2xl",
|
|
160
160
|
children: /* @__PURE__ */ jsx(r, {
|
|
161
|
-
types:
|
|
162
|
-
onSuccess:
|
|
161
|
+
types: K,
|
|
162
|
+
onSuccess: Ve
|
|
163
163
|
})
|
|
164
|
-
}), n[45] = r, n[46] =
|
|
165
|
-
let
|
|
166
|
-
n[48] !== m || n[49] !==
|
|
164
|
+
}), n[45] = r, n[46] = K, n[47] = q) : q = n[47];
|
|
165
|
+
let J;
|
|
166
|
+
n[48] !== m || n[49] !== q ? (J = /* @__PURE__ */ jsx(Dialog, {
|
|
167
167
|
open: m,
|
|
168
168
|
onOpenChange: h,
|
|
169
|
-
children:
|
|
170
|
-
}), n[48] = m, n[49] =
|
|
171
|
-
let
|
|
172
|
-
n[51] === Symbol.for("react.memo_cache_sentinel") ? (Y = (e) => !e &&
|
|
169
|
+
children: q
|
|
170
|
+
}), n[48] = m, n[49] = q, n[50] = J) : J = n[50];
|
|
171
|
+
let Ge = !!g, Y;
|
|
172
|
+
n[51] === Symbol.for("react.memo_cache_sentinel") ? (Y = (e) => !e && Ue(), n[51] = Y) : Y = n[51];
|
|
173
173
|
let X;
|
|
174
|
-
n[52]
|
|
174
|
+
n[52] !== i || n[53] !== y.data || n[54] !== g ? (X = g && /* @__PURE__ */ jsx(i, {
|
|
175
|
+
types: y.data ?? [],
|
|
176
|
+
workspace: g,
|
|
177
|
+
onSuccess: Ue
|
|
178
|
+
}), n[52] = i, n[53] = y.data, n[54] = g, n[55] = X) : X = n[55];
|
|
175
179
|
let Z;
|
|
176
|
-
n[
|
|
180
|
+
n[56] === X ? Z = n[57] : (Z = /* @__PURE__ */ jsx(DialogContent, {
|
|
177
181
|
className: "max-w-2xl",
|
|
178
|
-
children:
|
|
179
|
-
|
|
180
|
-
workspace: g,
|
|
181
|
-
onSuccess: Ve
|
|
182
|
-
})
|
|
183
|
-
}), n[54] = r, n[55] = g, n[56] = X, n[57] = Z) : Z = n[57];
|
|
182
|
+
children: X
|
|
183
|
+
}), n[56] = X, n[57] = Z);
|
|
184
184
|
let Q;
|
|
185
|
-
n[58] !==
|
|
186
|
-
open:
|
|
185
|
+
n[58] !== Ge || n[59] !== Z ? (Q = /* @__PURE__ */ jsx(Dialog, {
|
|
186
|
+
open: Ge,
|
|
187
187
|
onOpenChange: Y,
|
|
188
188
|
children: Z
|
|
189
|
-
}), n[58] =
|
|
189
|
+
}), n[58] = Ge, n[59] = Z, n[60] = Q) : Q = n[60];
|
|
190
190
|
let $;
|
|
191
|
-
return n[61] !==
|
|
192
|
-
|
|
193
|
-
|
|
191
|
+
return n[61] !== G || n[62] !== J || n[63] !== Q ? ($ = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
192
|
+
G,
|
|
193
|
+
J,
|
|
194
194
|
Q
|
|
195
|
-
] }), n[61] =
|
|
195
|
+
] }), n[61] = G, n[62] = J, n[63] = Q, n[64] = $) : $ = n[64], $;
|
|
196
196
|
};
|
|
197
197
|
function _temp(e) {
|
|
198
198
|
return e.slice(0, 6);
|
package/dist/hooks/useAuth.js
CHANGED
|
@@ -1,15 +1,36 @@
|
|
|
1
1
|
import { useApiClient } from "./useApi.js";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
4
|
-
function
|
|
4
|
+
function useMe(n) {
|
|
5
5
|
let i = c(8), a = n === void 0 ? !0 : n, { envKey: s, api: l } = useApiClient(), u;
|
|
6
|
-
i[0] === s ? u = i[1] : (u = ["
|
|
6
|
+
i[0] === s ? u = i[1] : (u = ["me", s], i[0] = s, i[1] = u);
|
|
7
7
|
let d;
|
|
8
8
|
i[2] === l ? d = i[3] : (d = () => {
|
|
9
9
|
if (!l) throw Error("API not available");
|
|
10
|
-
return l.ApiV1AuthApi.
|
|
10
|
+
return l.ApiV1AuthApi.authControllerMe();
|
|
11
11
|
}, i[2] = l, i[3] = d);
|
|
12
12
|
let f;
|
|
13
|
+
return i[4] !== a || i[5] !== u || i[6] !== d ? (f = {
|
|
14
|
+
queryKey: u,
|
|
15
|
+
queryFn: d,
|
|
16
|
+
select: _temp,
|
|
17
|
+
retry: !1,
|
|
18
|
+
staleTime: 3e5,
|
|
19
|
+
enabled: a
|
|
20
|
+
}, i[4] = a, i[5] = u, i[6] = d, i[7] = f) : f = i[7], useQuery(f);
|
|
21
|
+
}
|
|
22
|
+
function _temp(e) {
|
|
23
|
+
return e.data;
|
|
24
|
+
}
|
|
25
|
+
function useGetHealthInfo(n) {
|
|
26
|
+
let i = c(8), a = n === void 0 ? !0 : n, { envKey: o, api: s } = useApiClient(), u;
|
|
27
|
+
i[0] === o ? u = i[1] : (u = ["health", o], i[0] = o, i[1] = u);
|
|
28
|
+
let d;
|
|
29
|
+
i[2] === s ? d = i[3] : (d = () => {
|
|
30
|
+
if (!s) throw Error("API not available");
|
|
31
|
+
return s.ApiV1AuthApi.authControllerGetInfo();
|
|
32
|
+
}, i[2] = s, i[3] = d);
|
|
33
|
+
let f;
|
|
13
34
|
return i[4] !== a || i[5] !== u || i[6] !== d ? (f = {
|
|
14
35
|
queryKey: u,
|
|
15
36
|
queryFn: d,
|
|
@@ -53,4 +74,4 @@ function useWorkerAuthTokenRefresh() {
|
|
|
53
74
|
onSuccess: l
|
|
54
75
|
}, r[4] = s, r[5] = l, r[6] = u) : u = r[6], useMutation(u);
|
|
55
76
|
}
|
|
56
|
-
export { useGetHealthInfo, useWorkerAuth, useWorkerAuthTokenRefresh };
|
|
77
|
+
export { useGetHealthInfo, useMe, useWorkerAuth, useWorkerAuthTokenRefresh };
|
|
@@ -119,4 +119,4 @@ function useDeleteWorkflow() {
|
|
|
119
119
|
onSuccess: p
|
|
120
120
|
}, r[5] = f, r[6] = p, r[7] = m) : m = r[7], useMutation(m);
|
|
121
121
|
}
|
|
122
|
-
export { useDeleteWorkflow, useFetchWorkflowsByNamespace, useFetchWorkflowsByPipeline, useWorkflow };
|
|
122
|
+
export { getWorkflowCacheKey, getWorkflowsByPipelineCacheKey, getWorkflowsCacheKey, useDeleteWorkflow, useFetchWorkflowsByNamespace, useFetchWorkflowsByPipeline, useWorkflow };
|
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ import { useNavigate } from 'react-router-dom';
|
|
|
41
41
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
42
42
|
import { VariantProps } from 'class-variance-authority';
|
|
43
43
|
import { WorkspaceConfigDto } from '../../../../client/api-client';
|
|
44
|
+
import { WorkspaceConfigDto as WorkspaceConfigDto_2 } from '../../client/api-client';
|
|
44
45
|
import { WorkspaceControllerBatchDeleteWorkspaces200Response } from '../../client/api-client';
|
|
45
46
|
import { WorkspaceControllerGetWorkspaces200Response } from '../../client/api-client';
|
|
46
47
|
import { WorkspaceDto } from '../../client/api-client';
|
|
@@ -203,6 +204,7 @@ declare interface CompletionMessagePaperProps {
|
|
|
203
204
|
|
|
204
205
|
export declare interface ComponentOverrides {
|
|
205
206
|
CreateWorkspace?: ComponentType<CreateWorkspaceProps>;
|
|
207
|
+
EditWorkspace?: ComponentType<EditWorkspaceProps>;
|
|
206
208
|
}
|
|
207
209
|
|
|
208
210
|
export declare const ComponentOverridesProvider: ({ children, overrides, }: {
|
|
@@ -446,6 +448,12 @@ export declare function DropdownMenuSubTrigger({ className, inset, children, ...
|
|
|
446
448
|
|
|
447
449
|
export declare function DropdownMenuTrigger({ ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): JSX.Element;
|
|
448
450
|
|
|
451
|
+
export declare interface EditWorkspaceProps {
|
|
452
|
+
types: WorkspaceConfigDto_2[];
|
|
453
|
+
workspace: WorkspaceItemDto_2;
|
|
454
|
+
onSuccess: () => void;
|
|
455
|
+
}
|
|
456
|
+
|
|
449
457
|
export declare function EmbedWorkbenchPage(): JSX.Element;
|
|
450
458
|
|
|
451
459
|
export declare interface Environment {
|
|
@@ -477,6 +485,8 @@ declare interface GoogleLogoProps {
|
|
|
477
485
|
|
|
478
486
|
export declare function Input({ className, type, ...props }: React_2.ComponentProps<'input'>): JSX.Element;
|
|
479
487
|
|
|
488
|
+
export declare function InvalidationEventsProvider(): null;
|
|
489
|
+
|
|
480
490
|
declare interface Item {
|
|
481
491
|
id: string;
|
|
482
492
|
}
|
|
@@ -553,7 +563,7 @@ declare interface LoadingCenteredProps extends default_2.HTMLAttributes<HTMLDivE
|
|
|
553
563
|
children?: default_2.ReactNode;
|
|
554
564
|
}
|
|
555
565
|
|
|
556
|
-
export declare const LocalHealthCheck: () => JSX.Element;
|
|
566
|
+
export declare const LocalHealthCheck: () => JSX.Element | null;
|
|
557
567
|
|
|
558
568
|
export declare class LocalRouter implements StudioRouter {
|
|
559
569
|
private navigate;
|
|
@@ -814,6 +824,8 @@ export declare function Slider({ className, defaultValue, value, min, max, ...pr
|
|
|
814
824
|
|
|
815
825
|
export declare const Snackbar: default_2.FC<BaseSnackbarProps>;
|
|
816
826
|
|
|
827
|
+
export declare function SseProvider(): null;
|
|
828
|
+
|
|
817
829
|
declare interface StudioContext {
|
|
818
830
|
router: StudioRouter;
|
|
819
831
|
environment: Environment;
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,8 @@ import { useIsMobile } from "./hooks/use-mobile.js";
|
|
|
7
7
|
import { useBatchDeleteWorkspaces, useCreateWorkspace, useDeleteWorkspace, useFilterWorkspaces, useSetFavouriteWorkspace, useUpdateWorkspace, useWorkspace } from "./hooks/useWorkspaces.js";
|
|
8
8
|
import "./hooks/index.js";
|
|
9
9
|
import { ComponentOverridesProvider, useComponentOverrides } from "./providers/ComponentOverridesProvider.js";
|
|
10
|
+
import { SseProvider } from "./providers/SseProvider.js";
|
|
11
|
+
import { InvalidationEventsProvider } from "./providers/InvalidationEventsProvider.js";
|
|
10
12
|
import { LocalRouter, useRouter } from "./routing/LocalRouter.js";
|
|
11
13
|
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./components/ui/accordion.js";
|
|
12
14
|
import { Button, buttonVariants } from "./components/ui/button.js";
|
|
@@ -64,4 +66,4 @@ import DebugWorkflowsPage from "./pages/DebugWorkflowsPage.js";
|
|
|
64
66
|
import DebugWorkflowDetailsPage from "./pages/DebugWorkflowDetailsPage.js";
|
|
65
67
|
import EmbedWorkbenchPage from "./pages/EmbedWorkbenchPage.js";
|
|
66
68
|
import LocalHealthCheck_default from "./features/health/LocalHealthCheck.js";
|
|
67
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, CompletionMessagePaper_default as CompletionMessagePaper, ComponentOverridesProvider, ConfirmDialog_default as ConfirmDialog, CustomListView_default as CustomItemListView, DashboardPage, DataList, DataTable, DataTableBatchAction_default as DataTableBatchActions, DataTableFilters_default as DataTableFilters, DataTablePagination_default as DataTablePagination, DataTableToolbar_default as DataTableToolbar, DebugPage_default as DebugPage, DebugWorkflowDetailsPage, DebugWorkflowsPage, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiscordLogo, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmbedWorkbenchPage, ErrorSnackbar_default as ErrorSnackbar, GoogleLogo, Input, ListView_default as ItemListView, Label, LoadingCentered_default as LoadingCentered, LocalHealthCheck_default as LocalHealthCheck, LocalRouter, MainLayout_default as MainLayout, PageBreadcrumbs_default as PageBreadcrumbs, PipelineDebugPage_default as PipelineDebugPage, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarInsetDiv, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuDiv, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Snackbar_default as Snackbar, StudioProvider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, WorkbenchPage, WorkspacePage_default as WorkspacePage, WorkspacesPage, badgeVariants, buttonVariants, createApiClient, eventBus, useApiClient, useBatchDeleteWorkspaces, useComponentOverrides, useCreateWorkspace, useDeleteWorkspace, useFilterWorkspaces, useIsMobile, useRouter, useSetFavouriteWorkspace, useSidebar, useStudio, useUpdateWorkspace, useWorkspace };
|
|
69
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, CompletionMessagePaper_default as CompletionMessagePaper, ComponentOverridesProvider, ConfirmDialog_default as ConfirmDialog, CustomListView_default as CustomItemListView, DashboardPage, DataList, DataTable, DataTableBatchAction_default as DataTableBatchActions, DataTableFilters_default as DataTableFilters, DataTablePagination_default as DataTablePagination, DataTableToolbar_default as DataTableToolbar, DebugPage_default as DebugPage, DebugWorkflowDetailsPage, DebugWorkflowsPage, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiscordLogo, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmbedWorkbenchPage, ErrorSnackbar_default as ErrorSnackbar, GoogleLogo, Input, InvalidationEventsProvider, ListView_default as ItemListView, Label, LoadingCentered_default as LoadingCentered, LocalHealthCheck_default as LocalHealthCheck, LocalRouter, MainLayout_default as MainLayout, PageBreadcrumbs_default as PageBreadcrumbs, PipelineDebugPage_default as PipelineDebugPage, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarInsetDiv, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuDiv, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Snackbar_default as Snackbar, SseProvider, StudioProvider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, WorkbenchPage, WorkspacePage_default as WorkspacePage, WorkspacesPage, badgeVariants, buttonVariants, createApiClient, eventBus, useApiClient, useBatchDeleteWorkspaces, useComponentOverrides, useCreateWorkspace, useDeleteWorkspace, useFilterWorkspaces, useIsMobile, useRouter, useSetFavouriteWorkspace, useSidebar, useStudio, useUpdateWorkspace, useWorkspace };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { require__root } from "./_root.js";
|
|
3
|
+
var require__Symbol = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
4
|
+
n.exports = require__root().Symbol;
|
|
5
|
+
}));
|
|
6
|
+
export default require__Symbol();
|
|
7
|
+
export { require__Symbol };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { require__Symbol } from "./_Symbol.js";
|
|
3
|
+
import { require__getRawTag } from "./_getRawTag.js";
|
|
4
|
+
import { require__objectToString } from "./_objectToString.js";
|
|
5
|
+
var require__baseGetTag = /* @__PURE__ */ __commonJSMin(((e, i) => {
|
|
6
|
+
var a = require__Symbol(), o = require__getRawTag(), s = require__objectToString(), c = "[object Null]", l = "[object Undefined]", u = a ? a.toStringTag : void 0;
|
|
7
|
+
function d(e) {
|
|
8
|
+
return e == null ? e === void 0 ? l : c : u && u in Object(e) ? o(e) : s(e);
|
|
9
|
+
}
|
|
10
|
+
i.exports = d;
|
|
11
|
+
}));
|
|
12
|
+
export default require__baseGetTag();
|
|
13
|
+
export { require__baseGetTag };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { require__trimmedEndIndex } from "./_trimmedEndIndex.js";
|
|
3
|
+
var require__baseTrim = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
4
|
+
var r = require__trimmedEndIndex(), i = /^\s+/;
|
|
5
|
+
function a(e) {
|
|
6
|
+
return e && e.slice(0, r(e) + 1).replace(i, "");
|
|
7
|
+
}
|
|
8
|
+
n.exports = a;
|
|
9
|
+
}));
|
|
10
|
+
export default require__baseTrim();
|
|
11
|
+
export { require__baseTrim };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../_virtual/rolldown_runtime.js";
|
|
2
|
+
var require__freeGlobal = /* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
3
|
+
t.exports = typeof global == "object" && global && global.Object === Object && global;
|
|
4
|
+
}));
|
|
5
|
+
export default require__freeGlobal();
|
|
6
|
+
export { require__freeGlobal };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { require__Symbol } from "./_Symbol.js";
|
|
3
|
+
var require__getRawTag = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
4
|
+
var r = require__Symbol(), i = Object.prototype, a = i.hasOwnProperty, o = i.toString, s = r ? r.toStringTag : void 0;
|
|
5
|
+
function c(e) {
|
|
6
|
+
var t = a.call(e, s), n = e[s];
|
|
7
|
+
try {
|
|
8
|
+
e[s] = void 0;
|
|
9
|
+
var r = !0;
|
|
10
|
+
} catch {}
|
|
11
|
+
var i = o.call(e);
|
|
12
|
+
return r && (t ? e[s] = n : delete e[s]), i;
|
|
13
|
+
}
|
|
14
|
+
n.exports = c;
|
|
15
|
+
}));
|
|
16
|
+
export default require__getRawTag();
|
|
17
|
+
export { require__getRawTag };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../_virtual/rolldown_runtime.js";
|
|
2
|
+
var require__objectToString = /* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
3
|
+
var n = Object.prototype.toString;
|
|
4
|
+
function r(e) {
|
|
5
|
+
return n.call(e);
|
|
6
|
+
}
|
|
7
|
+
t.exports = r;
|
|
8
|
+
}));
|
|
9
|
+
export default require__objectToString();
|
|
10
|
+
export { require__objectToString };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { require__freeGlobal } from "./_freeGlobal.js";
|
|
3
|
+
var require__root = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
4
|
+
var r = require__freeGlobal(), i = typeof self == "object" && self && self.Object === Object && self;
|
|
5
|
+
n.exports = r || i || Function("return this")();
|
|
6
|
+
}));
|
|
7
|
+
export default require__root();
|
|
8
|
+
export { require__root };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../_virtual/rolldown_runtime.js";
|
|
2
|
+
var require__trimmedEndIndex = /* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
3
|
+
var n = /\s/;
|
|
4
|
+
function r(e) {
|
|
5
|
+
for (var t = e.length; t-- && n.test(e.charAt(t)););
|
|
6
|
+
return t;
|
|
7
|
+
}
|
|
8
|
+
t.exports = r;
|
|
9
|
+
}));
|
|
10
|
+
export default require__trimmedEndIndex();
|
|
11
|
+
export { require__trimmedEndIndex };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { require_isObject } from "./isObject.js";
|
|
3
|
+
import { require_now } from "./now.js";
|
|
4
|
+
import { require_toNumber } from "./toNumber.js";
|
|
5
|
+
var require_debounce = /* @__PURE__ */ __commonJSMin(((e, i) => {
|
|
6
|
+
var a = require_isObject(), o = require_now(), s = require_toNumber(), c = "Expected a function", l = Math.max, u = Math.min;
|
|
7
|
+
function d(e, t, n) {
|
|
8
|
+
var r, i, d, f, p, m, h = 0, g = !1, _ = !1, v = !0;
|
|
9
|
+
if (typeof e != "function") throw TypeError(c);
|
|
10
|
+
t = s(t) || 0, a(n) && (g = !!n.leading, _ = "maxWait" in n, d = _ ? l(s(n.maxWait) || 0, t) : d, v = "trailing" in n ? !!n.trailing : v);
|
|
11
|
+
function y(t) {
|
|
12
|
+
var n = r, a = i;
|
|
13
|
+
return r = i = void 0, h = t, f = e.apply(a, n), f;
|
|
14
|
+
}
|
|
15
|
+
function b(e) {
|
|
16
|
+
return h = e, p = setTimeout(C, t), g ? y(e) : f;
|
|
17
|
+
}
|
|
18
|
+
function x(e) {
|
|
19
|
+
var n = e - m, r = e - h, i = t - n;
|
|
20
|
+
return _ ? u(i, d - r) : i;
|
|
21
|
+
}
|
|
22
|
+
function S(e) {
|
|
23
|
+
var n = e - m, r = e - h;
|
|
24
|
+
return m === void 0 || n >= t || n < 0 || _ && r >= d;
|
|
25
|
+
}
|
|
26
|
+
function C() {
|
|
27
|
+
var e = o();
|
|
28
|
+
if (S(e)) return w(e);
|
|
29
|
+
p = setTimeout(C, x(e));
|
|
30
|
+
}
|
|
31
|
+
function w(e) {
|
|
32
|
+
return p = void 0, v && r ? y(e) : (r = i = void 0, f);
|
|
33
|
+
}
|
|
34
|
+
function T() {
|
|
35
|
+
p !== void 0 && clearTimeout(p), h = 0, r = m = i = p = void 0;
|
|
36
|
+
}
|
|
37
|
+
function E() {
|
|
38
|
+
return p === void 0 ? f : w(o());
|
|
39
|
+
}
|
|
40
|
+
function D() {
|
|
41
|
+
var e = o(), n = S(e);
|
|
42
|
+
if (r = arguments, i = this, m = e, n) {
|
|
43
|
+
if (p === void 0) return b(m);
|
|
44
|
+
if (_) return clearTimeout(p), p = setTimeout(C, t), y(m);
|
|
45
|
+
}
|
|
46
|
+
return p === void 0 && (p = setTimeout(C, t)), f;
|
|
47
|
+
}
|
|
48
|
+
return D.cancel = T, D.flush = E, D;
|
|
49
|
+
}
|
|
50
|
+
i.exports = d;
|
|
51
|
+
}));
|
|
52
|
+
export default require_debounce();
|
|
53
|
+
export { require_debounce };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../_virtual/rolldown_runtime.js";
|
|
2
|
+
var require_isObject = /* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
3
|
+
function n(e) {
|
|
4
|
+
var t = typeof e;
|
|
5
|
+
return e != null && (t == "object" || t == "function");
|
|
6
|
+
}
|
|
7
|
+
t.exports = n;
|
|
8
|
+
}));
|
|
9
|
+
export default require_isObject();
|
|
10
|
+
export { require_isObject };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../_virtual/rolldown_runtime.js";
|
|
2
|
+
var require_isObjectLike = /* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
3
|
+
function n(e) {
|
|
4
|
+
return typeof e == "object" && !!e;
|
|
5
|
+
}
|
|
6
|
+
t.exports = n;
|
|
7
|
+
}));
|
|
8
|
+
export default require_isObjectLike();
|
|
9
|
+
export { require_isObjectLike };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { require__baseGetTag } from "./_baseGetTag.js";
|
|
3
|
+
import { require_isObjectLike } from "./isObjectLike.js";
|
|
4
|
+
var require_isSymbol = /* @__PURE__ */ __commonJSMin(((e, r) => {
|
|
5
|
+
var i = require__baseGetTag(), a = require_isObjectLike(), o = "[object Symbol]";
|
|
6
|
+
function s(e) {
|
|
7
|
+
return typeof e == "symbol" || a(e) && i(e) == o;
|
|
8
|
+
}
|
|
9
|
+
r.exports = s;
|
|
10
|
+
}));
|
|
11
|
+
export default require_isSymbol();
|
|
12
|
+
export { require_isSymbol };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { require__root } from "./_root.js";
|
|
3
|
+
var require_now = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
4
|
+
var r = require__root();
|
|
5
|
+
n.exports = function() {
|
|
6
|
+
return r.Date.now();
|
|
7
|
+
};
|
|
8
|
+
}));
|
|
9
|
+
export default require_now();
|
|
10
|
+
export { require_now };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { require_isObject } from "./isObject.js";
|
|
3
|
+
import { require__baseTrim } from "./_baseTrim.js";
|
|
4
|
+
import { require_isSymbol } from "./isSymbol.js";
|
|
5
|
+
var require_toNumber = /* @__PURE__ */ __commonJSMin(((e, i) => {
|
|
6
|
+
var a = require__baseTrim(), o = require_isObject(), s = require_isSymbol(), c = NaN, l = /^[-+]0x[0-9a-f]+$/i, u = /^0b[01]+$/i, d = /^0o[0-7]+$/i, f = parseInt;
|
|
7
|
+
function p(e) {
|
|
8
|
+
if (typeof e == "number") return e;
|
|
9
|
+
if (s(e)) return c;
|
|
10
|
+
if (o(e)) {
|
|
11
|
+
var n = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
12
|
+
e = o(n) ? n + "" : n;
|
|
13
|
+
}
|
|
14
|
+
if (typeof e != "string") return e === 0 ? e : +e;
|
|
15
|
+
e = a(e);
|
|
16
|
+
var r = u.test(e);
|
|
17
|
+
return r || d.test(e) ? f(e.slice(2), r ? 2 : 8) : l.test(e) ? c : +e;
|
|
18
|
+
}
|
|
19
|
+
i.exports = p;
|
|
20
|
+
}));
|
|
21
|
+
export default require_toNumber();
|
|
22
|
+
export { require_toNumber };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { useFetchWorkflowsByPipeline } from "../hooks/useWorkflows.js";
|
|
1
2
|
import ErrorSnackbar_default from "../components/snackbars/ErrorSnackbar.js";
|
|
2
3
|
import LoadingCentered_default from "../components/LoadingCentered.js";
|
|
3
4
|
import { usePipeline } from "../hooks/usePipelines.js";
|
|
4
|
-
import { useFetchWorkflowsByPipeline } from "../hooks/useWorkflows.js";
|
|
5
5
|
import WorkflowItem_default from "../features/workbench/WorkflowItem.js";
|
|
6
6
|
import { requireParam } from "../lib/requireParam.js";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
2
|
import { useWorkspace } from "../hooks/useWorkspaces.js";
|
|
3
|
+
import { useFetchWorkflowsByPipeline } from "../hooks/useWorkflows.js";
|
|
3
4
|
import MainLayout_default from "../components/layout/MainLayout.js";
|
|
4
5
|
import ErrorSnackbar_default from "../components/snackbars/ErrorSnackbar.js";
|
|
5
6
|
import { usePipeline, usePipelineConfig } from "../hooks/usePipelines.js";
|
|
6
7
|
import { ReactFlowProvider } from "../node_modules/@xyflow/react/dist/esm/index.js";
|
|
7
|
-
import { useFetchWorkflowsByPipeline } from "../hooks/useWorkflows.js";
|
|
8
8
|
import { requireParam } from "../lib/requireParam.js";
|
|
9
9
|
import PipelineDebugHeader_default from "../features/debug/components/PipelineDebugHeader.js";
|
|
10
10
|
import PipelineFlowViewer_default from "../features/debug/components/PipelineFlowViewer.js";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { __toESM } from "../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { SseClientEvents } from "../events/sse-client-events.js";
|
|
3
|
+
import { eventBus } from "../services/eventEmitter.js";
|
|
4
|
+
import "../services/index.js";
|
|
5
|
+
import { useStudio } from "./StudioProvider.js";
|
|
6
|
+
import { require_debounce } from "../node_modules/lodash/debounce.js";
|
|
7
|
+
import { getDocumentsCacheKey } from "../hooks/useDocuments.js";
|
|
8
|
+
import { getNamespacesByPipelineCacheKey } from "../hooks/useNamespaces.js";
|
|
9
|
+
import { getWorkflowCacheKey, getWorkflowsByPipelineCacheKey, getWorkflowsCacheKey } from "../hooks/useWorkflows.js";
|
|
10
|
+
import { c } from "react/compiler-runtime";
|
|
11
|
+
import { useEffect, useRef } from "react";
|
|
12
|
+
import { useQueryClient } from "@tanstack/react-query";
|
|
13
|
+
var import_debounce = /* @__PURE__ */ __toESM(require_debounce(), 1), DEBOUNCE_MS = 300;
|
|
14
|
+
function createDebouncedInvalidator(e, u) {
|
|
15
|
+
return (0, import_debounce.default)(() => {
|
|
16
|
+
e.invalidateQueries({ queryKey: u });
|
|
17
|
+
}, DEBOUNCE_MS);
|
|
18
|
+
}
|
|
19
|
+
function InvalidationEventsProvider() {
|
|
20
|
+
let e = c(5), { environment: f } = useStudio(), _ = useQueryClient(), v;
|
|
21
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ new Map(), e[0] = v) : v = e[0];
|
|
22
|
+
let y = useRef(v), b, x;
|
|
23
|
+
return e[1] !== f.id || e[2] !== _ ? (b = () => {
|
|
24
|
+
if (!f.id) return;
|
|
25
|
+
let e = f.id, d = y.current, p = function(e) {
|
|
26
|
+
let u = JSON.stringify(e);
|
|
27
|
+
d.has(u) || d.set(u, createDebouncedInvalidator(_, e)), d.get(u)();
|
|
28
|
+
}, m = eventBus.on(SseClientEvents.WORKFLOW_CREATED, (u) => {
|
|
29
|
+
u.namespaceId && p(getWorkflowsCacheKey(e, u.namespaceId)), u.pipelineId && (p(getNamespacesByPipelineCacheKey(e, u.pipelineId)), p(getWorkflowsByPipelineCacheKey(e, u.pipelineId)));
|
|
30
|
+
}), h = eventBus.on(SseClientEvents.WORKFLOW_UPDATED, (u) => {
|
|
31
|
+
u.id && p(getWorkflowCacheKey(e, u.id)), u.namespaceId && p(getWorkflowsCacheKey(e, u.namespaceId)), u.pipelineId && (p(getNamespacesByPipelineCacheKey(e, u.pipelineId)), p(getWorkflowsByPipelineCacheKey(e, u.pipelineId)));
|
|
32
|
+
}), g = eventBus.on(SseClientEvents.DOCUMENT_CREATED, (u) => {
|
|
33
|
+
u.workflowId && p(getDocumentsCacheKey(e, u.workflowId));
|
|
34
|
+
});
|
|
35
|
+
return () => {
|
|
36
|
+
m(), h(), g(), d.forEach(_temp), d.clear();
|
|
37
|
+
};
|
|
38
|
+
}, x = [_, f.id], e[1] = f.id, e[2] = _, e[3] = b, e[4] = x) : (b = e[3], x = e[4]), useEffect(b, x), null;
|
|
39
|
+
}
|
|
40
|
+
function _temp(e) {
|
|
41
|
+
return e.cancel();
|
|
42
|
+
}
|
|
43
|
+
export { InvalidationEventsProvider };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { eventBus } from "../services/eventEmitter.js";
|
|
2
|
+
import "../services/index.js";
|
|
3
|
+
import { useStudio } from "./StudioProvider.js";
|
|
4
|
+
import { useMe } from "../hooks/useAuth.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { useEffect, useRef } from "react";
|
|
7
|
+
function SseProvider() {
|
|
8
|
+
let s = c(5), { environment: l } = useStudio(), { data: u, isSuccess: d } = useMe(), f = useRef(null), p, m;
|
|
9
|
+
return s[0] !== l.url || s[1] !== d || s[2] !== u ? (p = () => {
|
|
10
|
+
if (l.url && d && u) {
|
|
11
|
+
f.current &&= (f.current.close(), null);
|
|
12
|
+
let a = `${l.url}/api/v1/sse/stream`, o = new EventSource(a, { withCredentials: !0 });
|
|
13
|
+
return f.current = o, o.onopen = _temp, o.onerror = () => {
|
|
14
|
+
o.readyState === EventSource.CLOSED && console.warn("SSE connection closed. Refresh the page if it does not recover.");
|
|
15
|
+
}, [
|
|
16
|
+
"workflow.created",
|
|
17
|
+
"workflow.updated",
|
|
18
|
+
"document.created",
|
|
19
|
+
"pipeline.updated",
|
|
20
|
+
"workspace.updated"
|
|
21
|
+
].forEach((a) => {
|
|
22
|
+
o.addEventListener(a, (o) => {
|
|
23
|
+
try {
|
|
24
|
+
let a = JSON.parse(o.data);
|
|
25
|
+
eventBus.emit(a.type, a);
|
|
26
|
+
} catch (e) {
|
|
27
|
+
let o = e;
|
|
28
|
+
console.error(`Error parsing SSE event [${a}]:`, o);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}), () => {
|
|
32
|
+
o.close(), f.current = null;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}, m = [
|
|
36
|
+
l.url,
|
|
37
|
+
d,
|
|
38
|
+
u
|
|
39
|
+
], s[0] = l.url, s[1] = d, s[2] = u, s[3] = p, s[4] = m) : (p = s[3], m = s[4]), useEffect(p, m), null;
|
|
40
|
+
}
|
|
41
|
+
function _temp() {
|
|
42
|
+
console.log("SSE connection established");
|
|
43
|
+
}
|
|
44
|
+
export { SseProvider };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loopstack/loopstack-studio",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.2",
|
|
4
4
|
"repository": "loopstack-ai/loopstack-studio",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@fontsource/roboto": "^5.2.10",
|
|
28
28
|
"@hookform/resolvers": "^5.2.2",
|
|
29
|
-
"@loopstack/api-client": "^0.20.
|
|
29
|
+
"@loopstack/api-client": "^0.20.1",
|
|
30
30
|
"@loopstack/contracts": "^0.22.0",
|
|
31
31
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
32
32
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|