Skip to content

vp migrate beta test#4

Draft
fengmk2 wants to merge 1 commit into
mainfrom
vp-migrate-test
Draft

vp migrate beta test#4
fengmk2 wants to merge 1 commit into
mainfrom
vp-migrate-test

Conversation

@fengmk2

@fengmk2 fengmk2 commented Jun 30, 2026

Copy link
Copy Markdown
Owner


描述

关联 Issue

解决的问题

测试情况

截屏

变更的类型

  • 解决 Bug
  • 新功能(不影响其他功能)
  • 对其他功能有影响
  • 存在破坏性变更

检查

  • 我的变更和代码规范一致
  • 我的变更需要更新文档
  • 我已经更新了对应的文档

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request primarily applies formatting and style updates across multiple files, including Elysia examples, Turnstile Spin worker templates, and server modules, alongside updating dependencies for Vite and Vitest. A critical bug was identified in packages/server/app/infrastructure/d1/database.ts where the first function signature is missing the db: D1Database parameter, which will lead to runtime errors since callers pass the database instance as the first argument.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines 7 to +10
sql: string,
...values: unknown[]
): Promise<T | null> => {
const row = await db.prepare(sql).bind(...values).first<Record<string, unknown>>()
const row = await db

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

first 函数的定义中缺少了 db: D1Database 参数,但其所有的调用处(例如 auth.repository.tssync.repository.ts)都将 this.db 作为第一个参数传入。这会导致传入的数据库对象被当作 SQL 查询字符串,而真正的 SQL 字符串被绑定到 values 数组中,从而引发运行时错误。请在 first 函数的签名中添加 db: D1Database 参数,使其与 allrun 保持一致。

Suggested change
sql: string,
...values: unknown[]
): Promise<T | null> => {
const row = await db.prepare(sql).bind(...values).first<Record<string, unknown>>()
const row = await db
db: D1Database,
sql: string,
...values: unknown[]
): Promise<T | null> => {
const row = await db

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant