From 93cce0a4cc3463ea3e359cbe5ffbf711148f8078 Mon Sep 17 00:00:00 2001 From: baiqi Date: Fri, 5 Jul 2024 10:01:09 +0800 Subject: [PATCH] =?UTF-8?q?chore(dependency):=20vite=E5=8F=8A=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E5=8C=85=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/config/vite.config.base.ts | 2 +- frontend/package.json | 115 +++++++++--------- .../business/ms-common-script/utils.ts | 3 +- .../components/pure/ms-json-schema/index.vue | 2 +- 4 files changed, 60 insertions(+), 62 deletions(-) diff --git a/frontend/config/vite.config.base.ts b/frontend/config/vite.config.base.ts index ec59a0aac5..2841c69da5 100644 --- a/frontend/config/vite.config.base.ts +++ b/frontend/config/vite.config.base.ts @@ -72,7 +72,7 @@ export default defineConfig({ replacement: '@halo-dev/richtext-editor', }, ], - extensions: ['.ts', '.js'], + extensions: ['.ts', '.js', '.jsx', '.tsx', '.json', '.vue'], }, define: { 'process.env': {}, diff --git a/frontend/package.json b/frontend/package.json index 54b5e1d501..eb3cf00c82 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -38,104 +38,103 @@ "dependencies": { "@7polo/kity": "2.0.8", "@7polo/kityminder-core": "1.4.53", - "@arco-design/web-vue": "^2.55.1", + "@arco-design/web-vue": "^2.55.3", "@arco-themes/vue-metersphere-v3": "^0.0.1", - "@form-create/arco-design": "^3.1.23", + "@form-create/arco-design": "^3.1.29", "@halo-dev/richtext-editor": "0.0.0-alpha.33", - "@tanstack/vue-query": "^5.17.15", + "@tanstack/vue-query": "^5.49.1", "@tiptap/extension-character-count": "^2.4.0", - "@tiptap/extension-image": "^2.1.15", - "@tiptap/extension-mention": "^2.1.13", - "@tiptap/suggestion": "^2.1.13", - "@tiptap/vue-3": "^2.1.13", - "@types/color": "^3.0.4", - "@types/node": "^20.11.19", - "@vueuse/core": "^10.9.0", + "@tiptap/extension-image": "^2.4.0", + "@tiptap/extension-mention": "^2.4.0", + "@tiptap/suggestion": "^2.4.0", + "@tiptap/vue-3": "^2.4.0", + "@types/color": "^3.0.6", + "@types/node": "^20.14.9", + "@vueuse/core": "^10.11.0", "@wecom/jssdk": "^1.4.5", "@xmldom/xmldom": "^0.8.10", - "ace-builds": "^1.24.2", + "ace-builds": "^1.35.2", "ahooks-vue": "^0.15.1", - "axios": "^1.6.5", - "dayjs": "^1.11.9", + "axios": "^1.7.2", + "dayjs": "^1.11.11", "dotenv": "^16.4.5", - "echarts": "^5.4.3", - "fastq": "^1.15.0", - "github-markdown-css": "^5.5.1", + "echarts": "^5.5.1", + "fastq": "^1.17.1", + "github-markdown-css": "^5.6.1", "jsencrypt": "^3.3.2", - "jsonpath-plus": "^8.0.0", + "json-schema-traverse": "^1.0.0", + "jsonpath-plus": "^8.1.0", "localforage": "^1.10.0", "lodash-es": "^4.17.21", "lossless-json": "^4.0.1", "mitt": "^3.0.1", "monaco-editor": "^0.39.0", "nprogress": "^0.2.0", - "pinia": "^2.1.6", - "pinia-plugin-persistedstate": "^3.2.0", + "pinia": "^2.1.7", + "pinia-plugin-persistedstate": "^3.2.1", "pm": "link:@/tiptap/pm", "pretty": "^2.0.0", - "query-string": "^8.1.0", + "query-string": "^8.2.0", "resize-observer-polyfill": "^1.5.1", - "sortablejs": "^1.15.0", + "sortablejs": "^1.15.2", "tippy.js": "^6.3.7", - "vue": "^3.4.20", + "vue": "^3.4.31", "vue-dompurify-html": "^4.1.4", "vue-draggable-plus": "^0.3.5", - "vue-echarts": "^6.6.1", - "vue-i18n": "^9.3.0", - "vue-router": "^4.2.4", - "vue3-ace-editor": "^2.2.3", - "vue3-colorpicker": "^2.2.2", + "vue-echarts": "^6.7.3", + "vue-i18n": "^9.13.1", + "vue-router": "^4.4.0", + "vue3-ace-editor": "^2.2.4", + "vue3-colorpicker": "^2.3.0", "xml-beautify": "^1.2.3", "xpath": "^0.0.34" }, "devDependencies": { "@arco-plugins/vite-vue": "^1.4.5", - "@commitlint/cli": "^17.7.1", - "@commitlint/config-conventional": "^17.7.0", - "@types/lodash": "^4.14.198", - "@types/lodash-es": "^4.17.9", - "@types/nprogress": "^0.2.0", + "@commitlint/cli": "^17.8.1", + "@commitlint/config-conventional": "^17.8.1", + "@types/lodash": "^4.17.6", + "@types/lodash-es": "^4.17.12", + "@types/nprogress": "^0.2.3", "@types/pretty": "^2.0.3", - "@types/react": "^18.2.79", - "@types/react-dom": "^18.2.25", - "@types/sortablejs": "^1.15.2", - "@typescript-eslint/eslint-plugin": "^7.1.1", - "@typescript-eslint/parser": "^7.1.1", - "@vitejs/plugin-vue": "^3.2.0", - "@vitejs/plugin-vue-jsx": "^2.1.1", + "@types/react": "^18.3.3", + "@types/react-dom": "^18.3.0", + "@types/sortablejs": "^1.15.8", + "@typescript-eslint/eslint-plugin": "^7.15.0", + "@typescript-eslint/parser": "^7.15.0", + "@vitejs/plugin-vue": "^4.6.2", + "@vitejs/plugin-vue-jsx": "^3.1.0", "@vitest/coverage-c8": "^0.31.4", - "@vue/babel-plugin-jsx": "^1.1.5", - "@vue/test-utils": "^2.4.1", - "@zougt/some-loader-utils": "^1.4.3", - "@zougt/vite-plugin-theme-preprocessor": "^1.4.8", - "autoprefixer": "^10.4.15", + "@vue/babel-plugin-jsx": "^1.2.2", + "@vue/test-utils": "^2.4.6", + "autoprefixer": "^10.4.19", "axios-mock-adapter": "^1.22.0", "color": "^4.2.3", "consola": "^2.15.3", "cross-env": "^7.0.3", - "eslint": "^8.56.0", + "eslint": "^8.57.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^8.10.0", - "eslint-import-resolver-typescript": "^3.6.0", - "eslint-plugin-import": "^2.28.1", + "eslint-import-resolver-typescript": "^3.6.1", + "eslint-plugin-import": "^2.29.1", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-simple-import-sort": "^10.0.0", - "eslint-plugin-vue": "^9.17.0", - "fast-glob": "^3.3.1", + "eslint-plugin-vue": "^9.27.0", + "fast-glob": "^3.3.2", "husky": "^8.0.3", "jsdom": "^22.1.0", "less": "^4.2.0", - "less-loader": "^11.1.3", + "less-loader": "^11.1.4", "lint-staged": "^13.3.0", - "postcss": "^8.4.29", - "postcss-html": "^1.5.0", + "postcss": "^8.4.39", + "postcss-html": "^1.7.0", "postcss-import": "^15.1.0", "postcss-less": "^6.0.0", "prettier": "^2.8.8", "prettier-plugin-tailwindcss": "^0.3.0", "rollup": "^2.79.1", - "rollup-plugin-visualizer": "^5.9.2", - "sass": "^1.66.1", + "rollup-plugin-visualizer": "^5.12.0", + "sass": "^1.77.6", "stylelint": "^14.16.1", "stylelint-config-html": "^1.1.0", "stylelint-config-prettier": "^9.0.5", @@ -148,11 +147,11 @@ "stylelint-config-standard-scss": "^4.0.0", "stylelint-less": "^1.0.8", "stylelint-order": "^5.0.0", - "tailwindcss": "^3.3.3", + "tailwindcss": "^3.4.4", "typescript": "5.4.5", "unplugin-auto-import": "^0.16.7", "unplugin-vue-components": "^0.24.1", - "vite": "^3.2.7", + "vite": "^4.3.9", "vite-plugin-compression": "^0.5.1", "vite-plugin-eslint": "^1.8.1", "vite-plugin-imagemin": "^0.6.1", @@ -161,10 +160,10 @@ "vite-plugin-vue-setup-extend": "^0.4.0", "vite-svg-loader": "^3.6.0", "vitest": "^0.31.4", - "vue-tsc": "^1.8.10" + "vue-tsc": "^1.8.27" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" }, "resolutions": { "bin-wrapper": "npm:bin-wrapper-china", diff --git a/frontend/src/components/business/ms-common-script/utils.ts b/frontend/src/components/business/ms-common-script/utils.ts index a8ee33a2eb..a30e633a44 100644 --- a/frontend/src/components/business/ms-common-script/utils.ts +++ b/frontend/src/components/business/ms-common-script/utils.ts @@ -3,7 +3,6 @@ import { Language, LanguageEnum } from '@/components/pure/ms-code-editor/types'; import { useI18n } from '@/hooks/useI18n'; import { hasAnyPermission } from '@/utils/permission'; -import type { CommonScriptMenu } from '@/models/projectManagement/commonScript'; import { RequestConditionScriptLanguage } from '@/enums/apiEnum'; const { t } = useI18n(); @@ -233,7 +232,7 @@ function getHeaders(requestHeaders: Record) { } // 获取pythonCode 模板 function _pythonCodeTemplate(obj: Record) { - const { requestBody, requestBodyKvs, bodyType, requestPath, requestMethod, connType, domain, port } = obj; + const { requestBodyKvs, requestPath, requestMethod, connType, domain, port } = obj; let { headers } = obj; let reqBody = obj.requestBody; if (requestMethod.toLowerCase() === 'post' && obj.bodyType === 'kvs' && obj.requestBodyKvs) { diff --git a/frontend/src/components/pure/ms-json-schema/index.vue b/frontend/src/components/pure/ms-json-schema/index.vue index 3eca7c9a00..574a67d525 100644 --- a/frontend/src/components/pure/ms-json-schema/index.vue +++ b/frontend/src/components/pure/ms-json-schema/index.vue @@ -980,7 +980,7 @@ try { // 再将 json schema 转换为 json 格式 const res = await convertJsonSchemaToJson(schema as JsonSchema); - activePreviewJsonValue.value = JSON.stringify(res); + activePreviewJsonValue.value = res; } catch (error) { // eslint-disable-next-line no-console console.log(error);