From 8a685ef47e69ce365d1665d772225ac37492f4dd Mon Sep 17 00:00:00 2001 From: DenisSinelnikov <142215442+DenisSinelnikov@users.noreply.github.com> Date: Wed, 20 Sep 2023 14:02:29 +0400 Subject: [PATCH 1/7] Cb 1036 server output log sql editor (#1999) * CB-2551. Fixed additional auth for disabled user * CB-3923. Added output reader logs * CB-3923. Added output reader logs * CB-3923. Refactor after review * CB-3923. Refactor after review * CB-3923. Refactor after review * CB-3923. Refactor after review * CB-3923. Refactor after review * CB-3923. Refactor after review * CB-3923. Refactor after review * CB-3923. Refactor after review * CB-3923. Refactor after review * CB-3924: add show output button * CB-3924: add output event handler and resource * CB-3924: add server output logs panel * CB-3924: fix bugs * CB-3923. Fixed checkstyle * CB-3924: fixes after review * CB-3923. Refactor after review * CB-3924: fixes after review * CB-3924: add line wrapper extension for editor * CB-3923. Refactor after review * CB-3924: show output logs for current context * CB-3924: fixes after review * CB-3924: add output logs icon * CB-3924: fixes after review * CB-3924: fixes after review * CB-3924: fixes after review * CB-3924: fix bug with not updated menus * CB-3924. Fix boolean type --------- Co-authored-by: Dmitry Osipov Co-authored-by: EvgeniaBzzz <139753579+EvgeniaBzzz@users.noreply.github.com> --- .../schema/service.events.graphqls | 23 ++- .../schema/service.sql.graphqls | 3 +- .../server/jobs/SqlOutputLogReaderJob.java | 114 +++++++++++++++ .../service/sql/DBWServiceSQL.java | 4 +- .../service/sql/WebSQLProcessor.java | 23 ++- .../service/sql/WebServiceBindingSQL.java | 4 +- .../service/sql/impl/WebServiceSQL.java | 10 +- .../src/FormControls/InputField.m.css | 9 ++ .../src/FormControls/InputField.tsx | 5 +- .../src/queries/grid/asyncSqlExecuteQuery.gql | 2 + .../plugin-codemirror6/src/Editor.tsx | 44 +++++- .../src/useEditorDefaultExtensions.ts | 131 ++++++++++++------ .../DatabaseDataModel/IDatabaseDataOptions.ts | 1 + .../src/SqlEditorTabService.ts | 1 + .../public/icons/sql_output_logs.svg | 1 + .../public/icons/sql_output_logs_m.svg | 1 + .../public/icons/sql_output_logs_sm.svg | 1 + .../src/ISqlEditorTabState.ts | 6 + .../plugin-sql-editor/src/MenuBootstrap.ts | 5 + .../plugin-sql-editor/src/QueryDataSource.ts | 1 + .../src/SqlEditor/SqlEditorActionsMenu.tsx | 2 - .../src/SqlEditor/useSqlEditor.ts | 9 +- .../plugin-sql-editor/src/SqlEditorService.ts | 1 + .../plugin-sql-editor/src/SqlEditorView.ts | 2 + .../OutputLogs/ACTION_SHOW_OUTPUT_LOGS.ts | 7 + .../OutputLogs/IOutputLogTypes.ts | 2 + .../OutputLogs/OUTPUT_LOGS_FILTER_MENU.ts | 10 ++ .../OutputLogs/OUTPUT_LOGS_TAB_ID.ts | 1 + .../OutputLogs/OutputLogTypesFilterMenu.m.css | 14 ++ .../OutputLogs/OutputLogTypesFilterMenu.tsx | 39 ++++++ .../OutputLogs/OutputLogsEventHandler.ts | 23 +++ .../OutputLogs/OutputLogsPanel.tsx | 39 ++++++ .../OutputLogs/OutputLogsResource.ts | 64 +++++++++ .../OutputLogs/OutputLogsService.ts | 54 ++++++++ .../OutputLogs/OutputLogsToolbar.m.css | 6 + .../OutputLogs/OutputLogsToolbar.tsx | 45 ++++++ .../OutputLogs/OutputMenuBootstrap.ts | 128 +++++++++++++++++ .../OutputLogs/useOutputLogsPanelState.ts | 58 ++++++++ .../src/SqlResultTabs/SqlQueryService.ts | 6 + .../src/SqlResultTabs/SqlResultPanel.tsx | 9 ++ .../src/SqlResultTabs/SqlResultTabsService.ts | 10 +- .../actions/ACTION_SQL_EDITOR_SHOW_OUTPUT.ts | 13 ++ .../KEY_BINDING_SQL_EDITOR_SHOW_OUTPUT.ts | 14 ++ .../packages/plugin-sql-editor/src/index.ts | 4 + .../plugin-sql-editor/src/locales/en.ts | 3 + .../plugin-sql-editor/src/locales/it.ts | 3 + .../plugin-sql-editor/src/locales/ru.ts | 3 + .../plugin-sql-editor/src/locales/zh.ts | 3 + .../plugin-sql-editor/src/manifest.ts | 8 ++ 49 files changed, 908 insertions(+), 61 deletions(-) create mode 100644 server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/jobs/SqlOutputLogReaderJob.java create mode 100644 webapp/packages/plugin-sql-editor/public/icons/sql_output_logs.svg create mode 100644 webapp/packages/plugin-sql-editor/public/icons/sql_output_logs_m.svg create mode 100644 webapp/packages/plugin-sql-editor/public/icons/sql_output_logs_sm.svg create mode 100644 webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/ACTION_SHOW_OUTPUT_LOGS.ts create mode 100644 webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/IOutputLogTypes.ts create mode 100644 webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OUTPUT_LOGS_FILTER_MENU.ts create mode 100644 webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OUTPUT_LOGS_TAB_ID.ts create mode 100644 webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogTypesFilterMenu.m.css create mode 100644 webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogTypesFilterMenu.tsx create mode 100644 webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsEventHandler.ts create mode 100644 webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsPanel.tsx create mode 100644 webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsResource.ts create mode 100644 webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsService.ts create mode 100644 webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsToolbar.m.css create mode 100644 webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsToolbar.tsx create mode 100644 webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputMenuBootstrap.ts create mode 100644 webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/useOutputLogsPanelState.ts create mode 100644 webapp/packages/plugin-sql-editor/src/actions/ACTION_SQL_EDITOR_SHOW_OUTPUT.ts create mode 100644 webapp/packages/plugin-sql-editor/src/actions/bindings/KEY_BINDING_SQL_EDITOR_SHOW_OUTPUT.ts diff --git a/server/bundles/io.cloudbeaver.server/schema/service.events.graphqls b/server/bundles/io.cloudbeaver.server/schema/service.events.graphqls index 1374063aea..5d21aaee78 100644 --- a/server/bundles/io.cloudbeaver.server/schema/service.events.graphqls +++ b/server/bundles/io.cloudbeaver.server/schema/service.events.graphqls @@ -28,7 +28,9 @@ enum CBServerEventId { cb_rm_project_removed, cb_object_permissions_updated, - cb_subject_permissions_updated + cb_subject_permissions_updated, + + cb_database_output_log_updated } # Events sent by client @@ -48,7 +50,8 @@ enum CBEventTopic { cb_scripts, cb_projects, cb_object_permissions, - cb_subject_permissions + cb_subject_permissions, + cb_database_output_log } # Base server event interface @@ -153,6 +156,22 @@ type CBProjectsActiveEvent implements CBClientEvent { projectIds: [String!]! # list of active projects } +# Database output log event +type CBDatabaseOutputLogEvent implements CBServerEvent { + id: CBServerEventId! + topicId: CBEventTopic + contextId: String! + messages: [WSOutputLogInfo!]! + eventTimestamp: Int! +} + +# Define the type for WSOutputLogInfo +type WSOutputLogInfo { + severity: String + message: String + # Add more fields as needed +} + extend type Query { emptyEvent: Boolean } diff --git a/server/bundles/io.cloudbeaver.server/schema/service.sql.graphqls b/server/bundles/io.cloudbeaver.server/schema/service.sql.graphqls index 0f27fd2a33..d008e2b557 100644 --- a/server/bundles/io.cloudbeaver.server/schema/service.sql.graphqls +++ b/server/bundles/io.cloudbeaver.server/schema/service.sql.graphqls @@ -289,7 +289,8 @@ extend type Mutation { sql: String!, resultId: ID, filter: SQLDataFilter, - dataFormat: ResultDataFormat # requested data format. May be ignored by server + dataFormat: ResultDataFormat, # requested data format. May be ignored by server + readLogs: Boolean # added 23.2.1 ): AsyncTaskInfo! # Read data from table diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/jobs/SqlOutputLogReaderJob.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/jobs/SqlOutputLogReaderJob.java new file mode 100644 index 0000000000..b28329e3bf --- /dev/null +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/jobs/SqlOutputLogReaderJob.java @@ -0,0 +1,114 @@ +/* + * DBeaver - Universal Database Manager + * Copyright (C) 2010-2023 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.cloudbeaver.server.jobs; + +import io.cloudbeaver.model.session.WebSession; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.jkiss.code.NotNull; +import org.jkiss.code.Nullable; +import org.jkiss.dbeaver.Log; +import org.jkiss.dbeaver.model.exec.DBCException; +import org.jkiss.dbeaver.model.exec.DBCExecutionContext; +import org.jkiss.dbeaver.model.exec.DBCStatement; +import org.jkiss.dbeaver.model.exec.output.DBCOutputSeverity; +import org.jkiss.dbeaver.model.exec.output.DBCOutputWriter; +import org.jkiss.dbeaver.model.exec.output.DBCServerOutputReader; +import org.jkiss.dbeaver.model.runtime.AbstractJob; +import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor; +import org.jkiss.dbeaver.model.websocket.event.WSOutputLogInfo; +import org.jkiss.dbeaver.model.websocket.event.session.WSOutputDBLogEvent; +import org.jkiss.dbeaver.runtime.DBWorkbench; + +import java.util.ArrayList; +import java.util.List; + + +public class SqlOutputLogReaderJob extends AbstractJob { + + private static final Log log = Log.getLog(SqlOutputLogReaderJob.class); + + @NotNull + private final WebSession webSession; + @NotNull + private final DBCExecutionContext dbcExecutionContext; + @NotNull + private final DBCStatement dbcStatement; + @NotNull + private final DBCServerOutputReader dbcServerOutputReader; + @NotNull + private final String contextInfoId; + + public SqlOutputLogReaderJob(@NotNull WebSession webSession, + @NotNull DBCExecutionContext dbcExecutionContext, + @NotNull DBCStatement dbcStatement, + @NotNull DBCServerOutputReader dbcServerOutputReader, + @NotNull String contextInfoId) { + super("Sql log state job"); + this.webSession = webSession; + this.dbcExecutionContext = dbcExecutionContext; + this.dbcStatement = dbcStatement; + this.dbcServerOutputReader = dbcServerOutputReader; + this.contextInfoId = contextInfoId; + } + + @Override + protected IStatus run(DBRProgressMonitor monitor) { + if (!DBWorkbench.getPlatform().isShuttingDown()) { + try { + if (!dbcStatement.isStatementClosed()) { + dumpOutput(monitor); + schedule(100); + } + } catch (Exception e) { + log.debug("Failed to execute job " + e.getMessage(), e); + } + } + return Status.OK_STATUS; + } + + private void dumpOutput(DBRProgressMonitor monitor) { + if (!monitor.isCanceled()) { + if (dbcServerOutputReader.isAsyncOutputReadSupported()) { + try { + if (!dbcStatement.isStatementClosed()) { + List messages = new ArrayList<>(); + dbcServerOutputReader.readServerOutput(monitor, dbcExecutionContext, null, dbcStatement, new DBCOutputWriter() { + @Override + public void println(@Nullable DBCOutputSeverity severity, @Nullable String message) { + if (message != null && severity != null) { + messages.add(new WSOutputLogInfo(severity.getName(), message)); + } + } + + @Override + public void flush() { + messages.clear(); + } + }); + webSession.addSessionEvent(new WSOutputDBLogEvent( + contextInfoId, + messages, + System.currentTimeMillis())); + } + } catch (DBCException e) { + log.error(e); + } + } + } + } +} \ No newline at end of file diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/DBWServiceSQL.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/DBWServiceSQL.java index 085eb95290..163076b5a5 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/DBWServiceSQL.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/DBWServiceSQL.java @@ -94,7 +94,9 @@ WebAsyncTaskInfo asyncExecuteQuery( @NotNull String sql, @Nullable String resultId, @Nullable WebSQLDataFilter filter, - @Nullable WebDataFormat dataFormat) throws DBException; + @Nullable WebDataFormat dataFormat, + boolean readLogs, + @NotNull WebSession webSession) throws DBException; @WebAction WebAsyncTaskInfo asyncReadDataFromContainer( diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java index 04df960500..4ea954fae9 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java @@ -20,6 +20,7 @@ import io.cloudbeaver.model.WebConnectionInfo; import io.cloudbeaver.model.session.WebSession; import io.cloudbeaver.model.session.WebSessionProvider; +import io.cloudbeaver.server.jobs.SqlOutputLogReaderJob; import org.eclipse.jface.text.Document; import org.jkiss.code.NotNull; import org.jkiss.code.Nullable; @@ -31,10 +32,12 @@ import org.jkiss.dbeaver.model.data.*; import org.jkiss.dbeaver.model.edit.DBEPersistAction; import org.jkiss.dbeaver.model.exec.*; +import org.jkiss.dbeaver.model.exec.output.DBCServerOutputReader; import org.jkiss.dbeaver.model.exec.plan.DBCPlan; import org.jkiss.dbeaver.model.exec.plan.DBCQueryPlanner; import org.jkiss.dbeaver.model.exec.plan.DBCQueryPlannerConfiguration; import org.jkiss.dbeaver.model.impl.AbstractExecutionSource; +import org.jkiss.dbeaver.model.impl.DefaultServerOutputReader; import org.jkiss.dbeaver.model.navigator.DBNDatabaseItem; import org.jkiss.dbeaver.model.navigator.DBNNode; import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor; @@ -152,7 +155,9 @@ public WebSQLExecuteInfo processQuery( @NotNull String sql, @Nullable String resultId, @Nullable WebSQLDataFilter filter, - @Nullable WebDataFormat dataFormat) throws DBWebException { + @Nullable WebDataFormat dataFormat, + @NotNull WebSession webSession, + boolean readLogs) throws DBWebException { if (filter == null) { // Use default filter filter = new WebSQLDataFilter(); @@ -203,6 +208,17 @@ public WebSQLExecuteInfo processQuery( webDataFilter.getOffset(), webDataFilter.getLimit())) { + SqlOutputLogReaderJob sqlOutputLogReaderJob = null; + if (readLogs) { + DBPDataSource dataSource = context.getDataSource(); + DBCServerOutputReader dbcServerOutputReader = DBUtils.getAdapter(DBCServerOutputReader.class, dataSource); + if (dbcServerOutputReader == null) { + dbcServerOutputReader = new DefaultServerOutputReader(); + } + sqlOutputLogReaderJob = new SqlOutputLogReaderJob( + webSession, context, dbStat, dbcServerOutputReader, contextInfo.getId()); + sqlOutputLogReaderJob.schedule(); + } // Set query timeout int queryTimeout = (int) session.getDataSource().getContainer().getPreferenceStore() .getDouble(WebSQLConstants.QUOTA_PROP_SQL_QUERY_TIMEOUT); @@ -220,6 +236,11 @@ public WebSQLExecuteInfo processQuery( } boolean hasResultSet = dbStat.executeStatement(); + + // Wait SqlLogStateJob, if its starts + if (sqlOutputLogReaderJob != null) { + sqlOutputLogReaderJob.join(); + } fillQueryResults(contextInfo, dataContainer, dbStat, hasResultSet, executeInfo, webDataFilter, dataFilter, dataFormat); } catch (DBException e) { throw new InvocationTargetException(e); diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebServiceBindingSQL.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebServiceBindingSQL.java index 1d125f05d5..fa8d1ed3cf 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebServiceBindingSQL.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebServiceBindingSQL.java @@ -160,7 +160,9 @@ public void bindWiring(DBWBindingContext model) throws DBWebException { env.getArgument("sql"), env.getArgument("resultId"), getDataFilter(env), - getDataFormat(env))) + getDataFormat(env), + CommonUtils.toBoolean(env.getArgument("readLogs")), + getWebSession(env))) .dataFetcher("asyncReadDataFromContainer", env -> getService(env).asyncReadDataFromContainer( getSQLContext(env), diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/impl/WebServiceSQL.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/impl/WebServiceSQL.java index 0ac61588f8..2e1f5f6de0 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/impl/WebServiceSQL.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/impl/WebServiceSQL.java @@ -363,16 +363,18 @@ public WebAsyncTaskInfo asyncExecuteQuery( @NotNull String sql, @Nullable String resultId, @Nullable WebSQLDataFilter filter, - @Nullable WebDataFormat dataFormat) + @Nullable WebDataFormat dataFormat, + boolean readLogs, + @NotNull WebSession webSession) { - WebAsyncTaskProcessor runnable = new WebAsyncTaskProcessor() { + WebAsyncTaskProcessor runnable = new WebAsyncTaskProcessor<>() { @Override - public void run(DBRProgressMonitor monitor) throws InvocationTargetException, InterruptedException { + public void run(DBRProgressMonitor monitor) throws InvocationTargetException { try { monitor.beginTask("Execute query", 1); monitor.subTask("Process query " + sql); WebSQLExecuteInfo executeResults = contextInfo.getProcessor().processQuery( - monitor, contextInfo, sql, resultId, filter, dataFormat); + monitor, contextInfo, sql, resultId, filter, dataFormat, webSession, readLogs); this.result = executeResults.getStatusMessage(); this.extendedResults = executeResults; } catch (Throwable e) { diff --git a/webapp/packages/core-blocks/src/FormControls/InputField.m.css b/webapp/packages/core-blocks/src/FormControls/InputField.m.css index 8d4691d598..3531611b5b 100644 --- a/webapp/packages/core-blocks/src/FormControls/InputField.m.css +++ b/webapp/packages/core-blocks/src/FormControls/InputField.m.css @@ -29,6 +29,15 @@ height: 100%; } } + +.customIconContainer { + composes: iconContainer; + right: 4px; + width: 24px; + height: 24px; + cursor: auto; +} + .input[disabled] + .iconContainer { cursor: auto; opacity: 0.8; diff --git a/webapp/packages/core-blocks/src/FormControls/InputField.tsx b/webapp/packages/core-blocks/src/FormControls/InputField.tsx index 77dfb6ed06..1d6f2ea509 100644 --- a/webapp/packages/core-blocks/src/FormControls/InputField.tsx +++ b/webapp/packages/core-blocks/src/FormControls/InputField.tsx @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ import { observer } from 'mobx-react-lite'; -import { forwardRef, useCallback, useContext, useLayoutEffect, useRef, useState } from 'react'; +import React, { forwardRef, useCallback, useContext, useLayoutEffect, useRef, useState } from 'react'; import styled, { use } from 'reshadow'; import type { ComponentStyle } from '@cloudbeaver/core-theming'; @@ -41,6 +41,7 @@ type BaseProps = Omit, 'onChange' | style?: ComponentStyle; canShowPassword?: boolean; onCustomCopy?: () => void; + icon?: React.ReactElement; }; type ControlledProps = BaseProps & { @@ -90,6 +91,7 @@ export const InputField: InputFieldType = observer( canShowPassword = true, onChange, onCustomCopy, + icon, ...rest }: ControlledProps | ObjectProps, ref, @@ -196,6 +198,7 @@ export const InputField: InputFieldType = observer( )} + {icon &&
{icon}
} {(description || passwordType) && (
diff --git a/webapp/packages/core-sdk/src/queries/grid/asyncSqlExecuteQuery.gql b/webapp/packages/core-sdk/src/queries/grid/asyncSqlExecuteQuery.gql index b2e1d0ec18..7aabbc989e 100644 --- a/webapp/packages/core-sdk/src/queries/grid/asyncSqlExecuteQuery.gql +++ b/webapp/packages/core-sdk/src/queries/grid/asyncSqlExecuteQuery.gql @@ -5,6 +5,7 @@ mutation asyncSqlExecuteQuery( $resultId: ID $filter: SQLDataFilter $dataFormat: ResultDataFormat + $readLogs: Boolean ) { taskInfo: asyncSqlExecuteQuery( connectionId: $connectionId @@ -13,6 +14,7 @@ mutation asyncSqlExecuteQuery( resultId: $resultId filter: $filter dataFormat: $dataFormat + readLogs: $readLogs ) { ...AsyncTaskInfo } diff --git a/webapp/packages/plugin-codemirror6/src/Editor.tsx b/webapp/packages/plugin-codemirror6/src/Editor.tsx index 1e6b7526c8..10be8ade09 100644 --- a/webapp/packages/plugin-codemirror6/src/Editor.tsx +++ b/webapp/packages/plugin-codemirror6/src/Editor.tsx @@ -19,9 +19,49 @@ import { useCodemirrorExtensions } from './useCodemirrorExtensions'; import { type IDefaultExtensions, useEditorDefaultExtensions } from './useEditorDefaultExtensions'; export const Editor = observer( - forwardRef(function Editor({ lineNumbers, extensions, ...rest }, ref) { + forwardRef(function Editor( + { + extensions, + lineNumbers, + tooltips, + highlightSpecialChars, + syntaxHighlighting, + bracketMatching, + dropCursor, + crosshairCursor, + foldGutter, + highlightActiveLineGutter, + highlightSelectionMatches, + highlightActiveLine, + indentOnInput, + rectangularSelection, + keymap, + lineWrapping, + ...rest + }, + ref, + ) { extensions = useCodemirrorExtensions(extensions); - const defaultExtensions = useEditorDefaultExtensions({ lineNumbers }); + + + const defaultExtensions = useEditorDefaultExtensions({ + lineNumbers, + tooltips, + highlightSpecialChars, + syntaxHighlighting, + bracketMatching, + dropCursor, + crosshairCursor, + foldGutter, + highlightActiveLineGutter, + highlightSelectionMatches, + highlightActiveLine, + indentOnInput, + rectangularSelection, + keymap, + lineWrapping, + }); + extensions.set(...defaultExtensions); return styled(EDITOR_BASE_STYLES)( diff --git a/webapp/packages/plugin-codemirror6/src/useEditorDefaultExtensions.ts b/webapp/packages/plugin-codemirror6/src/useEditorDefaultExtensions.ts index cbfd1ca01b..8830f64967 100644 --- a/webapp/packages/plugin-codemirror6/src/useEditorDefaultExtensions.ts +++ b/webapp/packages/plugin-codemirror6/src/useEditorDefaultExtensions.ts @@ -12,6 +12,7 @@ import { Compartment, Extension } from '@codemirror/state'; import { crosshairCursor, dropCursor, + EditorView, highlightActiveLine, highlightActiveLineGutter, highlightSpecialChars, @@ -21,9 +22,9 @@ import { tooltips, } from '@codemirror/view'; import { classHighlighter } from '@lezer/highlight'; -import { useMemo } from 'react'; +import { useRef } from 'react'; -import { clsx, GlobalConstants } from '@cloudbeaver/core-utils'; +import { clsx, GlobalConstants, isObjectsEqual } from '@cloudbeaver/core-utils'; // @TODO allow to configure bindings outside of the component const DEFAULT_KEY_MAP = defaultKeymap.filter(binding => binding.mac !== 'Ctrl-f' && binding.key !== 'Mod-Enter'); @@ -34,55 +35,101 @@ DEFAULT_KEY_MAP.push({ run: () => true, }); +const defaultExtensionsFlags: IDefaultExtensions = { + lineNumbers: false, + tooltips: true, + highlightSpecialChars: true, + syntaxHighlighting: true, + bracketMatching: true, + dropCursor: true, + crosshairCursor: true, + foldGutter: true, + highlightActiveLineGutter: true, + highlightSelectionMatches: true, + highlightActiveLine: true, + indentOnInput: true, + rectangularSelection: true, + keymap: true, + lineWrapping: false, +}; + export interface IDefaultExtensions { lineNumbers?: boolean; + tooltips?: boolean; + highlightSpecialChars?: boolean; + syntaxHighlighting?: boolean; + bracketMatching?: boolean; + dropCursor?: boolean; + crosshairCursor?: boolean; + foldGutter?: boolean; + highlightActiveLineGutter?: boolean; + highlightSelectionMatches?: boolean; + highlightActiveLine?: boolean; + indentOnInput?: boolean; + rectangularSelection?: boolean; + keymap?: boolean; + lineWrapping?: boolean; } +const extensionMap = { + lineNumbers, + tooltips: () => tooltips({ parent: document.body }), + highlightSpecialChars, + syntaxHighlighting: () => syntaxHighlighting(classHighlighter), + bracketMatching, + dropCursor, + highlightSelectionMatches, + crosshairCursor, + foldGutter: () => + foldGutter({ + markerDOM: (open: boolean) => { + const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); + svg.setAttributeNS(null, 'viewBox', '0 0 15 8'); + svg.style.maxWidth = '100%'; + svg.style.maxHeight = '100%'; + + const use = document.createElementNS('http://www.w3.org/2000/svg', 'use'); + use.setAttributeNS('http://www.w3.org/1999/xlink', 'href', GlobalConstants.absoluteUrl('/icons/icons.svg#angle')); + svg.appendChild(use); + + const element = document.createElement('div'); + element.appendChild(svg); + element.className = clsx('cm-gutterElement-icon', open ? 'cm-foldGutter-open' : 'cm-foldGutter-folded'); + + return element; + }, + }), + highlightActiveLineGutter, + highlightActiveLine, + indentOnInput, + rectangularSelection, + keymap: () => keymap.of(DEFAULT_KEY_MAP), + lineWrapping: () => EditorView.lineWrapping, +}; + const DEFAULT_EXTENSIONS_COMPARTMENT = new Compartment(); /** Provides the necessary extensions to establish a basic editor */ export function useEditorDefaultExtensions(options?: IDefaultExtensions): [Compartment, Extension] { - return useMemo(() => { - const extensions = []; - if (options?.lineNumbers) { - extensions.push(lineNumbers()); - } + const previousOptions = useRef(options); + const isOptionsChanged = !isObjectsEqual(options, previousOptions.current); + const extensions = useRef<[Compartment, Extension] | null>(null); - extensions.push( - tooltips({ - parent: document.body, - }), - highlightSpecialChars(), - highlightSelectionMatches(), - syntaxHighlighting(classHighlighter), - bracketMatching(), - dropCursor(), - crosshairCursor(), - foldGutter({ - markerDOM: (open: boolean) => { - const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); - svg.setAttributeNS(null, 'viewBox', '0 0 15 8'); - svg.style.maxWidth = '100%'; - svg.style.maxHeight = '100%'; + if (isOptionsChanged || extensions.current === null) { + previousOptions.current = options; + extensions.current = createExtensions(options); + } - const use = document.createElementNS('http://www.w3.org/2000/svg', 'use'); - use.setAttributeNS('http://www.w3.org/1999/xlink', 'href', GlobalConstants.absoluteUrl('/icons/icons.svg#angle')); - svg.appendChild(use); - - const element = document.createElement('div'); - element.appendChild(svg); - element.className = clsx('cm-gutterElement-icon', open ? 'cm-foldGutter-open' : 'cm-foldGutter-folded'); - - return element; - }, - }), - highlightActiveLineGutter(), - highlightActiveLine(), - indentOnInput(), - rectangularSelection(), - keymap.of(DEFAULT_KEY_MAP), - ); + return extensions.current; +} - return [DEFAULT_EXTENSIONS_COMPARTMENT, extensions]; - }, [options?.lineNumbers]); +function createExtensions(options?: IDefaultExtensions): [Compartment, Extension] { + const extensions = Object.entries(defaultExtensionsFlags) + .filter(([key, isEnabled]) => options?.[key as keyof typeof options] ?? isEnabled) + .map(([key]) => { + const extensionFunction = extensionMap[key as keyof typeof extensionMap]; + return extensionFunction?.(); + }) + .filter(Boolean); + return [DEFAULT_EXTENSIONS_COMPARTMENT, extensions]; } diff --git a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataOptions.ts b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataOptions.ts index 2b6c946d3a..50f56e43e0 100644 --- a/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataOptions.ts +++ b/webapp/packages/plugin-data-viewer/src/DatabaseDataModel/IDatabaseDataOptions.ts @@ -14,4 +14,5 @@ export interface IDatabaseDataOptions { catalog?: string; whereFilter: string; constraints: SqlDataFilterConstraint[]; + readLogs?: boolean; } diff --git a/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorTabService.ts b/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorTabService.ts index 400126f0e3..f1fd0fe203 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorTabService.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab/src/SqlEditorTabService.ts @@ -309,6 +309,7 @@ export class SqlEditorTabService extends Bootstrap { tab.handlerState.resultTabs = observable([]); tab.handlerState.executionPlanTabs = observable([]); tab.handlerState.statisticsTabs = observable([]); + tab.handlerState.outputLogsTab = undefined; return true; } diff --git a/webapp/packages/plugin-sql-editor/public/icons/sql_output_logs.svg b/webapp/packages/plugin-sql-editor/public/icons/sql_output_logs.svg new file mode 100644 index 0000000000..bc9e4420c2 --- /dev/null +++ b/webapp/packages/plugin-sql-editor/public/icons/sql_output_logs.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/webapp/packages/plugin-sql-editor/public/icons/sql_output_logs_m.svg b/webapp/packages/plugin-sql-editor/public/icons/sql_output_logs_m.svg new file mode 100644 index 0000000000..d4d1f74ad4 --- /dev/null +++ b/webapp/packages/plugin-sql-editor/public/icons/sql_output_logs_m.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/webapp/packages/plugin-sql-editor/public/icons/sql_output_logs_sm.svg b/webapp/packages/plugin-sql-editor/public/icons/sql_output_logs_sm.svg new file mode 100644 index 0000000000..bda167f39f --- /dev/null +++ b/webapp/packages/plugin-sql-editor/public/icons/sql_output_logs_sm.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/webapp/packages/plugin-sql-editor/src/ISqlEditorTabState.ts b/webapp/packages/plugin-sql-editor/src/ISqlEditorTabState.ts index 7c2c59154c..a117d81396 100644 --- a/webapp/packages/plugin-sql-editor/src/ISqlEditorTabState.ts +++ b/webapp/packages/plugin-sql-editor/src/ISqlEditorTabState.ts @@ -5,6 +5,7 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ +import type { IOutputLogType } from './SqlResultTabs/OutputLogs/IOutputLogTypes'; export interface IResultTab { tabId: string; @@ -41,6 +42,10 @@ export interface IExecutionPlanTab { options?: Record; } +export interface IOutputLogsTab extends ISqlEditorResultTab { + selectedLogTypes: IOutputLogType[]; +} + export interface ISqlEditorTabState { editorId: string; datasourceKey: string; @@ -54,6 +59,7 @@ export interface ISqlEditorTabState { resultTabs: IResultTab[]; statisticsTabs: IStatisticsTab[]; executionPlanTabs: IExecutionPlanTab[]; + outputLogsTab?: IOutputLogsTab; // mode currentModeId?: string; diff --git a/webapp/packages/plugin-sql-editor/src/MenuBootstrap.ts b/webapp/packages/plugin-sql-editor/src/MenuBootstrap.ts index 2652018a18..a99f4a8511 100644 --- a/webapp/packages/plugin-sql-editor/src/MenuBootstrap.ts +++ b/webapp/packages/plugin-sql-editor/src/MenuBootstrap.ts @@ -22,11 +22,13 @@ import { ACTION_SQL_EDITOR_EXECUTE_NEW } from './actions/ACTION_SQL_EDITOR_EXECU import { ACTION_SQL_EDITOR_EXECUTE_SCRIPT } from './actions/ACTION_SQL_EDITOR_EXECUTE_SCRIPT'; import { ACTION_SQL_EDITOR_FORMAT } from './actions/ACTION_SQL_EDITOR_FORMAT'; import { ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN } from './actions/ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN'; +import { ACTION_SQL_EDITOR_SHOW_OUTPUT } from './actions/ACTION_SQL_EDITOR_SHOW_OUTPUT'; import { KEY_BINDING_SQL_EDITOR_EXECUTE } from './actions/bindings/KEY_BINDING_SQL_EDITOR_EXECUTE'; import { KEY_BINDING_SQL_EDITOR_EXECUTE_NEW } from './actions/bindings/KEY_BINDING_SQL_EDITOR_EXECUTE_NEW'; import { KEY_BINDING_SQL_EDITOR_EXECUTE_SCRIPT } from './actions/bindings/KEY_BINDING_SQL_EDITOR_EXECUTE_SCRIPT'; import { KEY_BINDING_SQL_EDITOR_FORMAT } from './actions/bindings/KEY_BINDING_SQL_EDITOR_FORMAT'; import { KEY_BINDING_SQL_EDITOR_SHOW_EXECUTION_PLAN } from './actions/bindings/KEY_BINDING_SQL_EDITOR_SHOW_EXECUTION_PLAN'; +import { KEY_BINDING_SQL_EDITOR_SHOW_OUTPUT } from './actions/bindings/KEY_BINDING_SQL_EDITOR_SHOW_OUTPUT'; import { ESqlDataSourceFeatures } from './SqlDataSource/ESqlDataSourceFeatures'; import { DATA_CONTEXT_SQL_EDITOR_DATA } from './SqlEditor/DATA_CONTEXT_SQL_EDITOR_DATA'; @@ -57,11 +59,13 @@ export class MenuBootstrap extends Bootstrap { ACTION_SQL_EDITOR_EXECUTE_NEW, ACTION_SQL_EDITOR_EXECUTE_SCRIPT, ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN, + ACTION_SQL_EDITOR_SHOW_OUTPUT, ].includes(action) ) { return false; } + // TODO we have to add check for output action ? if ( !sqlEditorData.dataSource?.hasFeature(ESqlDataSourceFeatures.query) && [ACTION_SQL_EDITOR_EXECUTE, ACTION_SQL_EDITOR_EXECUTE_NEW, ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN].includes(action) @@ -77,6 +81,7 @@ export class MenuBootstrap extends Bootstrap { ACTION_REDO, ACTION_UNDO, ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN, + ACTION_SQL_EDITOR_SHOW_OUTPUT, ].includes(action); }, isDisabled: (context, action) => !context.has(DATA_CONTEXT_SQL_EDITOR_DATA), diff --git a/webapp/packages/plugin-sql-editor/src/QueryDataSource.ts b/webapp/packages/plugin-sql-editor/src/QueryDataSource.ts index 461544edba..95355bff36 100644 --- a/webapp/packages/plugin-sql-editor/src/QueryDataSource.ts +++ b/webapp/packages/plugin-sql-editor/src/QueryDataSource.ts @@ -199,6 +199,7 @@ export class QueryDataSource(function SqlEditorActionsMenu({ state, context, className }) { const styles = useS(SqlEditorActionsMenuBarStyles, SqlEditorActionsMenuBarItemStyles); const menu = useMenu({ menu: SQL_EDITOR_ACTIONS_MENU, context }); - menu.context.set(DATA_CONTEXT_SQL_EDITOR_STATE, state); return ( diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/useSqlEditor.ts b/webapp/packages/plugin-sql-editor/src/SqlEditor/useSqlEditor.ts index a313d6475a..7234ee2131 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/useSqlEditor.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/useSqlEditor.ts @@ -25,6 +25,8 @@ import { SqlDialectInfoService } from '../SqlDialectInfoService'; import { SqlEditorService } from '../SqlEditorService'; import { ISQLScriptSegment, SQLParser } from '../SQLParser'; import { SqlExecutionPlanService } from '../SqlResultTabs/ExecutionPlan/SqlExecutionPlanService'; +import { OUTPUT_LOGS_TAB_ID } from '../SqlResultTabs/OutputLogs/OUTPUT_LOGS_TAB_ID'; +import { OutputLogsService } from '../SqlResultTabs/OutputLogs/OutputLogsService'; import { SqlQueryService } from '../SqlResultTabs/SqlQueryService'; import { SqlResultTabsService } from '../SqlResultTabs/SqlResultTabsService'; import type { ICursor, ISQLEditorData } from './ISQLEditorData'; @@ -68,6 +70,7 @@ export function useSqlEditor(state: ISqlEditorTabState): ISQLEditorData { const sqlResultTabsService = useService(SqlResultTabsService); const commonDialogService = useService(CommonDialogService); const sqlDataSourceService = useService(SqlDataSourceService); + const sqlOutputLogsService = useService(OutputLogsService); const data = useObservableRef( () => ({ @@ -310,9 +313,11 @@ export function useSqlEditor(state: ISqlEditorTabState): ISQLEditorData { } if (this.state.tabs.length) { + const processableTabs = this.state.tabs.filter(tab => tab.id !== OUTPUT_LOGS_TAB_ID); + const result = await this.commonDialogService.open(ConfirmationDialog, { title: 'sql_editor_close_result_tabs_dialog_title', - message: `Do you want to close ${this.state.tabs.length} tabs before executing script?`, + message: `Do you want to close ${processableTabs.length} tabs before executing script?`, confirmActionText: 'ui_yes', extraStatus: 'no', }); @@ -324,7 +329,7 @@ export function useSqlEditor(state: ISqlEditorTabState): ISQLEditorData { return; } - this.sqlResultTabsService.removeResultTabs(this.state); + this.sqlResultTabsService.removeResultTabs(this.state, [OUTPUT_LOGS_TAB_ID]); } else if (result === DialogueStateResult.Rejected) { return; } diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditorService.ts b/webapp/packages/plugin-sql-editor/src/SqlEditorService.ts index 07d65961e8..7d625aaa36 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditorService.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlEditorService.ts @@ -72,6 +72,7 @@ export class SqlEditorService { resultTabs: observable([]), executionPlanTabs: observable([]), statisticsTabs: observable([]), + outputLogsTab: undefined, currentModeId: undefined, modeState: observable([]), }); diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditorView.ts b/webapp/packages/plugin-sql-editor/src/SqlEditorView.ts index 58f8bb152e..0178d42e5c 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditorView.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlEditorView.ts @@ -14,6 +14,7 @@ import { ACTION_SQL_EDITOR_EXECUTE_NEW } from './actions/ACTION_SQL_EDITOR_EXECU import { ACTION_SQL_EDITOR_EXECUTE_SCRIPT } from './actions/ACTION_SQL_EDITOR_EXECUTE_SCRIPT'; import { ACTION_SQL_EDITOR_FORMAT } from './actions/ACTION_SQL_EDITOR_FORMAT'; import { ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN } from './actions/ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN'; +import { ACTION_SQL_EDITOR_SHOW_OUTPUT } from './actions/ACTION_SQL_EDITOR_SHOW_OUTPUT'; @injectable() export class SqlEditorView extends View { @@ -27,6 +28,7 @@ export class SqlEditorView extends View { ACTION_UNDO, ACTION_REDO, ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN, + ACTION_SQL_EDITOR_SHOW_OUTPUT, ACTION_SAVE, ); } diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/ACTION_SHOW_OUTPUT_LOGS.ts b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/ACTION_SHOW_OUTPUT_LOGS.ts new file mode 100644 index 0000000000..ffe85a38f9 --- /dev/null +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/ACTION_SHOW_OUTPUT_LOGS.ts @@ -0,0 +1,7 @@ +import { createAction } from '@cloudbeaver/core-view'; + +export const ACTION_SHOW_OUTPUT_LOGS = createAction('action-show_output_logs', { + label: 'sql_editor_output_logs_button_tooltip', + icon: '/icons/sql_output_logs.svg', + tooltip: 'sql_editor_output_logs_button_tooltip', +}); diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/IOutputLogTypes.ts b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/IOutputLogTypes.ts new file mode 100644 index 0000000000..5078ee9ff3 --- /dev/null +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/IOutputLogTypes.ts @@ -0,0 +1,2 @@ +export const OUTPUT_LOG_TYPES = ['Debug', 'Log', 'Info', 'Notice', 'Warning', 'Error'] as const; +export type IOutputLogType = (typeof OUTPUT_LOG_TYPES)[number]; diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OUTPUT_LOGS_FILTER_MENU.ts b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OUTPUT_LOGS_FILTER_MENU.ts new file mode 100644 index 0000000000..e1f53931bd --- /dev/null +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OUTPUT_LOGS_FILTER_MENU.ts @@ -0,0 +1,10 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2023 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { createMenu } from '@cloudbeaver/core-view'; + +export const OUTPUT_LOGS_FILTER_MENU = createMenu('output_logs_filter_menu', 'Output Logs'); diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OUTPUT_LOGS_TAB_ID.ts b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OUTPUT_LOGS_TAB_ID.ts new file mode 100644 index 0000000000..b88237948f --- /dev/null +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OUTPUT_LOGS_TAB_ID.ts @@ -0,0 +1 @@ +export const OUTPUT_LOGS_TAB_ID = 'output_logs'; diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogTypesFilterMenu.m.css b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogTypesFilterMenu.m.css new file mode 100644 index 0000000000..83bd17790b --- /dev/null +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogTypesFilterMenu.m.css @@ -0,0 +1,14 @@ +.contextMenu { + padding: 0; + height: 24px; + width: 24px; + display: flex; + box-sizing: border-box; + align-items: center; + justify-content: center; + + & .icon { + width: 16px; + height: 100%; + } +} diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogTypesFilterMenu.tsx b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogTypesFilterMenu.tsx new file mode 100644 index 0000000000..9b31a9b4c8 --- /dev/null +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogTypesFilterMenu.tsx @@ -0,0 +1,39 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2023 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { observer } from 'mobx-react-lite'; +import React, { useEffect } from 'react'; + +import { Icon, s, useS } from '@cloudbeaver/core-blocks'; +import { ContextMenu } from '@cloudbeaver/core-ui'; +import { useMenu } from '@cloudbeaver/core-view'; + +import { DATA_CONTEXT_SQL_EDITOR_STATE } from '../../DATA_CONTEXT_SQL_EDITOR_STATE'; +import type { ISqlEditorTabState } from '../../ISqlEditorTabState'; +import { OUTPUT_LOGS_FILTER_MENU } from './OUTPUT_LOGS_FILTER_MENU'; +import style from './OutputLogTypesFilterMenu.m.css'; + +interface Props { + sqlEditorTabState: ISqlEditorTabState; +} + +export const OutputLogsFilterMenu = observer(function OutputLogTypesFilterMenu({ sqlEditorTabState }) { + const styles = useS(style); + const menu = useMenu({ + menu: OUTPUT_LOGS_FILTER_MENU, + }); + + useEffect(() => { + menu.context.set(DATA_CONTEXT_SQL_EDITOR_STATE, sqlEditorTabState); + }, []); + + return ( + + + + ); +}); diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsEventHandler.ts b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsEventHandler.ts new file mode 100644 index 0000000000..e800c4a631 --- /dev/null +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsEventHandler.ts @@ -0,0 +1,23 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2023 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { injectable } from '@cloudbeaver/core-di'; +import { ISessionEvent, SessionEventSource, SessionEventTopic, TopicEventHandler } from '@cloudbeaver/core-root'; +import type { CbDatabaseOutputLogEvent, CbSessionLogEvent as ISessionLogEvent } from '@cloudbeaver/core-sdk'; + +export { type ISessionLogEvent }; + +@injectable() +export class OutputLogsEventHandler extends TopicEventHandler { + constructor(sessionEventSource: SessionEventSource) { + super(SessionEventTopic.CbDatabaseOutputLog, sessionEventSource); + } + + map(event: CbDatabaseOutputLogEvent) { + return event; + } +} diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsPanel.tsx b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsPanel.tsx new file mode 100644 index 0000000000..246fad90eb --- /dev/null +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsPanel.tsx @@ -0,0 +1,39 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2023 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { observer } from 'mobx-react-lite'; + +import { Container, Group, s, useResource, useS } from '@cloudbeaver/core-blocks'; +import { useService } from '@cloudbeaver/core-di'; +import { EditorLoader } from '@cloudbeaver/plugin-codemirror6'; + +import type { ISqlEditorTabState } from '../../ISqlEditorTabState'; +import { OutputLogsResource } from './OutputLogsResource'; +import { OutputLogsService } from './OutputLogsService'; +import { OutputLogsToolbar } from './OutputLogsToolbar'; +import { useOutputLogsPanelState } from './useOutputLogsPanelState'; + +interface Props { + sqlEditorTabState: ISqlEditorTabState; +} + +export const OutputLogsPanel = observer(function SqlOutputLogsPanel({ sqlEditorTabState }) { + const outputLogsService = useService(OutputLogsService); + const { data } = useResource(SqlOutputLogsPanel, OutputLogsResource, undefined); + const outputLogs = outputLogsService.getOutputLogs(data, sqlEditorTabState); + + const state = useOutputLogsPanelState(outputLogs, sqlEditorTabState); + + return ( + + + + {data && } + + + ); +}); diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsResource.ts b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsResource.ts new file mode 100644 index 0000000000..4a03614823 --- /dev/null +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsResource.ts @@ -0,0 +1,64 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2023 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { ConnectionExecutionContextResource } from '@cloudbeaver/core-connections'; +import { injectable } from '@cloudbeaver/core-di'; +import { ServerEventId } from '@cloudbeaver/core-root'; +import { CachedDataResource, CbDatabaseOutputLogEvent } from '@cloudbeaver/core-sdk'; + +import type { IOutputLogType } from './IOutputLogTypes'; +import { OutputLogsEventHandler } from './OutputLogsEventHandler'; + +export interface IOutputLog { + message: string; + severity: IOutputLogType; + contextId: string; + timestamp: number; +} + +@injectable() +export class OutputLogsResource extends CachedDataResource { + constructor( + sqlOutputLogsEventHandler: OutputLogsEventHandler, + private readonly connectionExecutionContextResource: ConnectionExecutionContextResource, + ) { + super(() => []); + + sqlOutputLogsEventHandler.onEvent( + ServerEventId.CbDatabaseOutputLogUpdated, + (event: CbDatabaseOutputLogEvent) => { + this.collectMessagesFromEvent(event); + }, + undefined, + this, + ); + + // hack, we need to call this.use() to initialize resource at startup + this.use(undefined); + + this.connectionExecutionContextResource.onItemDelete.addHandler(key => { + this.setData(this.data.filter(log => log.contextId !== key)); + }); + } + + private collectMessagesFromEvent(event: CbDatabaseOutputLogEvent) { + const newLogs = event.messages.map(message => ({ + message: message.message, + severity: message.severity, + contextId: event.contextId, + timestamp: event.eventTimestamp, + })) as IOutputLog[]; + + const updatedData: IOutputLog[] = (this.data || []).concat(newLogs); + + this.setData(updatedData); + } + + protected async loader(): Promise { + return this.data; + } +} diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsService.ts b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsService.ts new file mode 100644 index 0000000000..f518517bf7 --- /dev/null +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsService.ts @@ -0,0 +1,54 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2023 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { injectable } from '@cloudbeaver/core-di'; + +import type { ISqlEditorTabState } from '../../ISqlEditorTabState'; +import { SqlDataSourceService } from '../../SqlDataSource/SqlDataSourceService'; +import { OUTPUT_LOG_TYPES } from './IOutputLogTypes'; +import { OUTPUT_LOGS_TAB_ID } from './OUTPUT_LOGS_TAB_ID'; +import type { IOutputLog } from './OutputLogsResource'; + +@injectable() +export class OutputLogsService { + constructor(private readonly sqlDataSourceService: SqlDataSourceService) {} + + async showOutputLogs(editorState: ISqlEditorTabState): Promise { + this.createOutputLogsTab(editorState); + editorState.currentTabId = OUTPUT_LOGS_TAB_ID; + } + + removeOutputLogsTab(state: ISqlEditorTabState, tabId: string): void { + if (tabId === OUTPUT_LOGS_TAB_ID) { + state.outputLogsTab = undefined; + } + } + + private createOutputLogsTab(state: ISqlEditorTabState) { + const order = Math.max(0, ...state.tabs.map(tab => tab.order + 1)); + + if (state.tabs.find(tab => tab.id === OUTPUT_LOGS_TAB_ID)) { + return; + } + + const tab = { + id: OUTPUT_LOGS_TAB_ID, + name: 'Output', + icon: '/icons/sql_output_logs.svg', + order, + }; + + state.outputLogsTab = { ...tab, selectedLogTypes: [...OUTPUT_LOG_TYPES] }; + state.tabs.push({ ...tab }); + } + + getOutputLogs(events: IOutputLog[], editorState: ISqlEditorTabState) { + const dataSource = this.sqlDataSourceService.get(editorState.editorId); + + return events.filter(event => event.contextId === dataSource?.executionContext?.id); + } +} diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsToolbar.m.css b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsToolbar.m.css new file mode 100644 index 0000000000..e5faba5c7a --- /dev/null +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsToolbar.m.css @@ -0,0 +1,6 @@ +.searchIcon { + width: 24px; + height: 24px; + display: flex; + border-radius: var(--theme-menu-bar-small-action-radius); +} diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsToolbar.tsx b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsToolbar.tsx new file mode 100644 index 0000000000..8f6002dd87 --- /dev/null +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputLogsToolbar.tsx @@ -0,0 +1,45 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2023 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { observer } from 'mobx-react-lite'; +import React from 'react'; + +import { Container, Icon, InputField, s, useS, useTranslate } from '@cloudbeaver/core-blocks'; + +import type { ISqlEditorTabState } from '../../ISqlEditorTabState'; +import style from './OutputLogsToolbar.m.css'; +import { OutputLogsFilterMenu } from './OutputLogTypesFilterMenu'; +import type { SqlOutputLogsPanelState } from './useOutputLogsPanelState'; + +interface Props { + state: SqlOutputLogsPanelState; + sqlEditorTabState: ISqlEditorTabState; +} + +export const OutputLogsToolbar = observer(function SqlOutputLogsToolbar({ state, sqlEditorTabState }) { + const styles = useS(style); + const translate = useTranslate(); + + return ( + + + +
+ } + fill + onChange={value => state.setSearchValue(value.toString())} + /> + + + + + ); +}); diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputMenuBootstrap.ts b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputMenuBootstrap.ts new file mode 100644 index 0000000000..c23292cd31 --- /dev/null +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/OutputMenuBootstrap.ts @@ -0,0 +1,128 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2023 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { Bootstrap, injectable } from '@cloudbeaver/core-di'; +import { ActionService, KeyBindingService, MenuCheckboxItem, MenuService } from '@cloudbeaver/core-view'; + +import { ACTION_SQL_EDITOR_SHOW_OUTPUT } from '../../actions/ACTION_SQL_EDITOR_SHOW_OUTPUT'; +import { KEY_BINDING_SQL_EDITOR_SHOW_OUTPUT } from '../../actions/bindings/KEY_BINDING_SQL_EDITOR_SHOW_OUTPUT'; +import { DATA_CONTEXT_SQL_EDITOR_STATE } from '../../DATA_CONTEXT_SQL_EDITOR_STATE'; +import { ESqlDataSourceFeatures } from '../../SqlDataSource/ESqlDataSourceFeatures'; +import { SqlDataSourceService } from '../../SqlDataSource/SqlDataSourceService'; +import { SQL_EDITOR_ACTIONS_MENU } from '../../SqlEditor/SQL_EDITOR_ACTIONS_MENU'; +import { ACTION_SHOW_OUTPUT_LOGS } from './ACTION_SHOW_OUTPUT_LOGS'; +import { OUTPUT_LOG_TYPES } from './IOutputLogTypes'; +import { OUTPUT_LOGS_FILTER_MENU } from './OUTPUT_LOGS_FILTER_MENU'; +import { OutputLogsService } from './OutputLogsService'; + +@injectable() +export class OutputMenuBootstrap extends Bootstrap { + constructor( + private readonly actionService: ActionService, + private readonly menuService: MenuService, + private readonly outputLogsService: OutputLogsService, + private readonly sqlDataSourceService: SqlDataSourceService, + private readonly keyBindingService: KeyBindingService, + ) { + super(); + } + + register(): void | Promise { + this.menuService.addCreator({ + menus: [OUTPUT_LOGS_FILTER_MENU], + getItems: context => { + const state = context.tryGet(DATA_CONTEXT_SQL_EDITOR_STATE); + + if (!state) { + return []; + } + + const outputLogsTabState = state?.outputLogsTab; + const items = []; + + for (const logType of OUTPUT_LOG_TYPES) { + items.push( + new MenuCheckboxItem( + { + id: logType, + label: logType, + tooltip: logType, + }, + { + onSelect: () => { + if (outputLogsTabState?.selectedLogTypes) { + if (outputLogsTabState.selectedLogTypes.includes(logType)) { + outputLogsTabState.selectedLogTypes = outputLogsTabState.selectedLogTypes.filter(type => type !== logType); + return; + } + outputLogsTabState.selectedLogTypes = [...outputLogsTabState.selectedLogTypes, logType]; + } + }, + }, + { + isChecked: () => !!outputLogsTabState?.selectedLogTypes.includes(logType), + }, + ), + ); + } + + return items; + }, + }); + + this.registerOutputLogsAction(); + } + + private registerOutputLogsAction() { + this.actionService.addHandler({ + id: 'output-logs-handler', + isActionApplicable: (context, action): boolean => { + const state = context.tryGet(DATA_CONTEXT_SQL_EDITOR_STATE); + + if (state && action === ACTION_SHOW_OUTPUT_LOGS) { + const sqlDataSource = this.sqlDataSourceService.get(state.editorId); + const isQuery = sqlDataSource?.hasFeature(ESqlDataSourceFeatures.query); + const isExecutable = sqlDataSource?.hasFeature(ESqlDataSourceFeatures.executable); + + if (isQuery && isExecutable) { + return true; + } + } + + return false; + }, + + handler: async (context, action) => { + const state = context.get(DATA_CONTEXT_SQL_EDITOR_STATE); + + if (action === ACTION_SHOW_OUTPUT_LOGS) { + this.outputLogsService.showOutputLogs(state); + } + }, + }); + + this.menuService.addCreator({ + menus: [SQL_EDITOR_ACTIONS_MENU], + getItems: (context, items) => [...items, ACTION_SHOW_OUTPUT_LOGS], + }); + + this.keyBindingService.addKeyBindingHandler({ + id: 'sql-editor-show-output', + binding: KEY_BINDING_SQL_EDITOR_SHOW_OUTPUT, + isBindingApplicable: (contexts, action) => action === ACTION_SQL_EDITOR_SHOW_OUTPUT, + handler: (context, action) => { + const state = context.get(DATA_CONTEXT_SQL_EDITOR_STATE); + + if (action === ACTION_SQL_EDITOR_SHOW_OUTPUT) { + this.outputLogsService.showOutputLogs(state); + } + }, + }); + } + + async load(): Promise {} +} diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/useOutputLogsPanelState.ts b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/useOutputLogsPanelState.ts new file mode 100644 index 0000000000..f2cfa2e591 --- /dev/null +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/OutputLogs/useOutputLogsPanelState.ts @@ -0,0 +1,58 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2023 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { action, computed, observable } from 'mobx'; + +import { useObservableRef } from '@cloudbeaver/core-blocks'; +import type { WsOutputLogInfo } from '@cloudbeaver/core-sdk'; + +import type { ISqlEditorTabState } from '../../ISqlEditorTabState'; +import type { IOutputLog } from './OutputLogsResource'; + +export interface SqlOutputLogsPanelState { + searchValue: string; + setSearchValue: (value: string) => void; + logMessages: WsOutputLogInfo['message'][]; + readonly resultValue: string; + readonly filteredLogs: WsOutputLogInfo[]; +} +export const useOutputLogsPanelState = (outputLogs: IOutputLog[], sqlEditorTabState: ISqlEditorTabState) => + useObservableRef( + () => ({ + searchValue: '', + setSearchValue(value: string) { + this.searchValue = value; + }, + get filteredLogs() { + const selectedLogTypes = sqlEditorTabState.outputLogsTab?.selectedLogTypes; + + if (!selectedLogTypes?.length) { + return []; + } + + return outputLogs.filter(log => { + if (!selectedLogTypes.includes(log.severity)) { + return false; + } + if (this.searchValue.length > 0 && !log.message?.includes(this.searchValue)) { + return false; + } + return true; + }); + }, + get resultValue() { + return this.filteredLogs.map(log => `[${log.severity}] ${log.message}`).join('\n'); + }, + }), + { + searchValue: observable.ref, + setSearchValue: action.bound, + filteredLogs: computed, + resultValue: computed, + }, + false, + ); diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/SqlQueryService.ts b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/SqlQueryService.ts index 58ca739f4e..5599760742 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/SqlQueryService.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/SqlQueryService.ts @@ -144,6 +144,8 @@ export class SqlQueryService { } const editable = this.dataViewerService.isDataEditable(connectionInfo); + const isOutputLogsTabOpened = !!editorState.outputLogsTab; + model .setAccess(editable ? DatabaseDataAccessMode.Default : DatabaseDataAccessMode.Readonly) .setOptions({ @@ -151,6 +153,7 @@ export class SqlQueryService { connectionKey, constraints: [], whereFilter: '', + readLogs: isOutputLogsTabOpened, }) .source.setExecutionContext(executionContext) .setSupportedDataFormats(connectionInfo.supportedDataFormats); @@ -218,6 +221,8 @@ export class SqlQueryService { statistics.modelId = model.id; const editable = this.dataViewerService.isDataEditable(connectionInfo); + const isOutputLogsTabOpened = !!editorState.outputLogsTab; + model .setAccess(editable ? DatabaseDataAccessMode.Default : DatabaseDataAccessMode.Readonly) .setOptions({ @@ -225,6 +230,7 @@ export class SqlQueryService { connectionKey, constraints: [], whereFilter: '', + readLogs: isOutputLogsTabOpened, }) .source.setExecutionContext(executionContext) .setSupportedDataFormats(connectionInfo.supportedDataFormats); diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/SqlResultPanel.tsx b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/SqlResultPanel.tsx index 523fa6876d..89b6caeb03 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/SqlResultPanel.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/SqlResultPanel.tsx @@ -10,6 +10,7 @@ import styled, { css } from 'reshadow'; import type { ISqlEditorTabState } from '../ISqlEditorTabState'; import { SqlExecutionPlanPanel } from './ExecutionPlan/SqlExecutionPlanPanel'; +import { OutputLogsPanel } from './OutputLogs/OutputLogsPanel'; import { SqlResultSetPanel } from './SqlResultSetPanel'; import { SqlScriptStatisticsPanel } from './SqlScriptStatisticsPanel'; @@ -59,5 +60,13 @@ export const SqlResultPanel = observer(function SqlResultPanel({ state, i ); } + if (state.outputLogsTab) { + return styled(style)( + + + , + ); + } + return null; }); diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/SqlResultTabsService.ts b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/SqlResultTabsService.ts index 2c2a214b20..138c7f9806 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/SqlResultTabsService.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/SqlResultTabsService.ts @@ -11,6 +11,7 @@ import { injectable } from '@cloudbeaver/core-di'; import type { ISqlEditorResultTab, ISqlEditorTabState } from '../ISqlEditorTabState'; import { SqlExecutionPlanService } from './ExecutionPlan/SqlExecutionPlanService'; +import { OutputLogsService } from './OutputLogs/OutputLogsService'; import { SqlQueryResultService } from './SqlQueryResultService'; import { SqlQueryService } from './SqlQueryService'; @@ -20,6 +21,7 @@ export class SqlResultTabsService { private readonly sqlQueryService: SqlQueryService, private readonly sqlQueryResultService: SqlQueryResultService, private readonly sqlExecutionPlanService: SqlExecutionPlanService, + private readonly sqlOutputLogsService: OutputLogsService, ) { makeObservable(this, { removeResultTabs: action, @@ -62,8 +64,11 @@ export class SqlResultTabsService { return true; } - removeResultTabs(state: ISqlEditorTabState): void { - for (const tab of state.tabs.slice()) { + removeResultTabs(state: ISqlEditorTabState, excludedTabIds?: string[]): void { + for (const tab of state.tabs) { + if (excludedTabIds?.includes(tab.id)) { + continue; + } this.removeTab(state, tab); } } @@ -74,6 +79,7 @@ export class SqlResultTabsService { this.sqlQueryService.removeStatisticsTab(state, tab.id); this.sqlQueryResultService.removeResultTab(state, tab.id); this.sqlExecutionPlanService.removeExecutionPlanTab(state, tab.id); + this.sqlOutputLogsService.removeOutputLogsTab(state, tab.id); if (state.currentTabId === tab.id) { if (state.tabs.length > 0) { diff --git a/webapp/packages/plugin-sql-editor/src/actions/ACTION_SQL_EDITOR_SHOW_OUTPUT.ts b/webapp/packages/plugin-sql-editor/src/actions/ACTION_SQL_EDITOR_SHOW_OUTPUT.ts new file mode 100644 index 0000000000..ef3a9deee5 --- /dev/null +++ b/webapp/packages/plugin-sql-editor/src/actions/ACTION_SQL_EDITOR_SHOW_OUTPUT.ts @@ -0,0 +1,13 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2023 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { createAction } from '@cloudbeaver/core-view'; + +export const ACTION_SQL_EDITOR_SHOW_OUTPUT = createAction('sql-editor-show-output', { + icon: '/icons/sql_output.svg', // todo change icon + label: 'sql_editor_output_logs_button_tooltip', +}); diff --git a/webapp/packages/plugin-sql-editor/src/actions/bindings/KEY_BINDING_SQL_EDITOR_SHOW_OUTPUT.ts b/webapp/packages/plugin-sql-editor/src/actions/bindings/KEY_BINDING_SQL_EDITOR_SHOW_OUTPUT.ts new file mode 100644 index 0000000000..2508b02b88 --- /dev/null +++ b/webapp/packages/plugin-sql-editor/src/actions/bindings/KEY_BINDING_SQL_EDITOR_SHOW_OUTPUT.ts @@ -0,0 +1,14 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2023 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ +import { createKeyBinding } from '@cloudbeaver/core-view'; + +export const KEY_BINDING_SQL_EDITOR_SHOW_OUTPUT = createKeyBinding({ + id: 'sql-editor-show-output', + keys: 'shift+ctrl+o', + preventDefault: true, +}); diff --git a/webapp/packages/plugin-sql-editor/src/index.ts b/webapp/packages/plugin-sql-editor/src/index.ts index 5ee2f5bd1d..755f70e50a 100644 --- a/webapp/packages/plugin-sql-editor/src/index.ts +++ b/webapp/packages/plugin-sql-editor/src/index.ts @@ -10,6 +10,7 @@ export * from './actions/ACTION_SQL_EDITOR_EXECUTE_SCRIPT'; export * from './actions/ACTION_SQL_EDITOR_EXECUTE'; export * from './actions/ACTION_SQL_EDITOR_FORMAT'; export * from './actions/ACTION_SQL_EDITOR_SHOW_EXECUTION_PLAN'; +export * from './actions/ACTION_SQL_EDITOR_SHOW_OUTPUT'; export * from './SqlDataSource/LocalStorage/ILocalStorageSqlDataSourceState'; export * from './SqlDataSource/LocalStorage/LocalStorageSqlDataSource'; export * from './SqlDataSource/LocalStorage/LocalStorageSqlDataSourceBootstrap'; @@ -27,6 +28,9 @@ export * from './SqlEditor/SQL_EDITOR_TOOLS_MENU'; export * from './SqlEditor/SQLEditorModeContext'; export * from './SqlResultTabs/DATA_CONTEXT_SQL_EDITOR_RESULT_ID'; export * from './SqlResultTabs/SqlResultTabsService'; +export * from './SqlResultTabs/OutputLogs/OutputLogsEventHandler'; +export * from './SqlResultTabs/OutputLogs/OutputLogsResource'; +export * from './SqlResultTabs/OutputLogs/OutputLogsService'; export * from './DATA_CONTEXT_SQL_EDITOR_STATE'; export * from './getSqlEditorName'; export * from './QueryDataSource'; diff --git a/webapp/packages/plugin-sql-editor/src/locales/en.ts b/webapp/packages/plugin-sql-editor/src/locales/en.ts index 3c20f7b3bd..54308fd446 100644 --- a/webapp/packages/plugin-sql-editor/src/locales/en.ts +++ b/webapp/packages/plugin-sql-editor/src/locales/en.ts @@ -7,6 +7,9 @@ export default [ ['sql_editor_placeholder', 'Execute query with Ctrl+Enter to see results'], ['sql_editor_hint_empty', 'There is no proposals...'], ['sql_editor_execution_plan_button_tooltip', 'Explain execution plan (Shift + Ctrl + E)'], + ['sql_editor_output_logs_button_tooltip', 'Show server output (Shift + Ctrl + O)'], + ['sql_editor_output_logs_tab_title', 'Output'], + ['sql_editor_output_logs_input_placeholder', 'Enter a part of a message to search for here'], ['sql_editor_sql_execution_button_tooltip', 'Execute SQL Statement (Ctrl + Enter)'], ['sql_editor_sql_execution_new_tab_button_tooltip', 'Execute SQL Statement in new tab (Ctrl + \\)(Shift + Ctrl + Enter)'], ['sql_editor_sql_execution_script_button_tooltip', 'Execute SQL Script (Alt + X)'], diff --git a/webapp/packages/plugin-sql-editor/src/locales/it.ts b/webapp/packages/plugin-sql-editor/src/locales/it.ts index e0649ef0a6..8071d17e7e 100644 --- a/webapp/packages/plugin-sql-editor/src/locales/it.ts +++ b/webapp/packages/plugin-sql-editor/src/locales/it.ts @@ -7,6 +7,9 @@ export default [ ['sql_editor_placeholder', 'Esegui la query con Ctrl+Enter per vedere i risultati'], ['sql_editor_hint_empty', 'There is no proposals...'], ['sql_editor_execution_plan_button_tooltip', 'Mostra il piano di esecuzione (Shift + Ctrl + E)'], + ['sql_editor_output_logs_button_tooltip', 'Show server output (Shift + Ctrl + O)'], + ['sql_editor_output_logs_tab_title', 'Output'], + ['sql_editor_output_logs_input_placeholder', 'Enter a part of a message to search for here'], ['sql_editor_sql_execution_button_tooltip', "Esegui l'istruzione SQL (Ctrl + Enter)"], ['sql_editor_sql_execution_new_tab_button_tooltip', "Esegui l'istruzione SQL in una nuova tab (Ctrl + \\)(Shift + Ctrl + Enter)"], ['sql_editor_sql_execution_script_button_tooltip', 'Esegui lo script SQL (Alt + X)'], diff --git a/webapp/packages/plugin-sql-editor/src/locales/ru.ts b/webapp/packages/plugin-sql-editor/src/locales/ru.ts index f16baf789f..f639337962 100644 --- a/webapp/packages/plugin-sql-editor/src/locales/ru.ts +++ b/webapp/packages/plugin-sql-editor/src/locales/ru.ts @@ -7,6 +7,9 @@ export default [ ['sql_editor_placeholder', 'Нажмите Ctrl+Enter, чтобы выполнить запрос и увидеть результат'], ['sql_editor_hint_empty', 'Нет авто-дополнений...'], ['sql_editor_execution_plan_button_tooltip', 'Посмотреть информацию о плане выполнения запроса (Shift + Ctrl + E)'], + ['sql_editor_output_logs_button_tooltip', 'Показать вывод сервера (Shift + Ctrl + O)'], + ['sql_editor_output_logs_tab_title', 'Вывод логов'], + ['sql_editor_output_logs_input_placeholder', 'Введите часть сообщения для поиска'], ['sql_editor_sql_execution_button_tooltip', 'Выполнить SQL Выражение (Ctrl + Enter)'], ['sql_editor_sql_execution_new_tab_button_tooltip', 'Выполнить SQL Выражение в новой вкладке (Ctrl + \\)(Shift + Ctrl + Enter)'], ['sql_editor_sql_execution_script_button_tooltip', 'Исполнить SQL Скрипт (Alt + X)'], diff --git a/webapp/packages/plugin-sql-editor/src/locales/zh.ts b/webapp/packages/plugin-sql-editor/src/locales/zh.ts index ca1124c0f8..3c6d9ac298 100644 --- a/webapp/packages/plugin-sql-editor/src/locales/zh.ts +++ b/webapp/packages/plugin-sql-editor/src/locales/zh.ts @@ -7,6 +7,9 @@ export default [ ['sql_editor_placeholder', '使用Ctrl + Enter执行查询以查看结果'], ['sql_editor_hint_empty', 'There is no proposals...'], ['sql_editor_execution_plan_button_tooltip', '解释执行计划(Shift + Ctrl + E)'], + ['sql_editor_output_logs_button_tooltip', 'Show server output (Shift + Ctrl + O)'], + ['sql_editor_output_logs_tab_title', 'Output'], + ['sql_editor_output_logs_input_placeholder', 'Enter a part of a message to search for here'], ['sql_editor_sql_execution_button_tooltip', '执行SQL语句(Ctrl + Enter)'], ['sql_editor_sql_execution_new_tab_button_tooltip', '在新选项卡中执行SQL语句(Ctrl + \\)(Shift + Ctrl + Enter)'], ['sql_editor_sql_execution_script_button_tooltip', '执行SQL脚本(Alt + X)'], diff --git a/webapp/packages/plugin-sql-editor/src/manifest.ts b/webapp/packages/plugin-sql-editor/src/manifest.ts index 1118d92010..25de7423c0 100644 --- a/webapp/packages/plugin-sql-editor/src/manifest.ts +++ b/webapp/packages/plugin-sql-editor/src/manifest.ts @@ -17,6 +17,10 @@ import { SqlEditorService } from './SqlEditorService'; import { SqlEditorSettingsService } from './SqlEditorSettingsService'; import { SqlEditorView } from './SqlEditorView'; import { SqlExecutionPlanService } from './SqlResultTabs/ExecutionPlan/SqlExecutionPlanService'; +import { OutputMenuBootstrap } from './SqlResultTabs/OutputLogs/OutputMenuBootstrap'; +import { OutputLogsEventHandler } from './SqlResultTabs/OutputLogs/OutputLogsEventHandler'; +import { OutputLogsResource } from './SqlResultTabs/OutputLogs/OutputLogsResource'; +import { OutputLogsService } from './SqlResultTabs/OutputLogs/OutputLogsService'; import { SqlQueryResultService } from './SqlResultTabs/SqlQueryResultService'; import { SqlQueryService } from './SqlResultTabs/SqlQueryService'; import { SqlResultTabsService } from './SqlResultTabs/SqlResultTabsService'; @@ -40,5 +44,9 @@ export const sqlEditorPluginManifest: PluginManifest = { MenuBootstrap, SqlDataSourceService, LocalStorageSqlDataSourceBootstrap, + OutputLogsEventHandler, + OutputLogsResource, + OutputLogsService, + OutputMenuBootstrap, ], }; From 1a434adb3d0661ba5fcb78bb549dc67519e841e8 Mon Sep 17 00:00:00 2001 From: Ainur <59531286+yagudin10@users.noreply.github.com> Date: Wed, 20 Sep 2023 18:45:10 +0200 Subject: [PATCH 2/7] CB-3945 add subject permissions changed events (#1974) * CB-3945 add subject permissions changed events * CB-3945 remove parameter from subject event * CB-3945 code style fix * CB-3945 check rm admin permission --------- Co-authored-by: EvgeniaBzzz <139753579+EvgeniaBzzz@users.noreply.github.com> --- .../cloudbeaver/service/security/SMUtils.java | 9 +++ ...SSubjectPermissionUpdatedEventHandler.java | 10 ++- .../CBEmbeddedSecurityController.java | 66 ++++++++++++------- 3 files changed, 62 insertions(+), 23 deletions(-) diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/service/security/SMUtils.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/service/security/SMUtils.java index 253da6abc0..508d3f61be 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/service/security/SMUtils.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/service/security/SMUtils.java @@ -15,16 +15,25 @@ import java.util.ArrayList; import java.util.Comparator; import java.util.List; +import java.util.Set; public class SMUtils { public static boolean isAdmin(SMCredentialsProvider webSession) { return webSession.hasPermission(DBWConstants.PERMISSION_ADMIN); } + public static boolean isAdmin(@NotNull Set permissions) { + return permissions.contains(DBWConstants.PERMISSION_ADMIN); + } + public static boolean isRMAdmin(SMCredentialsProvider webSession) { return isAdmin(webSession) || webSession.hasPermission(RMConstants.PERMISSION_RM_ADMIN); } + public static boolean isRMAdmin(@NotNull Set permissions) { + return isAdmin(permissions) || permissions.contains(RMConstants.PERMISSION_RM_ADMIN); + } + public static boolean hasProjectPermission( SMCredentialsProvider credentialsProvider, RMProject project, diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/events/WSSubjectPermissionUpdatedEventHandler.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/events/WSSubjectPermissionUpdatedEventHandler.java index c5946411fb..d71b7131ae 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/events/WSSubjectPermissionUpdatedEventHandler.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/events/WSSubjectPermissionUpdatedEventHandler.java @@ -17,6 +17,7 @@ package io.cloudbeaver.server.events; import io.cloudbeaver.model.session.BaseWebSession; +import io.cloudbeaver.service.security.SMUtils; import org.jkiss.code.NotNull; import org.jkiss.dbeaver.DBException; import org.jkiss.dbeaver.Log; @@ -24,11 +25,14 @@ import org.jkiss.utils.ArrayUtils; import org.jkiss.utils.CommonUtils; +import java.util.HashSet; + public class WSSubjectPermissionUpdatedEventHandler extends WSDefaultEventHandler { private static final Log log = Log.getLog(WSSubjectPermissionUpdatedEventHandler.class); @Override protected void updateSessionData(@NotNull BaseWebSession activeUserSession, @NotNull WSSubjectPermissionEvent event) { + var oldUserPermissions = new HashSet<>(activeUserSession.getUserContext().getUserPermissions()); try { activeUserSession.getUserContext().refreshSMSession(); } catch (DBException e) { @@ -36,7 +40,11 @@ protected void updateSessionData(@NotNull BaseWebSession activeUserSession, @Not log.error("Error refreshing session", e); } activeUserSession.refreshUserData(); - super.updateSessionData(activeUserSession, event); + var newUserPermissions = activeUserSession.getUserContext().getUserPermissions(); + boolean shouldUpdateData = !(SMUtils.isRMAdmin(oldUserPermissions) && SMUtils.isRMAdmin(newUserPermissions)); + if (shouldUpdateData) { + super.updateSessionData(activeUserSession, event); + } } @Override diff --git a/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/CBEmbeddedSecurityController.java b/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/CBEmbeddedSecurityController.java index 15cf7769e7..875de6b57d 100644 --- a/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/CBEmbeddedSecurityController.java +++ b/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/CBEmbeddedSecurityController.java @@ -216,13 +216,7 @@ public void setUserTeams(String userId, String[] teamIds, String grantorId) thro } catch (SQLException e) { throw new DBCException("Error saving user teams in database", e); } - var event = WSSubjectPermissionEvent.update( - getSmSessionId(), - getUserId(), - SMSubjectType.user, - userId - ); - application.getEventController().addEvent(event); + addSubjectPermissionsUpdateEvent(userId, SMSubjectType.user); } @@ -599,13 +593,7 @@ public void setUserAuthRole(@NotNull String userId, @Nullable String authRole) t } catch (SQLException e) { throw new DBCException("Error while updating user authentication role", e); } - var event = WSSubjectPermissionEvent.update( - getSmSessionId(), - getUserId(), - SMSubjectType.user, - userId - ); - application.getEventController().addEvent(event); + addSubjectPermissionsUpdateEvent(userId, SMSubjectType.user); } @@ -1040,13 +1028,7 @@ public void deleteTeam(String teamId, boolean force) throws DBCException { throw new DBCException("Error deleting team from database", e); } if (force) { - var event = WSSubjectPermissionEvent.update( - getSmSessionId(), - getUserId(), - SMSubjectType.team, - teamId - ); - application.getEventController().addEvent(event); + addSubjectPermissionsUpdateEvent(teamId, SMSubjectType.team); } } @@ -1082,6 +1064,7 @@ public void setSubjectPermissions(String subjectId, List permissionIds, } catch (SQLException e) { throw new DBCException("Error saving subject permissions in database", e); } + addSubjectPermissionsUpdateEvent(subjectId, null); } private void insertPermissions(Connection dbCon, String subjectId, String[] permissionIds, String grantorId) throws SQLException { @@ -2231,6 +2214,7 @@ public void setObjectPermissions( @NotNull String grantor ) throws DBException { if (CommonUtils.isEmpty(objectIds)) { + subjectIds.forEach(id -> addSubjectPermissionsUpdateEvent(id, null)); return; } else if (CommonUtils.isEmpty(subjectIds)) { addObjectPermissionsUpdateEvent(objectIds, objectType); @@ -2280,6 +2264,25 @@ public void setObjectPermissions( } } + + + private void addSubjectPermissionsUpdateEvent(@NotNull String subjectId, @Nullable SMSubjectType subjectType) { + if (subjectType == null) { + subjectType = getSubjectType(subjectId); + } + if (subjectType == null) { + log.error("Subject type is not found for subject '" + subjectId + "'"); + return; + } + var event = WSSubjectPermissionEvent.update( + getSmSessionId(), + getUserId(), + subjectType, + subjectId + ); + application.getEventController().addEvent(event); + } + private void addObjectPermissionsUpdateEvent(@NotNull Set objectIds, @NotNull SMObjectType objectType) { for (var objectId : objectIds) { var event = WSObjectPermissionEvent.update( @@ -2625,7 +2628,7 @@ public Set getFilteredSubjects(Set allSubjects) { result.add(dbResult.getString(1)); } } - }; + } return result; } catch (SQLException e) { log.error("Error getting all subject ids from database", e); @@ -2633,6 +2636,25 @@ public Set getFilteredSubjects(Set allSubjects) { } } + private SMSubjectType getSubjectType(@NotNull String subjectId) { + try (Connection dbCon = database.openConnection()) { + Set result = new HashSet<>(); + String sqlBuilder = "SELECT SUBJECT_TYPE FROM {table_prefix}CB_AUTH_SUBJECT U WHERE SUBJECT_ID = ?"; + try (var dbStat = dbCon.prepareStatement(database.normalizeTableNames(sqlBuilder))) { + dbStat.setString(1, subjectId); + try (ResultSet dbResult = dbStat.executeQuery()) { + if (dbResult.next()) { + return SMSubjectType.fromCode(dbResult.getString(1)); + } + } + } + return null; + } catch (SQLException e) { + log.error("Error getting all subject ids from database", e); + return null; + } + } + @Nullable private String getSmSessionId() { var credentials = credentialsProvider.getActiveUserCredentials(); From 0a88cbdb5095bb0b73fb2442b561cdb97c05da2d Mon Sep 17 00:00:00 2001 From: serge-rider Date: Wed, 20 Sep 2023 20:07:30 +0200 Subject: [PATCH 3/7] Version 23.2.1 bump --- server/bundles/io.cloudbeaver.model/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.model/pom.xml | 2 +- server/bundles/io.cloudbeaver.product.ce/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.product.ce/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.resources.drivers.base/pom.xml | 2 +- server/bundles/io.cloudbeaver.server/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.server/pom.xml | 2 +- .../bundles/io.cloudbeaver.service.admin/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.service.admin/pom.xml | 2 +- .../bundles/io.cloudbeaver.service.auth/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.service.auth/pom.xml | 2 +- .../io.cloudbeaver.service.data.transfer/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.service.data.transfer/pom.xml | 2 +- .../io.cloudbeaver.service.metadata/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.service.metadata/pom.xml | 2 +- server/bundles/io.cloudbeaver.service.rm/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.service.rm/pom.xml | 2 +- .../io.cloudbeaver.service.security/META-INF/MANIFEST.MF | 4 ++-- server/bundles/io.cloudbeaver.service.security/pom.xml | 2 +- server/features/io.cloudbeaver.ce.drivers.feature/feature.xml | 2 +- server/features/io.cloudbeaver.ce.drivers.feature/pom.xml | 2 +- server/features/io.cloudbeaver.product.ce.feature/feature.xml | 2 +- server/features/io.cloudbeaver.product.ce.feature/pom.xml | 2 +- server/features/io.cloudbeaver.server.feature/feature.xml | 2 +- server/features/io.cloudbeaver.server.feature/pom.xml | 2 +- server/features/io.cloudbeaver.ws.feature/feature.xml | 2 +- server/features/io.cloudbeaver.ws.feature/pom.xml | 2 +- server/pom.xml | 2 +- server/product/web-server/CloudbeaverServer.product | 2 +- server/product/web-server/pom.xml | 2 +- webapp/packages/product-default/package.json | 2 +- 32 files changed, 42 insertions(+), 42 deletions(-) diff --git a/server/bundles/io.cloudbeaver.model/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.model/META-INF/MANIFEST.MF index 23d40d61c4..2469bde4a7 100644 --- a/server/bundles/io.cloudbeaver.model/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.model/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: Cloudbeaver Web Model Bundle-SymbolicName: io.cloudbeaver.model;singleton:=true -Bundle-Version: 1.0.36.qualifier -Bundle-Release-Date: 20230904 +Bundle-Version: 1.0.37.qualifier +Bundle-Release-Date: 20230925 Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.model/pom.xml b/server/bundles/io.cloudbeaver.model/pom.xml index 00423bc285..2e01cfd2e5 100644 --- a/server/bundles/io.cloudbeaver.model/pom.xml +++ b/server/bundles/io.cloudbeaver.model/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.model - 1.0.36-SNAPSHOT + 1.0.37-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.product.ce/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.product.ce/META-INF/MANIFEST.MF index 7939649947..8b59dab5b0 100644 --- a/server/bundles/io.cloudbeaver.product.ce/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.product.ce/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: Cloudbeaver Community Product Bundle-SymbolicName: io.cloudbeaver.product.ce;singleton:=true -Bundle-Version: 23.2.0.qualifier -Bundle-Release-Date: 20230904 +Bundle-Version: 23.2.1.qualifier +Bundle-Release-Date: 20230925 Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.product.ce/pom.xml b/server/bundles/io.cloudbeaver.product.ce/pom.xml index c6bb1db818..dee078b46b 100644 --- a/server/bundles/io.cloudbeaver.product.ce/pom.xml +++ b/server/bundles/io.cloudbeaver.product.ce/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.product.ce - 23.2.0-SNAPSHOT + 23.2.1-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.resources.drivers.base/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.resources.drivers.base/META-INF/MANIFEST.MF index b33c5273c8..9de70cb1a9 100644 --- a/server/bundles/io.cloudbeaver.resources.drivers.base/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.resources.drivers.base/META-INF/MANIFEST.MF @@ -2,8 +2,8 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Base JDBC drivers Bundle-SymbolicName: io.cloudbeaver.resources.drivers.base;singleton:=true -Bundle-Version: 1.0.81.qualifier -Bundle-Release-Date: 20230904 +Bundle-Version: 1.0.82.qualifier +Bundle-Release-Date: 20230925 Bundle-Vendor: DBeaver Corp Bundle-ActivationPolicy: lazy Automatic-Module-Name: io.cloudbeaver.resources.drivers.base diff --git a/server/bundles/io.cloudbeaver.resources.drivers.base/pom.xml b/server/bundles/io.cloudbeaver.resources.drivers.base/pom.xml index 194aa8df7a..4903c7d91b 100644 --- a/server/bundles/io.cloudbeaver.resources.drivers.base/pom.xml +++ b/server/bundles/io.cloudbeaver.resources.drivers.base/pom.xml @@ -9,6 +9,6 @@ ../ io.cloudbeaver.resources.drivers.base - 1.0.81-SNAPSHOT + 1.0.82-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.server/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.server/META-INF/MANIFEST.MF index f927398e5d..bf61d8f89b 100644 --- a/server/bundles/io.cloudbeaver.server/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.server/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: Cloudbeaver Web Server Bundle-SymbolicName: io.cloudbeaver.server;singleton:=true -Bundle-Version: 23.2.0.qualifier -Bundle-Release-Date: 20230904 +Bundle-Version: 23.2.1.qualifier +Bundle-Release-Date: 20230925 Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Bundle-Activator: io.cloudbeaver.server.CBPlatformActivator diff --git a/server/bundles/io.cloudbeaver.server/pom.xml b/server/bundles/io.cloudbeaver.server/pom.xml index f63d8b8a39..888636c43d 100644 --- a/server/bundles/io.cloudbeaver.server/pom.xml +++ b/server/bundles/io.cloudbeaver.server/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.server - 23.2.0-SNAPSHOT + 23.2.1-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.service.admin/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.service.admin/META-INF/MANIFEST.MF index 40ca854f6b..52a6e30dca 100644 --- a/server/bundles/io.cloudbeaver.service.admin/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.service.admin/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: Cloudbeaver Web Service - Administration Bundle-SymbolicName: io.cloudbeaver.service.admin;singleton:=true -Bundle-Version: 1.0.80.qualifier -Bundle-Release-Date: 20230904 +Bundle-Version: 1.0.81.qualifier +Bundle-Release-Date: 20230925 Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.service.admin/pom.xml b/server/bundles/io.cloudbeaver.service.admin/pom.xml index 86ddd387d9..d6282fdd97 100644 --- a/server/bundles/io.cloudbeaver.service.admin/pom.xml +++ b/server/bundles/io.cloudbeaver.service.admin/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.service.admin - 1.0.80-SNAPSHOT + 1.0.81-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.service.auth/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.service.auth/META-INF/MANIFEST.MF index 68d68378d7..8be0f6aea3 100644 --- a/server/bundles/io.cloudbeaver.service.auth/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.service.auth/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: Cloudbeaver Web Service - Authentication Bundle-SymbolicName: io.cloudbeaver.service.auth;singleton:=true -Bundle-Version: 1.0.80.qualifier -Bundle-Release-Date: 20230904 +Bundle-Version: 1.0.81.qualifier +Bundle-Release-Date: 20230925 Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.service.auth/pom.xml b/server/bundles/io.cloudbeaver.service.auth/pom.xml index 49070d4f4a..d9ec64c8e0 100644 --- a/server/bundles/io.cloudbeaver.service.auth/pom.xml +++ b/server/bundles/io.cloudbeaver.service.auth/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.service.auth - 1.0.80-SNAPSHOT + 1.0.81-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.service.data.transfer/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.service.data.transfer/META-INF/MANIFEST.MF index 47e029a9b3..3cbd3f23a7 100644 --- a/server/bundles/io.cloudbeaver.service.data.transfer/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.service.data.transfer/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: Cloudbeaver Web Service - Data Transfer Bundle-SymbolicName: io.cloudbeaver.service.data.transfer;singleton:=true -Bundle-Version: 1.0.81.qualifier -Bundle-Release-Date: 20230904 +Bundle-Version: 1.0.82.qualifier +Bundle-Release-Date: 20230925 Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.service.data.transfer/pom.xml b/server/bundles/io.cloudbeaver.service.data.transfer/pom.xml index bdf3d149e9..e5c021baeb 100644 --- a/server/bundles/io.cloudbeaver.service.data.transfer/pom.xml +++ b/server/bundles/io.cloudbeaver.service.data.transfer/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.service.data.transfer - 1.0.81-SNAPSHOT + 1.0.82-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.service.metadata/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.service.metadata/META-INF/MANIFEST.MF index adff2c3c51..1cea5dce38 100644 --- a/server/bundles/io.cloudbeaver.service.metadata/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.service.metadata/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: Cloudbeaver Web Service - Metadata Bundle-SymbolicName: io.cloudbeaver.service.metadata;singleton:=true -Bundle-Version: 1.0.84.qualifier -Bundle-Release-Date: 20230904 +Bundle-Version: 1.0.85.qualifier +Bundle-Release-Date: 20230925 Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.service.metadata/pom.xml b/server/bundles/io.cloudbeaver.service.metadata/pom.xml index bb299294c3..2477990d84 100644 --- a/server/bundles/io.cloudbeaver.service.metadata/pom.xml +++ b/server/bundles/io.cloudbeaver.service.metadata/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.service.metadata - 1.0.84-SNAPSHOT + 1.0.85-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.service.rm/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.service.rm/META-INF/MANIFEST.MF index 85d838c96c..f35ad2386e 100644 --- a/server/bundles/io.cloudbeaver.service.rm/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.service.rm/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: DBeaver Corp Bundle-Name: Cloudbeaver Web Service - Resource manager Bundle-SymbolicName: io.cloudbeaver.service.rm;singleton:=true -Bundle-Version: 1.0.33.qualifier -Bundle-Release-Date: 20230904 +Bundle-Version: 1.0.34.qualifier +Bundle-Release-Date: 20230925 Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.service.rm/pom.xml b/server/bundles/io.cloudbeaver.service.rm/pom.xml index c99700cb4b..f58fcdbbc4 100644 --- a/server/bundles/io.cloudbeaver.service.rm/pom.xml +++ b/server/bundles/io.cloudbeaver.service.rm/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.service.rm - 1.0.33-SNAPSHOT + 1.0.34-SNAPSHOT eclipse-plugin diff --git a/server/bundles/io.cloudbeaver.service.security/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.service.security/META-INF/MANIFEST.MF index f48b01034e..b8f99983df 100644 --- a/server/bundles/io.cloudbeaver.service.security/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.service.security/META-INF/MANIFEST.MF @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2 Bundle-Vendor: Cloudbeaver Web Service - Security Bundle-Vendor: DBeaver Corp Bundle-SymbolicName: io.cloudbeaver.service.security;singleton:=true -Bundle-Version: 1.0.36.qualifier -Bundle-Release-Date: 20230904 +Bundle-Version: 1.0.37.qualifier +Bundle-Release-Date: 20230925 Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/server/bundles/io.cloudbeaver.service.security/pom.xml b/server/bundles/io.cloudbeaver.service.security/pom.xml index 1580938756..e0b8267229 100644 --- a/server/bundles/io.cloudbeaver.service.security/pom.xml +++ b/server/bundles/io.cloudbeaver.service.security/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.service.security - 1.0.36-SNAPSHOT + 1.0.37-SNAPSHOT eclipse-plugin diff --git a/server/features/io.cloudbeaver.ce.drivers.feature/feature.xml b/server/features/io.cloudbeaver.ce.drivers.feature/feature.xml index bb59b18984..ceaad80555 100644 --- a/server/features/io.cloudbeaver.ce.drivers.feature/feature.xml +++ b/server/features/io.cloudbeaver.ce.drivers.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/server/features/io.cloudbeaver.ce.drivers.feature/pom.xml b/server/features/io.cloudbeaver.ce.drivers.feature/pom.xml index 0b034707ff..55b0a4dfc4 100644 --- a/server/features/io.cloudbeaver.ce.drivers.feature/pom.xml +++ b/server/features/io.cloudbeaver.ce.drivers.feature/pom.xml @@ -9,6 +9,6 @@ ../ io.cloudbeaver.ce.drivers.feature - 1.0.104-SNAPSHOT + 1.0.105-SNAPSHOT eclipse-feature diff --git a/server/features/io.cloudbeaver.product.ce.feature/feature.xml b/server/features/io.cloudbeaver.product.ce.feature/feature.xml index 2e8a98c93c..84b9e32bb6 100644 --- a/server/features/io.cloudbeaver.product.ce.feature/feature.xml +++ b/server/features/io.cloudbeaver.product.ce.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/server/features/io.cloudbeaver.product.ce.feature/pom.xml b/server/features/io.cloudbeaver.product.ce.feature/pom.xml index 0b83488c7e..e838ebb696 100644 --- a/server/features/io.cloudbeaver.product.ce.feature/pom.xml +++ b/server/features/io.cloudbeaver.product.ce.feature/pom.xml @@ -10,7 +10,7 @@ ../ io.cloudbeaver.product.ce.feature - 23.2.0-SNAPSHOT + 23.2.1-SNAPSHOT eclipse-feature diff --git a/server/features/io.cloudbeaver.server.feature/feature.xml b/server/features/io.cloudbeaver.server.feature/feature.xml index a98dc4b448..d8e48a7260 100644 --- a/server/features/io.cloudbeaver.server.feature/feature.xml +++ b/server/features/io.cloudbeaver.server.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/server/features/io.cloudbeaver.server.feature/pom.xml b/server/features/io.cloudbeaver.server.feature/pom.xml index 180891aea4..739e613d43 100644 --- a/server/features/io.cloudbeaver.server.feature/pom.xml +++ b/server/features/io.cloudbeaver.server.feature/pom.xml @@ -10,6 +10,6 @@ ../ io.cloudbeaver.server.feature - 23.2.0-SNAPSHOT + 23.2.1-SNAPSHOT eclipse-feature diff --git a/server/features/io.cloudbeaver.ws.feature/feature.xml b/server/features/io.cloudbeaver.ws.feature/feature.xml index 5dbdcdc135..1a7c40b675 100644 --- a/server/features/io.cloudbeaver.ws.feature/feature.xml +++ b/server/features/io.cloudbeaver.ws.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/server/features/io.cloudbeaver.ws.feature/pom.xml b/server/features/io.cloudbeaver.ws.feature/pom.xml index 7b787a594b..fb5f68db01 100644 --- a/server/features/io.cloudbeaver.ws.feature/pom.xml +++ b/server/features/io.cloudbeaver.ws.feature/pom.xml @@ -10,6 +10,6 @@ ../ io.cloudbeaver.ws.feature - 1.0.34-SNAPSHOT + 1.0.35-SNAPSHOT eclipse-feature diff --git a/server/pom.xml b/server/pom.xml index c881164e43..26e5f76a51 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -19,7 +19,7 @@ CloudBeaver CE - 23.2.0 + 23.2.1 diff --git a/server/product/web-server/CloudbeaverServer.product b/server/product/web-server/CloudbeaverServer.product index eff8f1785f..ab02c6fc7b 100644 --- a/server/product/web-server/CloudbeaverServer.product +++ b/server/product/web-server/CloudbeaverServer.product @@ -2,7 +2,7 @@ diff --git a/server/product/web-server/pom.xml b/server/product/web-server/pom.xml index 1e9a381d96..1e317e5fee 100644 --- a/server/product/web-server/pom.xml +++ b/server/product/web-server/pom.xml @@ -9,7 +9,7 @@ 1.0.0-SNAPSHOT ../../ - 23.2.0-SNAPSHOT + 23.2.1-SNAPSHOT web-server eclipse-repository Cloudbeaver Server Product diff --git a/webapp/packages/product-default/package.json b/webapp/packages/product-default/package.json index 2cc5f47926..95a7fdcb8c 100644 --- a/webapp/packages/product-default/package.json +++ b/webapp/packages/product-default/package.json @@ -1,7 +1,7 @@ { "name": "@cloudbeaver/product-default", "sideEffects": false, - "version": "23.2.0", + "version": "23.2.1", "description": "", "license": "Apache-2.0", "main": "lib/index.js", From 6eaafd6e2a653e016fd6f034889e21714b3f8601 Mon Sep 17 00:00:00 2001 From: Alexey Date: Thu, 21 Sep 2023 17:44:16 +0300 Subject: [PATCH 4/7] dev: update chrome vs-code configuration (#2011) --- .vscode/launch.json | 22 +++++++++++-------- .../core-cli/configs/webpack.config.js | 1 + .../configs/webpack.product.dev.config.js | 1 + 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 3986894f8b..d2bb0f29a8 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,9 +4,10 @@ { "type": "chrome", "request": "launch", - "name": "Debug CE", + "name": "Chrome", "url": "http://127.0.0.1:3100", - "webRoot": "${workspaceFolder}/webapp/packages/product-default" + "webRoot": "${workspaceFolder}/..", + "sourceMaps": true }, { "type": "java", @@ -14,21 +15,21 @@ "cwd": "${workspaceFolder}/../opt/cbce", "request": "launch", "mainClass": "org.eclipse.equinox.launcher.Main", - "classPaths": [ - "${env:DBEAVER_DEVEL_ECLIPSE_PATH}/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar" - ], "windows": { "type": "java", "name": "CloudBeaver CE", "request": "launch", "mainClass": "org.eclipse.equinox.launcher.Main", + "classPaths": [ + "${workspaceFolder}/../eclipse/eclipse/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar" + ], "args": [ "-product", "io.cloudbeaver.product.ce.product", "-configuration", - "file:${env:DBEAVER_DEVEL_ECLIPSE_WORKSPACE_PATH}/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/", + "file:${workspaceFolder}/../eclipse/workspace/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/", "-dev", - "file:${env:DBEAVER_DEVEL_ECLIPSE_WORKSPACE_PATH}/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/dev.properties", + "file:${workspaceFolder}/../eclipse/workspace/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/dev.properties", "-os", "win32", "-ws", @@ -54,13 +55,16 @@ "name": "CloudBeaver CE", "request": "launch", "mainClass": "org.eclipse.equinox.launcher.Main", + "classPaths": [ + "${workspaceFolder}/../eclipse/Eclipse.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar" + ], "args": [ "-product", "io.cloudbeaver.product.ce.product", "-configuration", - "file:${env:DBEAVER_DEVEL_ECLIPSE_WORKSPACE_PATH}/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/", + "file:${workspaceFolder}/../eclipse/workspace/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/", "-dev", - "file:${env:DBEAVER_DEVEL_ECLIPSE_WORKSPACE_PATH}/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/dev.properties", + "file:${workspaceFolder}/../eclipse/workspace/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/dev.properties", "-os", "macosx", "-ws", diff --git a/webapp/packages/core-cli/configs/webpack.config.js b/webapp/packages/core-cli/configs/webpack.config.js index 2b28beea5f..d43cd1c56a 100644 --- a/webapp/packages/core-cli/configs/webpack.config.js +++ b/webapp/packages/core-cli/configs/webpack.config.js @@ -242,6 +242,7 @@ module.exports = (env, argv) => { plugins: [ new ForkTsCheckerWebpackPlugin({ typescript: { + configFile: resolve('tsconfig.json'), configOverwrite: { include: ['**/src/**/*.ts', '**/src/**/*.tsx'], }, diff --git a/webapp/packages/core-cli/configs/webpack.product.dev.config.js b/webapp/packages/core-cli/configs/webpack.product.dev.config.js index fe36dfde4b..32653b5b61 100644 --- a/webapp/packages/core-cli/configs/webpack.product.dev.config.js +++ b/webapp/packages/core-cli/configs/webpack.product.dev.config.js @@ -40,6 +40,7 @@ module.exports = (env, argv) => { return merge(commonConfig(env, argv), { mode: 'development', + context: resolve(__dirname, '../../../../../'), entry: { main, sso, From 63c7c6feb17d5465504d78edd3671dc4563f1231 Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 22 Sep 2023 18:15:24 +0300 Subject: [PATCH 5/7] fix: ignore typescript error (#2014) --- webapp/packages/core-blocks/src/useS.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/webapp/packages/core-blocks/src/useS.ts b/webapp/packages/core-blocks/src/useS.ts index f9165d4528..3ee0b1f6ea 100644 --- a/webapp/packages/core-blocks/src/useS.ts +++ b/webapp/packages/core-blocks/src/useS.ts @@ -49,6 +49,7 @@ export function useS(...componentStyles: [...T]): Ex const themeService = useService(ThemeService); const [currentThemeId, setCurrentThemeId] = useState(() => themeService.currentThemeId); const lastThemeRef = useRef(currentThemeId); + //@ts-ignore const filteredStyles = themeService.mapStyles(componentStyles.flat(Infinity).filter(Boolean) as Style[], context); const trackTheme = filteredStyles.some(style => typeof style === 'function'); From 9384877bb0969dd700e8fa185fabfb726fc4d238 Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 22 Sep 2023 18:34:04 +0300 Subject: [PATCH 6/7] fix: dependency alert (#2015) --- webapp/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/yarn.lock b/webapp/yarn.lock index bc257e52a6..db64d5cff2 100644 --- a/webapp/yarn.lock +++ b/webapp/yarn.lock @@ -9691,9 +9691,9 @@ graphql-ws@^5.14.0: integrity sha512-itrUTQZP/TgswR4GSSYuwWUzrE/w5GhbwM2GX3ic2U7aw33jgEsayfIlvaj7/GcIvZgNMzsPTrE5hqPuFUiE5g== "graphql@^15.0.0 || ^16.0.0", graphql@~16.x.x: - version "16.8.0" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.0.tgz#374478b7f27b2dc6153c8f42c1b80157f79d79d4" - integrity sha512-0oKGaR+y3qcS5mCu1vb7KG+a89vjn06C7Ihq/dDl3jA+A8B3TKomvi3CiEcVLJQGalbu8F52LxkOym7U5sSfbg== + version "16.8.1" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.1.tgz#1930a965bef1170603702acdb68aedd3f3cf6f07" + integrity sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw== gzip-size@^6.0.0: version "6.0.0" From 55ab7361043ed6f9df79b05a57d12cf586484e37 Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 22 Sep 2023 18:50:58 +0300 Subject: [PATCH 7/7] fix: eslint parser (#2016) --- .../packages/eslint-config/eslint-config.json | 2 +- webapp/packages/eslint-config/package.json | 11 +- webapp/yarn.lock | 181 ++++++++++-------- 3 files changed, 109 insertions(+), 85 deletions(-) diff --git a/webapp/packages/eslint-config/eslint-config.json b/webapp/packages/eslint-config/eslint-config.json index 2dc89a5c2f..e1695e8a12 100644 --- a/webapp/packages/eslint-config/eslint-config.json +++ b/webapp/packages/eslint-config/eslint-config.json @@ -1,6 +1,6 @@ { "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint"], + "plugins": ["@typescript-eslint/eslint-plugin"], "overrides": [ { "files": ["**/*.cjs"], diff --git a/webapp/packages/eslint-config/package.json b/webapp/packages/eslint-config/package.json index e6312502ac..f3ab8cb897 100644 --- a/webapp/packages/eslint-config/package.json +++ b/webapp/packages/eslint-config/package.json @@ -3,7 +3,7 @@ "sideEffects": false, "version": "0.1.0", "main": "index.js", - "description": "eslint for CloudBeaver", + "description": "ESLint for CloudBeaver", "license": "Apache-2.0", "files": [ "eslint-config.json", @@ -12,15 +12,14 @@ ], "type": "commonjs", "devDependencies": { - "@typescript-eslint/eslint-plugin": "~6.6.0", - "@typescript-eslint/parser": "~6.6.0", - "eslint": "~8.48.0", + "@typescript-eslint/eslint-plugin": "~6.7.2", + "@typescript-eslint/parser": "~6.7.2", + "eslint": "~8.49.0", "eslint-config-airbnb-base": "~15.0.0", "eslint-config-airbnb-typescript": "~17.1.0", "eslint-config-prettier": "^9.0.0", - "eslint-import-resolver-typescript": "~3.6.0", "eslint-plugin-import": "~2.28.1", - "eslint-plugin-jest": "~27.2.3", + "eslint-plugin-jest": "~27.4.0", "eslint-plugin-jsx-a11y": "~6.7.1", "eslint-plugin-node": "~11.1.0", "eslint-plugin-promise": "~6.1.1", diff --git a/webapp/yarn.lock b/webapp/yarn.lock index db64d5cff2..00c0c5aaf3 100644 --- a/webapp/yarn.lock +++ b/webapp/yarn.lock @@ -1611,13 +1611,18 @@ resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.4.tgz#a87b4b04e5ae14a88d48ebef15015f6b7d1f5677" integrity sha512-kBa+cDHOR9jpRJ+kcGMsysrls0leukrm68DmFQoMIWQcXdr2cZvyvypWuGYT7U+9kAExUE7+T7r6G3C3A6L8MQ== -"@eslint-community/eslint-utils@^4.2.0": +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== dependencies: eslint-visitor-keys "^3.3.0" +"@eslint-community/regexpp@^4.5.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.8.1.tgz#8c4bb756cc2aa7eaf13cfa5e69c83afb3260c20c" + integrity sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ== + "@eslint-community/regexpp@^4.6.1": version "4.8.0" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.8.0.tgz#11195513186f68d42fbf449f9a7136b2c0c92005" @@ -1638,10 +1643,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.48.0": - version "8.48.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.48.0.tgz#642633964e217905436033a2bd08bf322849b7fb" - integrity sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw== +"@eslint/js@8.49.0": + version "8.49.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.49.0.tgz#86f79756004a97fa4df866835093f1df3d03c333" + integrity sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w== "@fontsource/roboto@^5.0.8": version "5.0.8" @@ -2149,7 +2154,7 @@ resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.2.0.tgz#5f3d96ec6b2354ad6d8a28bf216a1d97b5426861" integrity sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ== -"@humanwhocodes/config-array@^0.11.10": +"@humanwhocodes/config-array@^0.11.11": version "0.11.11" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.11.tgz#88a04c570dbbc7dd943e4712429c3df09bc32844" integrity sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA== @@ -4585,6 +4590,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== +"@types/json-schema@^7.0.12": + version "7.0.13" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.13.tgz#02c24f4363176d2d18fc8b70b9f3c54aba178a85" + integrity sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ== + "@types/json-stable-stringify@^1.0.32": version "1.0.34" resolved "https://registry.yarnpkg.com/@types/json-stable-stringify/-/json-stable-stringify-1.0.34.tgz#c0fb25e4d957e0ee2e497c1f553d7f8bb668fd75" @@ -4759,6 +4769,11 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.1.tgz#0480eeb7221eb9bc398ad7432c9d7e14b1a5a367" integrity sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg== +"@types/semver@^7.5.0": + version "7.5.2" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.2.tgz#31f6eec1ed7ec23f4f05608d3a2d381df041f564" + integrity sha512-7aqorHYgdNO4DM36stTiGO3DvKoex9TQRwsJU6vMaFGyqpBA1MNZkz+PG3gaNUPpTAOYhT1WR7M1JyA3fbS9Cw== + "@types/send@*": version "0.17.1" resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.1.tgz#ed4932b8a2a805f1fe362a70f4e62d0ac994e301" @@ -4856,20 +4871,32 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@~6.6.0": - version "6.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.6.0.tgz#19ba09aa34fd504696445100262e5a9e1b1d7024" - integrity sha512-CW9YDGTQnNYMIo5lMeuiIG08p4E0cXrXTbcZ2saT/ETE7dWUrNxlijsQeU04qAAKkILiLzdQz+cGFxCJjaZUmA== +"@typescript-eslint/eslint-plugin@~6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.2.tgz#f18cc75c9cceac8080a9dc2e7d166008c5207b9f" + integrity sha512-ooaHxlmSgZTM6CHYAFRlifqh1OAr3PAQEwi7lhYhaegbnXrnh7CDcHmc3+ihhbQC7H0i4JF0psI5ehzkF6Yl6Q== + dependencies: + "@eslint-community/regexpp" "^4.5.1" + "@typescript-eslint/scope-manager" "6.7.2" + "@typescript-eslint/type-utils" "6.7.2" + "@typescript-eslint/utils" "6.7.2" + "@typescript-eslint/visitor-keys" "6.7.2" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.4" + natural-compare "^1.4.0" + semver "^7.5.4" + ts-api-utils "^1.0.1" -"@typescript-eslint/parser@~6.6.0": - version "6.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.6.0.tgz#fe323a7b4eafb6d5ea82b96216561810394a739e" - integrity sha512-setq5aJgUwtzGrhW177/i+DMLqBaJbdwGj2CPIVFFLE0NCliy5ujIdLHd2D1ysmlmsjdL2GWW+hR85neEfc12w== +"@typescript-eslint/parser@~6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.7.2.tgz#e0ae93771441b9518e67d0660c79e3a105497af4" + integrity sha512-KA3E4ox0ws+SPyxQf9iSI25R6b4Ne78ORhNHeVKrPQnoYsb9UhieoiRoJgrzgEeKGOXhcY1i8YtOeCHHTDa6Fw== dependencies: - "@typescript-eslint/scope-manager" "6.6.0" - "@typescript-eslint/types" "6.6.0" - "@typescript-eslint/typescript-estree" "6.6.0" - "@typescript-eslint/visitor-keys" "6.6.0" + "@typescript-eslint/scope-manager" "6.7.2" + "@typescript-eslint/types" "6.7.2" + "@typescript-eslint/typescript-estree" "6.7.2" + "@typescript-eslint/visitor-keys" "6.7.2" debug "^4.3.4" "@typescript-eslint/scope-manager@5.62.0": @@ -4880,13 +4907,23 @@ "@typescript-eslint/types" "5.62.0" "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/scope-manager@6.6.0": - version "6.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.6.0.tgz#57105d4419d6de971f7d2c30a2ff4ac40003f61a" - integrity sha512-pT08u5W/GT4KjPUmEtc2kSYvrH8x89cVzkA0Sy2aaOUIw6YxOIjA8ilwLr/1fLjOedX1QAuBpG9XggWqIIfERw== +"@typescript-eslint/scope-manager@6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.7.2.tgz#cf59a2095d2f894770c94be489648ad1c78dc689" + integrity sha512-bgi6plgyZjEqapr7u2mhxGR6E8WCzKNUFWNh6fkpVe9+yzRZeYtDTbsIBzKbcxI+r1qVWt6VIoMSNZ4r2A+6Yw== dependencies: - "@typescript-eslint/types" "6.6.0" - "@typescript-eslint/visitor-keys" "6.6.0" + "@typescript-eslint/types" "6.7.2" + "@typescript-eslint/visitor-keys" "6.7.2" + +"@typescript-eslint/type-utils@6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.7.2.tgz#ed921c9db87d72fa2939fee242d700561454f367" + integrity sha512-36F4fOYIROYRl0qj95dYKx6kybddLtsbmPIYNK0OBeXv2j9L5nZ17j9jmfy+bIDHKQgn2EZX+cofsqi8NPATBQ== + dependencies: + "@typescript-eslint/typescript-estree" "6.7.2" + "@typescript-eslint/utils" "6.7.2" + debug "^4.3.4" + ts-api-utils "^1.0.1" "@typescript-eslint/types@4.33.0": version "4.33.0" @@ -4898,10 +4935,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/types@6.6.0": - version "6.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.6.0.tgz#95e7ea650a2b28bc5af5ea8907114a48f54618c2" - integrity sha512-CB6QpJQ6BAHlJXdwUmiaXDBmTqIE2bzGTDLADgvqtHWuhfNP3rAOK7kAgRMAET5rDRr9Utt+qAzRBdu3AhR3sg== +"@typescript-eslint/types@6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.7.2.tgz#75a615a6dbeca09cafd102fe7f465da1d8a3c066" + integrity sha512-flJYwMYgnUNDAN9/GAI3l8+wTmvTYdv64fcH8aoJK76Y+1FCZ08RtI5zDerM/FYT5DMkAc+19E4aLmd5KqdFyg== "@typescript-eslint/typescript-estree@5.62.0", "@typescript-eslint/typescript-estree@^5.55.0": version "5.62.0" @@ -4916,13 +4953,13 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@6.6.0": - version "6.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.6.0.tgz#373c420d2e12c28220f4a83352280a04823a91b7" - integrity sha512-hMcTQ6Al8MP2E6JKBAaSxSVw5bDhdmbCEhGW/V8QXkb9oNsFkA4SBuOMYVPxD3jbtQ4R/vSODBsr76R6fP3tbA== +"@typescript-eslint/typescript-estree@6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.2.tgz#ce5883c23b581a5caf878af641e49dd0349238c7" + integrity sha512-kiJKVMLkoSciGyFU0TOY0fRxnp9qq1AzVOHNeN1+B9erKFCJ4Z8WdjAkKQPP+b1pWStGFqezMLltxO+308dJTQ== dependencies: - "@typescript-eslint/types" "6.6.0" - "@typescript-eslint/visitor-keys" "6.6.0" + "@typescript-eslint/types" "6.7.2" + "@typescript-eslint/visitor-keys" "6.7.2" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -4942,6 +4979,19 @@ semver "^7.3.5" tsutils "^3.21.0" +"@typescript-eslint/utils@6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.7.2.tgz#b9ef0da6f04932167a9222cb4ac59cb187165ebf" + integrity sha512-ZCcBJug/TS6fXRTsoTkgnsvyWSiXwMNiPzBUani7hDidBdj1779qwM1FIAmpH4lvlOZNF3EScsxxuGifjpLSWQ== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "6.7.2" + "@typescript-eslint/types" "6.7.2" + "@typescript-eslint/typescript-estree" "6.7.2" + semver "^7.5.4" + "@typescript-eslint/utils@^5.10.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" @@ -4972,12 +5022,12 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@6.6.0": - version "6.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.6.0.tgz#1109088b4346c8b2446f3845db526374d9a3bafc" - integrity sha512-L61uJT26cMOfFQ+lMZKoJNbAEckLe539VhTxiGHrWl5XSKQgA0RTBZJW2HFPy5T0ZvPVSD93QsrTKDkfNwJGyQ== +"@typescript-eslint/visitor-keys@6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.2.tgz#4cb2bd786f1f459731b0ad1584c9f73e1c7a4d5c" + integrity sha512-uVw9VIMFBUTz8rIeaUT3fFe8xIUx8r4ywAdlQv1ifH+6acn/XF8Y6rwJ7XNmkNMDrTW+7+vxFFPIF40nJCVsMQ== dependencies: - "@typescript-eslint/types" "6.6.0" + "@typescript-eslint/types" "6.7.2" eslint-visitor-keys "^3.4.1" "@vue/babel-helper-vue-jsx-merge-props@^1.4.0": @@ -8224,7 +8274,7 @@ end-of-stream@^1.4.1: dependencies: once "^1.4.0" -enhanced-resolve@^5.0.0, enhanced-resolve@^5.12.0, enhanced-resolve@^5.15.0, enhanced-resolve@^5.8.3: +enhanced-resolve@^5.0.0, enhanced-resolve@^5.15.0, enhanced-resolve@^5.8.3: version "5.15.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg== @@ -8467,20 +8517,7 @@ eslint-import-resolver-node@^0.3.7: is-core-module "^2.13.0" resolve "^1.22.4" -eslint-import-resolver-typescript@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.0.tgz#36f93e1eb65a635e688e16cae4bead54552e3bbd" - integrity sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg== - dependencies: - debug "^4.3.4" - enhanced-resolve "^5.12.0" - eslint-module-utils "^2.7.4" - fast-glob "^3.3.1" - get-tsconfig "^4.5.0" - is-core-module "^2.11.0" - is-glob "^4.0.3" - -eslint-module-utils@^2.7.4, eslint-module-utils@^2.8.0: +eslint-module-utils@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== @@ -8518,10 +8555,10 @@ eslint-plugin-import@~2.28.1: semver "^6.3.1" tsconfig-paths "^3.14.2" -eslint-plugin-jest@~27.2.3: - version "27.2.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.2.3.tgz#6f8a4bb2ca82c0c5d481d1b3be256ab001f5a3ec" - integrity sha512-sRLlSCpICzWuje66Gl9zvdF6mwD5X86I4u55hJyFBsxYOsBCmT5+kSUjf+fkFWVMMgpzNEupjW8WzUqi83hJAQ== +eslint-plugin-jest@~27.4.0: + version "27.4.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.4.0.tgz#3926cca723c40c3d7a3fe0e1fd911eff5e681f50" + integrity sha512-ukVeKmMPAUA5SWjHenvyyXnirKfHKMdOsTZdn5tZx5EW05HGVQwBohigjFZGGj3zuv1cV6hc82FvWv6LdIbkgg== dependencies: "@typescript-eslint/utils" "^5.10.0" @@ -8629,16 +8666,16 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@~8.48.0: - version "8.48.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.48.0.tgz#bf9998ba520063907ba7bfe4c480dc8be03c2155" - integrity sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg== +eslint@~8.49.0: + version "8.49.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.49.0.tgz#09d80a89bdb4edee2efcf6964623af1054bf6d42" + integrity sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" "@eslint/eslintrc" "^2.1.2" - "@eslint/js" "8.48.0" - "@humanwhocodes/config-array" "^0.11.10" + "@eslint/js" "8.49.0" + "@humanwhocodes/config-array" "^0.11.11" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" ajv "^6.12.4" @@ -8919,7 +8956,7 @@ fast-glob@^2.0.2: merge2 "^1.2.3" micromatch "^3.1.10" -fast-glob@^3.2.11, fast-glob@^3.2.9, fast-glob@^3.3.0, fast-glob@^3.3.1: +fast-glob@^3.2.11, fast-glob@^3.2.9, fast-glob@^3.3.0: version "3.3.1" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== @@ -9430,13 +9467,6 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" -get-tsconfig@^4.5.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.0.tgz#06ce112a1463e93196aa90320c35df5039147e34" - integrity sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw== - dependencies: - resolve-pkg-maps "^1.0.0" - get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -10434,7 +10464,7 @@ is-color-stop@^1.0.0: rgb-regex "^1.0.1" rgba-regex "^1.0.0" -is-core-module@^2.11.0, is-core-module@^2.13.0, is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0: +is-core-module@^2.13.0, is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0: version "2.13.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== @@ -15596,11 +15626,6 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve-pkg-maps@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" - integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== - resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"