@loopstack/loopstack-studio 0.33.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/app/EnvironmentEmbedRoot.js +22 -24
- 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/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/useSecrets.js +9 -45
- package/dist/index.d.ts +27 -13
- package/dist/index.js +6 -6
- 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
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -293,14 +293,26 @@ declare function createApi(http: AxiosInstance): {
|
|
|
293
293
|
}>;
|
|
294
294
|
};
|
|
295
295
|
files: {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
296
|
+
local: {
|
|
297
|
+
getTree: (params: {
|
|
298
|
+
workspaceId: string;
|
|
299
|
+
path?: string;
|
|
300
|
+
}) => Promise<FileExplorerNode[]>;
|
|
301
|
+
readFile: (params: {
|
|
302
|
+
workspaceId: string;
|
|
303
|
+
path: string;
|
|
304
|
+
}) => Promise<FileContent>;
|
|
305
|
+
};
|
|
306
|
+
remote: {
|
|
307
|
+
getTree: (params: {
|
|
308
|
+
workspaceId: string;
|
|
309
|
+
path?: string;
|
|
310
|
+
}) => Promise<FileExplorerNode[]>;
|
|
311
|
+
readFile: (params: {
|
|
312
|
+
workspaceId: string;
|
|
313
|
+
path: string;
|
|
314
|
+
}) => Promise<FileContent>;
|
|
315
|
+
};
|
|
304
316
|
};
|
|
305
317
|
git: {
|
|
306
318
|
getStatus: (params: {
|
|
@@ -739,11 +751,11 @@ declare class EventEmitter {
|
|
|
739
751
|
emit(event: string, ...args: unknown[]): void;
|
|
740
752
|
}
|
|
741
753
|
|
|
742
|
-
export declare function FeatureRegistryProvider({
|
|
754
|
+
export declare function FeatureRegistryProvider({ appName, children }: FeatureRegistryProviderProps): JSX.Element;
|
|
743
755
|
|
|
744
756
|
export declare interface FeatureRegistryProviderProps {
|
|
745
|
-
/**
|
|
746
|
-
|
|
757
|
+
/** App name to scope features to. Must match an `appName` from `/api/v1/config/apps`. */
|
|
758
|
+
appName: string;
|
|
747
759
|
children: ReactNode;
|
|
748
760
|
}
|
|
749
761
|
|
|
@@ -752,8 +764,6 @@ declare interface FileContent {
|
|
|
752
764
|
content: string;
|
|
753
765
|
}
|
|
754
766
|
|
|
755
|
-
export declare const fileExplorerFeature: StudioFeature;
|
|
756
|
-
|
|
757
767
|
declare interface FileExplorerNode {
|
|
758
768
|
id: string;
|
|
759
769
|
name: string;
|
|
@@ -940,6 +950,8 @@ declare interface LoadingCenteredProps extends default_2.HTMLAttributes<HTMLDivE
|
|
|
940
950
|
children?: default_2.ReactNode;
|
|
941
951
|
}
|
|
942
952
|
|
|
953
|
+
export declare const localFileExplorerFeature: StudioFeature;
|
|
954
|
+
|
|
943
955
|
export declare const LocalHealthCheck: () => JSX.Element | null;
|
|
944
956
|
|
|
945
957
|
export declare class LocalRouter implements StudioRouter {
|
|
@@ -1043,6 +1055,8 @@ export declare function RadioGroup({ className, ...props }: React_2.ComponentPro
|
|
|
1043
1055
|
|
|
1044
1056
|
export declare function RadioGroupItem({ className, ...props }: React_2.ComponentProps<typeof RadioGroupPrimitive.Item>): JSX.Element;
|
|
1045
1057
|
|
|
1058
|
+
export declare const remoteFileExplorerFeature: StudioFeature;
|
|
1059
|
+
|
|
1046
1060
|
export declare interface RowAction<T = any> {
|
|
1047
1061
|
id: string;
|
|
1048
1062
|
label: string;
|
package/dist/index.js
CHANGED
|
@@ -64,17 +64,17 @@ import ErrorSnackbar_default from "./components/feedback/ErrorSnackbar.js";
|
|
|
64
64
|
import ErrorAlert_default from "./components/feedback/ErrorAlert.js";
|
|
65
65
|
import "./components/index.js";
|
|
66
66
|
import DebugPage_default from "./pages/DebugPage.js";
|
|
67
|
+
import { FeatureRegistryProvider } from "./features/feature-registry/FeatureRegistryProvider.js";
|
|
68
|
+
import "./features/feature-registry/index.js";
|
|
67
69
|
import { EnvironmentSlotSelector } from "./features/workspaces/components/EnvironmentSlotSelector.js";
|
|
68
70
|
import CreateWorkspace_default from "./features/workspaces/components/CreateWorkspace.js";
|
|
69
|
-
import DashboardPage from "./pages/DashboardPage.js";
|
|
70
|
-
import WorkspacesPage from "./pages/WorkspacesPage.js";
|
|
71
71
|
import "./features/workspaces/index.js";
|
|
72
|
-
import {
|
|
72
|
+
import { localFileExplorerFeature, remoteFileExplorerFeature } from "./features/file-explorer/file-explorer-feature.js";
|
|
73
73
|
import "./features/file-explorer/index.js";
|
|
74
74
|
import { secretsFeature } from "./features/secrets/secrets-feature.js";
|
|
75
75
|
import "./features/secrets/index.js";
|
|
76
|
-
import
|
|
77
|
-
import "./
|
|
76
|
+
import DashboardPage from "./pages/DashboardPage.js";
|
|
77
|
+
import WorkspacesPage from "./pages/WorkspacesPage.js";
|
|
78
78
|
import WorkspacePage_default from "./pages/WorkspacePage.js";
|
|
79
79
|
import WorkspaceRunsPage_default from "./pages/WorkspaceRunsPage.js";
|
|
80
80
|
import WorkbenchPage from "./pages/WorkbenchPage.js";
|
|
@@ -90,4 +90,4 @@ import LocalHealthCheck_default from "./features/health/LocalHealthCheck.js";
|
|
|
90
90
|
import EnvironmentEmbedRoot from "./app/EnvironmentEmbedRoot.js";
|
|
91
91
|
import { StudioSidebar } from "./components/layout/StudioSidebar.js";
|
|
92
92
|
import "./features/health/index.js";
|
|
93
|
-
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,
|
|
93
|
+
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, 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, localFileExplorerFeature, remoteFileExplorerFeature, secretsFeature, useApiClient, useAppsConfig, useAvailableEnvironments, useBatchDeleteWorkflows, useBatchDeleteWorkspaces, useChildWorkflows, useComponentOverrides, useCreateWorkflow, useCreateWorkspace, useDeleteWorkflow, useDeleteWorkspace, useDocumentConfigs, useFilterWorkflows, useFilterWorkspaces, useIsMobile, useOptionalStudioPreferences, useReplaceEnvironments, useResetEnvironment, useRouter, useSetFavouriteWorkspace, useSidebar, useStudio, useStudioOptional, useStudioPreferences, useUpdateWorkflow, useUpdateWorkspace, useWorkflow, useWorkflowCheckpoints, useWorkflowConfigByName, useWorkflowSource, useWorkflowStatus, useWorkspace, useWorkspaceEnvironments };
|