@loopstack/loopstack-studio 0.26.0 → 0.26.1
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 +13 -11
- package/dist/features/git/api/git.js +9 -0
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/query-keys.js +45 -24
- package/dist/index.d.ts +48 -0
- package/dist/index.js +2 -2
- package/dist/pages/WorkspacePage.js +2 -4
- package/dist/providers/SseProvider.js +14 -20
- package/package.json +2 -2
package/dist/api/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createFilesApi } from "../features/file-explorer/api/files.js";
|
|
2
|
+
import { createGitApi } from "../features/git/api/git.js";
|
|
2
3
|
import { createAuthApi } from "./auth.js";
|
|
3
4
|
import { createConfigApi } from "./config.js";
|
|
4
5
|
import { createDashboardApi } from "./dashboard.js";
|
|
@@ -9,18 +10,19 @@ import { createSecretsApi } from "./secrets.js";
|
|
|
9
10
|
import { createWorkflowsApi } from "./workflows.js";
|
|
10
11
|
import { createWorkspacesApi } from "./workspaces.js";
|
|
11
12
|
import { createAxiosClient } from "./client.js";
|
|
12
|
-
function createApi(
|
|
13
|
+
function createApi(f) {
|
|
13
14
|
return {
|
|
14
|
-
auth: createAuthApi(
|
|
15
|
-
config: createConfigApi(
|
|
16
|
-
dashboard: createDashboardApi(
|
|
17
|
-
documents: createDocumentsApi(
|
|
18
|
-
environments: createEnvironmentsApi(
|
|
19
|
-
files: createFilesApi(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
auth: createAuthApi(f),
|
|
16
|
+
config: createConfigApi(f),
|
|
17
|
+
dashboard: createDashboardApi(f),
|
|
18
|
+
documents: createDocumentsApi(f),
|
|
19
|
+
environments: createEnvironmentsApi(f),
|
|
20
|
+
files: createFilesApi(f),
|
|
21
|
+
git: createGitApi(f),
|
|
22
|
+
processor: createProcessorApi(f),
|
|
23
|
+
secrets: createSecretsApi(f),
|
|
24
|
+
workflows: createWorkflowsApi(f),
|
|
25
|
+
workspaces: createWorkspacesApi(f)
|
|
24
26
|
};
|
|
25
27
|
}
|
|
26
28
|
export { createApi };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
function createGitApi(e) {
|
|
2
|
+
return {
|
|
3
|
+
getStatus: (t) => e.get(`/api/v1/workspaces/${t.workspaceId}/git/status`).then((e) => e.data),
|
|
4
|
+
getLog: (t) => e.get(`/api/v1/workspaces/${t.workspaceId}/git/log`, { params: t.limit ? { limit: t.limit } : void 0 }).then((e) => e.data),
|
|
5
|
+
getRemote: (t) => e.get(`/api/v1/workspaces/${t.workspaceId}/git/remote`).then((e) => e.data),
|
|
6
|
+
removeRemote: (t) => e.delete(`/api/v1/workspaces/${t.workspaceId}/git/remote`).then((e) => e.data)
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export { createGitApi };
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey } from "./query-keys.js";
|
|
1
|
+
import { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey } from "./query-keys.js";
|
|
2
2
|
import { useApiClient } from "./useApi.js";
|
|
3
3
|
import { useIsMobile } from "./use-mobile.js";
|
|
4
4
|
import { useAvailableEnvironments, useWorkflowConfig, useWorkspaceConfig } from "./useConfig.js";
|
package/dist/hooks/query-keys.js
CHANGED
|
@@ -7,11 +7,11 @@ function getHealthCacheKey(e) {
|
|
|
7
7
|
function getWorkspaceTypesCacheKey(e) {
|
|
8
8
|
return ["workspace-types", e];
|
|
9
9
|
}
|
|
10
|
-
function getWorkflowTypesCacheKey(e,
|
|
10
|
+
function getWorkflowTypesCacheKey(e, y) {
|
|
11
11
|
return [
|
|
12
12
|
"workflowTypes",
|
|
13
13
|
e,
|
|
14
|
-
|
|
14
|
+
y
|
|
15
15
|
];
|
|
16
16
|
}
|
|
17
17
|
function getAvailableEnvironmentsCacheKey(e) {
|
|
@@ -24,81 +24,102 @@ function getDashboardStatsCacheKey(e) {
|
|
|
24
24
|
e
|
|
25
25
|
];
|
|
26
26
|
}
|
|
27
|
-
function getWorkflowCacheKey(e,
|
|
27
|
+
function getWorkflowCacheKey(e, y) {
|
|
28
28
|
return [
|
|
29
29
|
"workflow",
|
|
30
30
|
e,
|
|
31
|
-
|
|
31
|
+
y
|
|
32
32
|
];
|
|
33
33
|
}
|
|
34
34
|
function getWorkflowsCacheKey(e) {
|
|
35
35
|
return ["workflows", e];
|
|
36
36
|
}
|
|
37
|
-
function getChildWorkflowsCacheKey(e,
|
|
37
|
+
function getChildWorkflowsCacheKey(e, y) {
|
|
38
38
|
return [
|
|
39
39
|
"childWorkflows",
|
|
40
40
|
e,
|
|
41
|
-
|
|
41
|
+
y
|
|
42
42
|
];
|
|
43
43
|
}
|
|
44
|
-
function getWorkflowConfigCacheKey(e,
|
|
44
|
+
function getWorkflowConfigCacheKey(e, y) {
|
|
45
45
|
return [
|
|
46
46
|
"workflowConfig",
|
|
47
47
|
e,
|
|
48
|
-
|
|
48
|
+
y
|
|
49
49
|
];
|
|
50
50
|
}
|
|
51
|
-
function getWorkflowSourceCacheKey(e,
|
|
51
|
+
function getWorkflowSourceCacheKey(e, y) {
|
|
52
52
|
return [
|
|
53
53
|
"workflowSource",
|
|
54
54
|
e,
|
|
55
|
-
|
|
55
|
+
y
|
|
56
56
|
];
|
|
57
57
|
}
|
|
58
|
-
function getWorkspaceCacheKey(e,
|
|
58
|
+
function getWorkspaceCacheKey(e, y) {
|
|
59
59
|
return [
|
|
60
60
|
"workspace",
|
|
61
61
|
e,
|
|
62
|
-
|
|
62
|
+
y
|
|
63
63
|
];
|
|
64
64
|
}
|
|
65
65
|
function getWorkspacesCacheKey(e) {
|
|
66
66
|
return ["workspaces", e];
|
|
67
67
|
}
|
|
68
|
-
function getDocumentCacheKey(e,
|
|
68
|
+
function getDocumentCacheKey(e, y) {
|
|
69
69
|
return [
|
|
70
70
|
"document",
|
|
71
71
|
e,
|
|
72
|
-
|
|
72
|
+
y
|
|
73
73
|
];
|
|
74
74
|
}
|
|
75
|
-
function getDocumentsCacheKey(e,
|
|
75
|
+
function getDocumentsCacheKey(e, y) {
|
|
76
76
|
return [
|
|
77
77
|
"documents",
|
|
78
78
|
e,
|
|
79
|
-
|
|
79
|
+
y
|
|
80
80
|
];
|
|
81
81
|
}
|
|
82
|
-
function getSecretsCacheKey(e,
|
|
82
|
+
function getSecretsCacheKey(e, y) {
|
|
83
83
|
return [
|
|
84
84
|
"secrets",
|
|
85
85
|
e,
|
|
86
|
-
|
|
86
|
+
y
|
|
87
87
|
];
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function getGitStatusCacheKey(e, y) {
|
|
90
|
+
return [
|
|
91
|
+
"gitStatus",
|
|
92
|
+
e,
|
|
93
|
+
y
|
|
94
|
+
];
|
|
95
|
+
}
|
|
96
|
+
function getGitLogCacheKey(e, y) {
|
|
97
|
+
return [
|
|
98
|
+
"gitLog",
|
|
99
|
+
e,
|
|
100
|
+
y
|
|
101
|
+
];
|
|
102
|
+
}
|
|
103
|
+
function getGitRemoteCacheKey(e, y) {
|
|
104
|
+
return [
|
|
105
|
+
"gitRemote",
|
|
106
|
+
e,
|
|
107
|
+
y
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
function getFileTreeCacheKey(e, y) {
|
|
90
111
|
return [
|
|
91
112
|
"fileTree",
|
|
92
113
|
e,
|
|
93
|
-
|
|
114
|
+
y
|
|
94
115
|
];
|
|
95
116
|
}
|
|
96
|
-
function getFileContentCacheKey(e,
|
|
117
|
+
function getFileContentCacheKey(e, y, b) {
|
|
97
118
|
return [
|
|
98
119
|
"fileContent",
|
|
99
120
|
e,
|
|
100
|
-
|
|
101
|
-
|
|
121
|
+
y,
|
|
122
|
+
b
|
|
102
123
|
];
|
|
103
124
|
}
|
|
104
|
-
export { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey };
|
|
125
|
+
export { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey };
|
package/dist/index.d.ts
CHANGED
|
@@ -297,6 +297,23 @@ declare function createApi(http: AxiosInstance): {
|
|
|
297
297
|
path: string;
|
|
298
298
|
}) => Promise<FileContent>;
|
|
299
299
|
};
|
|
300
|
+
git: {
|
|
301
|
+
getStatus: (params: {
|
|
302
|
+
workspaceId: string;
|
|
303
|
+
}) => Promise<GitStatusResponse>;
|
|
304
|
+
getLog: (params: {
|
|
305
|
+
workspaceId: string;
|
|
306
|
+
limit?: number;
|
|
307
|
+
}) => Promise<GitLogResponse>;
|
|
308
|
+
getRemote: (params: {
|
|
309
|
+
workspaceId: string;
|
|
310
|
+
}) => Promise<GitRemoteResponse | null>;
|
|
311
|
+
removeRemote: (params: {
|
|
312
|
+
workspaceId: string;
|
|
313
|
+
}) => Promise<{
|
|
314
|
+
success: boolean;
|
|
315
|
+
}>;
|
|
316
|
+
};
|
|
300
317
|
processor: {
|
|
301
318
|
runWorkflow: (params: {
|
|
302
319
|
workflowId: string;
|
|
@@ -754,6 +771,12 @@ export declare function getFileContentCacheKey(envKey: string, workflowId: strin
|
|
|
754
771
|
|
|
755
772
|
export declare function getFileTreeCacheKey(envKey: string, workflowId: string): string[];
|
|
756
773
|
|
|
774
|
+
export declare function getGitLogCacheKey(envKey: string, workspaceId: string): string[];
|
|
775
|
+
|
|
776
|
+
export declare function getGitRemoteCacheKey(envKey: string, workspaceId: string): string[];
|
|
777
|
+
|
|
778
|
+
export declare function getGitStatusCacheKey(envKey: string, workspaceId: string): string[];
|
|
779
|
+
|
|
757
780
|
export declare function getHealthCacheKey(envKey: string): string[];
|
|
758
781
|
|
|
759
782
|
/**
|
|
@@ -786,6 +809,31 @@ export declare function getWorkspacesCacheKey(envKey: string): string[];
|
|
|
786
809
|
|
|
787
810
|
export declare function getWorkspaceTypesCacheKey(envKey: string): string[];
|
|
788
811
|
|
|
812
|
+
declare interface GitCommit {
|
|
813
|
+
hash: string;
|
|
814
|
+
shortHash: string;
|
|
815
|
+
message: string;
|
|
816
|
+
author: string;
|
|
817
|
+
date: string;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
declare interface GitLogResponse {
|
|
821
|
+
commits: GitCommit[];
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
declare interface GitRemoteResponse {
|
|
825
|
+
name: string;
|
|
826
|
+
url: string;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
declare interface GitStatusResponse {
|
|
830
|
+
branch: string;
|
|
831
|
+
staged: string[];
|
|
832
|
+
modified: string[];
|
|
833
|
+
untracked: string[];
|
|
834
|
+
deleted: string[];
|
|
835
|
+
}
|
|
836
|
+
|
|
789
837
|
export declare const GoogleLogo: default_2.FC<GoogleLogoProps>;
|
|
790
838
|
|
|
791
839
|
declare interface GoogleLogoProps {
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey } from "./hooks/query-keys.js";
|
|
1
|
+
import { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, 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";
|
|
@@ -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, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey, secretsFeature, useApiClient, 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, useWorkspaceConfig };
|
|
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, getWorkspaceTypesCacheKey, getWorkspacesCacheKey, secretsFeature, useApiClient, 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, useWorkspaceConfig };
|
|
@@ -20,10 +20,8 @@ var WorkspacePage_default = () => {
|
|
|
20
20
|
}
|
|
21
21
|
let t;
|
|
22
22
|
if (_[0] !== x.data || _[1] !== C) {
|
|
23
|
-
let
|
|
24
|
-
_[3] === C ?
|
|
25
|
-
let g = x.data.find(h)?.ui;
|
|
26
|
-
t = (g?.widgets ?? g?.actions)?.find(_temp), _[0] = x.data, _[1] = C, _[2] = t;
|
|
23
|
+
let g;
|
|
24
|
+
_[3] === C ? g = _[4] : (g = (t) => t.className === C.className, _[3] = C, _[4] = g), t = x.data.find(g)?.ui?.widgets?.find(_temp), _[0] = x.data, _[1] = C, _[2] = t;
|
|
27
25
|
} else t = _[2];
|
|
28
26
|
w = t;
|
|
29
27
|
}
|
|
@@ -5,29 +5,14 @@ import { useMe } from "../hooks/useAuth.js";
|
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import { useEffect, useRef } from "react";
|
|
7
7
|
function SseProvider() {
|
|
8
|
-
let
|
|
9
|
-
return
|
|
8
|
+
let e = c(5), { environment: l } = useStudio(), { data: u, isSuccess: d } = useMe(), f = useRef(null), p, m;
|
|
9
|
+
return e[0] !== l.url || e[1] !== d || e[2] !== u ? (p = () => {
|
|
10
10
|
if (l.url && d && u) {
|
|
11
11
|
f.current &&= (f.current.close(), null);
|
|
12
|
-
let
|
|
12
|
+
let e = `${l.url}/api/v1/sse/stream`, o = new EventSource(e, { withCredentials: !0 });
|
|
13
13
|
return f.current = o, o.onopen = _temp, o.onerror = () => {
|
|
14
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
|
-
"workspace.updated"
|
|
20
|
-
].forEach((a) => {
|
|
21
|
-
o.addEventListener(a, (o) => {
|
|
22
|
-
try {
|
|
23
|
-
let a = JSON.parse(o.data);
|
|
24
|
-
eventBus.emit(a.type, a);
|
|
25
|
-
} catch (e) {
|
|
26
|
-
let o = e;
|
|
27
|
-
console.error(`Error parsing SSE event [${a}]:`, o);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}), () => {
|
|
15
|
+
}, o.onmessage = _temp2, () => {
|
|
31
16
|
o.close(), f.current = null;
|
|
32
17
|
};
|
|
33
18
|
}
|
|
@@ -35,7 +20,16 @@ function SseProvider() {
|
|
|
35
20
|
l.url,
|
|
36
21
|
d,
|
|
37
22
|
u
|
|
38
|
-
],
|
|
23
|
+
], e[0] = l.url, e[1] = d, e[2] = u, e[3] = p, e[4] = m) : (p = e[3], m = e[4]), useEffect(p, m), null;
|
|
24
|
+
}
|
|
25
|
+
function _temp2(o) {
|
|
26
|
+
try {
|
|
27
|
+
let s = JSON.parse(o.data);
|
|
28
|
+
eventBus.emit(s.type, s);
|
|
29
|
+
} catch (e) {
|
|
30
|
+
let o = e;
|
|
31
|
+
console.error("Error parsing SSE event:", o);
|
|
32
|
+
}
|
|
39
33
|
}
|
|
40
34
|
function _temp() {
|
|
41
35
|
console.log("SSE connection established");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loopstack/loopstack-studio",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.1",
|
|
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.27.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",
|