windmill-components 1.613.5 → 1.623.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/package/assets/tokens/tokens.json +1 -11
- package/package/ata/apis.js +5 -78
- package/package/components/AddUser.svelte +1 -1
- package/package/components/CenteredModal.svelte +24 -32
- package/package/components/CenteredModal.svelte.d.ts +27 -7
- package/package/components/CenteredPage.svelte +2 -5
- package/package/components/CenteredPage.svelte.d.ts +0 -2
- package/package/components/ConcurrentJobsChart.svelte +2 -3
- package/package/components/ConcurrentJobsChart.svelte.d.ts +2 -2
- package/package/components/CustomPopover.svelte +23 -20
- package/package/components/CustomPopover.svelte.d.ts +39 -14
- package/package/components/DBManager.svelte +17 -105
- package/package/components/DBManager.svelte.d.ts +1 -2
- package/package/components/DBManagerContent.svelte +3 -4
- package/package/components/DBManagerContent.svelte.d.ts +1 -1
- package/package/components/DBTableEditor.svelte +171 -210
- package/package/components/DBTableEditor.svelte.d.ts +3 -22
- package/package/components/Description.svelte +2 -3
- package/package/components/Dev.svelte +2 -36
- package/package/components/DiffDrawer.svelte +29 -8
- package/package/components/DiffEditor.svelte +2 -32
- package/package/components/DisplayResult.svelte +24 -32
- package/package/components/Editor.svelte +16 -70
- package/package/components/Editor.svelte.d.ts +0 -3
- package/package/components/EditorBar.svelte +1 -1
- package/package/components/FakeMonacoPlaceHolder.svelte +1 -1
- package/package/components/FlowBuilder.svelte +11 -17
- package/package/components/FlowPreviewContent.svelte +2 -3
- package/package/components/FlowPreviewResult.svelte +4 -0
- package/package/components/FlowRestartButton.svelte +3 -2
- package/package/components/FlowRestartButton.svelte.d.ts +0 -3
- package/package/components/FlowStatusViewerInner.svelte +33 -50
- package/package/components/FlowStatusViewerInner.svelte.d.ts +1 -1
- package/package/components/FlowStatusWaitingForEvents.svelte +23 -27
- package/package/components/FlowStatusWaitingForEvents.svelte.d.ts +18 -4
- package/package/components/FlowViewer.svelte +2 -103
- package/package/components/FlowViewer.svelte.d.ts +3 -9
- package/package/components/ForkWorkspaceBanner.svelte +13 -16
- package/package/components/GraphqlSchemaViewer.svelte +1 -8
- package/package/components/HistoricInputs.svelte +27 -25
- package/package/components/HistoricInputs.svelte.d.ts +2 -2
- package/package/components/InstanceSetting.svelte +0 -38
- package/package/components/InviteUser.svelte +42 -16
- package/package/components/InviteUser.svelte.d.ts +18 -4
- package/package/components/JsonInputs.svelte +8 -6
- package/package/components/JsonInputs.svelte.d.ts +8 -7
- package/package/components/LogViewer.svelte +33 -91
- package/package/components/Login.svelte +0 -21
- package/package/components/ManualPopover.svelte +6 -5
- package/package/components/ManualPopover.svelte.d.ts +35 -9
- package/package/components/MemoryFootprintViewer.svelte +6 -2
- package/package/components/ModulePreview.svelte +21 -23
- package/package/components/ModulePreview.svelte.d.ts +0 -1
- package/package/components/OAuthSetting.svelte +11 -23
- package/package/components/Path.svelte +2 -2
- package/package/components/Path.svelte.d.ts +1 -1
- package/package/components/ResourcePicker.svelte +0 -3
- package/package/components/ResourcePicker.svelte.d.ts +0 -1
- package/package/components/RunButton.svelte +15 -5
- package/package/components/RunButton.svelte.d.ts +19 -7
- package/package/components/RunChart.svelte +4 -8
- package/package/components/RunChart.svelte.d.ts +2 -2
- package/package/components/RunFormAdvancedPopup.svelte +1 -1
- package/package/components/RunsPage.svelte +539 -170
- package/package/components/RunsPage.svelte.d.ts +5 -5
- package/package/components/S3FilePicker.svelte +11 -7
- package/package/components/S3FilePickerInner.svelte +3 -2
- package/package/components/S3FilePickerInner.svelte.d.ts +2 -2
- package/package/components/SavedInputs.svelte +416 -0
- package/package/components/{tutorials/workspace/WorkspaceOnboardingOperatorTutorial.svelte.d.ts → SavedInputs.svelte.d.ts} +11 -8
- package/package/components/SchemaForm.svelte +19 -26
- package/package/components/SchemaFormWithArgPicker.svelte +3 -4
- package/package/components/ScriptBuilder.svelte +1 -1
- package/package/components/ScriptEditor.svelte +101 -575
- package/package/components/Section.svelte +1 -3
- package/package/components/ServiceLogsInner.svelte +4 -4
- package/package/components/ShareModal.svelte.d.ts +1 -1
- package/package/components/SimpleEditor.svelte +2 -46
- package/package/components/SuperadminSettingsInner.svelte +1 -1
- package/package/components/TemplateEditor.svelte +29 -54
- package/package/components/TemplateEditor.svelte.d.ts +102 -13
- package/package/components/UserSettings.svelte +1 -1
- package/package/components/WorkerTagPicker.svelte +1 -1
- package/package/components/WorkerTagSelect.svelte +2 -5
- package/package/components/WorkspaceTutorials.svelte +0 -5
- package/package/components/apps/components/buttons/AppButton.svelte +6 -21
- package/package/components/apps/components/buttons/AppForm.svelte +1 -2
- package/package/components/apps/components/buttons/AppFormButton.svelte +1 -2
- package/package/components/apps/components/display/dbtable/AppDbExplorer.svelte +4 -0
- package/package/components/apps/components/display/dbtable/metadata.js +30 -69
- package/package/components/apps/components/display/dbtable/queries/createTable.d.ts +24 -2
- package/package/components/apps/components/display/dbtable/queries/createTable.js +25 -11
- package/package/components/apps/components/display/dbtable/queries/select.d.ts +0 -2
- package/package/components/apps/components/display/dbtable/queries/select.js +6 -37
- package/package/components/apps/components/display/dbtable/utils.d.ts +1 -10
- package/package/components/apps/components/display/dbtable/utils.js +20 -52
- package/package/components/apps/components/helpers/HiddenComponent.svelte +1 -1
- package/package/components/apps/components/helpers/InputValue.svelte +1 -1
- package/package/components/apps/components/helpers/ResolveConfig.svelte +1 -1
- package/package/components/apps/components/helpers/RunnableComponent.svelte +2 -3
- package/package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +1 -1
- package/package/components/apps/components/helpers/RunnableWrapper.svelte +2 -2
- package/package/components/apps/editor/AppEditorHeader.svelte +1 -8
- package/package/components/apps/editor/AppEditorHeaderDeploy.svelte +29 -32
- package/package/components/apps/editor/AppEditorHeaderDeploy.svelte.d.ts +2 -2
- package/package/components/apps/editor/AppEditorHeaderDeployInitialDraft.svelte +4 -4
- package/package/components/apps/editor/AppEditorHeaderDeployInitialDraft.svelte.d.ts +3 -3
- package/package/components/apps/editor/PublicApp.svelte +30 -49
- package/package/components/apps/editor/PublicApp.svelte.d.ts +0 -1
- package/package/components/apps/editor/inlineScriptsPanel/InlineScriptRunnableByPath.svelte +7 -77
- package/package/components/apps/editor/inlineScriptsPanel/InlineScriptRunnableByPath.svelte.d.ts +2 -2
- package/package/components/apps/editor/inlineScriptsPanel/utils.d.ts +2 -2
- package/package/components/apps/editor/inlineScriptsPanel/utils.js +1 -10
- package/package/components/apps/inputType.d.ts +1 -6
- package/package/components/auditLogs/AuditLogsFilters.svelte +17 -9
- package/package/components/auditLogs/AuditLogsFilters.svelte.d.ts +1 -1
- package/package/components/common/button/model.js +1 -1
- package/package/components/common/calendarPicker/CalendarPicker.svelte.d.ts +1 -1
- package/package/components/common/languageIcons/TypeScript.svelte +3 -5
- package/package/components/common/languageIcons/TypeScript.svelte.d.ts +0 -1
- package/package/components/common/modal/Modal.svelte +3 -3
- package/package/components/copilot/autocomplete/Autocompletor.js +2 -3
- package/package/components/copilot/chat/AIButtonStyle.d.ts +1 -1
- package/package/components/copilot/chat/AIButtonStyle.js +1 -2
- package/package/components/copilot/chat/AIChat.svelte +1 -3
- package/package/components/copilot/chat/AIChatDisplay.svelte +4 -89
- package/package/components/copilot/chat/AIChatInput.svelte +0 -275
- package/package/components/copilot/chat/AIChatManager.svelte.js +1 -107
- package/package/components/copilot/chat/AiChatLayout.svelte +30 -15
- package/package/components/copilot/chat/ContextElementBadge.svelte +0 -44
- package/package/components/copilot/chat/DatatableCreationPolicy.svelte +33 -32
- package/package/components/copilot/chat/ProviderModelSelector.svelte +1 -1
- package/package/components/copilot/chat/__tests__/app/appEvalHelpers.js +0 -3
- package/package/components/copilot/chat/__tests__/flow/flowEvalHelpers.js +0 -4
- package/package/components/copilot/chat/app/core.d.ts +15 -56
- package/package/components/copilot/chat/app/core.js +22 -141
- package/package/components/copilot/chat/context.d.ts +2 -59
- package/package/components/copilot/chat/context.js +2 -6
- package/package/components/copilot/chat/flow/FlowAIChat.svelte +0 -22
- package/package/components/copilot/chat/flow/core.d.ts +1 -3
- package/package/components/copilot/chat/flow/core.js +2 -29
- package/package/components/copilot/chat/flow/openFlow.json +1 -1
- package/package/components/copilot/chat/flow/openFlowZod.d.ts +0 -1
- package/package/components/copilot/chat/flow/openFlowZod.js +2 -14
- package/package/components/copilot/chat/script/core.d.ts +1 -4
- package/package/components/copilot/chat/script/core.js +2 -38
- package/package/components/copilot/chat/shared.d.ts +0 -10
- package/package/components/copilot/chat/shared.js +0 -24
- package/package/components/copilot/lib.d.ts +1 -1
- package/package/components/custom_ui.d.ts +0 -2
- package/package/components/dbOps.d.ts +4 -18
- package/package/components/dbOps.js +3 -25
- package/package/components/flows/CreateActionsApp.svelte +4 -6
- package/package/components/flows/DebounceLimit.svelte.d.ts +1 -1
- package/package/components/flows/FlowHistoryInner.svelte +4 -15
- package/package/components/flows/content/AgentToolWrapper.svelte +1 -1
- package/package/components/flows/content/FlowInput.svelte +37 -211
- package/package/components/flows/content/FlowModuleComponent.svelte +67 -553
- package/package/components/flows/content/FlowModuleEarlyStop.svelte +10 -8
- package/package/components/flows/content/FlowModuleHeader.svelte +4 -7
- package/package/components/flows/content/FlowModuleWorkerTagSelect.svelte +1 -1
- package/package/components/flows/content/McpToolEditor.svelte +37 -50
- package/package/components/flows/content/McpToolEditor.svelte.d.ts +1 -0
- package/package/components/flows/conversations/FlowChat.svelte +2 -16
- package/package/components/flows/conversations/FlowChat.svelte.d.ts +1 -2
- package/package/components/flows/conversations/FlowChatInterface.svelte +6 -103
- package/package/components/flows/conversations/FlowChatInterface.svelte.d.ts +0 -2
- package/package/components/flows/conversations/FlowChatManager.svelte.js +21 -53
- package/package/components/flows/header/FlowImportExportMenu.svelte +1 -1
- package/package/components/flows/propPicker/PropPickerWrapper.svelte +1 -3
- package/package/components/flows/types.d.ts +0 -2
- package/package/components/git_sync/GitSyncRepositoryCard.svelte +8 -16
- package/package/components/home/ItemsList.svelte +5 -5
- package/package/components/home/TutorialBanner.svelte +18 -34
- package/package/components/icons/CssIcon.svelte +0 -20
- package/package/components/icons/CssIcon.svelte.d.ts +25 -7
- package/package/components/icons/JavaScriptIcon.svelte +2 -10
- package/package/components/icons/JavaScriptIcon.svelte.d.ts +0 -1
- package/package/components/icons/JsonIcon.svelte +2 -8
- package/package/components/icons/JsonIcon.svelte.d.ts +0 -1
- package/package/components/icons/ReactIcon.svelte +2 -10
- package/package/components/icons/ReactIcon.svelte.d.ts +0 -1
- package/package/components/icons/SvelteIcon.svelte +2 -10
- package/package/components/icons/SvelteIcon.svelte.d.ts +0 -1
- package/package/components/icons/VueIcon.svelte +2 -10
- package/package/components/icons/VueIcon.svelte.d.ts +0 -1
- package/package/components/instanceSettings.d.ts +1 -2
- package/package/components/instanceSettings.js +1 -32
- package/package/components/jobs/JobPreview.svelte +39 -46
- package/package/components/jobs/JobPreview.svelte.d.ts +0 -1
- package/package/components/monacoLanguagesOptions.js +15 -16
- package/package/components/propertyPicker/PropPicker.svelte +2 -16
- package/package/components/propertyPicker/PropPicker.svelte.d.ts +0 -2
- package/package/components/raw_apps/DefaultDatabaseSelector.svelte +5 -9
- package/package/components/raw_apps/FileEditorIcon.svelte +7 -12
- package/package/components/raw_apps/FileEditorIcon.svelte.d.ts +0 -2
- package/package/components/raw_apps/FileTreeNode.svelte +83 -119
- package/package/components/raw_apps/RawAppBackgroundRunner.svelte +8 -88
- package/package/components/raw_apps/RawAppDataTableList.svelte +9 -12
- package/package/components/raw_apps/RawAppEditor.svelte +68 -218
- package/package/components/raw_apps/RawAppEditorHeader.svelte +16 -33
- package/package/components/raw_apps/RawAppHistoryList.svelte +80 -264
- package/package/components/raw_apps/RawAppHistoryList.svelte.d.ts +0 -1
- package/package/components/raw_apps/RawAppHistoryManager.svelte.d.ts +1 -15
- package/package/components/raw_apps/RawAppHistoryManager.svelte.js +12 -46
- package/package/components/raw_apps/RawAppInlineScriptEditor.svelte +47 -549
- package/package/components/raw_apps/RawAppInlineScriptEditor.svelte.d.ts +5 -31
- package/package/components/raw_apps/RawAppInlineScriptPanelList.svelte +18 -25
- package/package/components/raw_apps/RawAppInlineScriptPanelList.svelte.d.ts +0 -1
- package/package/components/raw_apps/RawAppInlineScriptRunnable.svelte +10 -141
- package/package/components/raw_apps/RawAppInlineScriptRunnable.svelte.d.ts +0 -8
- package/package/components/raw_apps/RawAppInlineScriptsPanel.svelte +1 -2
- package/package/components/raw_apps/RawAppInlineScriptsPanel.svelte.d.ts +1 -9
- package/package/components/raw_apps/RawAppInputsSpecEditor.svelte +3 -47
- package/package/components/raw_apps/RawAppInputsSpecEditor.svelte.d.ts +2 -2
- package/package/components/raw_apps/RawAppModules.svelte +7 -13
- package/package/components/raw_apps/RawAppPreview.svelte +6 -48
- package/package/components/raw_apps/RawAppSidebar.svelte +125 -194
- package/package/components/raw_apps/RawAppSidebar.svelte.d.ts +0 -1
- package/package/components/raw_apps/utils.d.ts +1 -1
- package/package/components/raw_apps/utils.js +18 -76
- package/package/components/runs/JobsLoader.svelte +468 -0
- package/package/components/runs/JobsLoader.svelte.d.ts +49 -0
- package/package/components/runs/ManuelDatePicker.svelte +3 -3
- package/package/components/runs/ManuelDatePicker.svelte.d.ts +3 -3
- package/package/components/runs/NoWorkerWithTagWarning.svelte +1 -5
- package/package/components/runs/RunsFilter.svelte +63 -75
- package/package/components/runs/RunsFilter.svelte.d.ts +4 -35
- package/package/components/runs/RunsQueue.svelte.d.ts +1 -1
- package/package/components/runs/RunsTable.svelte +1 -1
- package/package/components/runs/RunsTable.svelte.d.ts +1 -1
- package/package/components/schema/SchemaPicker.svelte +92 -0
- package/package/components/{tutorials/RunsTutorial.svelte.d.ts → schema/SchemaPicker.svelte.d.ts} +12 -11
- package/package/components/scriptEditor/LogPanel.svelte +2 -17
- package/package/components/scriptEditor/LogPanel.svelte.d.ts +0 -2
- package/package/components/select/SelectDropdown.svelte +2 -2
- package/package/components/settings/ChangeWorkspaceColor.svelte +3 -4
- package/package/components/settings/ChangeWorkspaceId.svelte +10 -14
- package/package/components/settings/ChangeWorkspaceName.svelte +6 -7
- package/package/components/settings/CreateToken.svelte +1 -1
- package/package/components/settings/UserAIPromptsSettings.svelte +15 -56
- package/package/components/settings/WorkspaceOperatorSettings.svelte +85 -68
- package/package/components/settings/WorkspaceUserSettings.svelte +406 -531
- package/package/components/sidebar/MenuButton.svelte +24 -46
- package/package/components/sidebar/MenuButton.svelte.d.ts +0 -2
- package/package/components/sidebar/MultiplayerMenu.svelte +3 -3
- package/package/components/sidebar/OperatorMenu.svelte +88 -63
- package/package/components/sidebar/SidebarContent.svelte +2 -7
- package/package/components/sidebar/UserMenu.svelte +1 -1
- package/package/components/sidebar/WorkspaceMenu.svelte +85 -35
- package/package/components/sqlTypeService.js +3 -4
- package/package/components/table/DataTable.svelte +2 -3
- package/package/components/table/DataTable.svelte.d.ts +0 -1
- package/package/components/text_input/TextInput.svelte +0 -3
- package/package/components/text_input/TextInput.svelte.d.ts +0 -2
- package/package/components/triggers/utils.js +1 -0
- package/package/components/tutorials/FlowBuilderLiveTutorial.svelte +35 -6
- package/package/components/tutorials/TroubleshootFlowTutorial.svelte +20 -5
- package/package/components/tutorials/utils.d.ts +0 -16
- package/package/components/tutorials/utils.js +0 -96
- package/package/components/vscode.js +6 -6
- package/package/components/workspaceSettings/AISettings.svelte +108 -146
- package/package/components/workspaceSettings/CreateWorkspace.svelte +12 -26
- package/package/components/workspaceSettings/DucklakeSettings.svelte +23 -46
- package/package/components/workspaceSettings/DucklakeSettings.svelte.d.ts +1 -2
- package/package/components/workspaceSettings/ModelTokenLimits.svelte +18 -14
- package/package/components/workspaceSettings/StorageSettings.svelte +241 -280
- package/package/components/workspaceSettings/StorageSettings.svelte.d.ts +0 -1
- package/package/consts.js +1 -4
- package/package/gen/core/OpenAPI.js +1 -1
- package/package/gen/schemas.gen.d.ts +1 -133
- package/package/gen/schemas.gen.js +1 -133
- package/package/gen/services.gen.d.ts +10 -160
- package/package/gen/services.gen.js +20 -319
- package/package/gen/types.gen.d.ts +19 -609
- package/package/hubPaths.json +2 -3
- package/package/infer.js +0 -2
- package/package/logout.d.ts +2 -0
- package/package/logout.js +23 -2
- package/package/monaco_workers/graphql.worker.bundle.js +121 -121
- package/package/navigation.d.ts +1 -1
- package/package/rawAppWmillTs.d.ts +0 -11
- package/package/rawAppWmillTs.js +1 -38
- package/package/svelte5Utils.svelte.d.ts +1 -7
- package/package/svelte5Utils.svelte.js +2 -23
- package/package/tutorialUtils.js +4 -0
- package/package/tutorials/config.js +3 -31
- package/package/tutorials/roleUtils.d.ts +1 -1
- package/package/tutorials/roleUtils.js +2 -6
- package/package/utils.js +1 -159
- package/package.json +4 -6
- package/dist/sharedUtils/assets/tokens/colorTokensConfig.d.ts +0 -2
- package/dist/sharedUtils/base.d.ts +0 -1
- package/dist/sharedUtils/cloud.d.ts +0 -1
- package/dist/sharedUtils/common.d.ts +0 -111
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/count.d.ts +0 -5
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/delete.d.ts +0 -5
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/insert.d.ts +0 -5
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/select.d.ts +0 -13
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/update.d.ts +0 -11
- package/dist/sharedUtils/components/apps/components/display/dbtable/utils.d.ts +0 -95
- package/dist/sharedUtils/components/apps/editor/appPolicy.d.ts +0 -6
- package/dist/sharedUtils/components/apps/editor/appUtilsCore.d.ts +0 -7
- package/dist/sharedUtils/components/apps/editor/appUtilsS3.d.ts +0 -33
- package/dist/sharedUtils/components/apps/editor/commonAppUtils.d.ts +0 -10
- package/dist/sharedUtils/components/apps/editor/component/components.d.ts +0 -5371
- package/dist/sharedUtils/components/apps/editor/component/default-codes.d.ts +0 -3
- package/dist/sharedUtils/components/apps/editor/component/index.d.ts +0 -3
- package/dist/sharedUtils/components/apps/editor/component/sets.d.ts +0 -7
- package/dist/sharedUtils/components/apps/editor/componentsPanel/componentDefaultProps.d.ts +0 -3
- package/dist/sharedUtils/components/apps/gridUtils.d.ts +0 -14
- package/dist/sharedUtils/components/apps/inputType.d.ts +0 -178
- package/dist/sharedUtils/components/apps/rx.d.ts +0 -29
- package/dist/sharedUtils/components/apps/sharedTypes.d.ts +0 -21
- package/dist/sharedUtils/components/apps/types.d.ts +0 -274
- package/dist/sharedUtils/components/assets/lib.d.ts +0 -25
- package/dist/sharedUtils/components/common/alert/model.d.ts +0 -2
- package/dist/sharedUtils/components/common/badge/model.d.ts +0 -8
- package/dist/sharedUtils/components/common/button/model.d.ts +0 -45
- package/dist/sharedUtils/components/common/fileInput/model.d.ts +0 -1
- package/dist/sharedUtils/components/common/index.d.ts +0 -24
- package/dist/sharedUtils/components/common/skeleton/model.d.ts +0 -21
- package/dist/sharedUtils/components/dbTypes.d.ts +0 -14
- package/dist/sharedUtils/components/diff_drawer.d.ts +0 -26
- package/dist/sharedUtils/components/ducklake.d.ts +0 -1
- package/dist/sharedUtils/components/flows/scheduleUtils.d.ts +0 -7
- package/dist/sharedUtils/components/icons/index.d.ts +0 -101
- package/dist/sharedUtils/components/random_positive_adjetive.d.ts +0 -1
- package/dist/sharedUtils/components/raw_apps/rawAppPolicy.d.ts +0 -10
- package/dist/sharedUtils/components/raw_apps/utils.d.ts +0 -15
- package/dist/sharedUtils/components/triggers/email/utils.d.ts +0 -4
- package/dist/sharedUtils/components/triggers/gcp/utils.d.ts +0 -2
- package/dist/sharedUtils/components/triggers/http/utils.d.ts +0 -11
- package/dist/sharedUtils/components/triggers/kafka/utils.d.ts +0 -2
- package/dist/sharedUtils/components/triggers/mqtt/utils.d.ts +0 -2
- package/dist/sharedUtils/components/triggers/nats/utils.d.ts +0 -2
- package/dist/sharedUtils/components/triggers/postgres/utils.d.ts +0 -8
- package/dist/sharedUtils/components/triggers/sqs/utils.d.ts +0 -2
- package/dist/sharedUtils/components/triggers/triggers.svelte.d.ts +0 -32
- package/dist/sharedUtils/components/triggers/utils.d.ts +0 -80
- package/dist/sharedUtils/components/triggers/websocket/utils.d.ts +0 -2
- package/dist/sharedUtils/components/triggers.d.ts +0 -20
- package/dist/sharedUtils/gen/core/ApiError.d.ts +0 -10
- package/dist/sharedUtils/gen/core/ApiRequestOptions.d.ts +0 -13
- package/dist/sharedUtils/gen/core/ApiResult.d.ts +0 -7
- package/dist/sharedUtils/gen/core/CancelablePromise.d.ts +0 -26
- package/dist/sharedUtils/gen/core/OpenAPI.d.ts +0 -27
- package/dist/sharedUtils/gen/core/request.d.ts +0 -29
- package/dist/sharedUtils/gen/index.d.ts +0 -6
- package/dist/sharedUtils/gen/schemas.gen.d.ts +0 -7036
- package/dist/sharedUtils/gen/services.gen.d.ts +0 -6047
- package/dist/sharedUtils/gen/types.gen.d.ts +0 -21881
- package/dist/sharedUtils/history.svelte.d.ts +0 -9
- package/dist/sharedUtils/hub.d.ts +0 -49
- package/dist/sharedUtils/jsr.json +0 -6
- package/dist/sharedUtils/lib.d.ts +0 -5
- package/dist/sharedUtils/lib.es.js +0 -1588
- package/dist/sharedUtils/package.json +0 -12
- package/dist/sharedUtils/schema.d.ts +0 -3
- package/dist/sharedUtils/stores.d.ts +0 -97
- package/dist/sharedUtils/svelte5Utils.svelte.d.ts +0 -80
- package/dist/sharedUtils/toast.d.ts +0 -8
- package/dist/sharedUtils/utils.d.ts +0 -265
- package/package/components/FlowDiffViewer.svelte +0 -37
- package/package/components/FlowDiffViewer.svelte.d.ts +0 -7
- package/package/components/JobOtelTraces.svelte +0 -287
- package/package/components/JobOtelTraces.svelte.d.ts +0 -6
- package/package/components/apps/components/display/dbtable/queries/alterTable.d.ts +0 -46
- package/package/components/apps/components/display/dbtable/queries/alterTable.js +0 -314
- package/package/components/apps/components/display/dbtable/queries/alterTable.test.d.ts +0 -1
- package/package/components/apps/components/display/dbtable/queries/alterTable.test.js +0 -867
- package/package/components/apps/components/display/dbtable/queries/dbQueriesUtils.d.ts +0 -9
- package/package/components/apps/components/display/dbtable/queries/dbQueriesUtils.js +0 -45
- package/package/components/apps/components/display/dbtable/queries/relationalKeys.d.ts +0 -47
- package/package/components/apps/components/display/dbtable/queries/relationalKeys.js +0 -402
- package/package/components/apps/components/display/dbtable/tableEditor.d.ts +0 -35
- package/package/components/apps/components/display/dbtable/tableEditor.js +0 -49
- package/package/components/copilot/chat/AppAvailableContextList.svelte +0 -263
- package/package/components/copilot/chat/AppAvailableContextList.svelte.d.ts +0 -13
- package/package/components/debug/DebugConsole.svelte +0 -277
- package/package/components/debug/DebugConsole.svelte.d.ts +0 -13
- package/package/components/debug/DebugPanel.svelte +0 -97
- package/package/components/debug/DebugPanel.svelte.d.ts +0 -11
- package/package/components/debug/DebugToolbar.svelte +0 -148
- package/package/components/debug/DebugToolbar.svelte.d.ts +0 -17
- package/package/components/debug/DebugVariableViewer.svelte +0 -115
- package/package/components/debug/DebugVariableViewer.svelte.d.ts +0 -11
- package/package/components/debug/MonacoDebugger.svelte +0 -384
- package/package/components/debug/MonacoDebugger.svelte.d.ts +0 -15
- package/package/components/debug/dapClient.d.ts +0 -192
- package/package/components/debug/dapClient.js +0 -426
- package/package/components/debug/debugUtils.d.ts +0 -30
- package/package/components/debug/debugUtils.js +0 -131
- package/package/components/debug/index.d.ts +0 -75
- package/package/components/debug/index.js +0 -82
- package/package/components/flows/content/FlowEditorDrawer.svelte +0 -124
- package/package/components/flows/content/FlowEditorDrawer.svelte.d.ts +0 -22
- package/package/components/flows/content/McpOAuthConnect.svelte +0 -217
- package/package/components/flows/content/McpOAuthConnect.svelte.d.ts +0 -7
- package/package/components/icons/HtmlIcon.svelte +0 -20
- package/package/components/icons/HtmlIcon.svelte.d.ts +0 -8
- package/package/components/icons/LessIcon.svelte +0 -16
- package/package/components/icons/LessIcon.svelte.d.ts +0 -8
- package/package/components/icons/MarkdownIcon.svelte +0 -20
- package/package/components/icons/MarkdownIcon.svelte.d.ts +0 -8
- package/package/components/icons/SassIcon.svelte +0 -28
- package/package/components/icons/SassIcon.svelte.d.ts +0 -8
- package/package/components/icons/YamlIcon.svelte +0 -20
- package/package/components/icons/YamlIcon.svelte.d.ts +0 -8
- package/package/components/instanceSettings/SecretBackendConfig.svelte +0 -514
- package/package/components/instanceSettings/SecretBackendConfig.svelte.d.ts +0 -8
- package/package/components/raw_apps/RunnableRow.svelte +0 -41
- package/package/components/raw_apps/RunnableRow.svelte.d.ts +0 -11
- package/package/components/runs/useJobsLoader.svelte.d.ts +0 -34
- package/package/components/runs/useJobsLoader.svelte.js +0 -507
- package/package/components/settings/AIPromptsModal.svelte +0 -88
- package/package/components/settings/AIPromptsModal.svelte.d.ts +0 -11
- package/package/components/tutorials/RunsTutorial.svelte +0 -399
- package/package/components/tutorials/workspace/WorkspaceOnboardingOperatorTutorial.svelte +0 -133
- package/package/components/workspace/WorkspaceCard.svelte +0 -184
- package/package/components/workspace/WorkspaceCard.svelte.d.ts +0 -24
- package/package/components/workspace/WorkspaceIcon.svelte +0 -21
- package/package/components/workspace/WorkspaceIcon.svelte.d.ts +0 -9
- package/package/components/workspace/WorkspaceTreeView.svelte +0 -331
- package/package/components/workspace/WorkspaceTreeView.svelte.d.ts +0 -15
- package/package/logoutKit.d.ts +0 -2
- package/package/logoutKit.js +0 -26
- package/package/svelte5UtilsKit.svelte.d.ts +0 -3
- package/package/svelte5UtilsKit.svelte.js +0 -30
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
<script lang="ts">import { Bug, Play, Square, SkipForward, ArrowDownToLine, ArrowUpFromLine, Trash2, AlertTriangle, X } from 'lucide-svelte';
|
|
2
|
-
import { Button } from '../common';
|
|
3
|
-
let { connected, running, stopped, breakpointCount, onStart, onStop, onContinue, onStepOver, onStepIn, onStepOut, onClearBreakpoints, onExitDebug } = $props();
|
|
4
|
-
let loading = $state(false);
|
|
5
|
-
async function handleStart() {
|
|
6
|
-
loading = true;
|
|
7
|
-
try {
|
|
8
|
-
await onStart();
|
|
9
|
-
}
|
|
10
|
-
finally {
|
|
11
|
-
loading = false;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
async function handleStop() {
|
|
15
|
-
loading = true;
|
|
16
|
-
try {
|
|
17
|
-
await onStop();
|
|
18
|
-
}
|
|
19
|
-
finally {
|
|
20
|
-
loading = false;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<div class="flex items-center gap-1 p-1 border-b border-surface-secondary bg-surface-secondary">
|
|
26
|
-
<div class="flex items-center gap-1 mr-2">
|
|
27
|
-
<Bug size={16} class="text-orange-500" />
|
|
28
|
-
<span class="text-xs font-medium text-secondary">Debug</span>
|
|
29
|
-
{#if connected}
|
|
30
|
-
<span class="w-2 h-2 rounded-full bg-green-500" title="Connected"></span>
|
|
31
|
-
{:else}
|
|
32
|
-
<span class="w-2 h-2 rounded-full bg-gray-400" title="Disconnected"></span>
|
|
33
|
-
{/if}
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
<div class="h-4 w-px bg-surface-tertiary mx-1"></div>
|
|
37
|
-
|
|
38
|
-
{#if !connected || (!running && !stopped)}
|
|
39
|
-
<Button
|
|
40
|
-
size="xs"
|
|
41
|
-
color="green"
|
|
42
|
-
variant="contained"
|
|
43
|
-
startIcon={{ icon: Play }}
|
|
44
|
-
onclick={handleStart}
|
|
45
|
-
disabled={loading}
|
|
46
|
-
>
|
|
47
|
-
Debug
|
|
48
|
-
</Button>
|
|
49
|
-
{:else}
|
|
50
|
-
<Button
|
|
51
|
-
size="xs"
|
|
52
|
-
color="red"
|
|
53
|
-
variant="contained"
|
|
54
|
-
startIcon={{ icon: Square }}
|
|
55
|
-
onclick={handleStop}
|
|
56
|
-
disabled={loading}
|
|
57
|
-
>
|
|
58
|
-
Stop
|
|
59
|
-
</Button>
|
|
60
|
-
{/if}
|
|
61
|
-
|
|
62
|
-
<div class="h-4 w-px bg-surface-tertiary mx-1"></div>
|
|
63
|
-
|
|
64
|
-
<!-- Step controls - only enabled when stopped -->
|
|
65
|
-
<div class="flex items-center gap-1">
|
|
66
|
-
<Button
|
|
67
|
-
size="xs"
|
|
68
|
-
color="light"
|
|
69
|
-
startIcon={{ icon: Play }}
|
|
70
|
-
onclick={onContinue}
|
|
71
|
-
disabled={!stopped}
|
|
72
|
-
title="Continue (F8) - Resume execution until the next breakpoint"
|
|
73
|
-
iconOnly
|
|
74
|
-
/>
|
|
75
|
-
<Button
|
|
76
|
-
size="xs"
|
|
77
|
-
color="light"
|
|
78
|
-
startIcon={{ icon: SkipForward }}
|
|
79
|
-
onclick={onStepOver}
|
|
80
|
-
disabled={!stopped}
|
|
81
|
-
title="Step Over (F6) - Execute the current line, skipping over function details"
|
|
82
|
-
iconOnly
|
|
83
|
-
/>
|
|
84
|
-
<Button
|
|
85
|
-
size="xs"
|
|
86
|
-
color="light"
|
|
87
|
-
startIcon={{ icon: ArrowDownToLine }}
|
|
88
|
-
onclick={onStepIn}
|
|
89
|
-
disabled={!stopped}
|
|
90
|
-
title="Step Into (F7) - Enter the function call and debug inside it"
|
|
91
|
-
iconOnly
|
|
92
|
-
/>
|
|
93
|
-
<Button
|
|
94
|
-
size="xs"
|
|
95
|
-
color="light"
|
|
96
|
-
startIcon={{ icon: ArrowUpFromLine }}
|
|
97
|
-
onclick={onStepOut}
|
|
98
|
-
disabled={!stopped}
|
|
99
|
-
title="Step Out (Shift+F8) - Run until the current function returns"
|
|
100
|
-
iconOnly
|
|
101
|
-
/>
|
|
102
|
-
</div>
|
|
103
|
-
|
|
104
|
-
<div class="h-4 w-px bg-surface-tertiary mx-1"></div>
|
|
105
|
-
|
|
106
|
-
<Button
|
|
107
|
-
size="xs"
|
|
108
|
-
color="light"
|
|
109
|
-
startIcon={{ icon: Trash2 }}
|
|
110
|
-
onclick={onClearBreakpoints}
|
|
111
|
-
title="Clear All Breakpoints"
|
|
112
|
-
iconOnly
|
|
113
|
-
/>
|
|
114
|
-
|
|
115
|
-
{#if onExitDebug}
|
|
116
|
-
<div class="h-4 w-px bg-surface-tertiary mx-1"></div>
|
|
117
|
-
|
|
118
|
-
<Button
|
|
119
|
-
size="xs"
|
|
120
|
-
color="red"
|
|
121
|
-
variant="border"
|
|
122
|
-
startIcon={{ icon: X }}
|
|
123
|
-
onclick={onExitDebug}
|
|
124
|
-
title="Exit Debug Mode"
|
|
125
|
-
>
|
|
126
|
-
Exit Debug
|
|
127
|
-
</Button>
|
|
128
|
-
{/if}
|
|
129
|
-
|
|
130
|
-
{#if running && !stopped}
|
|
131
|
-
<span class="ml-2 text-xs text-tertiary flex items-center gap-1">
|
|
132
|
-
<span class="animate-pulse">Running...</span>
|
|
133
|
-
</span>
|
|
134
|
-
{:else if stopped}
|
|
135
|
-
<span class="ml-2 text-xs text-orange-500 flex items-center gap-1"> Paused </span>
|
|
136
|
-
{/if}
|
|
137
|
-
</div>
|
|
138
|
-
|
|
139
|
-
{#if breakpointCount === 0 && !running && !stopped}
|
|
140
|
-
<div
|
|
141
|
-
class="flex items-center gap-1 px-2 py-1 bg-yellow-50 dark:bg-yellow-900/20 border-b border-yellow-200 dark:border-yellow-800"
|
|
142
|
-
>
|
|
143
|
-
<AlertTriangle size={14} class="text-yellow-600 dark:text-yellow-500" />
|
|
144
|
-
<span class="text-xs text-yellow-700 dark:text-yellow-400">
|
|
145
|
-
No breakpoints set - click in the gutter to add one
|
|
146
|
-
</span>
|
|
147
|
-
</div>
|
|
148
|
-
{/if}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
connected: boolean;
|
|
3
|
-
running: boolean;
|
|
4
|
-
stopped: boolean;
|
|
5
|
-
breakpointCount: number;
|
|
6
|
-
onStart: () => Promise<void>;
|
|
7
|
-
onStop: () => Promise<void>;
|
|
8
|
-
onContinue: () => Promise<void>;
|
|
9
|
-
onStepOver: () => Promise<void>;
|
|
10
|
-
onStepIn: () => Promise<void>;
|
|
11
|
-
onStepOut: () => Promise<void>;
|
|
12
|
-
onClearBreakpoints: () => void;
|
|
13
|
-
onExitDebug?: () => void;
|
|
14
|
-
}
|
|
15
|
-
declare const DebugToolbar: import("svelte").Component<Props, {}, "">;
|
|
16
|
-
type DebugToolbar = ReturnType<typeof DebugToolbar>;
|
|
17
|
-
export default DebugToolbar;
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
<script lang="ts">import { ChevronRight, ChevronDown } from 'lucide-svelte';
|
|
2
|
-
import DebugVariableViewer from './DebugVariableViewer.svelte';
|
|
3
|
-
let { variable, client, level = 0, prefix = '' } = $props();
|
|
4
|
-
let expanded = $state(false);
|
|
5
|
-
let children = $state([]);
|
|
6
|
-
let loading = $state(false);
|
|
7
|
-
let loaded = $state(false);
|
|
8
|
-
const hasChildren = $derived(variable.variablesReference > 0);
|
|
9
|
-
const isExpandable = $derived(hasChildren);
|
|
10
|
-
async function toggleExpand() {
|
|
11
|
-
if (!isExpandable)
|
|
12
|
-
return;
|
|
13
|
-
if (!expanded && !loaded && client) {
|
|
14
|
-
loading = true;
|
|
15
|
-
try {
|
|
16
|
-
children = await client.getVariables(variable.variablesReference);
|
|
17
|
-
loaded = true;
|
|
18
|
-
}
|
|
19
|
-
catch (error) {
|
|
20
|
-
console.error('Failed to fetch nested variables:', error);
|
|
21
|
-
}
|
|
22
|
-
finally {
|
|
23
|
-
loading = false;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
expanded = !expanded;
|
|
27
|
-
}
|
|
28
|
-
function getTypeColor(type) {
|
|
29
|
-
switch (type) {
|
|
30
|
-
case 'string':
|
|
31
|
-
return 'text-green-600 dark:text-green-400/80';
|
|
32
|
-
case 'number':
|
|
33
|
-
return 'text-orange-600 dark:text-orange-400/90';
|
|
34
|
-
case 'boolean':
|
|
35
|
-
return 'text-blue-600 dark:text-blue-400/90';
|
|
36
|
-
case 'undefined':
|
|
37
|
-
case 'null':
|
|
38
|
-
return 'text-tertiary';
|
|
39
|
-
case 'function':
|
|
40
|
-
return 'text-purple-600 dark:text-purple-400/90';
|
|
41
|
-
default:
|
|
42
|
-
return 'text-primary';
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
function formatValue(value, type) {
|
|
46
|
-
// For objects/arrays with children, just show type indicator
|
|
47
|
-
if (hasChildren) {
|
|
48
|
-
if (type === 'object' || value.startsWith('{')) {
|
|
49
|
-
return '{...}';
|
|
50
|
-
}
|
|
51
|
-
if (value.startsWith('[')) {
|
|
52
|
-
return '[...]';
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return value;
|
|
56
|
-
}
|
|
57
|
-
</script>
|
|
58
|
-
|
|
59
|
-
<div class="font-mono text-xs" style="padding-left: {level * 12}px">
|
|
60
|
-
<div class="flex items-start gap-0.5 py-0.5 hover:bg-surface-hover rounded group">
|
|
61
|
-
{#if isExpandable}
|
|
62
|
-
<button
|
|
63
|
-
class="flex-shrink-0 p-0.5 hover:bg-surface-secondary rounded"
|
|
64
|
-
onclick={toggleExpand}
|
|
65
|
-
>
|
|
66
|
-
{#if loading}
|
|
67
|
-
<span class="inline-block w-3 h-3 border border-tertiary border-t-transparent rounded-full animate-spin"></span>
|
|
68
|
-
{:else if expanded}
|
|
69
|
-
<ChevronDown size={12} class="text-tertiary" />
|
|
70
|
-
{:else}
|
|
71
|
-
<ChevronRight size={12} class="text-tertiary" />
|
|
72
|
-
{/if}
|
|
73
|
-
</button>
|
|
74
|
-
{:else}
|
|
75
|
-
<span class="w-4 flex-shrink-0"></span>
|
|
76
|
-
{/if}
|
|
77
|
-
|
|
78
|
-
<div class="flex-1 flex flex-wrap items-baseline gap-1 min-w-0">
|
|
79
|
-
<span class="text-blue-500 font-medium">{variable.name}</span>
|
|
80
|
-
<span class="text-tertiary">=</span>
|
|
81
|
-
<span class={getTypeColor(variable.type)} title={variable.value}>
|
|
82
|
-
{#if hasChildren && expanded}
|
|
83
|
-
{variable.type === 'object' || variable.value.startsWith('{') ? '{' : '['}
|
|
84
|
-
{:else}
|
|
85
|
-
{formatValue(variable.value, variable.type)}
|
|
86
|
-
{/if}
|
|
87
|
-
</span>
|
|
88
|
-
{#if variable.type && !hasChildren}
|
|
89
|
-
<span class="text-tertiary text-[10px]">({variable.type})</span>
|
|
90
|
-
{/if}
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
|
|
94
|
-
{#if expanded && hasChildren}
|
|
95
|
-
<div class="border-l border-dotted border-surface-secondary ml-2">
|
|
96
|
-
{#if children.length === 0 && loaded}
|
|
97
|
-
<div class="text-tertiary italic py-0.5" style="padding-left: {12}px">
|
|
98
|
-
No properties
|
|
99
|
-
</div>
|
|
100
|
-
{:else}
|
|
101
|
-
{#each children as child (child.name)}
|
|
102
|
-
<DebugVariableViewer
|
|
103
|
-
variable={child}
|
|
104
|
-
{client}
|
|
105
|
-
level={level + 1}
|
|
106
|
-
prefix={prefix ? `${prefix}.${variable.name}` : variable.name}
|
|
107
|
-
/>
|
|
108
|
-
{/each}
|
|
109
|
-
{/if}
|
|
110
|
-
</div>
|
|
111
|
-
<div class="text-primary" style="padding-left: {(level + 1) * 12}px">
|
|
112
|
-
{variable.type === 'object' || variable.value.startsWith('{') ? '}' : ']'}
|
|
113
|
-
</div>
|
|
114
|
-
{/if}
|
|
115
|
-
</div>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Variable, DAPClient } from './dapClient';
|
|
2
|
-
import DebugVariableViewer from './DebugVariableViewer.svelte';
|
|
3
|
-
interface Props {
|
|
4
|
-
variable: Variable;
|
|
5
|
-
client: DAPClient | null;
|
|
6
|
-
level?: number;
|
|
7
|
-
prefix?: string;
|
|
8
|
-
}
|
|
9
|
-
declare const DebugVariableViewer: import("svelte").Component<Props, {}, "">;
|
|
10
|
-
type DebugVariableViewer = ReturnType<typeof DebugVariableViewer>;
|
|
11
|
-
export default DebugVariableViewer;
|
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
<script lang="ts">import { onMount, onDestroy } from 'svelte';
|
|
2
|
-
import { SvelteSet } from 'svelte/reactivity';
|
|
3
|
-
import { debugState, getDAPClient, resetDAPClient } from './dapClient';
|
|
4
|
-
import DebugToolbar from './DebugToolbar.svelte';
|
|
5
|
-
import DebugPanel from './DebugPanel.svelte';
|
|
6
|
-
import { getDebugServerUrl, getDebugFileExtension } from './index';
|
|
7
|
-
import { VariableService } from '../../gen';
|
|
8
|
-
let { editor, code, language = 'bun', filePath, dapServerUrl, workspace } = $props();
|
|
9
|
-
// Derive the server URL from language if not explicitly provided
|
|
10
|
-
const effectiveServerUrl = $derived(dapServerUrl ?? getDebugServerUrl(language));
|
|
11
|
-
// Derive file path from language if not explicitly provided
|
|
12
|
-
const effectiveFilePath = $derived(filePath ?? `/tmp/script${getDebugFileExtension(language)}`);
|
|
13
|
-
let client = $state(null);
|
|
14
|
-
let breakpointDecorations = $state([]);
|
|
15
|
-
let currentLineDecoration = $state([]);
|
|
16
|
-
let disposables = [];
|
|
17
|
-
// Breakpoint glyph margin decoration
|
|
18
|
-
const breakpointDecorationType = {
|
|
19
|
-
glyphMarginClassName: 'debug-breakpoint-glyph',
|
|
20
|
-
glyphMarginHoverMessage: { value: 'Breakpoint' },
|
|
21
|
-
stickiness: 1 // NeverGrowsWhenTypingAtEdges
|
|
22
|
-
};
|
|
23
|
-
// Current line decoration (yellow background when stopped)
|
|
24
|
-
const currentLineDecorationType = {
|
|
25
|
-
isWholeLine: true,
|
|
26
|
-
className: 'debug-current-line',
|
|
27
|
-
glyphMarginClassName: 'debug-current-line-glyph'
|
|
28
|
-
};
|
|
29
|
-
// Track breakpoints by line number
|
|
30
|
-
let breakpoints = new SvelteSet();
|
|
31
|
-
// Track the last used server URL to detect changes
|
|
32
|
-
let lastServerUrl = undefined;
|
|
33
|
-
// React to language/server URL changes - fully exit debug mode and reset client
|
|
34
|
-
$effect(() => {
|
|
35
|
-
const newUrl = effectiveServerUrl;
|
|
36
|
-
if (lastServerUrl !== undefined && lastServerUrl !== newUrl) {
|
|
37
|
-
// Server URL changed (language switched), fully exit debug mode
|
|
38
|
-
console.log('[DAP] Language changed, switching from', lastServerUrl, 'to', newUrl);
|
|
39
|
-
// Terminate and disconnect if we have an active session
|
|
40
|
-
if (client) {
|
|
41
|
-
if (client.isConnected()) {
|
|
42
|
-
// Try to terminate gracefully, then disconnect
|
|
43
|
-
client
|
|
44
|
-
.terminate()
|
|
45
|
-
.catch(() => { })
|
|
46
|
-
.finally(() => {
|
|
47
|
-
client?.disconnect();
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
// Reset the singleton and clear local client reference
|
|
52
|
-
resetDAPClient();
|
|
53
|
-
client = null;
|
|
54
|
-
// Clear current line decoration since we're exiting debug mode
|
|
55
|
-
if (editor) {
|
|
56
|
-
currentLineDecoration = editor.deltaDecorations(currentLineDecoration, []);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
lastServerUrl = newUrl;
|
|
60
|
-
});
|
|
61
|
-
// Export function to refresh breakpoint positions - called by parent when code changes
|
|
62
|
-
export function refreshBreakpoints() {
|
|
63
|
-
updateBreakpointPositionsFromDecorations();
|
|
64
|
-
}
|
|
65
|
-
onMount(() => {
|
|
66
|
-
if (!editor)
|
|
67
|
-
return;
|
|
68
|
-
client = getDAPClient(effectiveServerUrl);
|
|
69
|
-
lastServerUrl = effectiveServerUrl;
|
|
70
|
-
// Add click handler for glyph margin (breakpoint toggle)
|
|
71
|
-
const mouseDownDisposable = editor.onMouseDown((e) => {
|
|
72
|
-
if (e.target.type === 2) {
|
|
73
|
-
// MouseTargetType.GUTTER_GLYPH_MARGIN
|
|
74
|
-
const line = e.target.position?.lineNumber;
|
|
75
|
-
if (line) {
|
|
76
|
-
toggleBreakpoint(line);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
disposables.push(mouseDownDisposable);
|
|
81
|
-
// Add keyboard shortcut F9 for toggling breakpoint
|
|
82
|
-
editor.addCommand(120, // KeyCode.F9
|
|
83
|
-
() => {
|
|
84
|
-
const position = editor?.getPosition();
|
|
85
|
-
if (position) {
|
|
86
|
-
toggleBreakpoint(position.lineNumber);
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
// Update decorations when state changes
|
|
90
|
-
const unsubscribe = debugState.subscribe((state) => {
|
|
91
|
-
updateCurrentLineDecoration(state.currentLine);
|
|
92
|
-
});
|
|
93
|
-
return () => {
|
|
94
|
-
unsubscribe();
|
|
95
|
-
};
|
|
96
|
-
});
|
|
97
|
-
onDestroy(() => {
|
|
98
|
-
disposables.forEach((d) => d.dispose());
|
|
99
|
-
disposables = [];
|
|
100
|
-
});
|
|
101
|
-
function toggleBreakpoint(line) {
|
|
102
|
-
if (breakpoints.has(line)) {
|
|
103
|
-
breakpoints.delete(line);
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
breakpoints.add(line);
|
|
107
|
-
}
|
|
108
|
-
// SvelteSet is reactive, no need to reassign
|
|
109
|
-
updateBreakpointDecorations();
|
|
110
|
-
syncBreakpointsWithServer();
|
|
111
|
-
}
|
|
112
|
-
function updateBreakpointDecorations() {
|
|
113
|
-
if (!editor)
|
|
114
|
-
return;
|
|
115
|
-
const model = editor.getModel();
|
|
116
|
-
if (!model)
|
|
117
|
-
return;
|
|
118
|
-
const decorations = Array.from(breakpoints).map((line) => ({
|
|
119
|
-
range: { startLineNumber: line, startColumn: 1, endLineNumber: line, endColumn: 1 },
|
|
120
|
-
options: breakpointDecorationType
|
|
121
|
-
}));
|
|
122
|
-
breakpointDecorations = editor.deltaDecorations(breakpointDecorations, decorations);
|
|
123
|
-
}
|
|
124
|
-
// Update breakpoint line numbers from decoration positions after code edits
|
|
125
|
-
function updateBreakpointPositionsFromDecorations() {
|
|
126
|
-
console.log('[DAP] updateBreakpointPositionsFromDecorations called, decorations:', breakpointDecorations.length);
|
|
127
|
-
if (!editor || breakpointDecorations.length === 0)
|
|
128
|
-
return;
|
|
129
|
-
const model = editor.getModel();
|
|
130
|
-
if (!model)
|
|
131
|
-
return;
|
|
132
|
-
// Get current line numbers from decorations (using plain Set as this is not reactive state)
|
|
133
|
-
const newLines = new Set();
|
|
134
|
-
for (const decorationId of breakpointDecorations) {
|
|
135
|
-
const range = model.getDecorationRange(decorationId);
|
|
136
|
-
if (range) {
|
|
137
|
-
newLines.add(range.startLineNumber);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
// Check if positions changed
|
|
141
|
-
const oldLines = Array.from(breakpoints).sort((a, b) => a - b);
|
|
142
|
-
const updatedLines = Array.from(newLines).sort((a, b) => a - b);
|
|
143
|
-
console.log('[DAP] Old breakpoint lines:', oldLines, 'New lines from decorations:', updatedLines);
|
|
144
|
-
const positionsChanged = oldLines.length !== updatedLines.length ||
|
|
145
|
-
oldLines.some((line, i) => line !== updatedLines[i]);
|
|
146
|
-
if (positionsChanged) {
|
|
147
|
-
console.log('[DAP] Breakpoint positions changed, syncing with server');
|
|
148
|
-
// Update breakpoints set with new positions
|
|
149
|
-
breakpoints.clear();
|
|
150
|
-
for (const line of newLines) {
|
|
151
|
-
breakpoints.add(line);
|
|
152
|
-
}
|
|
153
|
-
// Sync updated positions with server
|
|
154
|
-
syncBreakpointsWithServer();
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
function updateCurrentLineDecoration(line) {
|
|
158
|
-
if (!editor)
|
|
159
|
-
return;
|
|
160
|
-
if (!line) {
|
|
161
|
-
currentLineDecoration = editor.deltaDecorations(currentLineDecoration, []);
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
const decorations = [
|
|
165
|
-
{
|
|
166
|
-
range: { startLineNumber: line, startColumn: 1, endLineNumber: line, endColumn: 1 },
|
|
167
|
-
options: currentLineDecorationType
|
|
168
|
-
}
|
|
169
|
-
];
|
|
170
|
-
currentLineDecoration = editor.deltaDecorations(currentLineDecoration, decorations);
|
|
171
|
-
// Scroll to the current line
|
|
172
|
-
editor.revealLineInCenter(line);
|
|
173
|
-
}
|
|
174
|
-
async function syncBreakpointsWithServer() {
|
|
175
|
-
console.log('[DAP] syncBreakpointsWithServer called, connected:', client?.isConnected(), 'breakpoints:', Array.from(breakpoints));
|
|
176
|
-
if (!client || !client.isConnected()) {
|
|
177
|
-
console.log('[DAP] Not syncing - client not connected');
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
try {
|
|
181
|
-
console.log('[DAP] Sending setBreakpoints to server:', effectiveFilePath, Array.from(breakpoints));
|
|
182
|
-
await client.setBreakpoints(effectiveFilePath, Array.from(breakpoints));
|
|
183
|
-
console.log('[DAP] setBreakpoints completed');
|
|
184
|
-
}
|
|
185
|
-
catch (error) {
|
|
186
|
-
console.error('Failed to sync breakpoints:', error);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Fetch contextual variables from the backend to pass to the debugger
|
|
191
|
-
*/
|
|
192
|
-
async function fetchContextualVariables() {
|
|
193
|
-
console.log('[DAP] fetchContextualVariables called, workspace:', workspace);
|
|
194
|
-
if (!workspace) {
|
|
195
|
-
console.log('[DAP] No workspace provided, skipping contextual variables');
|
|
196
|
-
return {};
|
|
197
|
-
}
|
|
198
|
-
try {
|
|
199
|
-
console.log('[DAP] Fetching contextual variables for workspace:', workspace);
|
|
200
|
-
const variables = await VariableService.listContextualVariables({ workspace });
|
|
201
|
-
console.log('[DAP] Got contextual variables:', variables);
|
|
202
|
-
const envVars = {};
|
|
203
|
-
for (const v of variables) {
|
|
204
|
-
envVars[v.name] = v.value;
|
|
205
|
-
}
|
|
206
|
-
console.log('[DAP] Parsed env vars:', Object.keys(envVars));
|
|
207
|
-
return envVars;
|
|
208
|
-
}
|
|
209
|
-
catch (error) {
|
|
210
|
-
console.error('Failed to fetch contextual variables:', error);
|
|
211
|
-
return {};
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
async function signDebugRequest(codeToSign, lang) {
|
|
215
|
-
if (!workspace) {
|
|
216
|
-
throw new Error('No workspace selected');
|
|
217
|
-
}
|
|
218
|
-
const response = await fetch(`/api/w/${workspace}/debug/sign`, {
|
|
219
|
-
method: 'POST',
|
|
220
|
-
headers: { 'Content-Type': 'application/json' },
|
|
221
|
-
body: JSON.stringify({ code: codeToSign, language: lang })
|
|
222
|
-
});
|
|
223
|
-
if (!response.ok) {
|
|
224
|
-
const errorText = await response.text();
|
|
225
|
-
// Parse specific error cases for better user messages
|
|
226
|
-
if (errorText.includes('not initialized')) {
|
|
227
|
-
throw new Error('Debug signing is not configured on the server. Please contact your administrator.');
|
|
228
|
-
}
|
|
229
|
-
throw new Error(errorText || 'Failed to authorize debug session');
|
|
230
|
-
}
|
|
231
|
-
return await response.json();
|
|
232
|
-
}
|
|
233
|
-
function getDebugErrorMessage(error) {
|
|
234
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
235
|
-
// Handle token verification errors from debugger
|
|
236
|
-
if (message.includes('Token verification failed') || message.includes('Debug token required')) {
|
|
237
|
-
if (message.includes('expired')) {
|
|
238
|
-
return 'Debug session expired. Please try again.';
|
|
239
|
-
}
|
|
240
|
-
if (message.includes('Invalid JWT signature')) {
|
|
241
|
-
return 'Debug authorization failed. The signing key may be misconfigured.';
|
|
242
|
-
}
|
|
243
|
-
if (message.includes('Code hash mismatch')) {
|
|
244
|
-
return 'Code was modified after signing. Please try again.';
|
|
245
|
-
}
|
|
246
|
-
if (message.includes('Public key not available')) {
|
|
247
|
-
return 'Debug server cannot verify tokens. Please check WINDMILL_BASE_URL configuration.';
|
|
248
|
-
}
|
|
249
|
-
if (message.includes('Debug token required')) {
|
|
250
|
-
return 'Debug authorization required. The debug session must be signed by the backend.';
|
|
251
|
-
}
|
|
252
|
-
return 'Debug authorization failed. Please try again.';
|
|
253
|
-
}
|
|
254
|
-
// Handle connection errors
|
|
255
|
-
if (message.includes('WebSocket') || message.includes('connection failed')) {
|
|
256
|
-
return 'Could not connect to debug server. Make sure the DAP server is running.';
|
|
257
|
-
}
|
|
258
|
-
// Handle signing errors
|
|
259
|
-
if (message.includes('not configured on the server')) {
|
|
260
|
-
return message;
|
|
261
|
-
}
|
|
262
|
-
return message || 'An unexpected error occurred while starting the debugger.';
|
|
263
|
-
}
|
|
264
|
-
async function startDebugging() {
|
|
265
|
-
// Always reset and create a fresh client with the current server URL
|
|
266
|
-
// This ensures we connect to the correct endpoint for the current language
|
|
267
|
-
resetDAPClient();
|
|
268
|
-
client = getDAPClient(effectiveServerUrl);
|
|
269
|
-
try {
|
|
270
|
-
// Fetch contextual variables (WM_WORKSPACE, WM_TOKEN, etc.) from backend
|
|
271
|
-
const env = await fetchContextualVariables();
|
|
272
|
-
console.log('[DAP] Starting debug with env vars:', Object.keys(env), env);
|
|
273
|
-
// Sign the debug request (creates audit log entry)
|
|
274
|
-
let signedPayload;
|
|
275
|
-
try {
|
|
276
|
-
signedPayload = await signDebugRequest(code ?? '', language);
|
|
277
|
-
console.log('[DAP] Got signed payload from backend');
|
|
278
|
-
}
|
|
279
|
-
catch (signError) {
|
|
280
|
-
console.error('[DAP] Signing failed:', getDebugErrorMessage(signError));
|
|
281
|
-
return;
|
|
282
|
-
}
|
|
283
|
-
await client.connect();
|
|
284
|
-
await client.initialize();
|
|
285
|
-
await client.setBreakpoints(effectiveFilePath, Array.from(breakpoints));
|
|
286
|
-
await client.configurationDone();
|
|
287
|
-
await client.launch({
|
|
288
|
-
code,
|
|
289
|
-
cwd: '/tmp',
|
|
290
|
-
env,
|
|
291
|
-
// JWT token for verification by the debugger
|
|
292
|
-
token: signedPayload.token
|
|
293
|
-
});
|
|
294
|
-
console.log('[DAP] Launch completed with env');
|
|
295
|
-
}
|
|
296
|
-
catch (error) {
|
|
297
|
-
console.error('[DAP] Failed to start debugging:', getDebugErrorMessage(error));
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
async function stopDebugging() {
|
|
301
|
-
if (!client)
|
|
302
|
-
return;
|
|
303
|
-
try {
|
|
304
|
-
await client.terminate();
|
|
305
|
-
client.disconnect();
|
|
306
|
-
}
|
|
307
|
-
catch (error) {
|
|
308
|
-
console.error('Failed to stop debugging:', error);
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
async function continueExecution() {
|
|
312
|
-
if (!client)
|
|
313
|
-
return;
|
|
314
|
-
await client.continue_();
|
|
315
|
-
}
|
|
316
|
-
async function stepOver() {
|
|
317
|
-
if (!client)
|
|
318
|
-
return;
|
|
319
|
-
await client.stepOver();
|
|
320
|
-
}
|
|
321
|
-
async function stepIn() {
|
|
322
|
-
if (!client)
|
|
323
|
-
return;
|
|
324
|
-
await client.stepIn();
|
|
325
|
-
}
|
|
326
|
-
async function stepOut() {
|
|
327
|
-
if (!client)
|
|
328
|
-
return;
|
|
329
|
-
await client.stepOut();
|
|
330
|
-
}
|
|
331
|
-
function clearAllBreakpoints() {
|
|
332
|
-
breakpoints.clear();
|
|
333
|
-
updateBreakpointDecorations();
|
|
334
|
-
syncBreakpointsWithServer();
|
|
335
|
-
}
|
|
336
|
-
</script>
|
|
337
|
-
|
|
338
|
-
<div class="flex flex-col h-full">
|
|
339
|
-
<DebugToolbar
|
|
340
|
-
connected={$debugState.connected}
|
|
341
|
-
running={$debugState.running}
|
|
342
|
-
stopped={$debugState.stopped}
|
|
343
|
-
breakpointCount={breakpoints.size}
|
|
344
|
-
onStart={startDebugging}
|
|
345
|
-
onStop={stopDebugging}
|
|
346
|
-
onContinue={continueExecution}
|
|
347
|
-
onStepOver={stepOver}
|
|
348
|
-
onStepIn={stepIn}
|
|
349
|
-
onStepOut={stepOut}
|
|
350
|
-
onClearBreakpoints={clearAllBreakpoints}
|
|
351
|
-
/>
|
|
352
|
-
|
|
353
|
-
{#if $debugState.connected}
|
|
354
|
-
<DebugPanel
|
|
355
|
-
stackFrames={$debugState.stackFrames}
|
|
356
|
-
scopes={$debugState.scopes}
|
|
357
|
-
variables={$debugState.variables}
|
|
358
|
-
{client}
|
|
359
|
-
/>
|
|
360
|
-
{/if}
|
|
361
|
-
</div>
|
|
362
|
-
|
|
363
|
-
<style>
|
|
364
|
-
:global(.debug-breakpoint-glyph) {
|
|
365
|
-
background-color: #e51400;
|
|
366
|
-
border-radius: 50%;
|
|
367
|
-
width: 10px !important;
|
|
368
|
-
height: 10px !important;
|
|
369
|
-
margin-left: 5px;
|
|
370
|
-
margin-top: 4px;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
:global(.debug-current-line) {
|
|
374
|
-
background-color: rgba(255, 238, 0, 0.2);
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
:global(.debug-current-line-glyph) {
|
|
378
|
-
background-color: #ffcc00;
|
|
379
|
-
clip-path: polygon(0 0, 100% 50%, 0 100%);
|
|
380
|
-
width: 10px !important;
|
|
381
|
-
height: 14px !important;
|
|
382
|
-
margin-left: 5px;
|
|
383
|
-
margin-top: 2px;
|
|
384
|
-
}</style>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { editor as meditor } from 'monaco-editor';
|
|
2
|
-
import { type DebugLanguage } from './index';
|
|
3
|
-
interface Props {
|
|
4
|
-
editor: meditor.IStandaloneCodeEditor | null;
|
|
5
|
-
code: string;
|
|
6
|
-
language?: DebugLanguage;
|
|
7
|
-
filePath?: string;
|
|
8
|
-
dapServerUrl?: string;
|
|
9
|
-
workspace?: string;
|
|
10
|
-
}
|
|
11
|
-
declare const MonacoDebugger: import("svelte").Component<Props, {
|
|
12
|
-
refreshBreakpoints: () => void;
|
|
13
|
-
}, "">;
|
|
14
|
-
type MonacoDebugger = ReturnType<typeof MonacoDebugger>;
|
|
15
|
-
export default MonacoDebugger;
|