@loopstack/loopstack-studio 0.29.0 → 0.29.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/api/config.js +2 -2
- package/dist/features/workbench/components/NewRunDialog.js +2 -2
- package/dist/features/workspaces/Workspaces.js +2 -2
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/query-keys.js +3 -3
- package/dist/hooks/useConfig.js +15 -15
- package/dist/index.d.ts +12 -12
- package/dist/index.js +3 -3
- package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
- package/dist/pages/DebugWorkflowsPage.js +12 -12
- package/dist/pages/WorkspacePage.js +2 -2
- package/package.json +2 -2
package/dist/api/config.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function createConfigApi(e) {
|
|
2
2
|
return {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
getAppTypes: () => e.get("/api/v1/config/workspaces").then((e) => e.data),
|
|
4
|
+
getWorkflowTypesByApp: (t) => e.get(`/api/v1/config/workspaces/${encodeURIComponent(t.appBlockName)}/workflows`).then((e) => e.data),
|
|
5
5
|
getWorkflowConfig: (t) => e.get(`/api/v1/config/workflows/${encodeURIComponent(t.alias)}`).then((e) => e.data),
|
|
6
6
|
getWorkflowSource: (t) => e.get(`/api/v1/config/workflows/${encodeURIComponent(t.alias)}/source`).then((e) => e.data),
|
|
7
7
|
getAvailableEnvironments: () => e.get("/api/v1/config/environments").then((e) => e.data)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useAppConfig, useWorkflowConfig } from "../../../hooks/useConfig.js";
|
|
2
2
|
import { useCreateWorkflow } from "../../../hooks/useWorkflows.js";
|
|
3
3
|
import { useFilterWorkspaces } from "../../../hooks/useWorkspaces.js";
|
|
4
4
|
import { useComponentOverrides } from "../../../providers/ComponentOverridesProvider.js";
|
|
@@ -36,7 +36,7 @@ function NewRunDialog(e) {
|
|
|
36
36
|
}), t[4] = r, t[5] = n, t[6] = o, t[7] = s) : s = t[7], s;
|
|
37
37
|
}
|
|
38
38
|
function NewRunDialogContent(o) {
|
|
39
|
-
let s = c(115), { open: l, onSuccess: u } = o, [d, f] = useState("workspace"), [p, g] = useState(!1), [v, me] = useState(""), [y, he] = useState(""), { CreateWorkspace: x } = useComponentOverrides(), _e = x ?? CreateWorkspace_default, ve =
|
|
39
|
+
let s = c(115), { open: l, onSuccess: u } = o, [d, f] = useState("workspace"), [p, g] = useState(!1), [v, me] = useState(""), [y, he] = useState(""), { CreateWorkspace: x } = useComponentOverrides(), _e = x ?? CreateWorkspace_default, ve = useAppConfig(), ye;
|
|
40
40
|
s[0] === Symbol.for("react.memo_cache_sentinel") ? (ye = {}, s[0] = ye) : ye = s[0];
|
|
41
41
|
let S = useFilterWorkspaces(void 0, ye, "title", "ASC", 0, 100), be;
|
|
42
42
|
s[1] === S.data?.data ? be = s[2] : (be = S.data?.data ?? [], s[1] = S.data?.data, s[2] = be);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useStudio } from "../../providers/StudioProvider.js";
|
|
2
|
-
import {
|
|
2
|
+
import { useAppConfig } from "../../hooks/useConfig.js";
|
|
3
3
|
import { useBatchDeleteWorkspaces, useDeleteWorkspace, useFilterWorkspaces, useSetFavouriteWorkspace } from "../../hooks/useWorkspaces.js";
|
|
4
4
|
import { useComponentOverrides } from "../../providers/ComponentOverridesProvider.js";
|
|
5
5
|
import { Badge } from "../../components/ui/badge.js";
|
|
@@ -20,7 +20,7 @@ var Workspaces_default = () => {
|
|
|
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 =
|
|
23
|
+
let y = useAppConfig(), b = useFilterWorkspaces(Le, p, l, u, o, s), x = useDeleteWorkspace(), ze = useBatchDeleteWorkspaces(), S = useSetFavouriteWorkspace(), C;
|
|
24
24
|
n[4] === x ? C = n[5] : (C = (e) => {
|
|
25
25
|
x.mutate(e);
|
|
26
26
|
}, n[4] = x, n[5] = C);
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey,
|
|
1
|
+
import { getAppTypesCacheKey, getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspacesCacheKey } from "./query-keys.js";
|
|
2
2
|
import { useApiClient } from "./useApi.js";
|
|
3
3
|
import { useIsMobile } from "./use-mobile.js";
|
|
4
|
-
import { useAvailableEnvironments, useWorkflowConfig
|
|
4
|
+
import { useAppConfig, useAvailableEnvironments, useWorkflowConfig } from "./useConfig.js";
|
|
5
5
|
import { useBatchDeleteWorkflows, useChildWorkflows, useCreateWorkflow, useDeleteWorkflow, useFilterWorkflows, useUpdateWorkflow, useWorkflow, useWorkflowCheckpoints, useWorkflowConfigByName, useWorkflowSource } from "./useWorkflows.js";
|
|
6
6
|
import { useBatchDeleteWorkspaces, useCreateWorkspace, useDeleteWorkspace, useFilterWorkspaces, useSetFavouriteWorkspace, useUpdateWorkspace, useWorkspace } from "./useWorkspaces.js";
|
package/dist/hooks/query-keys.js
CHANGED
|
@@ -4,8 +4,8 @@ function getMeCacheKey(e) {
|
|
|
4
4
|
function getHealthCacheKey(e) {
|
|
5
5
|
return ["health", e];
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
return ["
|
|
7
|
+
function getAppTypesCacheKey(e) {
|
|
8
|
+
return ["app-types", e];
|
|
9
9
|
}
|
|
10
10
|
function getWorkflowTypesCacheKey(e, y) {
|
|
11
11
|
return [
|
|
@@ -122,4 +122,4 @@ function getFileContentCacheKey(e, y, b) {
|
|
|
122
122
|
b
|
|
123
123
|
];
|
|
124
124
|
}
|
|
125
|
-
export { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey,
|
|
125
|
+
export { getAppTypesCacheKey, getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspacesCacheKey };
|
package/dist/hooks/useConfig.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { getAvailableEnvironmentsCacheKey, getWorkflowTypesCacheKey
|
|
1
|
+
import { getAppTypesCacheKey, getAvailableEnvironmentsCacheKey, getWorkflowTypesCacheKey } from "./query-keys.js";
|
|
2
2
|
import { useApiClient } from "./useApi.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { useQuery } from "@tanstack/react-query";
|
|
5
|
-
function
|
|
6
|
-
let
|
|
7
|
-
|
|
5
|
+
function useAppConfig() {
|
|
6
|
+
let i = c(7), { envKey: a, api: o } = useApiClient(), s;
|
|
7
|
+
i[0] === a ? s = i[1] : (s = getAppTypesCacheKey(a), i[0] = a, i[1] = s);
|
|
8
8
|
let l;
|
|
9
|
-
|
|
9
|
+
i[2] === o ? l = i[3] : (l = () => o.config.getAppTypes(), i[2] = o, i[3] = l);
|
|
10
10
|
let u;
|
|
11
|
-
return
|
|
11
|
+
return i[4] !== s || i[5] !== l ? (u = {
|
|
12
12
|
queryKey: s,
|
|
13
13
|
queryFn: l
|
|
14
|
-
},
|
|
14
|
+
}, i[4] = s, i[5] = l, i[6] = u) : u = i[6], useQuery(u);
|
|
15
15
|
}
|
|
16
16
|
function useWorkflowConfig(e) {
|
|
17
|
-
let
|
|
18
|
-
|
|
17
|
+
let i = c(10), { envKey: o, api: s } = useApiClient(), l;
|
|
18
|
+
i[0] !== e || i[1] !== o ? (l = getWorkflowTypesCacheKey(o, e), i[0] = e, i[1] = o, i[2] = l) : l = i[2];
|
|
19
19
|
let u;
|
|
20
|
-
|
|
20
|
+
i[3] !== s || i[4] !== e ? (u = () => s.config.getWorkflowTypesByApp({ appBlockName: e }), i[3] = s, i[4] = e, i[5] = u) : u = i[5];
|
|
21
21
|
let d = !!e, f;
|
|
22
|
-
return
|
|
22
|
+
return i[6] !== l || i[7] !== u || i[8] !== d ? (f = {
|
|
23
23
|
queryKey: l,
|
|
24
24
|
queryFn: u,
|
|
25
25
|
enabled: d
|
|
26
|
-
},
|
|
26
|
+
}, i[6] = l, i[7] = u, i[8] = d, i[9] = f) : f = i[9], useQuery(f);
|
|
27
27
|
}
|
|
28
|
-
function useAvailableEnvironments(
|
|
28
|
+
function useAvailableEnvironments(e) {
|
|
29
29
|
let a = c(8), { envKey: o, api: s } = useApiClient(), l;
|
|
30
30
|
a[0] === o ? l = a[1] : (l = getAvailableEnvironmentsCacheKey(o), a[0] = o, a[1] = l);
|
|
31
31
|
let u;
|
|
32
32
|
a[2] === s ? u = a[3] : (u = () => s.config.getAvailableEnvironments(), a[2] = s, a[3] = u);
|
|
33
|
-
let d =
|
|
33
|
+
let d = e?.enabled ?? !0, f;
|
|
34
34
|
return a[4] !== l || a[5] !== u || a[6] !== d ? (f = {
|
|
35
35
|
queryKey: l,
|
|
36
36
|
queryFn: u,
|
|
37
37
|
enabled: d
|
|
38
38
|
}, a[4] = l, a[5] = u, a[6] = d, a[7] = f) : f = a[7], useQuery(f);
|
|
39
39
|
}
|
|
40
|
-
export { useAvailableEnvironments, useWorkflowConfig
|
|
40
|
+
export { useAppConfig, useAvailableEnvironments, useWorkflowConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
2
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
3
|
+
import { AppConfigInterface } from '@loopstack/contracts/api';
|
|
3
4
|
import { AvailableEnvironmentInterface } from '@loopstack/contracts/api';
|
|
4
5
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
5
6
|
import { AxiosInstance } from 'axios';
|
|
@@ -48,7 +49,6 @@ import { WorkflowFullInterface } from '@loopstack/contracts/api';
|
|
|
48
49
|
import { WorkflowItemInterface } from '@loopstack/contracts/api';
|
|
49
50
|
import { WorkflowSourceInterface } from '@loopstack/contracts/api';
|
|
50
51
|
import { WorkflowUpdateInterface } from '@loopstack/contracts/api';
|
|
51
|
-
import { WorkspaceConfigInterface } from '@loopstack/contracts/api';
|
|
52
52
|
import { WorkspaceCreateInterface } from '@loopstack/contracts/api';
|
|
53
53
|
import { WorkspaceEnvironmentInterface } from '@loopstack/contracts/api';
|
|
54
54
|
import { WorkspaceFavouriteInterface } from '@loopstack/contracts/api';
|
|
@@ -252,9 +252,9 @@ declare function createApi(http: AxiosInstance): {
|
|
|
252
252
|
logout: () => Promise<void>;
|
|
253
253
|
};
|
|
254
254
|
config: {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
255
|
+
getAppTypes: () => Promise<AppConfigInterface[]>;
|
|
256
|
+
getWorkflowTypesByApp: (params: {
|
|
257
|
+
appBlockName: string;
|
|
258
258
|
}) => Promise<WorkflowConfigInterface[]>;
|
|
259
259
|
getWorkflowConfig: (params: {
|
|
260
260
|
alias: string;
|
|
@@ -431,7 +431,7 @@ export declare function createApiClient(environment: Environment): {
|
|
|
431
431
|
export declare const CreateWorkspace: ({ types, workspace, onSuccess }: CreateWorkspaceProps) => JSX.Element;
|
|
432
432
|
|
|
433
433
|
export declare interface CreateWorkspaceProps {
|
|
434
|
-
types:
|
|
434
|
+
types: AppConfigInterface[];
|
|
435
435
|
workspace?: WorkspaceItemInterface;
|
|
436
436
|
onSuccess: () => void;
|
|
437
437
|
}
|
|
@@ -658,7 +658,7 @@ export declare function DropdownMenuSubTrigger({ className, inset, children, ...
|
|
|
658
658
|
export declare function DropdownMenuTrigger({ ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): JSX.Element;
|
|
659
659
|
|
|
660
660
|
export declare interface EditWorkspaceProps {
|
|
661
|
-
types:
|
|
661
|
+
types: AppConfigInterface[];
|
|
662
662
|
workspace: WorkspaceItemInterface;
|
|
663
663
|
onSuccess: () => void;
|
|
664
664
|
}
|
|
@@ -757,6 +757,8 @@ export declare type FilterOption = string | {
|
|
|
757
757
|
value: string;
|
|
758
758
|
};
|
|
759
759
|
|
|
760
|
+
export declare function getAppTypesCacheKey(envKey: string): string[];
|
|
761
|
+
|
|
760
762
|
export declare function getAvailableEnvironmentsCacheKey(envKey: string): string[];
|
|
761
763
|
|
|
762
764
|
export declare function getChildWorkflowsCacheKey(envKey: string, parentId: string): string[];
|
|
@@ -801,14 +803,12 @@ export declare function getWorkflowsCacheKey(envKey: string): string[];
|
|
|
801
803
|
|
|
802
804
|
export declare function getWorkflowSourceCacheKey(envKey: string, alias: string): string[];
|
|
803
805
|
|
|
804
|
-
export declare function getWorkflowTypesCacheKey(envKey: string,
|
|
806
|
+
export declare function getWorkflowTypesCacheKey(envKey: string, appBlockName: string): string[];
|
|
805
807
|
|
|
806
808
|
export declare function getWorkspaceCacheKey(envKey: string, id: string): string[];
|
|
807
809
|
|
|
808
810
|
export declare function getWorkspacesCacheKey(envKey: string): string[];
|
|
809
811
|
|
|
810
|
-
export declare function getWorkspaceTypesCacheKey(envKey: string): string[];
|
|
811
|
-
|
|
812
812
|
declare interface GitCommit {
|
|
813
813
|
hash: string;
|
|
814
814
|
shortHash: string;
|
|
@@ -1317,6 +1317,8 @@ export declare function useApiClient(): {
|
|
|
1317
1317
|
api: ApiClient;
|
|
1318
1318
|
};
|
|
1319
1319
|
|
|
1320
|
+
export declare function useAppConfig(): UseQueryResult<AppConfigInterface[], Error>;
|
|
1321
|
+
|
|
1320
1322
|
export declare function useAvailableEnvironments(options?: {
|
|
1321
1323
|
enabled?: boolean;
|
|
1322
1324
|
}): UseQueryResult<AvailableEnvironmentInterface[], Error>;
|
|
@@ -1402,7 +1404,7 @@ export declare function useWorkflow(id: string | undefined): UseQueryResult<Work
|
|
|
1402
1404
|
*/
|
|
1403
1405
|
export declare function useWorkflowCheckpoints(workflowId: string): UseQueryResult<WorkflowCheckpoint[], Error>;
|
|
1404
1406
|
|
|
1405
|
-
export declare function useWorkflowConfig(
|
|
1407
|
+
export declare function useWorkflowConfig(appBlockName: string | undefined): UseQueryResult<WorkflowConfigInterface[], Error>;
|
|
1406
1408
|
|
|
1407
1409
|
/**
|
|
1408
1410
|
* Fetch workflow config by block name (class name).
|
|
@@ -1416,8 +1418,6 @@ export declare function useWorkflowSource(alias: string | undefined): UseQueryRe
|
|
|
1416
1418
|
|
|
1417
1419
|
export declare function useWorkspace(id: string | undefined): UseQueryResult<WorkspaceInterface, Error>;
|
|
1418
1420
|
|
|
1419
|
-
export declare function useWorkspaceConfig(): UseQueryResult<WorkspaceConfigInterface[], Error>;
|
|
1420
|
-
|
|
1421
1421
|
export declare function WorkbenchPage({ getPreviewUrl, getEnvironmentPreviewUrl, environments, }?: {
|
|
1422
1422
|
getPreviewUrl?: (workflowId: string) => string;
|
|
1423
1423
|
getEnvironmentPreviewUrl?: (env: WorkspaceEnvironmentInterface, workflowId?: string) => string;
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey,
|
|
1
|
+
import { getAppTypesCacheKey, getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspacesCacheKey } from "./hooks/query-keys.js";
|
|
2
2
|
import { createApiClient } from "./services/createApiClient.js";
|
|
3
3
|
import { eventBus } from "./services/eventEmitter.js";
|
|
4
4
|
import "./services/index.js";
|
|
5
5
|
import { StudioProvider, useStudio, useStudioOptional } from "./providers/StudioProvider.js";
|
|
6
6
|
import { useApiClient } from "./hooks/useApi.js";
|
|
7
7
|
import { useIsMobile } from "./hooks/use-mobile.js";
|
|
8
|
-
import { useAvailableEnvironments, useWorkflowConfig
|
|
8
|
+
import { useAppConfig, useAvailableEnvironments, useWorkflowConfig } from "./hooks/useConfig.js";
|
|
9
9
|
import { useBatchDeleteWorkflows, useChildWorkflows, useCreateWorkflow, useDeleteWorkflow, useFilterWorkflows, useUpdateWorkflow, useWorkflow, useWorkflowCheckpoints, useWorkflowConfigByName, useWorkflowSource } from "./hooks/useWorkflows.js";
|
|
10
10
|
import { useBatchDeleteWorkspaces, useCreateWorkspace, useDeleteWorkspace, useFilterWorkspaces, useSetFavouriteWorkspace, useUpdateWorkspace, useWorkspace } from "./hooks/useWorkspaces.js";
|
|
11
11
|
import "./hooks/index.js";
|
|
@@ -89,4 +89,4 @@ import "./features/secrets/index.js";
|
|
|
89
89
|
import EnvironmentEmbedRoot from "./app/EnvironmentEmbedRoot.js";
|
|
90
90
|
import { StudioSidebar } from "./components/layout/StudioSidebar.js";
|
|
91
91
|
import "./features/health/index.js";
|
|
92
|
-
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, CreateWorkspace_default as CreateWorkspace, 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, EnvironmentEmbedRoot, EnvironmentSlotSelector, ErrorAlert_default as ErrorAlert, ErrorBoundary, ErrorSnackbar_default as ErrorSnackbar, FeatureRegistryProvider, 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, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreviewWorkbenchPage, RadioGroup, RadioGroupItem, RunsListPage, RunsPage, 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, StudioLandingPage, StudioPreferencesProvider, StudioProvider, StudioSidebar, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, WorkbenchPage, WorkflowDebugPage_default as WorkflowDebugPage, WorkspacePage_default as WorkspacePage, WorkspaceRunsPage_default as WorkspaceRunsPage, WorkspacesPage, badgeVariants, buttonVariants, createApiClient, eventBus, fileExplorerFeature, getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey,
|
|
92
|
+
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, CreateWorkspace_default as CreateWorkspace, 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, EnvironmentEmbedRoot, EnvironmentSlotSelector, ErrorAlert_default as ErrorAlert, ErrorBoundary, ErrorSnackbar_default as ErrorSnackbar, FeatureRegistryProvider, 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, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreviewWorkbenchPage, RadioGroup, RadioGroupItem, RunsListPage, RunsPage, 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, StudioLandingPage, StudioPreferencesProvider, StudioProvider, StudioSidebar, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, WorkbenchPage, WorkflowDebugPage_default as WorkflowDebugPage, WorkspacePage_default as WorkspacePage, WorkspaceRunsPage_default as WorkspaceRunsPage, WorkspacesPage, badgeVariants, buttonVariants, createApiClient, eventBus, fileExplorerFeature, getAppTypesCacheKey, getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspacesCacheKey, secretsFeature, useApiClient, useAppConfig, useAvailableEnvironments, useBatchDeleteWorkflows, useBatchDeleteWorkspaces, useChildWorkflows, useComponentOverrides, useCreateWorkflow, useCreateWorkspace, useDeleteWorkflow, useDeleteWorkspace, useFilterWorkflows, useFilterWorkspaces, useIsMobile, useOptionalStudioPreferences, useRouter, useSetFavouriteWorkspace, useSidebar, useStudio, useStudioOptional, useStudioPreferences, useUpdateWorkflow, useUpdateWorkspace, useWorkflow, useWorkflowCheckpoints, useWorkflowConfig, useWorkflowConfigByName, useWorkflowSource, useWorkspace };
|
|
@@ -43,7 +43,7 @@ function DebugWorkflowDetailsPage() {
|
|
|
43
43
|
let k;
|
|
44
44
|
m[11] !== E || m[12] !== O ? (k = [E, O], m[11] = E, m[12] = O, m[13] = k) : k = m[13];
|
|
45
45
|
let A = k, j;
|
|
46
|
-
m[14] !==
|
|
46
|
+
m[14] !== v || m[15] !== w || m[16] !== S || m[17] !== y || m[18] !== b ? (j = w ? /* @__PURE__ */ jsxs("div", {
|
|
47
47
|
className: "flex items-center space-x-2",
|
|
48
48
|
children: [/* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }), /* @__PURE__ */ jsx("span", { children: "Loading..." })]
|
|
49
49
|
}) : b ? /* @__PURE__ */ jsxs("div", {
|
|
@@ -97,7 +97,7 @@ function DebugWorkflowDetailsPage() {
|
|
|
97
97
|
", Workflow: ",
|
|
98
98
|
y,
|
|
99
99
|
")"
|
|
100
|
-
] }), m[14] =
|
|
100
|
+
] }), m[14] = v, m[15] = w, m[16] = S, m[17] = y, m[18] = b, m[19] = j) : j = m[19];
|
|
101
101
|
let M;
|
|
102
102
|
return m[20] !== A || m[21] !== j ? (M = /* @__PURE__ */ jsx(MainLayout_default, {
|
|
103
103
|
breadcrumbsData: A,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
2
|
import { useApiClient } from "../hooks/useApi.js";
|
|
3
|
-
import {
|
|
3
|
+
import { useAppConfig } from "../hooks/useConfig.js";
|
|
4
4
|
import { Badge } from "../components/ui/badge.js";
|
|
5
5
|
import MainLayout_default from "../components/layout/MainLayout.js";
|
|
6
6
|
import { DataTable } from "../components/data-table/DataTable.js";
|
|
@@ -9,26 +9,26 @@ import { useMemo, useState } from "react";
|
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { useQueries } from "@tanstack/react-query";
|
|
11
11
|
function DebugWorkflowsPage() {
|
|
12
|
-
let f = c(50), { router: m } = useStudio(), { envKey: h, api: g } = useApiClient(), { data: _, isLoading: v } =
|
|
12
|
+
let f = c(50), { router: m } = useStudio(), { envKey: h, api: g } = useApiClient(), { data: _, isLoading: v } = useAppConfig(), y;
|
|
13
13
|
f[0] === _ ? y = f[1] : (y = _ ?? [], f[0] = _, f[1] = y);
|
|
14
14
|
let b;
|
|
15
|
-
if (f[2] !== g || f[3] !==
|
|
15
|
+
if (f[2] !== g || f[3] !== _?.length || f[4] !== h || f[5] !== y) {
|
|
16
16
|
let e;
|
|
17
|
-
f[7] !== g || f[8] !==
|
|
17
|
+
f[7] !== g || f[8] !== _?.length || f[9] !== h ? (e = (e) => ({
|
|
18
18
|
queryKey: [
|
|
19
19
|
"workflowTypes",
|
|
20
20
|
e.className,
|
|
21
21
|
h
|
|
22
22
|
],
|
|
23
23
|
queryFn: async () => {
|
|
24
|
-
let u = await g.config.
|
|
24
|
+
let u = await g.config.getWorkflowTypesByApp({ appBlockName: e.className });
|
|
25
25
|
return {
|
|
26
|
-
|
|
26
|
+
appBlockName: e.className,
|
|
27
27
|
types: u
|
|
28
28
|
};
|
|
29
29
|
},
|
|
30
30
|
enabled: !!_?.length
|
|
31
|
-
}), f[7] = g, f[8] =
|
|
31
|
+
}), f[7] = g, f[8] = _?.length, f[9] = h, f[10] = e) : e = f[10], b = y.map(e), f[2] = g, f[3] = _?.length, f[4] = h, f[5] = y, f[6] = b;
|
|
32
32
|
} else b = f[6];
|
|
33
33
|
let x;
|
|
34
34
|
f[11] === b ? x = f[12] : (x = { queries: b }, f[11] = b, f[12] = x);
|
|
@@ -48,7 +48,7 @@ function DebugWorkflowsPage() {
|
|
|
48
48
|
if (f[18] !== E || f[19] !== D || f[20] !== k || f[21] !== j) {
|
|
49
49
|
if (L = E, D) {
|
|
50
50
|
let e = D.toLowerCase();
|
|
51
|
-
L = L.filter((u) => u.alias?.toLowerCase().includes(e) || u.title?.toLowerCase().includes(e) || u.description?.toLowerCase().includes(e) || u.
|
|
51
|
+
L = L.filter((u) => u.alias?.toLowerCase().includes(e) || u.title?.toLowerCase().includes(e) || u.description?.toLowerCase().includes(e) || u.appBlockName.toLowerCase().includes(e));
|
|
52
52
|
}
|
|
53
53
|
let e;
|
|
54
54
|
f[24] !== k || f[25] !== j ? (e = (e, u) => {
|
|
@@ -75,8 +75,8 @@ function DebugWorkflowsPage() {
|
|
|
75
75
|
format: _temp4
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
|
-
id: "
|
|
79
|
-
label: "
|
|
78
|
+
id: "appBlockName",
|
|
79
|
+
label: "App Type",
|
|
80
80
|
sortable: !0,
|
|
81
81
|
format: _temp5
|
|
82
82
|
},
|
|
@@ -155,11 +155,11 @@ function _temp3(e) {
|
|
|
155
155
|
}
|
|
156
156
|
function _temp2(e) {
|
|
157
157
|
if (!e.data) return [];
|
|
158
|
-
let {
|
|
158
|
+
let { appBlockName: u, types: d } = e.data;
|
|
159
159
|
return (d ?? []).map((e) => ({
|
|
160
160
|
...e,
|
|
161
161
|
id: `${u}::${e.alias}`,
|
|
162
|
-
|
|
162
|
+
appBlockName: u
|
|
163
163
|
}));
|
|
164
164
|
}
|
|
165
165
|
function _temp(e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
|
-
import {
|
|
2
|
+
import { useAppConfig } from "../hooks/useConfig.js";
|
|
3
3
|
import { useWorkspace } from "../hooks/useWorkspaces.js";
|
|
4
4
|
import MainLayout_default from "../components/layout/MainLayout.js";
|
|
5
5
|
import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
|
|
@@ -12,7 +12,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
12
12
|
import { useParams } from "react-router-dom";
|
|
13
13
|
import { Loader2 } from "lucide-react";
|
|
14
14
|
var WorkspacePage_default = () => {
|
|
15
|
-
let _ = c(40), { router: v } = useStudio(), { workspaceId: y } = useParams(), b = useWorkspace(y), x =
|
|
15
|
+
let _ = c(40), { router: v } = useStudio(), { workspaceId: y } = useParams(), b = useWorkspace(y), x = useAppConfig(), S = useDefaultEnvironmentPreviewUrl(), C = b.data, w;
|
|
16
16
|
bb0: {
|
|
17
17
|
if (!C || !x.data) {
|
|
18
18
|
w = void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loopstack/loopstack-studio",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.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/contracts": "^0.
|
|
29
|
+
"@loopstack/contracts": "^0.31.0",
|
|
30
30
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
31
31
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
32
32
|
"@radix-ui/react-avatar": "^1.1.11",
|