diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/base/ConnectionWrapper.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/base/ConnectionWrapper.java index 6d5aa93142ec063594c459de940bda3467ead64a..d3f647461cfb7512d383605f9fef6cedad687465 100644 --- a/plugins/data-studio/src/main/java/com/nctigba/datastudio/base/ConnectionWrapper.java +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/base/ConnectionWrapper.java @@ -281,7 +281,13 @@ public class ConnectionWrapper implements Connection { @Override public boolean isValid(int timeout) throws SQLException { - return this.connection.isValid(timeout); + try { + this.connection.isValid(timeout); + } catch (Exception e) { + log.error(e.getMessage(), e); + return false; + } + return true; } @Override diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/base/JdbcConnectionManager.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/base/JdbcConnectionManager.java index 2a6fcc5a2f56e284f0582840969af7e24b1c32a8..cbcb43882cc63450d14229a2a3c62d61810c9dfe 100644 --- a/plugins/data-studio/src/main/java/com/nctigba/datastudio/base/JdbcConnectionManager.java +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/base/JdbcConnectionManager.java @@ -23,9 +23,10 @@ package com.nctigba.datastudio.base; -import com.alibaba.druid.util.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import lombok.extern.slf4j.Slf4j; +import org.opengauss.admin.common.exception.CustomException; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import java.sql.Connection; @@ -37,14 +38,15 @@ import java.util.Properties; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.LinkedBlockingQueue; +import static java.util.concurrent.TimeUnit.MINUTES; + /** * JdbcConnectionManager */ @Component -public class JdbcConnectionManager extends Thread { - - private static final Logger log = LoggerFactory.getLogger(JdbcConnectionManager.class); - private static final long CONN_CHECK_TIME = 5 * 60 * 1000L; +@Slf4j +@EnableScheduling +public class JdbcConnectionManager { public static final long CONN_TIMEOUT = 3 * 60 * 1000L; private static ConcurrentHashMap> JDBC_POOL = new ConcurrentHashMap<>(); @@ -54,39 +56,31 @@ public class JdbcConnectionManager extends Thread { /** * A timed task to detect connections in the connection pool that have been unused for a long time */ - @Override + @Scheduled(fixedRate = 5, timeUnit = MINUTES) public void run() { - while (true) { - try { - Thread.sleep(CONN_CHECK_TIME); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - log.error("sleep error", e); - } - int size = 0; - for (String key : JDBC_POOL.keySet()) { - LinkedBlockingQueue queue = JDBC_POOL.get(key); - log.info("Start checking for expired connections in the connection pool, size:[{}] key:[{}]", - queue.size(), key); - synchronized (JdbcConnectionManager.class) { - Integer num = 0; - while (queue.peek() != null && queue.peek().checkTimeOut()) { - ConnectionWrapper ConnectionWrapper = queue.poll(); - try { - log.info("Close idle JDBC connections :{}", key); - ConnectionWrapper.closeConnection(); - } catch (SQLException e) { - log.error("Failed to close the connection", e); - } - num--; + int size = 0; + for (String key : JDBC_POOL.keySet()) { + LinkedBlockingQueue queue = JDBC_POOL.get(key); + log.info("Start checking for expired connections in the connection pool, size:[{}] key:[{}]", + queue.size(), key); + synchronized (JdbcConnectionManager.class) { + Integer num = 0; + while (queue.peek() != null && queue.peek().checkTimeOut()) { + ConnectionWrapper connectionWrapper = queue.poll(); + try { + log.info("Close idle JDBC connections :{}", key); + connectionWrapper.closeConnection(); + } catch (SQLException e) { + log.error("Failed to close the connection", e); } - CONNECTION_NUMLIMIT.put(key, CONNECTION_NUMLIMIT.get(key) + num); + num--; } - size += queue.size(); + CONNECTION_NUMLIMIT.put(key, CONNECTION_NUMLIMIT.get(key) + num); } - log.info("The current verification is complete, and the total number of connections in the connection " - + "pool is [{}]", size); + size += queue.size(); } + log.info("The current verification is complete, and the total number of connections in the connection " + + "pool is [{}]", size); } /** @@ -126,8 +120,8 @@ public class JdbcConnectionManager extends Thread { return connectionWrapper; } catch (Exception e) { log.error("getConnection error", e); + throw new CustomException(e.getMessage(), e); } - return null; } /** diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/compatible/ExportServiceSqlService.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/compatible/ExportServiceSqlService.java index 75f471736d3d2bf64e4ed7f146f195d5519761d6..3a48cdc34b0fd0b0cd444dd80a55b84a3721dfd2 100644 --- a/plugins/data-studio/src/main/java/com/nctigba/datastudio/compatible/ExportServiceSqlService.java +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/compatible/ExportServiceSqlService.java @@ -24,6 +24,7 @@ package com.nctigba.datastudio.compatible; import com.nctigba.datastudio.model.query.ExportQuery; +import com.nctigba.datastudio.model.query.ExportResultQuery; import com.nctigba.datastudio.utils.DebugUtils; import org.opengauss.admin.common.exception.CustomException; @@ -127,4 +128,17 @@ public interface ExportServiceSqlService { default void exportSchemaDdl(ExportQuery request, HttpServletResponse response) throws IOException, SQLException { throw new CustomException(DebugUtils.getMessage()); } + + /** + * export result + * + * @param request ExportResultQuery + * @param response HttpServletResponse + * @throws IOException IOException + * @throws SQLException SQLException + */ + default void exportResult(ExportResultQuery request, HttpServletResponse response) + throws IOException, SQLException { + throw new CustomException(DebugUtils.getMessage()); + } } diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/compatible/PrivilegeSQLService.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/compatible/PrivilegeSQLService.java new file mode 100644 index 0000000000000000000000000000000000000000..fdf517e93905e578151248779e56239ae2b3d53f --- /dev/null +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/compatible/PrivilegeSQLService.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) GBA-NCTI-ISDC. 2022-2024. + * + * openGauss DataKit is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * + * http://license.coscl.org.cn/MulanPSL2 + * + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, + * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, + * MERCHANTABILITY OR FITFOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + * ------------------------------------------------------------------------- + * + * PrivilegeSQLService.java + * + * IDENTIFICATION + * plugins/data-studio/src/main/java/com/nctigba/datastudio/compatible/PrivilegeSQLService.java + * + * ------------------------------------------------------------------------- + */ + +package com.nctigba.datastudio.compatible; + +import com.nctigba.datastudio.model.query.PrivilegeSetQuery; +import com.nctigba.datastudio.utils.DebugUtils; +import org.opengauss.admin.common.exception.CustomException; + +/** + * PrivilegeSQLService + * + * @author liupengfei + * @since 2024/10/30 + */ +public interface PrivilegeSQLService { + /** + * database type + * + * @return String database type + */ + String type(); + + /** + * getPrivilegeSql + * + * @param request PrivilegeSetQuery + * @return String sql + */ + default String getPrivilegeSql(PrivilegeSetQuery request) { + throw new CustomException(DebugUtils.getMessage()); + } +} diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/compatible/opengauss/ExportServiceSqlServiceImpl.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/compatible/opengauss/ExportServiceSqlServiceImpl.java index 8dbd8de6fb489f90052889fe30006d7f617ac807..b014d77c9ee92830b4ff5a988edbd1c4a1a38e23 100644 --- a/plugins/data-studio/src/main/java/com/nctigba/datastudio/compatible/opengauss/ExportServiceSqlServiceImpl.java +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/compatible/opengauss/ExportServiceSqlServiceImpl.java @@ -31,6 +31,7 @@ import com.nctigba.datastudio.model.dto.DatabaseSequenceDdlDTO; import com.nctigba.datastudio.model.dto.DatabaseViewDdlDTO; import com.nctigba.datastudio.model.query.DatabaseMetaArrayIdSchemaQuery; import com.nctigba.datastudio.model.query.ExportQuery; +import com.nctigba.datastudio.model.query.ExportResultQuery; import com.nctigba.datastudio.model.query.SelectDataQuery; import com.nctigba.datastudio.service.DatabaseFunctionSPService; import com.nctigba.datastudio.service.DatabaseSequenceService; @@ -80,6 +81,7 @@ import java.util.List; import java.util.Map; import static com.nctigba.datastudio.constants.CommonConstants.CURRENT_VALUE; +import static com.nctigba.datastudio.constants.CommonConstants.DEFAULT_EXPORT_DATA_FILE_NAME; import static com.nctigba.datastudio.constants.CommonConstants.FUNCTION; import static com.nctigba.datastudio.constants.CommonConstants.IS_CALLED; import static com.nctigba.datastudio.constants.CommonConstants.IS_PACKAGE; @@ -96,6 +98,7 @@ import static com.nctigba.datastudio.constants.CommonConstants.TABLE; import static com.nctigba.datastudio.constants.CommonConstants.UNDERLINE; import static com.nctigba.datastudio.constants.CommonConstants.VIEW; import static com.nctigba.datastudio.constants.SqlConstants.COMMA; +import static com.nctigba.datastudio.constants.SqlConstants.COUNT_FROM_SQL; import static com.nctigba.datastudio.constants.SqlConstants.COUNT_SQL; import static com.nctigba.datastudio.constants.SqlConstants.COURSE_SQL; import static com.nctigba.datastudio.constants.SqlConstants.CREATE_SCHEMA_SQL; @@ -109,6 +112,7 @@ import static com.nctigba.datastudio.constants.SqlConstants.PROC_SQL; import static com.nctigba.datastudio.constants.SqlConstants.QUERY_OID_BY_PACKAGE; import static com.nctigba.datastudio.constants.SqlConstants.QUOTES; import static com.nctigba.datastudio.constants.SqlConstants.RIGHT_BRACKET; +import static com.nctigba.datastudio.constants.SqlConstants.SELECT_FROM_LIMIT; import static com.nctigba.datastudio.constants.SqlConstants.SELECT_KEYWORD_SQL; import static com.nctigba.datastudio.constants.SqlConstants.SEMICOLON; import static com.nctigba.datastudio.constants.SqlConstants.SEQUENCE_SQL; @@ -246,10 +250,12 @@ public class ExportServiceSqlServiceImpl implements ExportServiceSqlService { log.info("ExportService exportExcel columnSb: " + columnSb); String tableName = request.getTableName(); - String sql = SELECT_KEYWORD_SQL + columnSb.deleteCharAt(columnSb.length() - 1) - + FROM_KEYWORD_SQL + DebugUtils.needQuoteName(request.getSchema()) - + POINT + DebugUtils.needQuoteName(tableName) + SEMICOLON; - + String sql = request.getSql(); + if (Strings.isBlank(sql)) { + sql = SELECT_KEYWORD_SQL + columnSb.deleteCharAt(columnSb.length() - 1) + + FROM_KEYWORD_SQL + DebugUtils.needQuoteName(request.getSchema()) + + POINT + DebugUtils.needQuoteName(tableName); + } String fileName = getDataFileName(tableName) + ".xlsx"; if (request.getFileType().equals("Excel(xls)")) { fileName = getDataFileName(tableName) + ".xls"; @@ -262,22 +268,21 @@ public class ExportServiceSqlServiceImpl implements ExportServiceSqlService { private void exportExcelFile(ExportQuery request, String sql, String fileName, HttpServletResponse response) throws SQLException, IOException { log.info("ExportService getXssfWorkBook startTime: " + System.currentTimeMillis()); + response.reset(); + response.setContentType("application/octet-stream"); + response.setHeader("Content-Disposition", URLEncoder.encode(fileName, StandardCharsets.UTF_8)); + response.addHeader("Response-Type", "blob"); + response.setCharacterEncoding(request.getEncoding()); + int count = 0; + String tableName = request.getTableName(); + String sql2exe = sql.replace(";", ""); try ( Connection connection = connectionConfig.connectDatabase(request.getUuid()); Statement statement = connection.createStatement(); SXSSFWorkbook sxssfWorkbook = new SXSSFWorkbook(); - OutputStream outputStream = response.getOutputStream() + OutputStream outputStream = response.getOutputStream(); + ResultSet countResult = statement.executeQuery(String.format(COUNT_FROM_SQL, sql2exe)); ) { - response.reset(); - response.setContentType("application/octet-stream"); - response.setHeader("Content-Disposition", URLEncoder.encode(fileName, StandardCharsets.UTF_8)); - response.addHeader("Response-Type", "blob"); - response.setCharacterEncoding(request.getEncoding()); - - int count = 0; - String tableName = request.getTableName(); - ResultSet countResult = statement.executeQuery(String.format(COUNT_SQL, - DebugUtils.needQuoteName(request.getSchema()), DebugUtils.needQuoteName(tableName))); while (countResult.next()) { count = countResult.getInt("count"); } @@ -285,7 +290,7 @@ public class ExportServiceSqlServiceImpl implements ExportServiceSqlService { String timeStamp = new SimpleDateFormat("HHmmssSSS").format(new Date()); connection.setAutoCommit(false); - statement.execute(String.format(COURSE_SQL, "DS_" + timeStamp, sql)); + statement.execute(String.format(COURSE_SQL, "DS_" + timeStamp, sql2exe)); log.info("ExportService getXssfWorkBook timeStamp: " + "DS_" + timeStamp); int page = count == 0 ? 1 : (int) Math.ceil((double) count / 1000000); @@ -398,16 +403,21 @@ public class ExportServiceSqlServiceImpl implements ExportServiceSqlService { private String composeQuerySql(ExportQuery request, boolean isExport) { StringBuilder sb = new StringBuilder(); - sb.append("COPY ").append(DebugUtils.needQuoteName(request.getSchema())).append(POINT) - .append(DebugUtils.needQuoteName(request.getTableName())); - List columnList = request.getColumnList(); - sb.append(LEFT_BRACKET); - if (CollectionUtils.isEmpty(columnList)) { - sb.append(request.getColumnString()); + sb.append("COPY "); + if (Strings.isBlank(request.getSql())) { + sb.append(DebugUtils.needQuoteName(request.getSchema())).append(POINT) + .append(DebugUtils.needQuoteName(request.getTableName())); + List columnList = request.getColumnList(); + sb.append(LEFT_BRACKET); + if (CollectionUtils.isEmpty(columnList)) { + sb.append(request.getColumnString()); + } else { + sb.append(DebugUtils.listToString(columnList, COMMA)); + } + sb.append(RIGHT_BRACKET); } else { - sb.append(DebugUtils.listToString(columnList, COMMA)); + sb.append(LEFT_BRACKET).append(request.getSql()).append(RIGHT_BRACKET); } - sb.append(RIGHT_BRACKET); if (isExport) { sb.append(" TO STDOUT"); } else { @@ -841,4 +851,24 @@ public class ExportServiceSqlServiceImpl implements ExportServiceSqlService { log.info("ExportService getSequenceData ddl: " + ddl); return ddl; } + + @Override + public void exportResult(ExportResultQuery request, HttpServletResponse response) throws IOException, SQLException { + log.info("ExportService exportResult request: " + request); + String sql = request.getSql().trim(); + if (sql.endsWith(";")) { + sql = sql.substring(0, sql.length() - 1); + } + if (request.getPageSize() != null && request.getPageNum() != null) { + request.setSql(String.format(SELECT_FROM_LIMIT, sql, request.getPageSize(), + (request.getPageNum() - 1) * request.getPageSize())); + } else { + request.setSql(sql); + } + request.setTableName(DEFAULT_EXPORT_DATA_FILE_NAME); + request.setDelimiter(null); + request.setEncoding("UTF-8"); + exportTableData(request, response); + log.info("ExportService exportResult end"); + } } diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/compatible/opengauss/PrivilegeSQLServiceImpl.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/compatible/opengauss/PrivilegeSQLServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..1195230c915f04a3c1b94c154acab65fef663f3d --- /dev/null +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/compatible/opengauss/PrivilegeSQLServiceImpl.java @@ -0,0 +1,130 @@ +/* + * Copyright (c) GBA-NCTI-ISDC. 2022-2024. + * + * openGauss DataKit is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * + * http://license.coscl.org.cn/MulanPSL2 + * + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, + * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, + * MERCHANTABILITY OR FITFOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + * ------------------------------------------------------------------------- + * + * PrivilegeSQLServiceImpl.java + * + * IDENTIFICATION + * plugins/data-studio/src/main/java/com/nctigba/datastudio/compatible/opengauss/PrivilegeSQLServiceImpl.java + * + * ------------------------------------------------------------------------- + */ + +package com.nctigba.datastudio.compatible.opengauss; + +import com.nctigba.datastudio.compatible.PrivilegeSQLService; +import com.nctigba.datastudio.model.query.PrivilegeSetQuery; +import com.nctigba.datastudio.utils.DebugUtils; +import org.springframework.stereotype.Service; + +import java.util.StringJoiner; + +import static com.nctigba.datastudio.constants.CommonConstants.OPENGAUSS; +import static com.nctigba.datastudio.constants.SqlConstants.GRANT_PRIVILEGE; +import static com.nctigba.datastudio.constants.SqlConstants.GRANT_PRIVILEGE_WITH_OPTION; +import static com.nctigba.datastudio.constants.SqlConstants.REVOKE_PRIVILEGE; +import static com.nctigba.datastudio.constants.SqlConstants.REVOKE_PRIVILEGE_WITH_OPTION; + +/** + * PrivilegeSQLServiceImpl + * + * @author liupengfei + * @since 2024/10/30 + */ +@Service +public class PrivilegeSQLServiceImpl implements PrivilegeSQLService { + @Override + public String type() { + return OPENGAUSS; + } + + @Override + public String getPrivilegeSql(PrivilegeSetQuery request) { + StringJoiner checkOptionPrivilegeSJ = new StringJoiner(","); + StringJoiner checkPrivilegeSJ = new StringJoiner(","); + StringJoiner checkOptionSJ = new StringJoiner(","); + for (PrivilegeSetQuery.PrivilegeOption option : request.getPrivilegeOption()) { + if (option.getCheckPrivilege() && option.getCheckOption()) { + checkOptionPrivilegeSJ.add(option.getPrivilege()); + } else if (option.getCheckPrivilege()) { + checkPrivilegeSJ.add(option.getPrivilege()); + } else if (option.getCheckOption()) { + checkOptionSJ.add(option.getPrivilege()); + } else { + continue; + } + } + StringJoiner objSJ = new StringJoiner(","); + for (PrivilegeSetQuery.ObjValue o : request.getObj()) { + String name = DebugUtils.needQuoteName(o.getName()); + String schema = DebugUtils.needQuoteName(o.getSchema()); + if (schema != null) { + objSJ.add(schema + "." + name); + } else { + objSJ.add(name); + } + } + StringJoiner userSJ = new StringJoiner(","); + for (String u : request.getUser()) { + userSJ.add(u); + } + return genPrivilegeSql(checkOptionPrivilegeSJ, checkPrivilegeSJ, checkOptionSJ, objSJ, userSJ, request); + } + + private String genPrivilegeSql(StringJoiner checkOptionPrivilegeSJ, + StringJoiner checkPrivilegeSJ, + StringJoiner checkOptionSJ, + StringJoiner objSJ, + StringJoiner userSJ, + PrivilegeSetQuery request) { + String checkOptionPrivilege = checkOptionPrivilegeSJ.toString(); + String checkPrivilege = checkPrivilegeSJ.toString(); + String obj = objSJ.toString(); + String user = userSJ.toString(); + StringJoiner sql = new StringJoiner("\n"); + if (!"TABLE".equalsIgnoreCase(request.getType()) && !"VIEW".equalsIgnoreCase(request.getType())) { + obj = request.getType() + " " + obj; + } + if ("grant".equalsIgnoreCase(request.getGrantOrRevoke()) && checkOptionPrivilege.length() != 0) { + sql.add(String.format(GRANT_PRIVILEGE_WITH_OPTION, checkOptionPrivilege, obj, user)); + } + if ("grant".equalsIgnoreCase(request.getGrantOrRevoke()) && checkPrivilege.length() != 0) { + sql.add(String.format(GRANT_PRIVILEGE, checkPrivilege, obj, user)); + } + if ("revoke".equalsIgnoreCase(request.getGrantOrRevoke()) && (checkOptionPrivilege.length() != 0 + || checkPrivilege.length() != 0)) { + StringJoiner sj = new StringJoiner(","); + if (checkOptionPrivilege.length() != 0) { + sj.add(checkOptionPrivilege); + } + if (checkPrivilege.length() != 0) { + sj.add(checkPrivilege); + } + sql.add(String.format(REVOKE_PRIVILEGE, sj, obj, user)); + } + String checkOption = checkOptionSJ.toString(); + if ("revoke".equalsIgnoreCase(request.getGrantOrRevoke()) && (checkOptionPrivilege.length() != 0 + || checkOption.length() != 0)) { + StringJoiner sj = new StringJoiner(","); + if (checkOptionPrivilege.length() != 0) { + sj.add(checkOptionPrivilege); + } + if (checkOption.length() != 0) { + sj.add(checkOption); + } + sql.add(String.format(REVOKE_PRIVILEGE_WITH_OPTION, sj, obj, user)); + } + return sql.toString(); + } +} diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/constants/CommonConstants.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/constants/CommonConstants.java index 2a169a4cb94ed8f368beb02f16bd14a1de97b1b2..15befa79380bad85249f7904de2e5b0e8fda9ccc 100644 --- a/plugins/data-studio/src/main/java/com/nctigba/datastudio/constants/CommonConstants.java +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/constants/CommonConstants.java @@ -469,5 +469,13 @@ public class CommonConstants { */ public static final int NUM_TABLE_ATTR_ROWS = 14; + /** + * "sql" + */ public static final String SQL = "sql"; + + /** + * default data file name + */ + public static final String DEFAULT_EXPORT_DATA_FILE_NAME = "table"; } diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/constants/SqlConstants.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/constants/SqlConstants.java index 8c6405f96e11b7e2f5bb7e5316718c3493a646d9..47aeafc4402faaae87836933fb900effaddf4ac7 100644 --- a/plugins/data-studio/src/main/java/com/nctigba/datastudio/constants/SqlConstants.java +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/constants/SqlConstants.java @@ -1447,6 +1447,11 @@ public class SqlConstants { */ public static final String COUNT_SQL = "select count(*) as count from %s.%s"; + /** + * count from sql + */ + public static final String COUNT_FROM_SQL = "select count(*) as count from (%s)"; + /** * course sql */ @@ -1628,4 +1633,29 @@ public class SqlConstants { * delete job sql */ public static final String DISABLE_JOB_SQL = "select pkg_service.job_finish(%s, true, sysdate);"; + + /** + * select from query limit sql + */ + public static final String SELECT_FROM_LIMIT = "select * from (%s) limit %s offset %s"; + + /** + * grant privilege + */ + public static final String GRANT_PRIVILEGE = "GRANT %s ON %s TO %s;"; + + /** + * grant privilege with option + */ + public static final String GRANT_PRIVILEGE_WITH_OPTION = "GRANT %s ON %s TO %s WITH GRANT OPTION;"; + + /** + * grant privilege with option + */ + public static final String REVOKE_PRIVILEGE = "REVOKE %s ON %s FROM %s;"; + + /** + * grant privilege with option + */ + public static final String REVOKE_PRIVILEGE_WITH_OPTION = "REVOKE GRANT OPTION FOR %s ON %s FROM %s CASCADE;"; } diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/controller/ExportController.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/controller/ExportController.java index fda006ce4a5ed84041277c1d5573a0e09473609c..3de069e12fee9b78cb13665f105e727483fcb8ac 100644 --- a/plugins/data-studio/src/main/java/com/nctigba/datastudio/controller/ExportController.java +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/controller/ExportController.java @@ -24,6 +24,7 @@ package com.nctigba.datastudio.controller; import com.nctigba.datastudio.model.query.ExportQuery; +import com.nctigba.datastudio.model.query.ExportResultQuery; import com.nctigba.datastudio.service.ExportService; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.PostMapping; @@ -142,4 +143,18 @@ public class ExportController { throws SQLException, IOException { exportService.exportSchemaDdl(request, response); } + + /** + * export schema ddl + * + * @param request request + * @param response response + * @throws SQLException SQLException + * @throws IOException IOException + */ + @PostMapping(value = "/export/result", produces = MediaType.APPLICATION_JSON_VALUE) + public void exportResult(@RequestBody ExportResultQuery request, HttpServletResponse response) + throws SQLException, IOException { + exportService.exportResult(request, response); + } } diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/controller/PrivilegeController.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/controller/PrivilegeController.java new file mode 100644 index 0000000000000000000000000000000000000000..2e137494caa1abae68039365c406e0520a9d295f --- /dev/null +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/controller/PrivilegeController.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) GBA-NCTI-ISDC. 2022-2024. + * + * openGauss DataKit is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * + * http://license.coscl.org.cn/MulanPSL2 + * + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, + * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, + * MERCHANTABILITY OR FITFOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + * ------------------------------------------------------------------------- + * + * PrivilegeController.java + * + * IDENTIFICATION + * plugins/data-studio/src/main/java/com/nctigba/datastudio/controller/PrivilegeController.java + * + * ------------------------------------------------------------------------- + */ + +package com.nctigba.datastudio.controller; + +import com.nctigba.datastudio.model.dto.PrivilegeHistoryDTO; +import com.nctigba.datastudio.model.query.PrivilegeHistoryQuery; +import com.nctigba.datastudio.model.query.PrivilegeSetQuery; +import com.nctigba.datastudio.service.PrivilegeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.sql.SQLException; + +/** + * PrivilegeController + * + * @author liupengfei + * @since 2024/10/25 + */ +@RestController +@RequestMapping(value = "/dataStudio/web/v1/privilege") +public class PrivilegeController { + @Autowired + private PrivilegeService privilegeService; + + /** + * getPrivilegeSql + * + * @param request PrivilegeSetQuery + * @return privilege sql + */ + @PostMapping(value = "/sql", produces = MediaType.APPLICATION_JSON_VALUE) + public String getPrivilegeSql(@RequestBody PrivilegeSetQuery request) { + return privilegeService.getPrivilegeSql(request); + } + + /** + * setPrivilege + * + * @param request PrivilegeSetQuery + * @throws SQLException SQLException + */ + @PostMapping(value = "/set", produces = MediaType.APPLICATION_JSON_VALUE) + public void setPrivilege(@RequestBody PrivilegeSetQuery request) throws SQLException { + privilegeService.setPrivilege(request); + } + + /** + * getPrivilegeHistory + * + * @param request PrivilegeHistoryQuery + * @return history + */ + @GetMapping(value = "/history", produces = MediaType.APPLICATION_JSON_VALUE) + public PrivilegeHistoryDTO getPrivilegeHistory(PrivilegeHistoryQuery request) { + return privilegeService.getPrivilegeHistory(request); + } +} diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/dao/DatabaseConnectionDAO.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/dao/DatabaseConnectionDAO.java index f8d24118b80644ee5b6ebf9c8c99ed95bd06b7de..aa23edc434fb783438316e306774ec508e438be1 100644 --- a/plugins/data-studio/src/main/java/com/nctigba/datastudio/dao/DatabaseConnectionDAO.java +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/dao/DatabaseConnectionDAO.java @@ -27,16 +27,17 @@ import com.nctigba.datastudio.model.entity.DatabaseConnectionDO; import com.nctigba.datastudio.model.entity.DatabaseConnectionUrlDO; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; +import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; -import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; import static com.nctigba.datastudio.constants.SqlConstants.CONFIGURE_TIME; import static com.nctigba.datastudio.constants.SqlConstants.GET_DATABASELINK_COUNT_SQL; @@ -97,18 +98,52 @@ public class DatabaseConnectionDAO implements ApplicationRunner { * @return List */ public List selectTable(String webUser) { - List list = new ArrayList<>(); - Map count = jdbcTemplate.queryForMap( - GET_DATABASELINK_COUNT_SQL + " webuser = '" + webUser + "';"); - if (count.get("count") instanceof Integer) { - if ((Integer) count.get("count") == 0) { - return null; - } else { - list = jdbcTemplate.query(GET_DATA_CONNECTION_NOT_P_SQL + " webuser = '" + webUser + "';", - new BeanPropertyRowMapper<>(DatabaseConnectionDO.class)); - } + Long count = jdbcTemplate.queryForObject( + GET_DATABASELINK_COUNT_SQL + " webuser = '" + webUser + "';", Long.class); + if (count != 0) { + List> dataList = jdbcTemplate.queryForList( + GET_DATA_CONNECTION_NOT_P_SQL + " webuser = '" + webUser + "';"); + return dataList.stream().map(DatabaseConnectionDAO::getDatabaseConnectionDO) + .collect(Collectors.toList()); + } + return new ArrayList<>(); + } + + @NotNull + private static DatabaseConnectionDO getDatabaseConnectionDO(Map data) { + DatabaseConnectionDO databaseConnectionDO = new DatabaseConnectionDO(); + databaseConnectionDO.setId(String.valueOf(data.get("id"))); + if (data.get("type") instanceof String) { + databaseConnectionDO.setType((String) data.get("type")); + } + if (data.get("name") instanceof String) { + databaseConnectionDO.setName((String) data.get("name")); + } + if (data.get("driver") instanceof String) { + databaseConnectionDO.setDriver((String) data.get("driver")); + } + if (data.get("ip") instanceof String) { + databaseConnectionDO.setIp((String) data.get("ip")); + } + if (data.get("port") instanceof String) { + databaseConnectionDO.setPort((String) data.get("port")); + } + if (data.get("dataname") instanceof String) { + databaseConnectionDO.setDataName((String) data.get("dataname")); + } + if (data.get("username") instanceof String) { + databaseConnectionDO.setUserName((String) data.get("username")); + } + if (data.get("userpassword") instanceof String) { + databaseConnectionDO.setPassword((String) data.get("userpassword")); + } + if (data.get("edition") instanceof String) { + databaseConnectionDO.setEdition((String) data.get("edition")); + } + if (data.get("webuser") instanceof String) { + databaseConnectionDO.setWebUser((String) data.get("webuser")); } - return list; + return databaseConnectionDO; } /** @@ -146,10 +181,9 @@ public class DatabaseConnectionDAO implements ApplicationRunner { * @param webUser webUser * @return Integer */ - public Integer getJudgeName(String name, String webUser) { - Map count = jdbcTemplate.queryForMap( - GET_DATABASELINK_COUNT_SQL + " name ='" + name + "' and webUser = '" + webUser + "'"); - return (Integer) count.get("count"); + public Long getJudgeName(String name, String webUser) { + return jdbcTemplate.queryForObject( + GET_DATABASELINK_COUNT_SQL + " name ='" + name + "' and webUser = '" + webUser + "'", Long.class); } /** diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/dao/DbSetPrivilegeHistoryDAO.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/dao/DbSetPrivilegeHistoryDAO.java new file mode 100644 index 0000000000000000000000000000000000000000..97227f9ecffe7c37c70cdace894392741aa3615f --- /dev/null +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/dao/DbSetPrivilegeHistoryDAO.java @@ -0,0 +1,131 @@ +/* + * Copyright (c) GBA-NCTI-ISDC. 2022-2024. + * + * openGauss DataKit is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * + * http://license.coscl.org.cn/MulanPSL2 + * + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, + * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, + * MERCHANTABILITY OR FITFOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + * ------------------------------------------------------------------------- + * + * DbSetPrivilegeHistoryDAO.java + * + * IDENTIFICATION + * plugins/data-studio/src/main/java/com/nctigba/datastudio/dao/DbSetPrivilegeHistoryDAO.java + * + * ------------------------------------------------------------------------- + */ + +package com.nctigba.datastudio.dao; + +import com.nctigba.datastudio.model.dto.PrivilegeHistoryDTO; +import com.nctigba.datastudio.model.entity.PrivilegeHistoryDO; +import com.nctigba.datastudio.model.query.PrivilegeHistoryQuery; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.ApplicationArguments; +import org.springframework.boot.ApplicationRunner; +import org.springframework.dao.DataAccessException; +import org.springframework.jdbc.core.BeanPropertyRowMapper; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.jdbc.core.PreparedStatementCallback; +import org.springframework.jdbc.core.PreparedStatementCreator; +import org.springframework.stereotype.Component; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.util.List; + +import static java.lang.Math.ceil; + +/** + * DbPrivilegeDAO + * + * @author liupengfei + * @since 2024/10/30 + */ +@Component +@Slf4j +public class DbSetPrivilegeHistoryDAO implements ApplicationRunner { + @Autowired + private JdbcTemplate jdbcTemplate; + + @Override + public void run(ApplicationArguments args) throws Exception { + jdbcTemplate.execute( + "create table if not exists privilegeHistory (" + + " id integer primary key AUTOINCREMENT," + + " startTime varchar(20)," + + " success boolean," + + " errMes varchar(512)," + + " sql clob," + + " privilegeSetQuery clob" + + ");"); + } + + /** + * insert privilege execute history + * + * @param privilegeHistoryDO privilegeHistoryDO + */ + public void insertTable(PrivilegeHistoryDO privilegeHistoryDO) { + String sql = "insert into privilegeHistory(startTime, success, errMes, sql, privilegeSetQuery) " + + "values(?,?,?,?,?)"; + jdbcTemplate.execute(new PreparedStatementCreator() { + @Override + public PreparedStatement createPreparedStatement(Connection con) throws SQLException { + return con.prepareStatement(sql); + } + }, new PreparedStatementCallback() { + @Override + public Object doInPreparedStatement(PreparedStatement ps) throws SQLException, DataAccessException { + ps.setString(1, privilegeHistoryDO.getStartTime()); + ps.setBoolean(2, privilegeHistoryDO.isSuccess()); + ps.setString(3, privilegeHistoryDO.getErrMes()); + ps.setString(4, privilegeHistoryDO.getSql()); + ps.setString(5, privilegeHistoryDO.getPrivilegeSetQuery()); + return ps.execute(); + } + }); + log.info("privilegeHistory insertTable: " + privilegeHistoryDO); + } + + + /** + * query privilege history + * + * @param privilegeHistoryQuery privilegeHistoryQuery + * @return PrivilegeHistoryDTO + */ + public PrivilegeHistoryDTO queryTable(PrivilegeHistoryQuery privilegeHistoryQuery) { + log.info("DbSetPrivilegeHistory queryTable privilegeHistory: " + privilegeHistoryQuery); + String sqlSelect = "select id, startTime, success, errMes, sql, privilegeSetQuery " + + "from privilegeHistory "; + String sqlCount = "select count(*) from privilegeHistory "; + if (StringUtils.isNotEmpty(privilegeHistoryQuery.getLike())) { + String where = "where sql like '%" + privilegeHistoryQuery.getLike() + "%'"; + sqlSelect = sqlSelect + where; + sqlCount = sqlCount + where; + } + sqlSelect = sqlSelect + "order by startTime desc " + + "limit " + privilegeHistoryQuery.getPageSize() + + " offset " + ((privilegeHistoryQuery.getPageNum() - 1) * privilegeHistoryQuery.getPageSize()) + ";"; + List list = jdbcTemplate.query(sqlSelect, + new BeanPropertyRowMapper<>(PrivilegeHistoryDO.class)); + Long total = jdbcTemplate.queryForObject(sqlCount, Long.class); + PrivilegeHistoryDTO dto = new PrivilegeHistoryDTO(); + dto.setData(list); + dto.setPageSize(privilegeHistoryQuery.getPageSize()); + dto.setPageNum(privilegeHistoryQuery.getPageNum()); + dto.setPageTotal((int) ceil((double) total / privilegeHistoryQuery.getPageSize())); + dto.setDataSize(total); + return dto; + } +} diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/dao/SqlHistoryTemplateDAO.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/dao/SqlHistoryTemplateDAO.java index 0ea9ca6125ba85ce916285035c59cfedf2216e94..f443b357fdce74ae5705b382e3ae631999363021 100644 --- a/plugins/data-studio/src/main/java/com/nctigba/datastudio/dao/SqlHistoryTemplateDAO.java +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/dao/SqlHistoryTemplateDAO.java @@ -69,7 +69,8 @@ public class SqlHistoryTemplateDAO implements ApplicationRunner { + ");"); String[] sqlList = { "alter table sqlHistory add column errMes varchar(512);", - "alter table sqlHistory add column updateCount integer;" + "alter table sqlHistory add column updateCount integer;", + "alter table sqlHistory alter column sql type clob;" }; for (String s : sqlList) { try { diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/dto/PrivilegeHistoryDTO.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/dto/PrivilegeHistoryDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..a01bdc891c3c975bc6d22403999364d0bc9f4593 --- /dev/null +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/dto/PrivilegeHistoryDTO.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) GBA-NCTI-ISDC. 2022-2024. + * + * openGauss DataKit is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * + * http://license.coscl.org.cn/MulanPSL2 + * + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, + * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, + * MERCHANTABILITY OR FITFOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + * ------------------------------------------------------------------------- + * + * PrivilegeHistoryDTO.java + * + * IDENTIFICATION + * plugins/data-studio/src/main/java/com/nctigba/datastudio/model/dto/PrivilegeHistoryDTO.java + * + * ------------------------------------------------------------------------- + */ + +package com.nctigba.datastudio.model.dto; + +import com.nctigba.datastudio.model.entity.PrivilegeHistoryDO; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * PrivilegeHistoryDTO + * + * @author liupengfei + * @since 2024/10/30 + */ +@Data +@NoArgsConstructor +public class PrivilegeHistoryDTO { + private List data; + private Integer pageTotal; + private Long dataSize; + private Integer pageNum; + private Integer pageSize; +} \ No newline at end of file diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/entity/PrivilegeHistoryDO.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/entity/PrivilegeHistoryDO.java new file mode 100644 index 0000000000000000000000000000000000000000..a11c9bd0a4ab5c24c5a0dbda78f1369995ca8a4e --- /dev/null +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/entity/PrivilegeHistoryDO.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) GBA-NCTI-ISDC. 2022-2024. + * + * openGauss DataKit is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * + * http://license.coscl.org.cn/MulanPSL2 + * + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, + * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, + * MERCHANTABILITY OR FITFOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + * ------------------------------------------------------------------------- + * + * PrivilegeHistoryDO.java + * + * IDENTIFICATION + * plugins/data-studio/src/main/java/com/nctigba/datastudio/model/entity/PrivilegeHistoryDO.java + * + * ------------------------------------------------------------------------- + */ + +package com.nctigba.datastudio.model.entity; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.Generated; +import lombok.NoArgsConstructor; + +/** + * PrivilegeHistoryDO + * + * @author liupengfei + * @since 2024/10/30 + */ +@NoArgsConstructor +@Data +@Generated +public class PrivilegeHistoryDO { + private Integer id; + private String startTime; + @JsonProperty("success") + private boolean isSuccess; + private String sql; + private String errMes; + private String privilegeSetQuery; +} diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/ExportQuery.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/ExportQuery.java index 42313e58528055b06c3fb8f8b6f6d3ae571ca611..8e9f45e35e49181d78691d1e4a3a5bc5794248a9 100644 --- a/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/ExportQuery.java +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/ExportQuery.java @@ -82,4 +82,6 @@ public class ExportQuery { private String timeFormat; private MultipartFile file; + + private String sql; } diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/ExportResultQuery.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/ExportResultQuery.java new file mode 100644 index 0000000000000000000000000000000000000000..d4bfe4f2eead9e61dad6c8386aaa71126359b6cd --- /dev/null +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/ExportResultQuery.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) GBA-NCTI-ISDC. 2022-2024. + * + * openGauss DataKit is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * + * http://license.coscl.org.cn/MulanPSL2 + * + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, + * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, + * MERCHANTABILITY OR FITFOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + * ------------------------------------------------------------------------- + * + * ExportResultQuery.java + * + * IDENTIFICATION + * plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/ExportResultQuery.java + * + * ------------------------------------------------------------------------- + */ + +package com.nctigba.datastudio.model.query; + +import lombok.Data; +import lombok.Generated; +import lombok.NoArgsConstructor; + +/** + * ExportResultQuery + * + * @author liupengfei + * @since 2024/8/27 + */ +@Data +@Generated +@NoArgsConstructor +public class ExportResultQuery extends ExportQuery { + private Integer pageNum; + private Long pageSize; +} diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/PrivilegeHistoryQuery.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/PrivilegeHistoryQuery.java new file mode 100644 index 0000000000000000000000000000000000000000..a6d8422563d9a516c1b289801728316f06735900 --- /dev/null +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/PrivilegeHistoryQuery.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) GBA-NCTI-ISDC. 2022-2024. + * + * openGauss DataKit is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * + * http://license.coscl.org.cn/MulanPSL2 + * + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, + * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, + * MERCHANTABILITY OR FITFOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + * ------------------------------------------------------------------------- + * + * PrivilegeHistoryQuery.java + * + * IDENTIFICATION + * plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/PrivilegeHistoryQuery.java + * + * ------------------------------------------------------------------------- + */ + +package com.nctigba.datastudio.model.query; + +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * PrivilegeHistoryQuery + * + * @author liupengfei + * @since 2024/10/30 + */ +@NoArgsConstructor +@Data +public class PrivilegeHistoryQuery { + private Integer pageNum; + private Integer pageSize; + private String like; +} \ No newline at end of file diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/PrivilegeSetQuery.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/PrivilegeSetQuery.java new file mode 100644 index 0000000000000000000000000000000000000000..40d53be815f23948d2179995e438749df4886324 --- /dev/null +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/PrivilegeSetQuery.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) GBA-NCTI-ISDC. 2022-2024. + * + * openGauss DataKit is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * + * http://license.coscl.org.cn/MulanPSL2 + * + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, + * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, + * MERCHANTABILITY OR FITFOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + * ------------------------------------------------------------------------- + * + * PrivilegeSetQuery.java + * + * IDENTIFICATION + * plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/PrivilegeSetQuery.java + * + * ------------------------------------------------------------------------- + */ + +package com.nctigba.datastudio.model.query; + +import lombok.Data; +import lombok.Generated; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * PrivilegeSetQuery + * + * @author liupengfei + * @since 2024/10/25 + */ +@Data +@Generated +@NoArgsConstructor +public class PrivilegeSetQuery { + private String uuid; + private String grantOrRevoke; + private List privilegeOption; + private String type; + private List obj; + private List user; + + /** + * PrivilegeOption + */ + @Data + public static class PrivilegeOption { + private String privilege; + private Boolean checkOption; + private Boolean checkPrivilege; + } + + /** + * ObjValue + */ + @Data + public static class ObjValue { + private String name; + private String schema; + } +} diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/PublicParamQuery.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/PublicParamQuery.java index efd152629870eec9aa336d2fcde8dfaf5ff65aa4..976f2ecb507756deb49e0f6f62931e9018e7e415 100644 --- a/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/PublicParamQuery.java +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/model/query/PublicParamQuery.java @@ -75,6 +75,12 @@ public class PublicParamQuery { private boolean isPackage; + private Integer pageNum; + + private Integer pageSize; + + private String resultId; + @Override public String toString() { return "PublicParamReq{" @@ -96,6 +102,9 @@ public class PublicParamQuery { + ", isCoverage='" + isCoverage + '\'' + ", isInPackage='" + isInPackage + '\'' + ", isPackage='" + isPackage + '\'' + + ", pageNum='" + pageNum + '\'' + + ", pageSize='" + pageSize + '\'' + + ", resultId='" + resultId + '\'' + '}'; } } diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/service/ExportService.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/service/ExportService.java index 18f70632fdcaefae3e2acee24a73019e1a519709..2372896d1603ae1d8ca3bc828df1e4f1b1918346 100644 --- a/plugins/data-studio/src/main/java/com/nctigba/datastudio/service/ExportService.java +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/service/ExportService.java @@ -24,6 +24,7 @@ package com.nctigba.datastudio.service; import com.nctigba.datastudio.model.query.ExportQuery; +import com.nctigba.datastudio.model.query.ExportResultQuery; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -104,4 +105,14 @@ public interface ExportService { * @throws SQLException SQLException */ void exportSchemaDdl(ExportQuery request, HttpServletResponse response) throws IOException, SQLException; + + /** + * exportResult + * + * @param request ExportResultQuery + * @param response HttpServletResponse + * @throws SQLException SQLException + * @throws IOException IOException + */ + void exportResult(ExportResultQuery request, HttpServletResponse response) throws SQLException, IOException; } diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/service/PrivilegeService.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/service/PrivilegeService.java new file mode 100644 index 0000000000000000000000000000000000000000..37f3667eac3d76395228dea032932834a2d2de5e --- /dev/null +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/service/PrivilegeService.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) GBA-NCTI-ISDC. 2022-2024. + * + * openGauss DataKit is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * + * http://license.coscl.org.cn/MulanPSL2 + * + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, + * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, + * MERCHANTABILITY OR FITFOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + * ------------------------------------------------------------------------- + * + * PrivilegeService.java + * + * IDENTIFICATION + * plugins/data-studio/src/main/java/com/nctigba/datastudio/service/PrivilegeService.java + * + * ------------------------------------------------------------------------- + */ + +package com.nctigba.datastudio.service; + +import com.nctigba.datastudio.model.dto.PrivilegeHistoryDTO; +import com.nctigba.datastudio.model.query.PrivilegeHistoryQuery; +import com.nctigba.datastudio.model.query.PrivilegeSetQuery; + +import java.sql.SQLException; + +/** + * PrivilegeService + * + * @author liupengfei + * @since 2024/10/28 + */ +public interface PrivilegeService { + /** + * getPrivilegeSql + * + * @param request PrivilegeSetQuery + * @return sql + */ + String getPrivilegeSql(PrivilegeSetQuery request); + + /** + * setPrivilege + * + * @param request PrivilegeSetQuery + * @throws SQLException SQLException + */ + void setPrivilege(PrivilegeSetQuery request) throws SQLException; + + /** + * getPrivilegeHistory + * + * @param request PrivilegeHistoryQuery + * @return PrivilegeHistoryDTO + */ + PrivilegeHistoryDTO getPrivilegeHistory(PrivilegeHistoryQuery request); +} diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/service/impl/sql/ExportServiceImpl.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/service/impl/sql/ExportServiceImpl.java index 4379d75daa81bf622e9b330eaa67cf51d2acf686..41073141cf6d3525aba82ef7938cdafc087b69bf 100644 --- a/plugins/data-studio/src/main/java/com/nctigba/datastudio/service/impl/sql/ExportServiceImpl.java +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/service/impl/sql/ExportServiceImpl.java @@ -26,6 +26,7 @@ package com.nctigba.datastudio.service.impl.sql; import com.nctigba.datastudio.compatible.ExportServiceSqlService; import com.nctigba.datastudio.config.ConnectionConfig; import com.nctigba.datastudio.model.query.ExportQuery; +import com.nctigba.datastudio.model.query.ExportResultQuery; import com.nctigba.datastudio.service.DatabaseFunctionSPService; import com.nctigba.datastudio.service.DatabaseSequenceService; import com.nctigba.datastudio.service.DatabaseViewService; @@ -121,4 +122,9 @@ public class ExportServiceImpl implements ExportService { public void exportSchemaDdl(ExportQuery request, HttpServletResponse response) throws IOException, SQLException { exportServiceSqlService.get(comGetUuidType(request.getUuid())).exportSchemaDdl(request, response); } + + @Override + public void exportResult(ExportResultQuery request, HttpServletResponse response) throws SQLException, IOException { + exportServiceSqlService.get(comGetUuidType(request.getUuid())).exportResult(request, response); + } } diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/service/impl/sql/PrivilegeServiceImpl.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/service/impl/sql/PrivilegeServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..0540c16e352cd2c4b90de398b02f5dd026c4d909 --- /dev/null +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/service/impl/sql/PrivilegeServiceImpl.java @@ -0,0 +1,115 @@ +/* + * Copyright (c) GBA-NCTI-ISDC. 2022-2024. + * + * openGauss DataKit is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * + * http://license.coscl.org.cn/MulanPSL2 + * + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, + * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, + * MERCHANTABILITY OR FITFOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + * ------------------------------------------------------------------------- + * + * PrivilegeServiceImpl.java + * + * IDENTIFICATION + * plugins/data-studio/src/main/java/com/nctigba/datastudio/service/impl/sql/PrivilegeServiceImpl.java + * + * ------------------------------------------------------------------------- + */ + +package com.nctigba.datastudio.service.impl.sql; + +import com.alibaba.fastjson.JSON; +import com.nctigba.datastudio.compatible.PrivilegeSQLService; +import com.nctigba.datastudio.config.ConnectionConfig; +import com.nctigba.datastudio.dao.DbSetPrivilegeHistoryDAO; +import com.nctigba.datastudio.model.dto.PrivilegeHistoryDTO; +import com.nctigba.datastudio.model.entity.PrivilegeHistoryDO; +import com.nctigba.datastudio.model.query.PrivilegeHistoryQuery; +import com.nctigba.datastudio.model.query.PrivilegeSetQuery; +import com.nctigba.datastudio.service.PrivilegeService; +import lombok.extern.slf4j.Slf4j; +import org.opengauss.admin.common.exception.CustomException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.Statement; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static com.nctigba.datastudio.utils.DebugUtils.comGetUuidType; + +/** + * PrivilegeServiceImpl + * + * @author liupengfei + * @since 2024/10/28 + */ +@Service +@Slf4j +public class PrivilegeServiceImpl implements PrivilegeService { + private Map privilegeSQLService; + @Autowired + private ConnectionConfig connectionConfig; + @Autowired + private DbSetPrivilegeHistoryDAO dbSetPrivilegeHistoryDAO; + + /** + * setPrivilegeService + * + * @param sqlServicesList implements PrivilegeSQLService + */ + @Resource + public void setPrivilegeService(List sqlServicesList) { + privilegeSQLService = new HashMap<>(); + for (PrivilegeSQLService service : sqlServicesList) { + privilegeSQLService.put(service.type(), service); + } + } + + @Override + public String getPrivilegeSql(PrivilegeSetQuery request) { + return privilegeSQLService.get(comGetUuidType(request.getUuid())).getPrivilegeSql(request); + } + + @Override + public void setPrivilege(PrivilegeSetQuery request) { + String privilegeSql = getPrivilegeSql(request); + PrivilegeHistoryDO history = new PrivilegeHistoryDO(); + DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + history.setStartTime(df.format(new Date())); + history.setSql(privilegeSql); + history.setPrivilegeSetQuery(JSON.toJSONString(request)); + try ( + Connection connection = connectionConfig.connectDatabase(request.getUuid()); + Statement statement = connection.createStatement(); + ) { + log.info("PrivilegeServiceImpl setPrivilege SQL: {}", privilegeSql); + statement.execute(privilegeSql); + history.setSuccess(true); + } catch (SQLException e) { + log.error(e.getMessage()); + history.setErrMes(e.getMessage()); + history.setSuccess(false); + throw new CustomException(e.getMessage(), e); + } finally { + dbSetPrivilegeHistoryDAO.insertTable(history); + } + } + + @Override + public PrivilegeHistoryDTO getPrivilegeHistory(PrivilegeHistoryQuery request) { + return dbSetPrivilegeHistoryDAO.queryTable(request); + } +} diff --git a/plugins/data-studio/src/main/java/com/nctigba/datastudio/service/impl/sql/StartSqlImpl.java b/plugins/data-studio/src/main/java/com/nctigba/datastudio/service/impl/sql/StartSqlImpl.java index bb8b7702d5b0a4112d9f92d7fa9d4c6e1cd74845..cc46543769a8b8630f140a864c9c2bf19a2b4544 100644 --- a/plugins/data-studio/src/main/java/com/nctigba/datastudio/service/impl/sql/StartSqlImpl.java +++ b/plugins/data-studio/src/main/java/com/nctigba/datastudio/service/impl/sql/StartSqlImpl.java @@ -34,27 +34,40 @@ import com.nctigba.datastudio.service.impl.debug.AsyncHelper; import com.nctigba.datastudio.utils.DebugUtils; import com.nctigba.datastudio.utils.LocaleStringUtils; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.opengauss.core.NativeQuery; +import org.opengauss.core.Parser; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import java.sql.Connection; +import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; +import java.util.Iterator; import java.util.List; +import java.util.Locale; import java.util.Map; +import java.util.StringJoiner; +import java.util.UUID; +import java.util.stream.Collectors; import static com.nctigba.datastudio.constants.CommonConstants.FIVE_HUNDRED; +import static com.nctigba.datastudio.constants.CommonConstants.RESULT; +import static com.nctigba.datastudio.constants.SqlConstants.COUNT_FROM_SQL; +import static com.nctigba.datastudio.constants.SqlConstants.SELECT_FROM_LIMIT; import static com.nctigba.datastudio.dao.ConnectionMapDAO.conMap; import static com.nctigba.datastudio.enums.MessageEnum.BUTTON; import static com.nctigba.datastudio.enums.MessageEnum.DISCONNECTION; import static com.nctigba.datastudio.enums.MessageEnum.TABLE; import static com.nctigba.datastudio.enums.MessageEnum.TEXT; import static com.nctigba.datastudio.enums.MessageEnum.WINDOW; +import static java.lang.Math.ceil; /** * StartSqlImpl @@ -75,10 +88,23 @@ public class StartSqlImpl implements OperationInterface { if (!conMap.containsKey(paramReq.getUuid())) { webSocketServer.sendMessage(windowName, DISCONNECTION, LocaleStringUtils.transLanguageWs("1004", webSocketServer), paramReq.getUuid()); + return; } String sql = paramReq.getSql(); + List nativeQueryList = Parser.parseJdbcSql(sql, false, false, true, false); + StringJoiner joiner = new StringJoiner(";"); + for (NativeQuery query : nativeQueryList) { + String nativeSql = query.nativeSql.trim(); + if (nativeSql.toLowerCase(Locale.ROOT).startsWith("select")) { + nativeSql = String.format(SELECT_FROM_LIMIT, nativeSql, + paramReq.getPageSize(), (paramReq.getPageNum() - 1) * paramReq.getPageSize()); + } + joiner.add(nativeSql); + } + String sqlToExecute = joiner.toString(); Connection connection = webSocketServer.getConnection(windowName); Statement stat = connection.createStatement(); + Statement countStat = connection.createStatement(); webSocketServer.setStatement(windowName, stat); ThreadUtil.execAsync(() -> { List list = new ArrayList<>(); @@ -94,16 +120,34 @@ public class StartSqlImpl implements OperationInterface { webSocketServer.sendMessage(windowName, TEXT, LocaleStringUtils.transLanguageWs("2001", webSocketServer), null); startTime = new Date(); - boolean result = stat.execute(sql); + boolean isExecutionSuccessful = stat.execute(sqlToExecute); endTime = new Date(); webSocketServer.sendMessage(windowName, BUTTON, LocaleStringUtils.transLanguageWs("2006", webSocketServer), null); OperateStatusDO operateStatus = webSocketServer.getOperateStatus(windowName); operateStatus.enableStopRun(); webSocketServer.setOperateStatus(windowName, operateStatus); + Iterator singleSqlIterator = nativeQueryList.stream().map(o -> o.nativeSql.trim()).collect( + Collectors.toList()).iterator(); while (true) { - if (result) { + if (isExecutionSuccessful) { Map resultMap = DebugUtils.parseResultSetType(stat.getResultSet()); + String singleSql = singleSqlIterator.next().trim(); + resultMap.put("sql", singleSql); + if (StringUtils.isNotEmpty(paramReq.getResultId())) { + resultMap.put("resultId", paramReq.getResultId()); + } else { + resultMap.put("resultId", UUID.randomUUID().toString()); + } + if (singleSql.toLowerCase(Locale.ROOT).startsWith("select")) { + long count = getCount(countStat, singleSql); + resultMap.put("dataSize", count); + resultMap.put("pageTotal", (int) ceil((double) count / paramReq.getPageSize())); + resultMap.put("pageNum", paramReq.getPageNum()); + resultMap.put("pageSize", paramReq.getPageSize()); + } else { + resultMap.put("dataSize", ((List>) resultMap.get(RESULT)).size()); + } webSocketServer.sendMessage(windowName, TABLE, LocaleStringUtils.transLanguageWs("2002", webSocketServer), resultMap); webSocketServer.sendMessage(windowName, TEXT, @@ -117,7 +161,7 @@ public class StartSqlImpl implements OperationInterface { break; } } - result = stat.getMoreResults(); + isExecutionSuccessful = stat.getMoreResults(); } if (isUpdate) { webSocketServer.sendMessage(windowName, TEXT, LocaleStringUtils.transLanguageWs( @@ -149,17 +193,20 @@ public class StartSqlImpl implements OperationInterface { operateStatus.enableStopRun(); webSocketServer.setOperateStatus(windowName, operateStatus); } finally { - sqlHistoryDO.setStartTime(df.format(startTime)); - sqlHistoryDO.setSuccess(isSuccess); - sqlHistoryDO.setSql(sql); - sqlHistoryDO.setExecuteTime((endTime.getTime() - startTime.getTime()) + "ms"); - sqlHistoryDO.setWebUser(paramReq.getWebUser()); - list.add(sqlHistoryDO); - asyncHelper.insertSqlHistory(list); + if (StringUtils.isEmpty(paramReq.getResultId())) { + sqlHistoryDO.setStartTime(df.format(startTime)); + sqlHistoryDO.setSuccess(isSuccess); + sqlHistoryDO.setSql(sql); + sqlHistoryDO.setExecuteTime((endTime.getTime() - startTime.getTime()) + "ms"); + sqlHistoryDO.setWebUser(paramReq.getWebUser()); + list.add(sqlHistoryDO); + asyncHelper.insertSqlHistory(list); + } try { stat.cancel(); stat.close(); + countStat.close(); webSocketServer.setStatement(windowName, null); } catch (SQLException e) { log.error("StartSqlImpl operate Exception: ", e); @@ -168,6 +215,13 @@ public class StartSqlImpl implements OperationInterface { }); } + private static long getCount(Statement countStat, String singleSql) throws SQLException { + try (ResultSet countRs = countStat.executeQuery(String.format(COUNT_FROM_SQL, singleSql))) { + countRs.next(); + return countRs.getLong("count"); + } + } + @Override public Object formatJson(String str) { return JSON.parseObject(str, PublicParamQuery.class); diff --git a/plugins/data-studio/src/main/resources/application.yml b/plugins/data-studio/src/main/resources/application.yml index 84a67fc74a484889d2d881f602b90fd862a3c075..f2dd0261c5609116bdd95f71416d3452c5f222db 100644 --- a/plugins/data-studio/src/main/resources/application.yml +++ b/plugins/data-studio/src/main/resources/application.yml @@ -5,7 +5,7 @@ context: spring: datasource: - driver-class-name: org.intarkdb.IntarkdbJDBC + driver-class-name: org.intarkdb.Driver url: 'jdbc:intarkdb:./data/ds' resources: static-locations: classpath:resources diff --git a/plugins/data-studio/src/test/java/com/nctigba/datastudio/service/impl/sql/DbConnectionServiceTest.java b/plugins/data-studio/src/test/java/com/nctigba/datastudio/service/impl/sql/DbConnectionServiceTest.java index e960bb6ec129db5d56502d083960dafa2be3e9be..dd9564a45f59a425a8864ec93fa4f4e3498c30fb 100644 --- a/plugins/data-studio/src/test/java/com/nctigba/datastudio/service/impl/sql/DbConnectionServiceTest.java +++ b/plugins/data-studio/src/test/java/com/nctigba/datastudio/service/impl/sql/DbConnectionServiceTest.java @@ -94,7 +94,7 @@ public class DbConnectionServiceTest { staticUtilsMockedStatic.when(() -> ConnectionUtils.connectGet(anyString(), anyString(), anyString())) .thenReturn(mockConnection); when(metaDataByJdbcService.versionSQL(anyString(), anyString(), anyString(), anyString())).thenReturn("0"); - when(databaseConnectionDAO.getJudgeName(anyString(), anyString())).thenReturn(1); + when(databaseConnectionDAO.getJudgeName(anyString(), anyString())).thenReturn(1L); when(databaseConnectionDAO.getAttributeByName(anyString(), anyString())).thenReturn(new DatabaseConnectionDO()); when(databaseConnectionDAO.getByName(anyString(), anyString())).thenReturn(new DatabaseConnectionUrlDO()); List serviceArrayList = new ArrayList<>(); @@ -122,7 +122,7 @@ public class DbConnectionServiceTest { staticUtilsMockedStatic.when(() -> ConnectionUtils.connectGet(anyString(), anyString(), anyString())) .thenReturn(mockConnection); when(metaDataByJdbcService.versionSQL(anyString(), anyString(), anyString(), anyString())).thenReturn("1"); - when(databaseConnectionDAO.getJudgeName(anyString(), anyString())).thenReturn(0); + when(databaseConnectionDAO.getJudgeName(anyString(), anyString())).thenReturn(0L); when(databaseConnectionDAO.getAttributeByName(anyString(), anyString())).thenReturn(new DatabaseConnectionDO()); List serviceArrayList = new ArrayList<>(); serviceArrayList.add(new GainObjectSQLServiceImpl()); diff --git a/plugins/data-studio/web-ui/.eslintignore b/plugins/data-studio/web-ui/.eslintignore index 5a27c6d7b9fc356f489ad7e8e2d282206d2fec61..7925e10d362be9f6a87204821ce703cc8be3d1f1 100644 --- a/plugins/data-studio/web-ui/.eslintignore +++ b/plugins/data-studio/web-ui/.eslintignore @@ -13,4 +13,5 @@ dist .local /bin Dockerfile -src/assets \ No newline at end of file +src/assets +components.d.ts \ No newline at end of file diff --git a/plugins/data-studio/web-ui/components.d.ts b/plugins/data-studio/web-ui/components.d.ts index c292b35c1812aa8efee9da91b2ccbde8e63cb4f4..4cd7f116b40737951295c33e802d9c28f9b80e62 100644 --- a/plugins/data-studio/web-ui/components.d.ts +++ b/plugins/data-studio/web-ui/components.d.ts @@ -19,5 +19,6 @@ declare module 'vue' { SwitchTheme: typeof import('./src/components/SwitchTheme.vue')['default'] TerminalEditor: typeof import('./src/components/terminal-editor/index.vue')['default'] UContainerLayout: typeof import('./src/components/u-container-layout/index.vue')['default'] + EllipsisWithElTooltip: typeof import('./src/components/EllipsisWithElTooltip/index.vue')['default'] } } diff --git a/plugins/data-studio/web-ui/package-lock.json b/plugins/data-studio/web-ui/package-lock.json index ceb86762b19801145e74707afbc9ed3c0c61b41b..816b973e4af8779d515eb502a1c7d275f8984e73 100644 --- a/plugins/data-studio/web-ui/package-lock.json +++ b/plugins/data-studio/web-ui/package-lock.json @@ -33,15 +33,16 @@ "vxe-table": "^4.5.17" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^6.11.0", - "@typescript-eslint/parser": "^6.11.0", + "@typescript-eslint/eslint-plugin": "^5.58.0", + "@typescript-eslint/parser": "^5.58.0", "@vitejs/plugin-vue": "^4.2.3", - "eslint": "^8.21.0", - "eslint-config-prettier": "^8.5.0", + "eslint": "^8.38.0", + "eslint-config-prettier": "^8.8.0", + "eslint-define-config": "^1.17.0", "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-vue": "^9.3.0", - "prettier": "^3.2.5", - "typescript": "^5.4.5", + "eslint-plugin-vue": "^9.10.0", + "prettier": "^2.8.7", + "typescript": "5.3", "unplugin-auto-import": "^0.17.6", "vite": "^4.4.5", "vite-plugin-compression": "^0.5.1", @@ -49,6 +50,10 @@ "vite-plugin-svg-icons": "^2.0.1", "vite-plugin-vue-setup-extend": "^0.4.0", "vue-tsc": "^2.0.19" + }, + "engines": { + "node": ">=16", + "npm": ">=7" } }, "node_modules/@antfu/utils": { @@ -479,22 +484,33 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", + "version": "2.1.4", + "resolved": "https://registry.npmmirror.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, - "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.2", - "globals": "^13.15.0", + "espree": "^9.6.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmmirror.com/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -515,37 +531,39 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.10.4", - "resolved": "https://registry.npmmirror.com/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", - "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", + "version": "0.13.0", + "resolved": "https://registry.npmmirror.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", "dev": true, - "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.0" } }, - "node_modules/@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", - "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, - "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, "funding": { "type": "github", "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true, - "license": "BSD-3-Clause" + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true }, "node_modules/@intlify/core-base": { "version": "9.4.1", @@ -976,33 +994,32 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.21.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", - "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", + "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", "dev": true, "dependencies": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/type-utils": "6.21.0", - "@typescript-eslint/utils": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/type-utils": "5.62.0", + "@typescript-eslint/utils": "5.62.0", "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" + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1011,26 +1028,25 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.21.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-6.21.0.tgz", - "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-5.62.0.tgz", + "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", "debug": "^4.3.4" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1039,16 +1055,16 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.21.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", - "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0" + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", @@ -1056,25 +1072,25 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.21.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", - "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", + "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/utils": "5.62.0", "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" + "tsutils": "^3.21.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "*" }, "peerDependenciesMeta": { "typescript": { @@ -1083,12 +1099,12 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.21.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.21.0.tgz", - "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", "dev": true, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", @@ -1096,22 +1112,21 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.21.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", - "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" + "semver": "^7.3.7", + "tsutils": "^3.21.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", @@ -1123,72 +1138,55 @@ } } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@typescript-eslint/utils": { - "version": "6.21.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-6.21.0.tgz", - "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", "dev": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "semver": "^7.5.4" + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.21.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", - "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.21.0", - "eslint-visitor-keys": "^3.4.1" + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/@vitejs/plugin-vue": { "version": "4.6.2", "resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-4.6.2.tgz", @@ -1521,7 +1519,6 @@ "resolved": "https://registry.npmmirror.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -1531,7 +1528,6 @@ "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, - "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -1620,7 +1616,6 @@ "resolved": "https://registry.npmmirror.com/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -1799,7 +1794,6 @@ "resolved": "https://registry.npmmirror.com/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -2321,7 +2315,6 @@ "resolved": "https://registry.npmmirror.com/cssesc/-/cssesc-3.0.0.tgz", "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true, - "license": "MIT", "bin": { "cssesc": "bin/cssesc" }, @@ -2390,8 +2383,7 @@ "version": "0.1.4", "resolved": "https://registry.npmmirror.com/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/deepmerge": { "version": "1.3.2", @@ -2428,7 +2420,6 @@ "resolved": "https://registry.npmmirror.com/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, - "license": "MIT", "dependencies": { "path-type": "^4.0.0" }, @@ -2643,51 +2634,49 @@ } }, "node_modules/eslint": { - "version": "8.21.0", - "resolved": "https://registry.npmmirror.com/eslint/-/eslint-8.21.0.tgz", - "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.10.4", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", - "ajv": "^6.10.0", + "version": "8.57.1", + "resolved": "https://registry.npmmirror.com/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.3", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.15.0", - "globby": "^11.1.0", - "grapheme-splitter": "^1.0.4", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" @@ -2700,11 +2689,10 @@ } }, "node_modules/eslint-config-prettier": { - "version": "8.5.0", - "resolved": "https://registry.npmmirror.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", - "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", + "version": "8.10.0", + "resolved": "https://registry.npmmirror.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", + "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", "dev": true, - "license": "MIT", "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -2712,6 +2700,27 @@ "eslint": ">=7.0.0" } }, + "node_modules/eslint-define-config": { + "version": "1.23.0", + "resolved": "https://registry.npmmirror.com/eslint-define-config/-/eslint-define-config-1.23.0.tgz", + "integrity": "sha512-4mMyu0JuBkQHsCtR+42irIQdFLmLIW+pMAVcyOV/gZRL4O1R8iuH0eMG3oL3Cbi1eo9fDAfT5CIHVHgdyxcf6w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/Shinigami92" + }, + { + "type": "paypal", + "url": "https://www.paypal.com/donate/?hosted_button_id=L7GY729FBKTZY" + } + ], + "engines": { + "node": "^16.13.0 || >=18.0.0", + "npm": ">=7.0.0", + "pnpm": ">= 8.6.0" + } + }, "node_modules/eslint-plugin-prettier": { "version": "4.2.1", "resolved": "https://registry.npmmirror.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", @@ -2735,54 +2744,38 @@ } }, "node_modules/eslint-plugin-vue": { - "version": "9.3.0", - "resolved": "https://registry.npmmirror.com/eslint-plugin-vue/-/eslint-plugin-vue-9.3.0.tgz", - "integrity": "sha512-iscKKkBZgm6fGZwFt6poRoWC0Wy2dQOlwUPW++CiPoQiw1enctV2Hj5DBzzjJZfyqs+FAXhgzL4q0Ww03AgSmQ==", + "version": "9.28.0", + "resolved": "https://registry.npmmirror.com/eslint-plugin-vue/-/eslint-plugin-vue-9.28.0.tgz", + "integrity": "sha512-ShrihdjIhOTxs+MfWun6oJWuk+g/LAhN+CiuOl/jjkG3l0F2AuK5NMTaWqyvBgkFtpYmyks6P4603mLmhNJW8g==", "dev": true, - "license": "MIT", "dependencies": { - "eslint-utils": "^3.0.0", + "@eslint-community/eslint-utils": "^4.4.0", + "globals": "^13.24.0", "natural-compare": "^1.4.0", - "nth-check": "^2.0.1", - "postcss-selector-parser": "^6.0.9", - "semver": "^7.3.5", - "vue-eslint-parser": "^9.0.1", + "nth-check": "^2.1.1", + "postcss-selector-parser": "^6.0.15", + "semver": "^7.6.3", + "vue-eslint-parser": "^9.4.3", "xml-name-validator": "^4.0.0" }, "engines": { "node": "^14.17.0 || >=16.0.0" }, "peerDependencies": { - "eslint": "^6.2.0 || ^7.0.0 || ^8.0.0" + "eslint": "^6.2.0 || ^7.0.0 || ^8.0.0 || ^9.0.0" } }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, - "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "license": "Apache-2.0", "engines": { - "node": ">=10" + "node": ">=8.0.0" } }, "node_modules/eslint-visitor-keys": { @@ -2798,17 +2791,19 @@ } }, "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "version": "7.2.2", + "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/estraverse": { @@ -2816,21 +2811,19 @@ "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/espree": { - "version": "9.3.3", - "resolved": "https://registry.npmmirror.com/espree/-/espree-9.3.3.tgz", - "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", + "version": "9.6.1", + "resolved": "https://registry.npmmirror.com/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.8.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2840,11 +2833,10 @@ } }, "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmmirror.com/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.6.0", + "resolved": "https://registry.npmmirror.com/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -2857,7 +2849,6 @@ "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -2867,7 +2858,6 @@ "resolved": "https://registry.npmmirror.com/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -2880,7 +2870,15 @@ "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, "engines": { "node": ">=4.0" } @@ -3053,8 +3051,7 @@ "version": "3.1.3", "resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/fast-diff": { "version": "1.2.0", @@ -3096,15 +3093,13 @@ "version": "2.1.0", "resolved": "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmmirror.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/fastq": { "version": "1.13.0", @@ -3269,13 +3264,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true, - "license": "MIT" - }, "node_modules/get-value": { "version": "2.0.6", "resolved": "https://registry.npmmirror.com/get-value/-/get-value-2.0.6.tgz", @@ -3320,11 +3308,10 @@ } }, "node_modules/globals": { - "version": "13.17.0", - "resolved": "https://registry.npmmirror.com/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.24.0", + "resolved": "https://registry.npmmirror.com/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, - "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -3340,7 +3327,6 @@ "resolved": "https://registry.npmmirror.com/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, - "license": "MIT", "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -3363,13 +3349,6 @@ "dev": true, "license": "ISC" }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmmirror.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true, - "license": "MIT" - }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmmirror.com/graphemer/-/graphemer-1.4.0.tgz", @@ -3558,7 +3537,6 @@ "resolved": "https://registry.npmmirror.com/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, - "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -3719,6 +3697,15 @@ "node": ">=0.12.0" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmmirror.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz", @@ -3800,7 +3787,6 @@ "resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -3812,8 +3798,7 @@ "version": "0.4.1", "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -3861,7 +3846,6 @@ "resolved": "https://registry.npmmirror.com/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, - "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -3981,19 +3965,6 @@ "dev": true, "license": "0BSD" }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/magic-string": { "version": "0.30.10", "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.10.tgz", @@ -4276,6 +4247,12 @@ "dev": true, "license": "MIT" }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, "node_modules/nearley": { "version": "2.20.1", "resolved": "https://registry.npmmirror.com/nearley/-/nearley-2.20.1.tgz", @@ -4497,18 +4474,17 @@ } }, "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmmirror.com/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.4", + "resolved": "https://registry.npmmirror.com/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, - "license": "MIT", "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -4569,7 +4545,6 @@ "resolved": "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, - "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -4669,7 +4644,6 @@ "resolved": "https://registry.npmmirror.com/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -4801,11 +4775,10 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.0.10", - "resolved": "https://registry.npmmirror.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", - "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", + "version": "6.1.2", + "resolved": "https://registry.npmmirror.com/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "dev": true, - "license": "MIT", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -4966,21 +4939,20 @@ "resolved": "https://registry.npmmirror.com/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/prettier": { - "version": "3.3.0", - "resolved": "https://registry.npmmirror.com/prettier/-/prettier-3.3.0.tgz", - "integrity": "sha512-J9odKxERhCQ10OC2yb93583f6UnYutOeiV5i0zEDS7UGTdUt0u+y8erxl3lBKvwo/JHyyoEdXjwp4dke9oyZ/g==", + "version": "2.8.8", + "resolved": "https://registry.npmmirror.com/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, "bin": { - "prettier": "bin/prettier.cjs" + "prettier": "bin-prettier.js" }, "engines": { - "node": ">=14" + "node": ">=10.13.0" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -5000,11 +4972,10 @@ } }, "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -5126,19 +5097,6 @@ "node": ">=0.10.0" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmmirror.com/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/repeat-element": { "version": "1.1.4", "resolved": "https://registry.npmmirror.com/repeat-element/-/repeat-element-1.1.4.tgz", @@ -5162,7 +5120,6 @@ "resolved": "https://registry.npmmirror.com/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } @@ -5323,14 +5280,10 @@ "dev": true }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmmirror.com/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.3", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -5400,7 +5353,6 @@ "resolved": "https://registry.npmmirror.com/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -5810,7 +5762,6 @@ "resolved": "https://registry.npmmirror.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -6149,16 +6100,25 @@ "integrity": "sha512-kdf4JKs8lbARxWdp7RKdNzoJBhGUcIalSYibuGyHJbmk40pOysQ0+QPvlkCOICOivDWU2IJo2rkrxyTK2AH4fw==", "license": "MIT" }, - "node_modules/ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmmirror.com/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, "engines": { - "node": ">=16" + "node": ">= 6" }, "peerDependencies": { - "typescript": ">=4.2.0" + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, "node_modules/type-check": { @@ -6166,7 +6126,6 @@ "resolved": "https://registry.npmmirror.com/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, - "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -6179,7 +6138,6 @@ "resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -6188,9 +6146,9 @@ } }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.3.3", + "resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "devOptional": true, "bin": { "tsc": "bin/tsc", @@ -6456,7 +6414,6 @@ "resolved": "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } @@ -6491,13 +6448,6 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "license": "MIT" }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true, - "license": "MIT" - }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz", @@ -6744,11 +6694,10 @@ } }, "node_modules/vue-eslint-parser": { - "version": "9.0.3", - "resolved": "https://registry.npmmirror.com/vue-eslint-parser/-/vue-eslint-parser-9.0.3.tgz", - "integrity": "sha512-yL+ZDb+9T0ELG4VIFo/2anAOz8SvBdlqEnQnvJ3M7Scq56DvtjY0VY88bByRZB0D4J0u8olBcfrXTVONXsh4og==", + "version": "9.4.3", + "resolved": "https://registry.npmmirror.com/vue-eslint-parser/-/vue-eslint-parser-9.4.3.tgz", + "integrity": "sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==", "dev": true, - "license": "MIT", "dependencies": { "debug": "^4.3.4", "eslint-scope": "^7.1.1", @@ -6769,17 +6718,19 @@ } }, "node_modules/vue-eslint-parser/node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "version": "7.2.2", + "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/vue-eslint-parser/node_modules/estraverse": { @@ -6787,7 +6738,6 @@ "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -6898,11 +6848,10 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmmirror.com/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmmirror.com/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -6929,13 +6878,6 @@ "node": ">=12" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true, - "license": "ISC" - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -7156,15 +7098,15 @@ "dev": true }, "@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", + "version": "2.1.4", + "resolved": "https://registry.npmmirror.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.2", - "globals": "^13.15.0", + "espree": "^9.6.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -7172,6 +7114,12 @@ "strip-json-comments": "^3.1.1" } }, + "@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmmirror.com/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true + }, "@floating-ui/core": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.0.1.tgz", @@ -7186,26 +7134,26 @@ } }, "@humanwhocodes/config-array": { - "version": "0.10.4", - "resolved": "https://registry.npmmirror.com/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", - "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", + "version": "0.13.0", + "resolved": "https://registry.npmmirror.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" } }, - "@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", - "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true }, "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "dev": true }, "@intlify/core-base": { @@ -7480,126 +7428,110 @@ "integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==" }, "@typescript-eslint/eslint-plugin": { - "version": "6.21.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", - "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", + "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", "dev": true, "requires": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/type-utils": "6.21.0", - "@typescript-eslint/utils": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/type-utils": "5.62.0", + "@typescript-eslint/utils": "5.62.0", "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" + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" } }, "@typescript-eslint/parser": { - "version": "6.21.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-6.21.0.tgz", - "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-5.62.0.tgz", + "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "6.21.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", - "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", "dev": true, "requires": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0" + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" } }, "@typescript-eslint/type-utils": { - "version": "6.21.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", - "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", + "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/utils": "5.62.0", "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" + "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "6.21.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.21.0.tgz", - "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "6.21.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", - "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", "dev": true, "requires": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - } + "semver": "^7.3.7", + "tsutils": "^3.21.0" } }, "@typescript-eslint/utils": { - "version": "6.21.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-6.21.0.tgz", - "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", "dev": true, "requires": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "semver": "^7.5.4" + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" } }, "@typescript-eslint/visitor-keys": { - "version": "6.21.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", - "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", "dev": true, "requires": { - "@typescript-eslint/types": "6.21.0", - "eslint-visitor-keys": "^3.4.1" + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" } }, + "@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "@vitejs/plugin-vue": { "version": "4.6.2", "resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-4.6.2.tgz", @@ -8658,56 +8590,55 @@ "dev": true }, "eslint": { - "version": "8.21.0", - "resolved": "https://registry.npmmirror.com/eslint/-/eslint-8.21.0.tgz", - "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==", - "dev": true, - "requires": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.10.4", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", - "ajv": "^6.10.0", + "version": "8.57.1", + "resolved": "https://registry.npmmirror.com/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.3", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.15.0", - "globby": "^11.1.0", - "grapheme-splitter": "^1.0.4", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "dependencies": { "eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "version": "7.2.2", + "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -8723,12 +8654,18 @@ } }, "eslint-config-prettier": { - "version": "8.5.0", - "resolved": "https://registry.npmmirror.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", - "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", + "version": "8.10.0", + "resolved": "https://registry.npmmirror.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", + "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", "dev": true, "requires": {} }, + "eslint-define-config": { + "version": "1.23.0", + "resolved": "https://registry.npmmirror.com/eslint-define-config/-/eslint-define-config-1.23.0.tgz", + "integrity": "sha512-4mMyu0JuBkQHsCtR+42irIQdFLmLIW+pMAVcyOV/gZRL4O1R8iuH0eMG3oL3Cbi1eo9fDAfT5CIHVHgdyxcf6w==", + "dev": true + }, "eslint-plugin-prettier": { "version": "4.2.1", "resolved": "https://registry.npmmirror.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", @@ -8739,35 +8676,29 @@ } }, "eslint-plugin-vue": { - "version": "9.3.0", - "resolved": "https://registry.npmmirror.com/eslint-plugin-vue/-/eslint-plugin-vue-9.3.0.tgz", - "integrity": "sha512-iscKKkBZgm6fGZwFt6poRoWC0Wy2dQOlwUPW++CiPoQiw1enctV2Hj5DBzzjJZfyqs+FAXhgzL4q0Ww03AgSmQ==", + "version": "9.28.0", + "resolved": "https://registry.npmmirror.com/eslint-plugin-vue/-/eslint-plugin-vue-9.28.0.tgz", + "integrity": "sha512-ShrihdjIhOTxs+MfWun6oJWuk+g/LAhN+CiuOl/jjkG3l0F2AuK5NMTaWqyvBgkFtpYmyks6P4603mLmhNJW8g==", "dev": true, "requires": { - "eslint-utils": "^3.0.0", + "@eslint-community/eslint-utils": "^4.4.0", + "globals": "^13.24.0", "natural-compare": "^1.4.0", - "nth-check": "^2.0.1", - "postcss-selector-parser": "^6.0.9", - "semver": "^7.3.5", - "vue-eslint-parser": "^9.0.1", + "nth-check": "^2.1.1", + "postcss-selector-parser": "^6.0.15", + "semver": "^7.6.3", + "vue-eslint-parser": "^9.4.3", "xml-name-validator": "^4.0.0" } }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - } + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" } }, "eslint-visitor-keys": { @@ -8777,20 +8708,20 @@ "dev": true }, "espree": { - "version": "9.3.3", - "resolved": "https://registry.npmmirror.com/espree/-/espree-9.3.3.tgz", - "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", + "version": "9.6.1", + "resolved": "https://registry.npmmirror.com/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "requires": { - "acorn": "^8.8.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.1" } }, "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmmirror.com/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.6.0", + "resolved": "https://registry.npmmirror.com/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "requires": { "estraverse": "^5.1.0" @@ -8821,6 +8752,12 @@ } } }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, "estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz", @@ -9095,12 +9032,6 @@ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "optional": true }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmmirror.com/get-value/-/get-value-2.0.6.tgz", @@ -9130,9 +9061,9 @@ } }, "globals": { - "version": "13.17.0", - "resolved": "https://registry.npmmirror.com/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.24.0", + "resolved": "https://registry.npmmirror.com/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -9158,12 +9089,6 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, - "grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmmirror.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true - }, "graphemer": { "version": "1.4.0", "resolved": "https://registry.npmmirror.com/graphemer/-/graphemer-1.4.0.tgz", @@ -9416,6 +9341,12 @@ "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + }, "is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmmirror.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz", @@ -9609,15 +9540,6 @@ } } }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, "magic-string": { "version": "0.30.10", "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.10.tgz", @@ -9821,6 +9743,12 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, "nearley": { "version": "2.20.1", "resolved": "https://registry.npmmirror.com/nearley/-/nearley-2.20.1.tgz", @@ -9980,9 +9908,9 @@ } }, "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmmirror.com/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.4", + "resolved": "https://registry.npmmirror.com/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "requires": { "deep-is": "^0.1.3", @@ -9990,7 +9918,7 @@ "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "word-wrap": "^1.2.5" } }, "p-limit": { @@ -10243,9 +10171,9 @@ "requires": {} }, "postcss-selector-parser": { - "version": "6.0.10", - "resolved": "https://registry.npmmirror.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", - "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", + "version": "6.1.2", + "resolved": "https://registry.npmmirror.com/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "dev": true, "requires": { "cssesc": "^3.0.0", @@ -10308,9 +10236,9 @@ "dev": true }, "prettier": { - "version": "3.3.0", - "resolved": "https://registry.npmmirror.com/prettier/-/prettier-3.3.0.tgz", - "integrity": "sha512-J9odKxERhCQ10OC2yb93583f6UnYutOeiV5i0zEDS7UGTdUt0u+y8erxl3lBKvwo/JHyyoEdXjwp4dke9oyZ/g==", + "version": "2.8.8", + "resolved": "https://registry.npmmirror.com/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true }, "prettier-linter-helpers": { @@ -10323,9 +10251,9 @@ } }, "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true }, "query-string": { @@ -10403,12 +10331,6 @@ } } }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmmirror.com/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, "repeat-element": { "version": "1.1.4", "resolved": "https://registry.npmmirror.com/repeat-element/-/repeat-element-1.1.4.tgz", @@ -10517,13 +10439,10 @@ "dev": true }, "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmmirror.com/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } + "version": "7.6.3", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true }, "sentence-case": { "version": "3.0.4", @@ -11142,12 +11061,20 @@ "resolved": "https://registry.npmmirror.com/traverse/-/traverse-0.6.6.tgz", "integrity": "sha512-kdf4JKs8lbARxWdp7RKdNzoJBhGUcIalSYibuGyHJbmk40pOysQ0+QPvlkCOICOivDWU2IJo2rkrxyTK2AH4fw==" }, - "ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmmirror.com/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, - "requires": {} + "requires": { + "tslib": "^1.8.1" + } }, "type-check": { "version": "0.4.0", @@ -11165,9 +11092,9 @@ "dev": true }, "typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.3.3", + "resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "devOptional": true }, "ufo": { @@ -11397,12 +11324,6 @@ "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz", @@ -11554,9 +11475,9 @@ } }, "vue-eslint-parser": { - "version": "9.0.3", - "resolved": "https://registry.npmmirror.com/vue-eslint-parser/-/vue-eslint-parser-9.0.3.tgz", - "integrity": "sha512-yL+ZDb+9T0ELG4VIFo/2anAOz8SvBdlqEnQnvJ3M7Scq56DvtjY0VY88bByRZB0D4J0u8olBcfrXTVONXsh4og==", + "version": "9.4.3", + "resolved": "https://registry.npmmirror.com/vue-eslint-parser/-/vue-eslint-parser-9.4.3.tgz", + "integrity": "sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==", "dev": true, "requires": { "debug": "^4.3.4", @@ -11569,9 +11490,9 @@ }, "dependencies": { "eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "version": "7.2.2", + "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -11656,9 +11577,9 @@ } }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmmirror.com/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmmirror.com/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true }, "wrappy": { @@ -11678,12 +11599,6 @@ "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", "dev": true }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/plugins/data-studio/web-ui/package.json b/plugins/data-studio/web-ui/package.json index 46406e40ae9166eadd96680166a0c004056ba76c..562c1d128efe1bd633e2e4e153de336c725acb96 100644 --- a/plugins/data-studio/web-ui/package.json +++ b/plugins/data-studio/web-ui/package.json @@ -40,15 +40,16 @@ "vxe-table": "^4.5.17" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^6.11.0", - "@typescript-eslint/parser": "^6.11.0", + "@typescript-eslint/eslint-plugin": "^5.58.0", + "@typescript-eslint/parser": "^5.58.0", "@vitejs/plugin-vue": "^4.2.3", - "eslint": "^8.21.0", - "eslint-config-prettier": "^8.5.0", + "eslint": "^8.38.0", + "eslint-config-prettier": "^8.8.0", + "eslint-define-config": "^1.17.0", "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-vue": "^9.3.0", - "prettier": "^3.2.5", - "typescript": "^5.4.5", + "eslint-plugin-vue": "^9.10.0", + "prettier": "^2.8.7", + "typescript": "5.3", "unplugin-auto-import": "^0.17.6", "vite": "^4.4.5", "vite-plugin-compression": "^0.5.1", diff --git a/plugins/data-studio/web-ui/src/api/privilege.ts b/plugins/data-studio/web-ui/src/api/privilege.ts new file mode 100644 index 0000000000000000000000000000000000000000..4d10c93b3202ad3c154561d79df1b27b989e53b6 --- /dev/null +++ b/plugins/data-studio/web-ui/src/api/privilege.ts @@ -0,0 +1,25 @@ +import request from './request'; + +export function getPrivilegeSqlApi(data) { + return request({ + url: '/dataStudio/web/v1/privilege/sql', + method: 'post', + data, + }); +} + +export function setPrivilegeApi(data) { + return request({ + url: '/dataStudio/web/v1/privilege/set', + method: 'post', + data, + }); +} + +export function getPrivilegehistoryApi(data) { + return request({ + url: '/dataStudio/web/v1/privilege/history', + method: 'get', + params: data, + }); +} diff --git a/plugins/data-studio/web-ui/src/api/requestBlob.ts b/plugins/data-studio/web-ui/src/api/requestBlob.ts index ca374d4cda303b0e6adab093b1d3495585023ac2..a1cb18d6916592591f7fd09440e6a1888742bdac 100644 --- a/plugins/data-studio/web-ui/src/api/requestBlob.ts +++ b/plugins/data-studio/web-ui/src/api/requestBlob.ts @@ -36,11 +36,7 @@ service.interceptors.request.use( service.interceptors.response.use( (response: AxiosResponse) => { if (response.data?.code == 500) { - ElMessage({ - message: response.data.msg, - type: 'error', - duration: 5000, - }); + showErrMessage(response.data.msg); return Promise.reject(response.data.msg); } return { diff --git a/plugins/data-studio/web-ui/src/api/terminal.ts b/plugins/data-studio/web-ui/src/api/terminal.ts new file mode 100644 index 0000000000000000000000000000000000000000..b2f0e4d357d05b682796b2b5976c57c783a7ff0b --- /dev/null +++ b/plugins/data-studio/web-ui/src/api/terminal.ts @@ -0,0 +1,11 @@ +import requestBlob from './requestBlob'; + +// export the data of terminal result +export function exportResultApi(data) { + return requestBlob({ + url: `/dataStudio/web/v1/export/result`, + method: 'post', + responseType: 'blob', + data, + }); +} diff --git a/plugins/data-studio/web-ui/src/assets/iconfont/demo_index.html b/plugins/data-studio/web-ui/src/assets/iconfont/demo_index.html index d0f100de79f78084146b99936c1cf95232308af8..387b512a4ce9ececde4b64ff03c05ef56bb5d1d8 100644 --- a/plugins/data-studio/web-ui/src/assets/iconfont/demo_index.html +++ b/plugins/data-studio/web-ui/src/assets/iconfont/demo_index.html @@ -50,6 +50,54 @@
    +
  • + +
    snippets
    +
    &#xe753;
    +
  • + +
  • + +
    edit
    +
    &#xe684;
    +
  • + +
  • + +
    snippets-red
    +
    &#xec7e;
    +
  • + +
  • + +
    云文件
    +
    &#xe61d;
    +
  • + +
  • + +
    transfer
    +
    &#xe61c;
    +
  • + +
  • + +
    migration
    +
    &#xe632;
    +
  • + +
  • + +
    key
    +
    &#xe61a;
    +
  • + +
  • + +
    backfill
    +
    &#xec7d;
    +
  • +
  • refresh
    @@ -376,7 +424,7 @@
  • -
    导出
    +
    daochu
    &#xe611;
  • @@ -572,9 +620,9 @@
    @font-face {
       font-family: 'iconfont';
    -  src: url('iconfont.woff2?t=1700118963984') format('woff2'),
    -       url('iconfont.woff?t=1700118963984') format('woff'),
    -       url('iconfont.ttf?t=1700118963984') format('truetype');
    +  src: url('iconfont.woff2?t=1729755558972') format('woff2'),
    +       url('iconfont.woff?t=1729755558972') format('woff'),
    +       url('iconfont.ttf?t=1729755558972') format('truetype');
     }
     

    第二步:定义使用 iconfont 的样式

    @@ -597,6 +645,78 @@
      +
    • + +
      + snippets +
      +
      .icon-snippets +
      +
    • + +
    • + +
      + edit +
      +
      .icon-edit +
      +
    • + +
    • + +
      + snippets-red +
      +
      .icon-snippets-copy +
      +
    • + +
    • + +
      + 云文件 +
      +
      .icon-yunwenjian +
      +
    • + +
    • + +
      + transfer +
      +
      .icon-weibiaoti8 +
      +
    • + +
    • + +
      + migration +
      +
      .icon-migration +
      +
    • + +
    • + +
      + key +
      +
      .icon-key1 +
      +
    • + +
    • + +
      + backfill +
      +
      .icon-backfill +
      +
    • +
    • @@ -1086,7 +1206,7 @@
    • - 导出 + daochu
      .icon-daochu
      @@ -1368,6 +1488,70 @@
        +
      • + +
        snippets
        +
        #icon-snippets
        +
      • + +
      • + +
        edit
        +
        #icon-edit
        +
      • + +
      • + +
        snippets-red
        +
        #icon-snippets-copy
        +
      • + +
      • + +
        云文件
        +
        #icon-yunwenjian
        +
      • + +
      • + +
        transfer
        +
        #icon-weibiaoti8
        +
      • + +
      • + +
        migration
        +
        #icon-migration
        +
      • + +
      • + +
        key
        +
        #icon-key1
        +
      • + +
      • + +
        backfill
        +
        #icon-backfill
        +
      • +
      • 导出
        +
        daochu
        #icon-daochu
      • @@ -2047,7 +2231,7 @@

        Step 1: Import the symbol code generated under the project:

        <script src="./iconfont.js"></script>
         
        -

        Step 2: Add general CSS code (just import it once):

        +

        第二步:加入通用 CSS 代码(引入一次就行):

        <style>
         .icon {
           width: 1em;
        diff --git a/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.css b/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.css
        index 13906ffc1f021869e20bc1f3aa6fe8d43df559ca..48804bd31a93311cd90e36180cd27807ca0a63fc 100644
        --- a/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.css
        +++ b/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.css
        @@ -1,8 +1,8 @@
         @font-face {
           font-family: "iconfont"; /* Project id 3692346 */
        -  src: url('iconfont.woff2?t=1700118963984') format('woff2'),
        -       url('iconfont.woff?t=1700118963984') format('woff'),
        -       url('iconfont.ttf?t=1700118963984') format('truetype');
        +  src: url('iconfont.woff2?t=1729755558972') format('woff2'),
        +       url('iconfont.woff?t=1729755558972') format('woff'),
        +       url('iconfont.ttf?t=1729755558972') format('truetype');
         }
         
         .iconfont {
        @@ -13,6 +13,38 @@
           -moz-osx-font-smoothing: grayscale;
         }
         
        +.icon-snippets:before {
        +  content: "\e753";
        +}
        +
        +.icon-edit:before {
        +  content: "\e684";
        +}
        +
        +.icon-snippets-copy:before {
        +  content: "\ec7e";
        +}
        +
        +.icon-yunwenjian:before {
        +  content: "\e61d";
        +}
        +
        +.icon-weibiaoti8:before {
        +  content: "\e61c";
        +}
        +
        +.icon-migration:before {
        +  content: "\e632";
        +}
        +
        +.icon-key1:before {
        +  content: "\e61a";
        +}
        +
        +.icon-backfill:before {
        +  content: "\ec7d";
        +}
        +
         .icon-refresh:before {
           content: "\e74f";
         }
        diff --git a/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.js b/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.js
        index 59105f20eab0b89af192fb11435f20ebd0ced71b..9e98a2890796d6c31ad5e915d4700791f6e799b3 100644
        --- a/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.js
        +++ b/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.js
        @@ -1 +1 @@
        -window.myIconfont='',function(a){var l=(l=document.getElementsByTagName("script"))[l.length-1],c=l.getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var h,i,t,o,v,s=function(l,c){c.parentNode.insertBefore(l,c)};if(c&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(l){console&&console.log(l)}}h=function(){var l,c=document.createElement("div");c.innerHTML=a.myIconfont,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(l=document.body).firstChild?s(c,l.firstChild):l.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),h()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(t=h,o=a.document,v=!1,m(),o.onreadystatechange=function(){"complete"==o.readyState&&(o.onreadystatechange=null,d())})}function d(){v||(v=!0,t())}function m(){try{o.documentElement.doScroll("left")}catch(l){return void setTimeout(m,50)}d()}}(window);
        \ No newline at end of file
        +window._iconfont_svg_string_3692346='',(a=>{var c=(l=(l=document.getElementsByTagName("script"))[l.length-1]).getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var h,i,o,t,v,s=function(c,l){l.parentNode.insertBefore(c,l)};if(c&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}h=function(){var c,l=document.createElement("div");l.innerHTML=a._iconfont_svg_string_3692346,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(c=document.body).firstChild?s(l,c.firstChild):c.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),h()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=h,t=a.document,v=!1,z(),t.onreadystatechange=function(){"complete"==t.readyState&&(t.onreadystatechange=null,d())})}function d(){v||(v=!0,o())}function z(){try{t.documentElement.doScroll("left")}catch(c){return void setTimeout(z,50)}d()}})(window);
        \ No newline at end of file
        diff --git a/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.json b/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.json
        index b2f1935713a40d85d83e371a28e0bf67e02f99b2..2e769c528fa3328d8520dd635632063579117a77 100644
        --- a/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.json
        +++ b/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.json
        @@ -5,6 +5,62 @@
           "css_prefix_text": "icon-",
           "description": "",
           "glyphs": [
        +    {
        +      "icon_id": "7239899",
        +      "name": "snippets",
        +      "font_class": "snippets",
        +      "unicode": "e753",
        +      "unicode_decimal": 59219
        +    },
        +    {
        +      "icon_id": "11741015",
        +      "name": "edit",
        +      "font_class": "edit",
        +      "unicode": "e684",
        +      "unicode_decimal": 59012
        +    },
        +    {
        +      "icon_id": "42064272",
        +      "name": "snippets-red",
        +      "font_class": "snippets-copy",
        +      "unicode": "ec7e",
        +      "unicode_decimal": 60542
        +    },
        +    {
        +      "icon_id": "8477242",
        +      "name": "云文件",
        +      "font_class": "yunwenjian",
        +      "unicode": "e61d",
        +      "unicode_decimal": 58909
        +    },
        +    {
        +      "icon_id": "593480",
        +      "name": "transfer",
        +      "font_class": "weibiaoti8",
        +      "unicode": "e61c",
        +      "unicode_decimal": 58908
        +    },
        +    {
        +      "icon_id": "15801331",
        +      "name": "migration",
        +      "font_class": "migration",
        +      "unicode": "e632",
        +      "unicode_decimal": 58930
        +    },
        +    {
        +      "icon_id": "38749495",
        +      "name": "key",
        +      "font_class": "key1",
        +      "unicode": "e61a",
        +      "unicode_decimal": 58906
        +    },
        +    {
        +      "icon_id": "40261532",
        +      "name": "backfill",
        +      "font_class": "backfill",
        +      "unicode": "ec7d",
        +      "unicode_decimal": 60541
        +    },
             {
               "icon_id": "928115",
               "name": "refresh",
        @@ -385,7 +441,7 @@
             },
             {
               "icon_id": "4736293",
        -      "name": "导出",
        +      "name": "daochu",
               "font_class": "daochu",
               "unicode": "e611",
               "unicode_decimal": 58897
        diff --git a/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.ttf b/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.ttf
        index fabf82c11b56066512d0e78ecd1178963b7889d1..682acd265f6b675483431ad9244a0447bb1127b3 100644
        Binary files a/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.ttf and b/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.ttf differ
        diff --git a/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.woff b/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.woff
        index f1cc930435bab288298430061b4137382f214a3c..226d2ab812f410bdcdc74826eeddef5f3d165b39 100644
        Binary files a/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.woff and b/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.woff differ
        diff --git a/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.woff2 b/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.woff2
        index a883a061b459dddc1bd5722a65ac9e89f769ef4a..e46407f3b74fc81eb82eee5969d7dd893ceaad39 100644
        Binary files a/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.woff2 and b/plugins/data-studio/web-ui/src/assets/iconfont/iconfont.woff2 differ
        diff --git a/plugins/data-studio/web-ui/src/components/EllipsisWithEltooltip/index.vue b/plugins/data-studio/web-ui/src/components/EllipsisWithEltooltip/index.vue
        new file mode 100644
        index 0000000000000000000000000000000000000000..0a725023e0c44233aa4a537a8c4e69ee78dfb827
        --- /dev/null
        +++ b/plugins/data-studio/web-ui/src/components/EllipsisWithEltooltip/index.vue
        @@ -0,0 +1,86 @@
        +
        +
        +
        diff --git a/plugins/data-studio/web-ui/src/components/ExportSimpleTableDataDialog.vue b/plugins/data-studio/web-ui/src/components/ExportSimpleTableDataDialog.vue
        new file mode 100644
        index 0000000000000000000000000000000000000000..23744af1e13558ad2e4d06f5dfaec75f5346eb55
        --- /dev/null
        +++ b/plugins/data-studio/web-ui/src/components/ExportSimpleTableDataDialog.vue
        @@ -0,0 +1,81 @@
        +
        +
        +
        diff --git a/plugins/data-studio/web-ui/src/components/terminal-editor/FunctionBar.vue b/plugins/data-studio/web-ui/src/components/terminal-editor/FunctionBar.vue
        index fb229868a556363676a350ff9adad1472ffe097f..d2740a8ca3dc023be06a7e9f1a0ad37182d97387 100644
        --- a/plugins/data-studio/web-ui/src/components/terminal-editor/FunctionBar.vue
        +++ b/plugins/data-studio/web-ui/src/components/terminal-editor/FunctionBar.vue
        @@ -22,14 +22,16 @@
                 
    - +
    + +
@@ -73,8 +75,10 @@ (e: 'coverageRate'): void; (e: 'importFile', value: string): void; (e: 'exportFile'): void; + (e: 'showHistory'): void; }>(); + const platform = inject>('platform'); const uploadInput = ref(null); const handleCompile = () => { diff --git a/plugins/data-studio/web-ui/src/components/terminal-editor/HistoryTable.vue b/plugins/data-studio/web-ui/src/components/terminal-editor/HistoryTable.vue index 9df377ac8dea198484b196949b89157712e6eb76..8d8995aab5e1d82f7701817134dd0e1d00d7c691 100644 --- a/plugins/data-studio/web-ui/src/components/terminal-editor/HistoryTable.vue +++ b/plugins/data-studio/web-ui/src/components/terminal-editor/HistoryTable.vue @@ -1,5 +1,5 @@ - + diff --git a/plugins/data-studio/web-ui/src/views/privilege/components/ShowSqlDetailDialog.vue b/plugins/data-studio/web-ui/src/views/privilege/components/ShowSqlDetailDialog.vue new file mode 100644 index 0000000000000000000000000000000000000000..f67dadbcd308673875c6acdcce14a017a647e3c1 --- /dev/null +++ b/plugins/data-studio/web-ui/src/views/privilege/components/ShowSqlDetailDialog.vue @@ -0,0 +1,82 @@ + + diff --git a/plugins/data-studio/web-ui/src/views/privilege/components/Tab1.vue b/plugins/data-studio/web-ui/src/views/privilege/components/Tab1.vue new file mode 100644 index 0000000000000000000000000000000000000000..c0379da01293cccc9e7a780b0fe0680f017425e2 --- /dev/null +++ b/plugins/data-studio/web-ui/src/views/privilege/components/Tab1.vue @@ -0,0 +1,503 @@ + + + + diff --git a/plugins/data-studio/web-ui/src/views/privilege/components/Tab2.vue b/plugins/data-studio/web-ui/src/views/privilege/components/Tab2.vue new file mode 100644 index 0000000000000000000000000000000000000000..db31b0bdb74384fdb180e367ed174828aba30ea5 --- /dev/null +++ b/plugins/data-studio/web-ui/src/views/privilege/components/Tab2.vue @@ -0,0 +1,275 @@ + + + + diff --git a/plugins/data-studio/web-ui/src/views/privilege/components/Toolbar.vue b/plugins/data-studio/web-ui/src/views/privilege/components/Toolbar.vue new file mode 100644 index 0000000000000000000000000000000000000000..4923c70cf9945478d77f47fd2cad821e6f5cf1db --- /dev/null +++ b/plugins/data-studio/web-ui/src/views/privilege/components/Toolbar.vue @@ -0,0 +1,221 @@ + + + + + diff --git a/plugins/data-studio/web-ui/src/views/privilege/index.vue b/plugins/data-studio/web-ui/src/views/privilege/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..fb3e44029b220b83043593f50f1f19f2f5fb842d --- /dev/null +++ b/plugins/data-studio/web-ui/src/views/privilege/index.vue @@ -0,0 +1,154 @@ + + + diff --git a/plugins/data-studio/web-ui/src/views/privilege/types.ts b/plugins/data-studio/web-ui/src/views/privilege/types.ts new file mode 100644 index 0000000000000000000000000000000000000000..4d071f1bec14ea64b5f1f39fecc1b758fa35762f --- /dev/null +++ b/plugins/data-studio/web-ui/src/views/privilege/types.ts @@ -0,0 +1,11 @@ +export type OperateType = 'schema' | 'table' | 'function' | 'sequence' | 'view'; +export type GrantOrRevoke = 'GRANT' | 'REVOKE'; +export type SelectedObjectList = Array<{ showName: string; name: string; schema?: string }>; +export interface SaveParams { + uuid: string; + grantOrRevoke: string; + type: string; + obj: { name: string; schema?: string }[]; + user: string[]; + privilegeOption: { privilege: string; checkPrivilege: boolean; checkOption: boolean }[]; +} diff --git a/plugins/data-studio/web-ui/src/views/sequence/CreateSequence.vue b/plugins/data-studio/web-ui/src/views/sequence/CreateSequence.vue index 8c7853b8d88d7f248dc207d3a4c49fbf7ffa588d..732af29cbb58ec02b89426d8db87b0d8264e0ae4 100644 --- a/plugins/data-studio/web-ui/src/views/sequence/CreateSequence.vue +++ b/plugins/data-studio/web-ui/src/views/sequence/CreateSequence.vue @@ -120,12 +120,12 @@ const { t } = useI18n(); const loading = ref(null); + const platform = ref(route.query.platform as Platform); const currentTabName = ref('Base'); const ruleFormRef = ref(); const editorPreRef = ref(); const refreshParams = reactive({ rootId: route.query.rootId as string, - schemaContentCollectId: route.query.schemaContentCollectId as string, }); const form = reactive({ @@ -136,9 +136,9 @@ maxValue: '', cache: '', isCycle: false, - tableSchema: route.query.schema, + tableSchema: route.query.schema || undefined, tableName: '', - schema: route.query.schema, + schema: route.query.schema || undefined, tableColumn: '', connectionName: route.query.connectInfoName, uuid: route.query.uuid, diff --git a/plugins/data-studio/web-ui/src/views/synonym/CreateSynonym.vue b/plugins/data-studio/web-ui/src/views/synonym/CreateSynonym.vue index 0b5477571638d407a983e5ba853e003ea725772c..a26227b9bf39b05376e304d5868d5708e418e3c8 100644 --- a/plugins/data-studio/web-ui/src/views/synonym/CreateSynonym.vue +++ b/plugins/data-studio/web-ui/src/views/synonym/CreateSynonym.vue @@ -102,7 +102,6 @@ const editorPreRef = ref(); const refreshParams = reactive({ rootId: route.query.rootId as string, - schemaContentCollectId: route.query.schemaContentCollectId as string, }); const form = reactive({ diff --git a/plugins/data-studio/web-ui/src/views/trigger/components/GeneralTab.vue b/plugins/data-studio/web-ui/src/views/trigger/components/GeneralTab.vue index d0a26fb413a9594aea6708066bb000b5fa7e9ba3..aea56da121ee6c48b5008de37f2f3ea6f94cbe36 100644 --- a/plugins/data-studio/web-ui/src/views/trigger/components/GeneralTab.vue +++ b/plugins/data-studio/web-ui/src/views/trigger/components/GeneralTab.vue @@ -103,15 +103,16 @@ @change="fetchUpdateFieldList" :disabled="$props.type == 'edit'" > - - + + - + diff --git a/plugins/data-studio/web-ui/src/views/view/CreateView.vue b/plugins/data-studio/web-ui/src/views/view/CreateView.vue index a0abead3d16bcf0022515a7bc7ded08ba72cff77..278bf4448575496d822cf7b92ab1e0a637e4a89b 100644 --- a/plugins/data-studio/web-ui/src/views/view/CreateView.vue +++ b/plugins/data-studio/web-ui/src/views/view/CreateView.vue @@ -73,9 +73,9 @@ const editorPreRef = ref(); const refreshParams = reactive({ rootId: route.query.rootId as string, - schemaContentCollectId: route.query.schemaContentCollectId as string, }); + const platform = ref(route.query.platform as Platform); const form = reactive({ viewName: '', viewType: 'VIEW', @@ -143,7 +143,7 @@ }; onMounted(() => { - form.schema = route.query.schema as string; + form.schema = (route.query.schema as string) || undefined; schemaList.value = [form.schema]; }); diff --git a/plugins/data-studio/web-ui/src/views/view/CreateViewDialog.vue b/plugins/data-studio/web-ui/src/views/view/CreateViewDialog.vue index 927dcaa23c9304a532eedb247b6828909a8a4bf3..6b3ed5d6f2df0cc94a3e7b36c0e54f82ba2d954c 100644 --- a/plugins/data-studio/web-ui/src/views/view/CreateViewDialog.vue +++ b/plugins/data-studio/web-ui/src/views/view/CreateViewDialog.vue @@ -97,6 +97,7 @@ const UserStore = useUserStore(); const nodeData = computed(() => props.nodeData); const activeName = ref('Base'); + const platform = ref(); const editDefaultValue = { viewName: '', viewType: 'VIEW', @@ -141,6 +142,7 @@ form.schema = nodeData.value.schemaName; form.connectionName = nodeData.value.connectInfo.name; form.uuid = nodeData.value.uuid; + platform.value = nodeData.value.connectInfo.type as Platform; if (props.type === 'create') { schemaList.value = [form.schema]; } else { diff --git a/plugins/data-studio/web-ui/src/views/view/components/Data.vue b/plugins/data-studio/web-ui/src/views/view/components/Data.vue index 4fd5b3ab019656c912f86940aa751fa4d0fc6a4a..d99d2a0d7d8034c965de4819ab218df9ab764b59 100644 --- a/plugins/data-studio/web-ui/src/views/view/components/Data.vue +++ b/plugins/data-studio/web-ui/src/views/view/components/Data.vue @@ -11,7 +11,7 @@ :key="item.label" :prop="item.label" :label="item.label" - :min-width="item.minWidth" + :min-width="tableColumnWidth[item.label]" align="center" /> @@ -21,6 +21,7 @@ v-model:pageNum="page.pageNum" v-model:pageSize="page.pageSize" v-model:pageTotal="page.pageTotal" + :dataSize="page.dataSize" @firstPage="handleFirstPage" @lastPage="handleLastPage" @previousPage="handlePreviousPage" @@ -33,11 +34,13 @@