@loopstack/loopstack-studio 0.32.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.js +4 -1
- package/dist/api/workflows.js +1 -0
- package/dist/app/EnvironmentEmbedRoot.js +22 -24
- package/dist/components/loopstack-elements/link.js +64 -56
- package/dist/components/messages/CompletionMessagePaper.js +25 -29
- package/dist/events/sse-client-events.js +2 -0
- package/dist/features/dashboard/AppLauncher.js +111 -64
- package/dist/features/documents/DocumentRenderer.js +42 -42
- package/dist/features/documents/renderers/LinkMessageRenderer.js +10 -10
- package/dist/features/feature-registry/FeatureRegistryProvider.js +15 -17
- package/dist/features/feature-registry/available-features.js +3 -2
- package/dist/features/feature-registry/index.js +1 -1
- package/dist/features/file-explorer/api/files.js +8 -3
- package/dist/features/file-explorer/components/FileExplorerPanel.js +64 -43
- package/dist/features/file-explorer/file-explorer-feature.js +15 -7
- package/dist/features/file-explorer/hooks/useFileExplorer.js +31 -29
- package/dist/features/file-explorer/index.js +1 -1
- package/dist/features/file-explorer/providers/FileExplorerProvider.js +77 -77
- package/dist/features/git/components/WorkbenchGitPanel.js +1 -1
- package/dist/features/secrets/components/WorkbenchSecretsPanel.js +1 -1
- package/dist/features/workbench/Workbench.js +16 -16
- package/dist/features/workbench/components/NewRunDialog.js +1 -1
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +1 -1
- package/dist/features/workbench/components/WorkbenchSidebarShell.js +3 -3
- package/dist/features/workbench/index.js +1 -1
- package/dist/features/workspaces/Workspaces.js +1 -1
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/query-keys.js +39 -32
- package/dist/hooks/useSecrets.js +9 -45
- package/dist/hooks/useWorkflows.js +73 -61
- package/dist/index.d.ts +39 -13
- package/dist/index.js +8 -8
- package/dist/loopstack-studio.css +1 -1
- package/dist/pages/EmbedWorkbenchPage.js +46 -40
- package/dist/pages/WorkbenchPage.js +50 -45
- package/dist/pages/WorkspacePage.js +39 -25
- package/dist/pages/WorkspaceRunsPage.js +34 -26
- package/dist/providers/InvalidationEventsProvider.js +22 -20
- package/package.json +2 -2
|
@@ -5,101 +5,101 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
5
|
import { useQueryClient } from "@tanstack/react-query";
|
|
6
6
|
var FileExplorerContext = createContext(null);
|
|
7
7
|
function FileExplorerProvider(s) {
|
|
8
|
-
let l = c(36), {
|
|
9
|
-
l[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
10
|
-
let [
|
|
11
|
-
l[1] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
12
|
-
let [
|
|
13
|
-
l[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
14
|
-
|
|
8
|
+
let l = c(36), { variant: u, workspaceId: d, enabled: f, children: p } = s, m = f === void 0 ? !0 : f, h = useQueryClient(), g;
|
|
9
|
+
l[0] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ new Set(), l[0] = g) : g = l[0];
|
|
10
|
+
let [_, v] = useState(g), y;
|
|
11
|
+
l[1] === Symbol.for("react.memo_cache_sentinel") ? (y = [], l[1] = y) : y = l[1];
|
|
12
|
+
let [b, x] = useState(y), [S, C] = useState(null), w = useFileTree(u, d, m), T = useFileContent(u, d, S?.type === "file" ? S.path : void 0, m), E;
|
|
13
|
+
l[2] === Symbol.for("react.memo_cache_sentinel") ? (E = (e) => {
|
|
14
|
+
v((a) => {
|
|
15
15
|
let o = new Set(a);
|
|
16
16
|
return o.has(e) ? o.delete(e) : o.add(e), o;
|
|
17
17
|
});
|
|
18
|
-
}, l[2] =
|
|
19
|
-
let
|
|
20
|
-
l[3] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
21
|
-
e.type === "file" && (
|
|
22
|
-
}, l[3] =
|
|
23
|
-
let
|
|
24
|
-
l[4] ===
|
|
25
|
-
|
|
18
|
+
}, l[2] = E) : E = l[2];
|
|
19
|
+
let D = E, O;
|
|
20
|
+
l[3] === Symbol.for("react.memo_cache_sentinel") ? (O = (e) => {
|
|
21
|
+
e.type === "file" && (C(e), x((a) => a.some((a) => a.path === e.path) ? a : [...a, e]));
|
|
22
|
+
}, l[3] = O) : O = l[3];
|
|
23
|
+
let k = O, A;
|
|
24
|
+
l[4] === S?.path ? A = l[5] : (A = (e) => {
|
|
25
|
+
x((a) => {
|
|
26
26
|
let o = a.filter((a) => a.path !== e.path);
|
|
27
|
-
if (
|
|
27
|
+
if (S?.path === e.path) if (o.length > 0) {
|
|
28
28
|
let s = a.findIndex((a) => a.path === e.path);
|
|
29
|
-
|
|
30
|
-
} else
|
|
29
|
+
C(o[Math.max(0, s - 1)]);
|
|
30
|
+
} else C(null);
|
|
31
31
|
return o;
|
|
32
32
|
});
|
|
33
|
-
}, l[4] =
|
|
34
|
-
let
|
|
35
|
-
l[6] ===
|
|
36
|
-
|
|
37
|
-
let a = e.filter((e) => e.path !==
|
|
33
|
+
}, l[4] = S?.path, l[5] = A);
|
|
34
|
+
let j = A, M;
|
|
35
|
+
l[6] === S ? M = l[7] : (M = () => {
|
|
36
|
+
S && x((e) => {
|
|
37
|
+
let a = e.filter((e) => e.path !== S.path);
|
|
38
38
|
if (a.length > 0) {
|
|
39
|
-
let o = e.findIndex((e) => e.path ===
|
|
40
|
-
|
|
41
|
-
} else
|
|
39
|
+
let o = e.findIndex((e) => e.path === S.path);
|
|
40
|
+
C(a[Math.max(0, o - 1)]);
|
|
41
|
+
} else C(null);
|
|
42
42
|
return a;
|
|
43
43
|
});
|
|
44
|
-
}, l[6] =
|
|
45
|
-
let
|
|
46
|
-
l[8] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
47
|
-
|
|
48
|
-
}, l[8] =
|
|
49
|
-
let
|
|
50
|
-
l[9] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
51
|
-
|
|
52
|
-
}, l[9] =
|
|
53
|
-
let
|
|
54
|
-
l[10] ===
|
|
55
|
-
|
|
44
|
+
}, l[6] = S, l[7] = M);
|
|
45
|
+
let N = M, P;
|
|
46
|
+
l[8] === Symbol.for("react.memo_cache_sentinel") ? (P = () => {
|
|
47
|
+
x([]), C(null);
|
|
48
|
+
}, l[8] = P) : P = l[8];
|
|
49
|
+
let F = P, I;
|
|
50
|
+
l[9] === Symbol.for("react.memo_cache_sentinel") ? (I = (e) => {
|
|
51
|
+
x([e]), C(e);
|
|
52
|
+
}, l[9] = I) : I = l[9];
|
|
53
|
+
let L = I, R;
|
|
54
|
+
l[10] === S ? R = l[11] : (R = (e) => {
|
|
55
|
+
x((a) => {
|
|
56
56
|
let o = a.findIndex((a) => a.path === e.path);
|
|
57
57
|
if (o <= 0) return a;
|
|
58
58
|
let s = a.slice(o);
|
|
59
|
-
return
|
|
59
|
+
return S && a.findIndex((e) => e.path === S.path) < o && C(e), s;
|
|
60
60
|
});
|
|
61
|
-
}, l[10] =
|
|
62
|
-
let
|
|
63
|
-
l[12] ===
|
|
64
|
-
|
|
61
|
+
}, l[10] = S, l[11] = R);
|
|
62
|
+
let z = R, B;
|
|
63
|
+
l[12] === S ? B = l[13] : (B = (e) => {
|
|
64
|
+
x((a) => {
|
|
65
65
|
let o = a.findIndex((a) => a.path === e.path);
|
|
66
66
|
if (o < 0 || o >= a.length - 1) return a;
|
|
67
67
|
let s = a.slice(0, o + 1);
|
|
68
|
-
return
|
|
68
|
+
return S && a.findIndex((e) => e.path === S.path) > o && C(e), s;
|
|
69
69
|
});
|
|
70
|
-
}, l[12] =
|
|
71
|
-
let
|
|
72
|
-
l[14] ===
|
|
73
|
-
|
|
74
|
-
}, l[14] =
|
|
75
|
-
let
|
|
76
|
-
l[16] ===
|
|
77
|
-
let
|
|
78
|
-
l[18] !==
|
|
79
|
-
nodes:
|
|
80
|
-
isTreeLoading:
|
|
81
|
-
treeError:
|
|
82
|
-
isFetchingTree:
|
|
83
|
-
openFiles:
|
|
84
|
-
selectedFile:
|
|
85
|
-
fileContent:
|
|
86
|
-
isContentLoading:
|
|
87
|
-
expandedFolders:
|
|
88
|
-
toggleFolder:
|
|
89
|
-
selectFile:
|
|
90
|
-
closeFile:
|
|
91
|
-
closeAll:
|
|
92
|
-
closeOthers:
|
|
93
|
-
closeToLeft:
|
|
94
|
-
closeToRight:
|
|
95
|
-
clearSelection:
|
|
96
|
-
refreshTree:
|
|
97
|
-
}, l[18] =
|
|
98
|
-
let
|
|
99
|
-
return l[33] !==
|
|
100
|
-
value:
|
|
101
|
-
children:
|
|
102
|
-
}), l[33] =
|
|
70
|
+
}, l[12] = S, l[13] = B);
|
|
71
|
+
let V = B, H;
|
|
72
|
+
l[14] === h ? H = l[15] : (H = () => {
|
|
73
|
+
h.invalidateQueries({ queryKey: ["file-explorer-tree"] });
|
|
74
|
+
}, l[14] = h, l[15] = H);
|
|
75
|
+
let U = H, W;
|
|
76
|
+
l[16] === w.data ? W = l[17] : (W = w.data ?? [], l[16] = w.data, l[17] = W);
|
|
77
|
+
let G = w.isLoading && !w.data, K = T.data?.content ?? null, q = T.isLoading && !!S, J;
|
|
78
|
+
l[18] !== N || l[19] !== j || l[20] !== z || l[21] !== V || l[22] !== _ || l[23] !== b || l[24] !== U || l[25] !== S || l[26] !== W || l[27] !== G || l[28] !== K || l[29] !== q || l[30] !== w.error || l[31] !== w.isFetching ? (J = {
|
|
79
|
+
nodes: W,
|
|
80
|
+
isTreeLoading: G,
|
|
81
|
+
treeError: w.error,
|
|
82
|
+
isFetchingTree: w.isFetching,
|
|
83
|
+
openFiles: b,
|
|
84
|
+
selectedFile: S,
|
|
85
|
+
fileContent: K,
|
|
86
|
+
isContentLoading: q,
|
|
87
|
+
expandedFolders: _,
|
|
88
|
+
toggleFolder: D,
|
|
89
|
+
selectFile: k,
|
|
90
|
+
closeFile: j,
|
|
91
|
+
closeAll: F,
|
|
92
|
+
closeOthers: L,
|
|
93
|
+
closeToLeft: z,
|
|
94
|
+
closeToRight: V,
|
|
95
|
+
clearSelection: N,
|
|
96
|
+
refreshTree: U
|
|
97
|
+
}, l[18] = N, l[19] = j, l[20] = z, l[21] = V, l[22] = _, l[23] = b, l[24] = U, l[25] = S, l[26] = W, l[27] = G, l[28] = K, l[29] = q, l[30] = w.error, l[31] = w.isFetching, l[32] = J) : J = l[32];
|
|
98
|
+
let Y = J, X;
|
|
99
|
+
return l[33] !== p || l[34] !== Y ? (X = /* @__PURE__ */ jsx(FileExplorerContext.Provider, {
|
|
100
|
+
value: Y,
|
|
101
|
+
children: p
|
|
102
|
+
}), l[33] = p, l[34] = Y, l[35] = X) : X = l[35], X;
|
|
103
103
|
}
|
|
104
104
|
function useFileExplorer() {
|
|
105
105
|
let e = useContext(FileExplorerContext);
|
|
@@ -2,8 +2,8 @@ import { useStudio } from "../../../providers/StudioProvider.js";
|
|
|
2
2
|
import { useCreateWorkflow } from "../../../hooks/useWorkflows.js";
|
|
3
3
|
import { useRunWorkflow } from "../../../hooks/useProcessor.js";
|
|
4
4
|
import { useWorkbenchLayout } from "../../workbench/providers/WorkbenchLayoutProvider.js";
|
|
5
|
-
import "../../workbench/index.js";
|
|
6
5
|
import { SidebarPanel } from "../../workbench/components/SidebarPanel.js";
|
|
6
|
+
import "../../workbench/index.js";
|
|
7
7
|
import { useGitInvalidation, useGitLog, useGitRemote, useGitStatus, useRemoveGitRemote } from "../hooks/useGit.js";
|
|
8
8
|
import { GitBranchBadge } from "./GitBranchBadge.js";
|
|
9
9
|
import { GitCommitList } from "./GitCommitList.js";
|
|
@@ -2,8 +2,8 @@ import { Button } from "../../../components/ui/button.js";
|
|
|
2
2
|
import { Input } from "../../../components/ui/input.js";
|
|
3
3
|
import { Label } from "../../../components/ui/label.js";
|
|
4
4
|
import { useWorkbenchLayout } from "../../workbench/providers/WorkbenchLayoutProvider.js";
|
|
5
|
-
import "../../workbench/index.js";
|
|
6
5
|
import { SidebarPanel } from "../../workbench/components/SidebarPanel.js";
|
|
6
|
+
import "../../workbench/index.js";
|
|
7
7
|
import { useCreateSecret, useDeleteSecret, useUpdateSecret, useWorkspaceSecrets } from "../../../hooks/useSecrets.js";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
9
9
|
import { useState } from "react";
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import PageBreadcrumbs_default from "../../components/page/PageBreadcrumbs.js";
|
|
2
2
|
import WorkflowList_default from "./WorkflowList.js";
|
|
3
|
-
import { ScrollProvider } from "./providers/ScrollProvider.js";
|
|
4
3
|
import { WorkbenchLayoutProvider } from "./providers/WorkbenchLayoutProvider.js";
|
|
5
4
|
import { WorkbenchSidebarShell } from "./components/WorkbenchSidebarShell.js";
|
|
5
|
+
import { ScrollProvider } from "./providers/ScrollProvider.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
function WorkbenchContent(
|
|
9
|
-
let
|
|
10
|
-
|
|
8
|
+
function WorkbenchContent(i) {
|
|
9
|
+
let a = c(7), { workflow: l, breadcrumbData: u } = i, d;
|
|
10
|
+
a[0] === u ? d = a[1] : (d = /* @__PURE__ */ jsx("div", {
|
|
11
11
|
className: "border-b flex h-12 shrink-0 items-center",
|
|
12
12
|
children: u ? /* @__PURE__ */ jsx(PageBreadcrumbs_default, { breadcrumbData: u }) : /* @__PURE__ */ jsx("span", {
|
|
13
13
|
className: "px-3 text-sm font-medium",
|
|
14
14
|
children: "Workflows"
|
|
15
15
|
})
|
|
16
|
-
}),
|
|
16
|
+
}), a[0] = u, a[1] = d);
|
|
17
17
|
let f;
|
|
18
|
-
|
|
18
|
+
a[2] === l ? f = a[3] : (f = /* @__PURE__ */ jsx(ScrollProvider, { children: /* @__PURE__ */ jsx("div", {
|
|
19
19
|
className: "flex-1 overflow-auto",
|
|
20
20
|
children: /* @__PURE__ */ jsx(WorkflowList_default, { workflow: l })
|
|
21
|
-
}) }),
|
|
21
|
+
}) }), a[2] = l, a[3] = f);
|
|
22
22
|
let p;
|
|
23
|
-
return
|
|
23
|
+
return a[4] !== d || a[5] !== f ? (p = /* @__PURE__ */ jsx("div", {
|
|
24
24
|
className: "flex h-full flex-col",
|
|
25
25
|
children: /* @__PURE__ */ jsx("div", {
|
|
26
26
|
className: "flex flex-1 gap-4 overflow-hidden md:flex-row flex-col",
|
|
@@ -29,21 +29,21 @@ function WorkbenchContent(a) {
|
|
|
29
29
|
children: [d, f]
|
|
30
30
|
})
|
|
31
31
|
})
|
|
32
|
-
}),
|
|
32
|
+
}), a[4] = d, a[5] = f, a[6] = p) : p = a[6], p;
|
|
33
33
|
}
|
|
34
34
|
function Workbench(e) {
|
|
35
|
-
let r = c(9), { workflow:
|
|
36
|
-
r[0] !== s || r[1] !==
|
|
37
|
-
workflow:
|
|
35
|
+
let r = c(9), { workflow: o, breadcrumbData: s, getPreviewUrl: u, getEnvironmentPreviewUrl: d } = e, f = o?.workspaceId, p;
|
|
36
|
+
r[0] !== s || r[1] !== o ? (p = /* @__PURE__ */ jsx(WorkbenchSidebarShell, { children: /* @__PURE__ */ jsx(WorkbenchContent, {
|
|
37
|
+
workflow: o,
|
|
38
38
|
breadcrumbData: s
|
|
39
|
-
}) }), r[0] = s, r[1] =
|
|
39
|
+
}) }), r[0] = s, r[1] = o, r[2] = p) : p = r[2];
|
|
40
40
|
let m;
|
|
41
|
-
return r[3] !== d || r[4] !== u || r[5] !== p || r[6] !==
|
|
41
|
+
return r[3] !== d || r[4] !== u || r[5] !== p || r[6] !== o || r[7] !== f ? (m = /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
|
|
42
42
|
workspaceId: f,
|
|
43
|
-
workflow:
|
|
43
|
+
workflow: o,
|
|
44
44
|
getPreviewUrl: u,
|
|
45
45
|
getEnvironmentPreviewUrl: d,
|
|
46
46
|
children: p
|
|
47
|
-
}), r[3] = d, r[4] = u, r[5] = p, r[6] =
|
|
47
|
+
}), r[3] = d, r[4] = u, r[5] = p, r[6] = o, r[7] = f, r[8] = m) : m = r[8], m;
|
|
48
48
|
}
|
|
49
49
|
export { Workbench as default };
|
|
@@ -6,9 +6,9 @@ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../co
|
|
|
6
6
|
import { Dialog, DialogContent, DialogTitle } from "../../../components/ui/dialog.js";
|
|
7
7
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../../components/ui/select.js";
|
|
8
8
|
import ErrorSnackbar_default from "../../../components/feedback/ErrorSnackbar.js";
|
|
9
|
-
import CreateWorkspace_default from "../../workspaces/components/CreateWorkspace.js";
|
|
10
9
|
import { useStartWorkflow } from "../../../hooks/useProcessor.js";
|
|
11
10
|
import Form_default from "../../../components/dynamic-form/Form.js";
|
|
11
|
+
import CreateWorkspace_default from "../../workspaces/components/CreateWorkspace.js";
|
|
12
12
|
import "../../workspaces/index.js";
|
|
13
13
|
import { c } from "react/compiler-runtime";
|
|
14
14
|
import { useEffect, useMemo, useState } from "react";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { cn } from "../../../lib/utils.js";
|
|
2
2
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../components/ui/tooltip.js";
|
|
3
|
-
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
4
3
|
import { useFeatureRegistry } from "../../feature-registry/FeatureRegistryProvider.js";
|
|
5
4
|
import "../../feature-registry/index.js";
|
|
5
|
+
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { MonitorPlay, Play, Server } from "lucide-react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
2
1
|
import { useFeatureRegistry } from "../../feature-registry/FeatureRegistryProvider.js";
|
|
3
2
|
import "../../feature-registry/index.js";
|
|
3
|
+
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
4
4
|
import { WorkbenchEnvironmentPanel } from "./WorkbenchEnvironmentPanel.js";
|
|
5
5
|
import { WorkbenchIconSidebar } from "./WorkbenchIconSidebar.js";
|
|
6
6
|
import { WorkbenchPreviewPanel } from "./WorkbenchPreviewPanel.js";
|
|
@@ -49,8 +49,8 @@ function ActivePanelContent() {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
function SidebarContent(
|
|
53
|
-
let i = c(12), { children: o } =
|
|
52
|
+
function SidebarContent(e) {
|
|
53
|
+
let i = c(12), { children: o } = e, { activePanel: s, panelSize: p } = useWorkbenchLayout(), m = `${s ? CONTENT_WIDTH[p] : "w-full"} overflow-hidden`, h;
|
|
54
54
|
i[0] !== o || i[1] !== m ? (h = /* @__PURE__ */ jsx("div", {
|
|
55
55
|
className: m,
|
|
56
56
|
children: o
|
|
@@ -3,10 +3,10 @@ import WorkflowHistoryList_default from "./components/WorkflowHistoryList.js";
|
|
|
3
3
|
import WorkflowButtons_default from "./components/buttons/WorkflowButtons.js";
|
|
4
4
|
import WorkflowList_default from "./WorkflowList.js";
|
|
5
5
|
import { useWorkbenchLayout } from "./providers/WorkbenchLayoutProvider.js";
|
|
6
|
+
import { WorkbenchSidebarShell } from "./components/WorkbenchSidebarShell.js";
|
|
6
7
|
import Workbench from "./Workbench.js";
|
|
7
8
|
import { NewRunDialog } from "./components/NewRunDialog.js";
|
|
8
9
|
import "./hooks/useEmbedBridge.js";
|
|
9
10
|
import "./components/PreviewWorkbench.js";
|
|
10
11
|
import { RecentRunItem } from "./components/RecentRunItem.js";
|
|
11
12
|
import "./components/PreviewEmptyState.js";
|
|
12
|
-
import { WorkbenchSidebarShell } from "./components/WorkbenchSidebarShell.js";
|
|
@@ -6,8 +6,8 @@ import { Badge } from "../../components/ui/badge.js";
|
|
|
6
6
|
import { Dialog, DialogContent } from "../../components/ui/dialog.js";
|
|
7
7
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../components/ui/tooltip.js";
|
|
8
8
|
import ListView_default from "../../components/lists/ListView.js";
|
|
9
|
-
import CreateWorkspace_default from "./components/CreateWorkspace.js";
|
|
10
9
|
import { useDebounce } from "../../hooks/useDebounce.js";
|
|
10
|
+
import CreateWorkspace_default from "./components/CreateWorkspace.js";
|
|
11
11
|
import { c } from "react/compiler-runtime";
|
|
12
12
|
import { useEffect, useMemo, useState } from "react";
|
|
13
13
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getAppTypesCacheKey, getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getStudioAppsCacheKey, getToolConfigCacheKey, getToolConfigsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspacesCacheKey } from "./query-keys.js";
|
|
1
|
+
import { getAppTypesCacheKey, getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getStudioAppsCacheKey, getToolConfigCacheKey, getToolConfigsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowStatusCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspacesCacheKey } from "./query-keys.js";
|
|
2
2
|
import { useApiClient } from "./useApi.js";
|
|
3
3
|
import { useIsMobile } from "./use-mobile.js";
|
|
4
4
|
import { useAppsConfig, useAvailableEnvironments, useDocumentConfigs } from "./useConfig.js";
|
|
5
5
|
import { useReplaceEnvironments, useResetEnvironment, useWorkspaceEnvironments } from "./useEnvironments.js";
|
|
6
|
-
import { useBatchDeleteWorkflows, useChildWorkflows, useCreateWorkflow, useDeleteWorkflow, useFilterWorkflows, useUpdateWorkflow, useWorkflow, useWorkflowCheckpoints, useWorkflowConfigByName, useWorkflowSource } from "./useWorkflows.js";
|
|
6
|
+
import { useBatchDeleteWorkflows, useChildWorkflows, useCreateWorkflow, useDeleteWorkflow, useFilterWorkflows, useUpdateWorkflow, useWorkflow, useWorkflowCheckpoints, useWorkflowConfigByName, useWorkflowSource, useWorkflowStatus } from "./useWorkflows.js";
|
|
7
7
|
import { useBatchDeleteWorkspaces, useCreateWorkspace, useDeleteWorkspace, useFilterWorkspaces, useSetFavouriteWorkspace, useUpdateWorkspace, useWorkspace } from "./useWorkspaces.js";
|
package/dist/hooks/query-keys.js
CHANGED
|
@@ -7,11 +7,11 @@ function getHealthCacheKey(e) {
|
|
|
7
7
|
function getAppTypesCacheKey(e) {
|
|
8
8
|
return ["app-types", e];
|
|
9
9
|
}
|
|
10
|
-
function getWorkflowTypesCacheKey(e,
|
|
10
|
+
function getWorkflowTypesCacheKey(e, C) {
|
|
11
11
|
return [
|
|
12
12
|
"workflowTypes",
|
|
13
13
|
e,
|
|
14
|
-
|
|
14
|
+
C
|
|
15
15
|
];
|
|
16
16
|
}
|
|
17
17
|
function getStudioAppsCacheKey(e) {
|
|
@@ -27,112 +27,119 @@ function getDashboardStatsCacheKey(e) {
|
|
|
27
27
|
e
|
|
28
28
|
];
|
|
29
29
|
}
|
|
30
|
-
function getWorkflowCacheKey(e,
|
|
30
|
+
function getWorkflowCacheKey(e, C) {
|
|
31
31
|
return [
|
|
32
32
|
"workflow",
|
|
33
33
|
e,
|
|
34
|
-
|
|
34
|
+
C
|
|
35
|
+
];
|
|
36
|
+
}
|
|
37
|
+
function getWorkflowStatusCacheKey(e, C) {
|
|
38
|
+
return [
|
|
39
|
+
"workflowStatus",
|
|
40
|
+
e,
|
|
41
|
+
C
|
|
35
42
|
];
|
|
36
43
|
}
|
|
37
44
|
function getWorkflowsCacheKey(e) {
|
|
38
45
|
return ["workflows", e];
|
|
39
46
|
}
|
|
40
|
-
function getChildWorkflowsCacheKey(e,
|
|
47
|
+
function getChildWorkflowsCacheKey(e, C) {
|
|
41
48
|
return [
|
|
42
49
|
"childWorkflows",
|
|
43
50
|
e,
|
|
44
|
-
|
|
51
|
+
C
|
|
45
52
|
];
|
|
46
53
|
}
|
|
47
54
|
function getToolConfigsCacheKey(e) {
|
|
48
55
|
return ["toolConfigs", e];
|
|
49
56
|
}
|
|
50
|
-
function getToolConfigCacheKey(e,
|
|
57
|
+
function getToolConfigCacheKey(e, C) {
|
|
51
58
|
return [
|
|
52
59
|
"toolConfig",
|
|
53
60
|
e,
|
|
54
|
-
|
|
61
|
+
C
|
|
55
62
|
];
|
|
56
63
|
}
|
|
57
|
-
function getWorkflowConfigCacheKey(e,
|
|
64
|
+
function getWorkflowConfigCacheKey(e, C) {
|
|
58
65
|
return [
|
|
59
66
|
"workflowConfig",
|
|
60
67
|
e,
|
|
61
|
-
|
|
68
|
+
C
|
|
62
69
|
];
|
|
63
70
|
}
|
|
64
|
-
function getWorkflowSourceCacheKey(e,
|
|
71
|
+
function getWorkflowSourceCacheKey(e, C) {
|
|
65
72
|
return [
|
|
66
73
|
"workflowSource",
|
|
67
74
|
e,
|
|
68
|
-
|
|
75
|
+
C
|
|
69
76
|
];
|
|
70
77
|
}
|
|
71
|
-
function getWorkspaceCacheKey(e,
|
|
78
|
+
function getWorkspaceCacheKey(e, C) {
|
|
72
79
|
return [
|
|
73
80
|
"workspace",
|
|
74
81
|
e,
|
|
75
|
-
|
|
82
|
+
C
|
|
76
83
|
];
|
|
77
84
|
}
|
|
78
85
|
function getWorkspacesCacheKey(e) {
|
|
79
86
|
return ["workspaces", e];
|
|
80
87
|
}
|
|
81
|
-
function getDocumentCacheKey(e,
|
|
88
|
+
function getDocumentCacheKey(e, C) {
|
|
82
89
|
return [
|
|
83
90
|
"document",
|
|
84
91
|
e,
|
|
85
|
-
|
|
92
|
+
C
|
|
86
93
|
];
|
|
87
94
|
}
|
|
88
|
-
function getDocumentsCacheKey(e,
|
|
95
|
+
function getDocumentsCacheKey(e, C) {
|
|
89
96
|
return [
|
|
90
97
|
"documents",
|
|
91
98
|
e,
|
|
92
|
-
|
|
99
|
+
C
|
|
93
100
|
];
|
|
94
101
|
}
|
|
95
|
-
function getSecretsCacheKey(e,
|
|
102
|
+
function getSecretsCacheKey(e, C) {
|
|
96
103
|
return [
|
|
97
104
|
"secrets",
|
|
98
105
|
e,
|
|
99
|
-
|
|
106
|
+
C
|
|
100
107
|
];
|
|
101
108
|
}
|
|
102
|
-
function getGitStatusCacheKey(e,
|
|
109
|
+
function getGitStatusCacheKey(e, C) {
|
|
103
110
|
return [
|
|
104
111
|
"gitStatus",
|
|
105
112
|
e,
|
|
106
|
-
|
|
113
|
+
C
|
|
107
114
|
];
|
|
108
115
|
}
|
|
109
|
-
function getGitLogCacheKey(e,
|
|
116
|
+
function getGitLogCacheKey(e, C) {
|
|
110
117
|
return [
|
|
111
118
|
"gitLog",
|
|
112
119
|
e,
|
|
113
|
-
|
|
120
|
+
C
|
|
114
121
|
];
|
|
115
122
|
}
|
|
116
|
-
function getGitRemoteCacheKey(e,
|
|
123
|
+
function getGitRemoteCacheKey(e, C) {
|
|
117
124
|
return [
|
|
118
125
|
"gitRemote",
|
|
119
126
|
e,
|
|
120
|
-
|
|
127
|
+
C
|
|
121
128
|
];
|
|
122
129
|
}
|
|
123
|
-
function getFileTreeCacheKey(e,
|
|
130
|
+
function getFileTreeCacheKey(e, C) {
|
|
124
131
|
return [
|
|
125
132
|
"fileTree",
|
|
126
133
|
e,
|
|
127
|
-
|
|
134
|
+
C
|
|
128
135
|
];
|
|
129
136
|
}
|
|
130
|
-
function getFileContentCacheKey(e,
|
|
137
|
+
function getFileContentCacheKey(e, C, w) {
|
|
131
138
|
return [
|
|
132
139
|
"fileContent",
|
|
133
140
|
e,
|
|
134
|
-
|
|
135
|
-
|
|
141
|
+
C,
|
|
142
|
+
w
|
|
136
143
|
];
|
|
137
144
|
}
|
|
138
|
-
export { getAppTypesCacheKey, getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getStudioAppsCacheKey, getToolConfigCacheKey, getToolConfigsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspacesCacheKey };
|
|
145
|
+
export { getAppTypesCacheKey, getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getStudioAppsCacheKey, getToolConfigCacheKey, getToolConfigsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowStatusCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspacesCacheKey };
|
package/dist/hooks/useSecrets.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getSecretsCacheKey } from "./query-keys.js";
|
|
2
2
|
import { useApiClient } from "./useApi.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
|
-
import { useMutation, useQuery
|
|
4
|
+
import { useMutation, useQuery } from "@tanstack/react-query";
|
|
5
5
|
function useWorkspaceSecrets(r) {
|
|
6
6
|
let a = c(10), { envKey: o, api: s } = useApiClient(), l;
|
|
7
7
|
a[0] !== o || a[1] !== r ? (l = getSecretsCacheKey(o, r), a[0] = o, a[1] = r, a[2] = l) : l = a[2];
|
|
@@ -15,55 +15,19 @@ function useWorkspaceSecrets(r) {
|
|
|
15
15
|
}, a[6] = l, a[7] = u, a[8] = d, a[9] = f) : f = a[9], useQuery(f);
|
|
16
16
|
}
|
|
17
17
|
function useCreateSecret() {
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
let d;
|
|
21
|
-
i[2] !== o || i[3] !== l ? (d = (t, n) => {
|
|
22
|
-
l.invalidateQueries({ queryKey: getSecretsCacheKey(o, n.workspaceId) });
|
|
23
|
-
}, i[2] = o, i[3] = l, i[4] = d) : d = i[4];
|
|
24
|
-
let f;
|
|
25
|
-
return i[5] !== u || i[6] !== d ? (f = {
|
|
26
|
-
mutationFn: u,
|
|
27
|
-
onSuccess: d
|
|
28
|
-
}, i[5] = u, i[6] = d, i[7] = f) : f = i[7], useMutation(f);
|
|
18
|
+
let e = c(2), { api: i } = useApiClient(), a;
|
|
19
|
+
return e[0] === i ? a = e[1] : (a = { mutationFn: (e) => i.secrets.create(e) }, e[0] = i, e[1] = a), useMutation(a);
|
|
29
20
|
}
|
|
30
21
|
function useUpdateSecret() {
|
|
31
|
-
let
|
|
32
|
-
|
|
33
|
-
let d;
|
|
34
|
-
i[2] !== o || i[3] !== l ? (d = (t, n) => {
|
|
35
|
-
l.invalidateQueries({ queryKey: getSecretsCacheKey(o, n.workspaceId) });
|
|
36
|
-
}, i[2] = o, i[3] = l, i[4] = d) : d = i[4];
|
|
37
|
-
let f;
|
|
38
|
-
return i[5] !== u || i[6] !== d ? (f = {
|
|
39
|
-
mutationFn: u,
|
|
40
|
-
onSuccess: d
|
|
41
|
-
}, i[5] = u, i[6] = d, i[7] = f) : f = i[7], useMutation(f);
|
|
22
|
+
let e = c(2), { api: i } = useApiClient(), a;
|
|
23
|
+
return e[0] === i ? a = e[1] : (a = { mutationFn: (e) => i.secrets.update(e) }, e[0] = i, e[1] = a), useMutation(a);
|
|
42
24
|
}
|
|
43
25
|
function useUpsertSecret() {
|
|
44
|
-
let
|
|
45
|
-
|
|
46
|
-
let d;
|
|
47
|
-
i[2] !== o || i[3] !== l ? (d = (t, n) => {
|
|
48
|
-
l.invalidateQueries({ queryKey: getSecretsCacheKey(o, n.workspaceId) });
|
|
49
|
-
}, i[2] = o, i[3] = l, i[4] = d) : d = i[4];
|
|
50
|
-
let f;
|
|
51
|
-
return i[5] !== u || i[6] !== d ? (f = {
|
|
52
|
-
mutationFn: u,
|
|
53
|
-
onSuccess: d
|
|
54
|
-
}, i[5] = u, i[6] = d, i[7] = f) : f = i[7], useMutation(f);
|
|
26
|
+
let e = c(2), { api: i } = useApiClient(), a;
|
|
27
|
+
return e[0] === i ? a = e[1] : (a = { mutationFn: (e) => i.secrets.upsert(e) }, e[0] = i, e[1] = a), useMutation(a);
|
|
55
28
|
}
|
|
56
29
|
function useDeleteSecret() {
|
|
57
|
-
let
|
|
58
|
-
|
|
59
|
-
let d;
|
|
60
|
-
i[2] !== o || i[3] !== l ? (d = (t, n) => {
|
|
61
|
-
l.invalidateQueries({ queryKey: getSecretsCacheKey(o, n.workspaceId) });
|
|
62
|
-
}, i[2] = o, i[3] = l, i[4] = d) : d = i[4];
|
|
63
|
-
let f;
|
|
64
|
-
return i[5] !== u || i[6] !== d ? (f = {
|
|
65
|
-
mutationFn: u,
|
|
66
|
-
onSuccess: d
|
|
67
|
-
}, i[5] = u, i[6] = d, i[7] = f) : f = i[7], useMutation(f);
|
|
30
|
+
let e = c(2), { api: i } = useApiClient(), a;
|
|
31
|
+
return e[0] === i ? a = e[1] : (a = { mutationFn: (e) => i.secrets.delete(e) }, e[0] = i, e[1] = a), useMutation(a);
|
|
68
32
|
}
|
|
69
33
|
export { useCreateSecret, useDeleteSecret, useUpdateSecret, useUpsertSecret, useWorkspaceSecrets };
|