From f0f094a28d0a6b9f4be7e198a809226b1b9e9f5b Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Wed, 3 Sep 2025 17:10:12 +0800 Subject: [PATCH] chore: fix missing dependencies --- apps/web-antd/package.json | 3 --- .../src/components/upload/use-upload.ts | 1 - .../src/components/upload/use-upload.ts | 1 - apps/web-naive/package.json | 4 ---- .../src/components/upload/use-upload.ts | 1 - packages/@core/base/shared/package.json | 1 + packages/effects/common-ui/package.json | 2 -- .../captcha/verification/utils/ase.ts | 15 ------------- .../captcha/verification/verify-points.vue | 7 ++++--- pnpm-lock.yaml | 21 ++++--------------- 10 files changed, 9 insertions(+), 47 deletions(-) delete mode 100644 packages/effects/common-ui/src/components/captcha/verification/utils/ase.ts diff --git a/apps/web-antd/package.json b/apps/web-antd/package.json index 2c1694a97..f92c5c90b 100644 --- a/apps/web-antd/package.json +++ b/apps/web-antd/package.json @@ -54,8 +54,5 @@ "vue-dompurify-html": "catalog:", "vue-router": "catalog:", "vue3-signature": "catalog:" - }, - "devDependencies": { - "@types/crypto-js": "catalog:" } } diff --git a/apps/web-antd/src/components/upload/use-upload.ts b/apps/web-antd/src/components/upload/use-upload.ts index 471091f51..ec3b2d58b 100644 --- a/apps/web-antd/src/components/upload/use-upload.ts +++ b/apps/web-antd/src/components/upload/use-upload.ts @@ -7,7 +7,6 @@ import { computed, unref } from 'vue'; import { useAppConfig } from '@vben/hooks'; import { $t } from '@vben/locales'; -// import CryptoJS from 'crypto-js'; import { createFile, getFilePresignedUrl, uploadFile } from '#/api/infra/file'; import { baseRequestClient } from '#/api/request'; diff --git a/apps/web-ele/src/components/upload/use-upload.ts b/apps/web-ele/src/components/upload/use-upload.ts index 9e3ca13f5..52f723be8 100644 --- a/apps/web-ele/src/components/upload/use-upload.ts +++ b/apps/web-ele/src/components/upload/use-upload.ts @@ -7,7 +7,6 @@ import { computed, unref } from 'vue'; import { useAppConfig } from '@vben/hooks'; import { $t } from '@vben/locales'; -// import CryptoJS from 'crypto-js'; import { createFile, getFilePresignedUrl, uploadFile } from '#/api/infra/file'; import { baseRequestClient } from '#/api/request'; diff --git a/apps/web-naive/package.json b/apps/web-naive/package.json index f186e541b..44b63afb2 100644 --- a/apps/web-naive/package.json +++ b/apps/web-naive/package.json @@ -44,15 +44,11 @@ "@vben/utils": "workspace:*", "@vueuse/core": "catalog:", "cropperjs": "catalog:", - "crypto-js": "catalog:", "dayjs": "catalog:", "highlight.js": "catalog:", "naive-ui": "catalog:", "pinia": "catalog:", "vue": "catalog:", "vue-router": "catalog:" - }, - "devDependencies": { - "@types/crypto-js": "catalog:" } } diff --git a/apps/web-naive/src/components/upload/use-upload.ts b/apps/web-naive/src/components/upload/use-upload.ts index d47672bd4..64383288e 100644 --- a/apps/web-naive/src/components/upload/use-upload.ts +++ b/apps/web-naive/src/components/upload/use-upload.ts @@ -7,7 +7,6 @@ import { computed, unref } from 'vue'; import { useAppConfig } from '@vben/hooks'; import { $t } from '@vben/locales'; -// import CryptoJS from 'crypto-js'; import { createFile, getFilePresignedUrl, uploadFile } from '#/api/infra/file'; import { baseRequestClient } from '#/api/request'; diff --git a/packages/@core/base/shared/package.json b/packages/@core/base/shared/package.json index e6fb260fc..495de4519 100644 --- a/packages/@core/base/shared/package.json +++ b/packages/@core/base/shared/package.json @@ -96,6 +96,7 @@ "theme-colors": "catalog:" }, "devDependencies": { + "@types/crypto-js": "catalog:", "@types/lodash.clonedeep": "catalog:", "@types/lodash.get": "catalog:", "@types/lodash.isequal": "catalog:", diff --git a/packages/effects/common-ui/package.json b/packages/effects/common-ui/package.json index ee8e7ba9e..5a34a2644 100644 --- a/packages/effects/common-ui/package.json +++ b/packages/effects/common-ui/package.json @@ -40,7 +40,6 @@ "@vben/types": "workspace:*", "@vueuse/core": "catalog:", "@vueuse/integrations": "catalog:", - "crypto-js": "catalog:", "json-bigint": "catalog:", "qrcode": "catalog:", "tippy.js": "catalog:", @@ -50,7 +49,6 @@ "vue-tippy": "catalog:" }, "devDependencies": { - "@types/crypto-js": "catalog:", "@types/qrcode": "catalog:" } } diff --git a/packages/effects/common-ui/src/components/captcha/verification/utils/ase.ts b/packages/effects/common-ui/src/components/captcha/verification/utils/ase.ts deleted file mode 100644 index 015aec1dd..000000000 --- a/packages/effects/common-ui/src/components/captcha/verification/utils/ase.ts +++ /dev/null @@ -1,15 +0,0 @@ -import CryptoJS from 'crypto-js'; - -/** - * @word 要加密的内容 - * @keyWord String 服务器随机返回的关键字 - */ -export function aesEncrypt(word: string, keyWord = 'XwKsGlMcdPMEhR1B') { - const key = CryptoJS.enc.Utf8.parse(keyWord); - const src = CryptoJS.enc.Utf8.parse(word); - const encrypted = CryptoJS.AES.encrypt(src, key, { - mode: CryptoJS.mode.ECB, - padding: CryptoJS.pad.Pkcs7, - }); - return encrypted.toString(); -} diff --git a/packages/effects/common-ui/src/components/captcha/verification/verify-points.vue b/packages/effects/common-ui/src/components/captcha/verification/verify-points.vue index 0dbc1f30b..8d882bc5e 100644 --- a/packages/effects/common-ui/src/components/captcha/verification/verify-points.vue +++ b/packages/effects/common-ui/src/components/captcha/verification/verify-points.vue @@ -14,7 +14,8 @@ import { import { $t } from '@vben/locales'; -import { aesEncrypt } from './utils/ase'; +import { AES } from '@vben-core/shared/utils'; + import { resetSize } from './utils/util'; /** @@ -137,7 +138,7 @@ function canvasClick(e: any) { // var flag = this.comparePos(this.fontPos, this.checkPosArr); // 发送后端请求 const captchaVerification = secretKey.value - ? aesEncrypt( + ? AES.encrypt( `${backToken.value}---${JSON.stringify(checkPosArr)}`, secretKey.value, ) @@ -145,7 +146,7 @@ function canvasClick(e: any) { const data = { captchaType: captchaType.value, pointJson: secretKey.value - ? aesEncrypt(JSON.stringify(checkPosArr), secretKey.value) + ? AES.encrypt(JSON.stringify(checkPosArr), secretKey.value) : JSON.stringify(checkPosArr), token: backToken.value, }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 04d59b399..a79ffc7df 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -800,10 +800,6 @@ importers: vue3-signature: specifier: 'catalog:' version: 0.2.4(vue@3.5.18(typescript@5.9.2)) - devDependencies: - '@types/crypto-js': - specifier: 'catalog:' - version: 4.2.2 apps/web-ele: dependencies: @@ -949,9 +945,6 @@ importers: cropperjs: specifier: 'catalog:' version: 1.6.2 - crypto-js: - specifier: 'catalog:' - version: 4.2.0 dayjs: specifier: 'catalog:' version: 1.11.13 @@ -970,10 +963,6 @@ importers: vue-router: specifier: 'catalog:' version: 4.5.1(vue@3.5.18(typescript@5.9.2)) - devDependencies: - '@types/crypto-js': - specifier: 'catalog:' - version: 4.2.2 docs: dependencies: @@ -1408,6 +1397,9 @@ importers: specifier: 'catalog:' version: 0.1.0 devDependencies: + '@types/crypto-js': + specifier: 'catalog:' + version: 4.2.2 '@types/lodash.clonedeep': specifier: 'catalog:' version: 4.5.9 @@ -1694,9 +1686,6 @@ importers: '@vueuse/integrations': specifier: 'catalog:' version: 13.7.0(async-validator@4.2.5)(axios@1.11.0)(focus-trap@7.6.5)(jwt-decode@4.0.0)(nprogress@0.2.0)(qrcode@1.5.4)(sortablejs@1.15.6)(vue@3.5.18(typescript@5.9.2)) - crypto-js: - specifier: 'catalog:' - version: 4.2.0 json-bigint: specifier: 'catalog:' version: 1.0.0 @@ -1719,9 +1708,6 @@ importers: specifier: 'catalog:' version: 6.7.1(vue@3.5.18(typescript@5.9.2)) devDependencies: - '@types/crypto-js': - specifier: 'catalog:' - version: 4.2.2 '@types/qrcode': specifier: 'catalog:' version: 1.5.5 @@ -10382,6 +10368,7 @@ packages: source-map@0.8.0-beta.0: resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} engines: {node: '>= 8'} + deprecated: The work that was done in this beta branch won't be included in future versions sourcemap-codec@1.4.8: resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==}