diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6ac3432..8a1e038 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -117,6 +117,12 @@ jobs: echo "$SECRETS" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT + - name: Mask Sensitive Domain + run: | + if [ -n "${{ secrets.CLOUDFLARE_WORKER_SUBDOMAIN }}" ]; then + echo "::add-mask::${{ secrets.CLOUDFLARE_WORKER_SUBDOMAIN }}" + fi + # 部署到 Cloudflare Workers - name: Deploy to Cloudflare Workers uses: cloudflare/wrangler-action@v3 diff --git a/backend/src/shared/db/db.ts b/backend/src/shared/db/db.ts index b561eda..5a3becb 100644 --- a/backend/src/shared/db/db.ts +++ b/backend/src/shared/db/db.ts @@ -63,10 +63,11 @@ export async function batchInsertVaultItems( // 2. 批量写入:使用 D1 的 batch 功能避免连接超时。 // 分批写入,每批最多 50 条。 + // 使用 onConflictDoNothing() 作为兜底,遇到重复 (service, account) 时静默跳过而非抛出 500 const CHUNK_SIZE = 50; for (let i = 0; i < preparedItems.length; i += CHUNK_SIZE) { const chunk = preparedItems.slice(i, i + CHUNK_SIZE); - const stmts = chunk.map(item => dbClient.insert(schema.vault).values(item)); + const stmts = chunk.map(item => dbClient.insert(schema.vault).values(item).onConflictDoNothing()); await dbClient.batch(stmts as any); } diff --git a/frontend/index.html b/frontend/index.html index 3b9d674..8a924c8 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1,13 +1,16 @@ -
- - - -