feat: support cleanDays max 1000 (#622)

This commit is contained in:
Dream Hunter
2025-04-07 19:24:21 +08:00
committed by GitHub
parent 525f5e2dce
commit 91a859bbcf
10 changed files with 2378 additions and 2708 deletions

View File

@@ -6,6 +6,7 @@
- feat: |UI| support google ads
- feat: |UI| 使用 shadow DOM 防止样式污染
- feat: |UI| 支持 URL jwt 参数自动登录邮箱jwt 参数会覆盖浏览器中的 jwt
- fix: |CleanUP| 修复清理邮件时,清理时间超过 30 天报错的 bug
## v0.9.0

View File

@@ -24,7 +24,7 @@
"@vueuse/core": "^12.8.2",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.12",
"axios": "^1.8.2",
"axios": "^1.8.4",
"jszip": "^3.10.1",
"mail-parser-wasm": "^0.2.1",
"naive-ui": "^2.41.0",
@@ -32,21 +32,21 @@
"vooks": "^0.2.12",
"vue": "^3.5.13",
"vue-clipboard3": "^2.0.0",
"vue-i18n": "^11.1.2",
"vue-i18n": "^11.1.3",
"vue-router": "^4.5.0"
},
"devDependencies": {
"@vicons/fa": "^0.13.0",
"@vicons/material": "^0.13.0",
"@vitejs/plugin-vue": "^5.2.1",
"unplugin-auto-import": "^19.1.1",
"@vitejs/plugin-vue": "^5.2.3",
"unplugin-auto-import": "^19.1.2",
"unplugin-vue-components": "^28.4.1",
"vite": "^6.2.1",
"vite-plugin-pwa": "^0.21.1",
"vite": "^6.2.5",
"vite-plugin-pwa": "^1.0.0",
"vite-plugin-top-level-await": "^1.5.0",
"vite-plugin-wasm": "^3.4.1",
"workbox-build": "^7.3.0",
"workbox-window": "^7.3.0",
"wrangler": "^3.114.0"
"wrangler": "^4.7.2"
}
}

1921
frontend/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -11,6 +11,6 @@
"author": "",
"license": "ISC",
"devDependencies": {
"wrangler": "^3.114.0"
"wrangler": "^4.7.2"
}
}

View File

@@ -1,15 +1,19 @@
cd frontend/
pnpm up
pnpm add -D wrangler@latest
cd ..
cd worker/
pnpm up
pnpm add -D wrangler@latest
cd ..
cd pages/
pnpm up
pnpm add -D wrangler@latest
cd ..
cd vitepress-docs/
pnpm up
pnpm add -D wrangler@latest
cd ..

View File

@@ -4,9 +4,9 @@
"version": "0.9.1",
"type": "module",
"devDependencies": {
"@types/node": "^22.13.9",
"@types/node": "^22.14.0",
"vitepress": "^1.6.3",
"wrangler": "^3.114.0"
"wrangler": "^4.7.2"
},
"scripts": {
"dev": "vitepress dev docs",

File diff suppressed because it is too large Load Diff

View File

@@ -11,24 +11,24 @@
"build": "wrangler deploy --dry-run --outdir dist --minify"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20250303.0",
"@cloudflare/workers-types": "^4.20250407.0",
"@eslint/js": "9.18.0",
"@simplewebauthn/types": "10.0.0",
"eslint": "9.18.0",
"globals": "^15.15.0",
"typescript-eslint": "^8.26.0",
"wrangler": "^3.114.0"
"typescript-eslint": "^8.29.0",
"wrangler": "^4.7.2"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.758.0",
"@aws-sdk/s3-request-presigner": "^3.758.0",
"@aws-sdk/client-s3": "^3.782.0",
"@aws-sdk/s3-request-presigner": "^3.782.0",
"@simplewebauthn/server": "10.0.1",
"hono": "^4.7.4",
"hono": "^4.7.5",
"mimetext": "^3.0.27",
"postal-mime": "^2.4.3",
"resend": "^4.1.2",
"resend": "^4.2.0",
"telegraf": "4.16.3",
"worker-mailer": "^1.0.1"
"worker-mailer": "^1.1.1"
},
"pnpm": {
"patchedDependencies": {

2103
worker/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -151,7 +151,7 @@ export const cleanup = async (
cleanType: string | undefined | null,
cleanDays: number | undefined | null
): Promise<boolean> => {
if (!cleanType || typeof cleanDays !== 'number' || cleanDays < 0 || cleanDays > 30) {
if (!cleanType || typeof cleanDays !== 'number' || cleanDays < 0 || cleanDays > 1000) {
throw new Error("Invalid cleanType or cleanDays")
}
console.log(`Cleanup ${cleanType} before ${cleanDays} days`);