浏览代码

update: 更新依赖包

liaojiaxing 2 月之前
父节点
当前提交
00cf832672

+ 1 - 1
apps/ai-server/package.json

@@ -10,7 +10,7 @@
   "author": "",
   "license": "ISC",
   "dependencies": {
-    "@ai-sdk/openai": "^1.1.9",
+    "@ai-sdk/openai": "^1.1.13",
     "cors": "^2.8.5",
     "dotenv": "^16.4.7",
     "express": "^4.21.2"

+ 6 - 6
apps/designer/package.json

@@ -10,14 +10,14 @@
   },
   "dependencies": {
     "@repo/x6-plugin-selection": "workspace:*",
-    "@unocss/cli": "^0.62.3",
-    "umi": "^4.3.18",
-    "unocss": "^0.62.3"
+    "@unocss/cli": "^0.62.4",
+    "umi": "^4.4.5",
+    "unocss": "^0.62.4"
   },
   "devDependencies": {
     "@iconify-json/ant-design": "1.2.1",
-    "@types/react": "^18.0.33",
-    "@types/react-dom": "^18.0.11",
-    "typescript": "^5.0.3"
+    "@types/react": "^18.3.18",
+    "@types/react-dom": "^18.3.5",
+    "typescript": "^5.7.3"
   }
 }

+ 5 - 5
apps/docs/package.json

@@ -17,11 +17,11 @@
   "devDependencies": {
     "@repo/eslint-config": "workspace:*",
     "@repo/typescript-config": "workspace:*",
-    "@types/node": "^20",
-    "@types/react": "^18",
-    "@types/react-dom": "^18",
-    "eslint": "^8",
+    "@types/node": "^20.17.19",
+    "@types/react": "^18.3.18",
+    "@types/react-dom": "^18.3.5",
+    "eslint": "^8.57.1",
     "eslint-config-next": "14.2.6",
-    "typescript": "^5"
+    "typescript": "^5.7.3"
   }
 }

+ 6 - 6
apps/er-designer/package.json

@@ -10,14 +10,14 @@
   },
   "dependencies": {
     "@repo/x6-plugin-export": "workspace:*",
-    "@unocss/cli": "^0.62.3",
-    "umi": "^4.3.18",
-    "unocss": "^0.62.3"
+    "@unocss/cli": "^0.62.4",
+    "umi": "^4.4.5",
+    "unocss": "^0.62.4"
   },
   "devDependencies": {
     "@iconify-json/ant-design": "1.2.1",
-    "@types/react": "^18.0.33",
-    "@types/react-dom": "^18.0.11",
-    "typescript": "^5.0.3"
+    "@types/react": "^18.3.18",
+    "@types/react-dom": "^18.3.5",
+    "typescript": "^5.7.3"
   }
 }

+ 21 - 21
package.json

@@ -8,20 +8,20 @@
     "format": "prettier --write \"**/*.{ts,tsx,md}\""
   },
   "devDependencies": {
-    "@umijs/plugins": "^4.3.19",
-    "prettier": "^3.3.3",
-    "turbo": "^2.1.1",
-    "typescript": "^5.4.5"
+    "@umijs/plugins": "^4.4.5",
+    "prettier": "^3.5.1",
+    "turbo": "^2.4.2",
+    "typescript": "^5.7.3"
   },
   "packageManager": "pnpm@8.15.6",
   "engines": {
     "node": ">=18"
   },
   "dependencies": {
-    "@ant-design/icons": "^5.4.0",
-    "@ant-design/pro-components": "^2.7.15",
+    "@ant-design/icons": "^5.6.1",
+    "@ant-design/pro-components": "^2.8.6",
     "@antv/hierarchy": "^0.6.14",
-    "@antv/x6": "^2.x",
+    "@antv/x6": "^2.18.1",
     "@antv/x6-plugin-clipboard": "^2.1.6",
     "@antv/x6-plugin-dnd": "^2.1.1",
     "@antv/x6-plugin-export": "^2.1.6",
@@ -34,33 +34,33 @@
     "@antv/x6-plugin-transform": "^2.1.8",
     "@antv/x6-react-shape": "^2.2.3",
     "@codemirror/lang-angular": "^0.1.3",
-    "@codemirror/lang-css": "^6.3.0",
+    "@codemirror/lang-css": "^6.3.1",
     "@codemirror/lang-go": "^6.0.1",
     "@codemirror/lang-html": "^6.4.9",
     "@codemirror/lang-java": "^6.0.1",
-    "@codemirror/lang-javascript": "^6.2.2",
+    "@codemirror/lang-javascript": "^6.2.3",
     "@codemirror/lang-json": "^6.0.1",
     "@codemirror/lang-php": "^6.0.1",
-    "@codemirror/lang-python": "^6.1.6",
+    "@codemirror/lang-python": "^6.1.7",
     "@codemirror/lang-rust": "^6.0.1",
-    "@codemirror/lang-sql": "^6.7.1",
+    "@codemirror/lang-sql": "^6.8.0",
     "@codemirror/lang-vue": "^0.1.3",
     "@codemirror/lang-xml": "^6.1.0",
-    "@codemirror/lang-yaml": "^6.1.1",
+    "@codemirror/lang-yaml": "^6.1.2",
     "@dnd-kit/core": "^6.3.1",
     "@dnd-kit/modifiers": "^9.0.0",
     "@dnd-kit/sortable": "^10.0.0",
     "@dnd-kit/utilities": "^3.2.2",
-    "@emotion/css": "^11.13.0",
+    "@emotion/css": "^11.13.5",
     "@excalidraw/mermaid-to-excalidraw": "^1.1.2",
     "@repo/utils": "workspace:*",
     "@types/lodash-es": "^4.17.12",
-    "@uiw/react-codemirror": "^4.23.3",
-    "@unocss/cli": "^0.62.3",
-    "ahooks": "^3.8.1",
-    "ai": "^4.1.26",
-    "antd": "^5.23.0",
-    "axios": "^1.7.7",
+    "@uiw/react-codemirror": "^4.23.8",
+    "@unocss/cli": "^0.62.4",
+    "ahooks": "^3.8.4",
+    "ai": "^4.1.44",
+    "antd": "^5.24.1",
+    "axios": "^1.7.9",
     "dagre": "^0.8.5",
     "dayjs": "^1.11.13",
     "insert-css": "^2.0.0",
@@ -72,8 +72,8 @@
     "rehype-raw": "^7.0.0",
     "remark-gfm": "^4.0.1",
     "thememirror": "^2.0.1",
-    "umi": "^4.3.18",
-    "unocss": "^0.62.3",
+    "umi": "^4.4.5",
+    "unocss": "^0.62.4",
     "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
   }
 }

+ 4 - 4
packages/eslint-config/package.json

@@ -8,12 +8,12 @@
     "react-internal.js"
   ],
   "devDependencies": {
+    "@typescript-eslint/eslint-plugin": "^7.18.0",
+    "@typescript-eslint/parser": "^7.18.0",
     "@vercel/style-guide": "^5.2.0",
-    "eslint-config-turbo": "^2.0.0",
     "eslint-config-prettier": "^9.1.0",
+    "eslint-config-turbo": "^2.4.2",
     "eslint-plugin-only-warn": "^1.1.0",
-    "@typescript-eslint/parser": "^7.1.0",
-    "@typescript-eslint/eslint-plugin": "^7.1.0",
-    "typescript": "^5.3.3"
+    "typescript": "^5.7.3"
   }
 }

+ 8 - 8
packages/ui/package.json

@@ -10,15 +10,15 @@
   "devDependencies": {
     "@repo/eslint-config": "workspace:*",
     "@repo/typescript-config": "workspace:*",
-    "@turbo/gen": "^1.12.4",
-    "@types/node": "^20.11.24",
-    "@types/eslint": "^8.56.5",
-    "@types/react": "^18.2.61",
-    "@types/react-dom": "^18.2.19",
-    "eslint": "^8.57.0",
-    "typescript": "^5.3.3"
+    "@turbo/gen": "^1.13.4",
+    "@types/eslint": "^8.56.12",
+    "@types/node": "^20.17.19",
+    "@types/react": "^18.3.18",
+    "@types/react-dom": "^18.3.5",
+    "eslint": "^8.57.1",
+    "typescript": "^5.7.3"
   },
   "dependencies": {
-    "react": "^18.2.0"
+    "react": "^18.3.1"
   }
 }

+ 28 - 13
packages/utils/src/index.ts

@@ -1,26 +1,41 @@
+function isSameOrigin(url: string): boolean {
+  try {
+    return new URL(url).origin === window.location.origin;
+  } catch {
+    return false;
+  }
+}
+
 /**
  * 获取全局的样式
  * @returns 样式
  */
 export const getClassRules = (): string => {
-  let rules = ''
-  const { styleSheets } = document
+  let rules = "";
+  const { styleSheets } = document;
   for (let i = 0; i < styleSheets.length; i++) {
-    const sheet = styleSheets[i]
+    const sheet = styleSheets[i];
     // 这里是为了过滤掉不同源 css 脚本,防止报错终止导出
-    try {
-      for (let j = 0; j < sheet.cssRules.length; j++) {
-        rules += sheet.cssRules[j].cssText
+    const ownerNode = sheet.ownerNode;
+    // 处理同源或者内部css
+    if (
+      ownerNode instanceof HTMLStyleElement ||
+      (ownerNode instanceof HTMLLinkElement && isSameOrigin(ownerNode.href))
+    ) {
+      try {
+        for (let j = 0; j < sheet.cssRules.length; j++) {
+          rules += sheet.cssRules[j].cssText;
+        }
+      } catch (error) {
+        console.log(
+          "CSS scripts from different sources have been filtered out"
+        );
       }
-    } catch (error) {
-      console.log(
-        'CSS scripts from different sources have been filtered out',
-      )
     }
   }
 
-  return rules
-}
+  return rules;
+};
 
 /**
  * base64 转 file
@@ -63,4 +78,4 @@ export function uuid() {
       v = c === "x" ? r : (r & 0x3) | 0x8;
     return v.toString(16);
   });
-}
+}

文件差异内容过多而无法显示
+ 3542 - 2989
pnpm-lock.yaml