Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

Nitro v3#8

Open
TurboRigby wants to merge 9 commits intomainfrom
feat/nitro-v3
Open

Nitro v3#8
TurboRigby wants to merge 9 commits intomainfrom
feat/nitro-v3

Conversation

@TurboRigby
Copy link
Copy Markdown
Member

No description provided.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nitrocore Error Error Apr 5, 2026 5:51pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 5, 2026

Important

Review skipped

Too many files!

This PR contains 203 files, which is 53 over the limit of 150.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6f87fff0-fdc6-4342-9a46-9d4a6fba9e61

📥 Commits

Reviewing files that changed from the base of the PR and between 30f2637 and dfc43b3.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (203)
  • .gitignore
  • README.md
  • controller/ActionController.ts
  • controller/CommentController.ts
  • controller/FriendshipController.ts
  • controller/Level.ts
  • controller/LevelController.ts
  • controller/LevelFilter.ts
  • controller/LevelPackController.ts
  • controller/List.ts
  • controller/ListController.ts
  • controller/ListFilter.ts
  • controller/MessageController.ts
  • controller/MusicController.ts
  • controller/QuestsController.ts
  • controller/ScoresController.ts
  • controller/User.ts
  • controller/UserController.ts
  • drizzle.config.ts
  • drizzle/account_comments.ts
  • drizzle/actions.ts
  • drizzle/actions_downloads.ts
  • drizzle/comments.ts
  • drizzle/custom_types.ts
  • drizzle/friendreqs.ts
  • drizzle/friendships.ts
  • drizzle/index.ts
  • drizzle/levelpacks.ts
  • drizzle/levels.ts
  • drizzle/lists.ts
  • drizzle/messages.ts
  • drizzle/quests.ts
  • drizzle/rate_queue.ts
  • drizzle/roles.ts
  • drizzle/scores.ts
  • drizzle/songs.ts
  • drizzle/users.ts
  • nitro.config-base.ts
  • nitro.config-cloudflare.ts
  • nitro.config-debug.ts
  • nitro.config-standalone.ts
  • nitro.config-vercel.ts
  • nitro.config.ts
  • package.json
  • sdk/commands/SDKCommands.ts
  • sdk/commands/context.ts
  • sdk/commands/types.ts
  • sdk/events/SDKEvents.ts
  • sdk/events/context.ts
  • sdk/events/types.ts
  • sdk/music/SDKMusic.ts
  • sdk/music/context.ts
  • sdk/music/types.ts
  • server/connectors/GeometryDash/comments.ts
  • server/connectors/GeometryDash/index.ts
  • server/connectors/GeometryDash/levels.ts
  • server/connectors/GeometryDash/messages.ts
  • server/connectors/GeometryDash/profile.ts
  • server/connectors/GeometryDash/quests.ts
  • server/connectors/GeometryDash/scores.ts
  • server/connectors/IConnector.ts
  • server/gdps_middleware/helpers/check_ip_bans.ts
  • server/gdps_middleware/helpers/get_drizzle.ts
  • server/gdps_middleware/helpers/get_serverconfig.ts
  • server/gdps_middleware/helpers/init_connector.ts
  • server/gdps_middleware/helpers/validate_srvid.ts
  • server/gdps_middleware/init_gdps.ts
  • server/gdps_middleware/user_auth.ts
  • server/middleware/01.real_ip.ts
  • server/plugins/level-commands.ts
  • server/plugins/logging.ts
  • server/plugins/music-builtin.ts
  • server/plugins/plugin-discord-ratebot.ts
  • server/plugins/plugin-gdpsswitcher.ts
  • server/plugins/plugin-telegram-ratebot.ts
  • server/plugins/storage-vercel-edgeconfig.ts
  • server/routes/[srvid]/db/acceptGJFriendRequest20.php.post.ts
  • server/routes/[srvid]/db/accounts/accountManagement.php.get.ts
  • server/routes/[srvid]/db/accounts/backupGJAccount.php.post.ts
  • server/routes/[srvid]/db/accounts/loginGJAccount.php.post.ts
  • server/routes/[srvid]/db/accounts/registerGJAccount.php.post.ts
  • server/routes/[srvid]/db/accounts/syncGJAccount.php.post.ts
  • server/routes/[srvid]/db/accounts/syncGJAccount20.php.post.ts
  • server/routes/[srvid]/db/blockGJUser20.php.post.ts
  • server/routes/[srvid]/db/content/music/musiclibrary.dat.get.ts
  • server/routes/[srvid]/db/content/music/musiclibrary_02.dat.get.ts
  • server/routes/[srvid]/db/content/music/musiclibrary_version.txt.get.ts
  • server/routes/[srvid]/db/content/sfx/[...all].ts
  • server/routes/[srvid]/db/database/accounts/backupGJAccountNew.php.post.ts
  • server/routes/[srvid]/db/database/accounts/syncGJAccountNew.php.post.ts
  • server/routes/[srvid]/db/deleteGJAccComment20.php.post.ts
  • server/routes/[srvid]/db/deleteGJComment20.php.post.ts
  • server/routes/[srvid]/db/deleteGJFriendRequests20.php.post.ts
  • server/routes/[srvid]/db/deleteGJLevelList.php.post.ts
  • server/routes/[srvid]/db/deleteGJLevelUser20.php.post.ts
  • server/routes/[srvid]/db/deleteGJMessages20.php.post.ts
  • server/routes/[srvid]/db/downloadGJLevel.php.post.ts
  • server/routes/[srvid]/db/downloadGJLevel19.php.post.ts
  • server/routes/[srvid]/db/downloadGJLevel20.php.post.ts
  • server/routes/[srvid]/db/downloadGJLevel21.php.post.ts
  • server/routes/[srvid]/db/downloadGJLevel22.php.post.ts
  • server/routes/[srvid]/db/downloadGJMessage20.php.post.ts
  • server/routes/[srvid]/db/getAccountURL.php.ts
  • server/routes/[srvid]/db/getCustomContentURL.php.get.ts
  • server/routes/[srvid]/db/getGJAccountComments20.php.post.ts
  • server/routes/[srvid]/db/getGJChallenges.php.post.ts
  • server/routes/[srvid]/db/getGJCommentHistory.php.post.ts
  • server/routes/[srvid]/db/getGJComments.php.post.ts
  • server/routes/[srvid]/db/getGJComments19.php.post.ts
  • server/routes/[srvid]/db/getGJComments20.php.post.ts
  • server/routes/[srvid]/db/getGJComments21.php.post.ts
  • server/routes/[srvid]/db/getGJCreators.php.post.ts
  • server/routes/[srvid]/db/getGJCreators19.php.post.ts
  • server/routes/[srvid]/db/getGJDailyLevel.php.post.ts
  • server/routes/[srvid]/db/getGJFriendRequests20.php.post.ts
  • server/routes/[srvid]/db/getGJGauntlets.php.post.ts
  • server/routes/[srvid]/db/getGJGauntlets21.php.post.ts
  • server/routes/[srvid]/db/getGJLevelLists.php.post.ts
  • server/routes/[srvid]/db/getGJLevelScores.php.post.ts
  • server/routes/[srvid]/db/getGJLevelScores211.php.post.ts
  • server/routes/[srvid]/db/getGJLevelScoresPlat.php.post.ts
  • server/routes/[srvid]/db/getGJLevels.php.post.ts
  • server/routes/[srvid]/db/getGJLevels19.php.post.ts
  • server/routes/[srvid]/db/getGJLevels20.php.post.ts
  • server/routes/[srvid]/db/getGJLevels21.php.post.ts
  • server/routes/[srvid]/db/getGJMapPacks.php.post.ts
  • server/routes/[srvid]/db/getGJMapPacks20.php.post.ts
  • server/routes/[srvid]/db/getGJMapPacks21.php.post.ts
  • server/routes/[srvid]/db/getGJMessages20.php.post.ts
  • server/routes/[srvid]/db/getGJRewards.php.post.ts
  • server/routes/[srvid]/db/getGJScores.php.post.ts
  • server/routes/[srvid]/db/getGJScores19.php.post.ts
  • server/routes/[srvid]/db/getGJScores20.php.post.ts
  • server/routes/[srvid]/db/getGJSongInfo.php.post.ts
  • server/routes/[srvid]/db/getGJTopArtists.php.post.ts
  • server/routes/[srvid]/db/getGJUserInfo20.php.post.ts
  • server/routes/[srvid]/db/getGJUserList20.php.post.ts
  • server/routes/[srvid]/db/getGJUsers20.php.post.ts
  • server/routes/[srvid]/db/likeGJItem.php.post.ts
  • server/routes/[srvid]/db/likeGJItem19.php.post.ts
  • server/routes/[srvid]/db/likeGJItem20.php.post.ts
  • server/routes/[srvid]/db/likeGJItem21.php.post.ts
  • server/routes/[srvid]/db/likeGJItem211.php.post.ts
  • server/routes/[srvid]/db/rateGJDemon21.php.post.ts
  • server/routes/[srvid]/db/rateGJStars20.php.post.ts
  • server/routes/[srvid]/db/rateGJStars211.php.post.ts
  • server/routes/[srvid]/db/readGJFriendRequest20.php.post.ts
  • server/routes/[srvid]/db/removeGJFriend20.php.post.ts
  • server/routes/[srvid]/db/reportGJLevel.php.post.ts
  • server/routes/[srvid]/db/requestUserAccess.php.post.ts
  • server/routes/[srvid]/db/suggestGJStars20.php.post.ts
  • server/routes/[srvid]/db/unblockGJUser20.php.post.ts
  • server/routes/[srvid]/db/updateGJAccSettings20.php.post.ts
  • server/routes/[srvid]/db/updateGJDesc20.php.post.ts
  • server/routes/[srvid]/db/updateGJUserScore.php.post.ts
  • server/routes/[srvid]/db/updateGJUserScore19.php.post.ts
  • server/routes/[srvid]/db/updateGJUserScore20.php.post.ts
  • server/routes/[srvid]/db/updateGJUserScore21.php.post.ts
  • server/routes/[srvid]/db/updateGJUserScore22.php.post.ts
  • server/routes/[srvid]/db/uploadFriendRequest20.php.post.ts
  • server/routes/[srvid]/db/uploadGJAccComment20.php.post.ts
  • server/routes/[srvid]/db/uploadGJComment.php.post.ts
  • server/routes/[srvid]/db/uploadGJComment19.php.post.ts
  • server/routes/[srvid]/db/uploadGJComment20.php.post.ts
  • server/routes/[srvid]/db/uploadGJComment21.php.post.ts
  • server/routes/[srvid]/db/uploadGJLevel.php.post.ts
  • server/routes/[srvid]/db/uploadGJLevel19.php.post.ts
  • server/routes/[srvid]/db/uploadGJLevel20.php.post.ts
  • server/routes/[srvid]/db/uploadGJLevel21.php.post.ts
  • server/routes/[srvid]/db/uploadGJLevelList.php.post.ts
  • server/routes/[srvid]/db/uploadGJMessage20.php.post.ts
  • server/routes/[srvid]/index.get.ts
  • server/routes/index.get.ts
  • server/tasks/nightly/refresh_sfx.ts
  • server/utils/types.ts
  • server/utils/useCrypto.ts
  • server/utils/useDrizzle.ts
  • server/utils/useFabric.ts
  • server/utils/useGeometryDashTooling.ts
  • server/utils/useGzip.ts
  • server/utils/useLogger.ts
  • server/utils/usePerformance.ts
  • server/utils/usePostObject.ts
  • server/utils/useSDK.ts
  • server/utils/useServerConfig.ts
  • tests/core/database.ts
  • tests/core/injector.ts
  • tests/core/redis.ts
  • tests/core/utils.ts
  • tests/e2e/accounts/accountManagement.test.ts
  • tests/e2e/accounts/registerGJAccount.test.ts
  • tests/imports.d.ts
  • tests/mocks/useRuntimeConfig.ts
  • tests/mocks/useStorage.ts
  • tests/unit/useCrypto.test.ts
  • tests/unit/useDrizzle.test.ts
  • tests/unit/useGeometryDashTooling.test.ts
  • tests/unit/usePostObject.test.ts
  • tests/unit/useServerConfig.test.ts
  • tsconfig.json
  • types.d.ts
  • vitest.config.ts
  • vitest.setup.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/nitro-v3

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@TurboRigby
Copy link
Copy Markdown
Member Author

@m41denx check why vercel fails

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR appears to migrate the codebase to Nitro v3 (and updated H3/Nitro APIs), including updating runtime plugins/middleware, route handlers, and the Vitest setup/config to match the new event/runtime patterns.

Changes:

  • Migrates server/runtime code to Nitro v3-style imports and plugin APIs (nitro, nitro/h3, definePlugin, updated runtime config/storage usage).
  • Refactors many routes to run GDPS middleware explicitly and updates connector/controller call signatures to pass H3Event.
  • Updates tooling/config: ESM mode ("type": "module"), tsconfig path aliases, Vitest auto-import + global setup changes, and dependency bumps.

Reviewed changes

Copilot reviewed 199 out of 204 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
vitest.setup.ts Converts Vitest global setup to default export returning teardown; adjusts test container injection.
vitest.config.ts Updates config for Nitro test utils + aliases and auto-import output path.
tsconfig.json Adds path aliases and changes Nitro tsconfig extends path.
types.d.ts Updates module augmentations for Nitro/H3 context types.
package.json Switches to ESM and bumps dependencies for Nitro v3 migration.
nitro.config*.ts Updates Nitro configuration structure (aliases/serverDir/typescript generation/presets).
server/gdps_middleware/** Refactors GDPS middleware initialization and helpers to accept H3Event and new helpers.
server/middleware/01.real_ip.ts Updates client IP extraction logic for Nitro/H3 changes.
server/utils/usePostObject.ts Changes form parsing approach and preparsed body caching.
controller/** Updates controller typings and (in some places) runtime/config access patterns for Nitro v3.
server/plugins/** Migrates plugins to Nitro v3 definePlugin, adjusts router/hooks usage, and storage integration.
server/routes/** Refactors many route handlers for new middleware/event/connector patterns; adds headers across endpoints.
README.md Updates license section and adds new README content.
.gitignore Adds ignores for generated/compiled artifacts and test auto-import d.ts outputs.
Comments suppressed due to low confidence (3)

server/routes/index.get.ts:29

  • The Tailwind CDN URL contains an extra "?" ("https://cdn?.tailwindcss.com"), which will fail to load Tailwind in the browser. Replace it with the correct Tailwind CDN URL.
    server/plugins/plugin-gdpsswitcher.ts:52
  • The fallback icon URL includes an extra "?" ("https://cdn?.rigby.host/..."), which will result in a broken icon URL. Replace it with the correct host.
    nitro.config-vercel.ts:49
  • The comment URL for the Unstorage Vercel Blob driver is malformed ("https://unstorage?.unjs.io/..."), so the reference link is broken. Update it to the correct documentation URL.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread vitest.setup.ts
Comment on lines +21 to +26
export default defineEventHandler((event: H3Event) => {
const h = (header: string) => event.req.headers.get(header);
event.context.clientAddress = h("cf-connecting-ip")
|| h("x-forwarded-for")
|| h("x-real-ip")
|| event.node.req.socket.remoteAddress;
|| (event.node?.req?.socket?.remoteAddress);
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

event.req is not a stable/standard H3/Nitro API surface across runtimes; using event.req.headers.get(...) may throw if req is undefined. Prefer the H3 helpers (e.g., getRequestHeader) or event.node.req.headers (Node) / event.request.headers (web) consistently.

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +30
export const withPreparsedForm = async (event: H3Event): Promise<FormData> => {
if (!event.context?._preparsedBody)
event.context._preparsedBody = await event.req.formData()
return event.context._preparsedBody as FormData
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

event.req.formData() is likely not available on H3Event in all Nitro runtimes (Node/CF/etc). This can crash request handling. Prefer readFormData(event) (h3 helper) or event.request.formData() if you are intentionally using the web Request API, and keep the approach consistent with the rest of the codebase.

Copilot uses AI. Check for mistakes.
Comment on lines +108 to +109
eq(scoresTable?.levelId, scoresTable?.levelId),
eq(scoresTable?.uid, scoresTable?.uid)
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

updateScore()'s WHERE clause compares each column to itself (levelId = levelId and uid = uid), which will match all rows and can update the entire table. This should constrain by the identifying values from data (or separate params), e.g. where(levelId = data.levelId AND uid = data.uid).

Suggested change
eq(scoresTable?.levelId, scoresTable?.levelId),
eq(scoresTable?.uid, scoresTable?.uid)
eq(scoresTable?.levelId, data.levelId),
eq(scoresTable?.uid, data.uid)

Copilot uses AI. Check for mistakes.
Comment on lines +31 to +35
if (platform === "vercel") {
const storage = useStorage("config")
if (storage && typeof storage.mount === "function") {
storage.mount("config", storageDriver({ url: process.env.EDGE_CONFIG_TOKEN || "" }))
}
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

This mounts the "config" driver onto a storage instance that is already scoped to the "config" namespace (useStorage("config")), and then mounts again at key "config". This likely results in an incorrect mount point (double-prefix) or no-op depending on the storage wrapper. Use the root storage (useStorage()) when calling .mount("config", ...), or mount the driver via Nitro config instead of runtime mounting.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 199 out of 204 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 47 to 52
if (useRuntimeConfig().platform) {
if (!privatePool) {
if (process.env.DATABASE_URL) {
if (process.env?.DATABASE_URL) {
console.log("Detected possible Postgres Neon")
privatePool = drizzle(process.env.DATABASE_URL, {schema, logger: !!process.env.VERBOSE})
privatePool = drizzle(process.env?.DATABASE_URL, {schema, logger: !!process.env?.VERBOSE})
}
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

useRuntimeConfig().platform is configured as a non-empty string (e.g. "vercel"/"cloudflare"/"standalone"), so if (useRuntimeConfig().platform) will always be truthy and force the code path that uses privatePool and env URLs, skipping per-srvid pools. Compare against the specific platforms that should use a single DB URL (or use a dedicated boolean flag).

Copilot uses AI. Check for mistakes.
Comment thread tests/core/injector.ts
Comment on lines +24 to +27
config.devStorage!.config = {
...inject("config"),
driver: "redis"
}
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

This setup assumes config.devStorage exists, but nitro.config.ts no longer defines devStorage. The non-null assertion will crash tests at startup. Either reintroduce devStorage in the config used by tests, or update the injector/mocks to mount/override storage via useStorage().mount(...) (or another supported Nitro/unstorage mechanism).

Copilot uses AI. Check for mistakes.
Comment thread nitro.config.ts
Comment on lines 45 to 57
storage: {
savedata: {
driver: "s3",
accessKeyId: process.env.S3_ACCESS_KEY,
secretAccessKey: process.env.S3_SECRET,
endpoint: process.env.S3_URL,
bucket: process.env.S3_BUCKET,
region: process.env.S3_REGION || "us-east-1",
driver: "vercel-blob",
access: "public", // DO NOT CHANGE, THIS IS MANDATORY AND IS NOT A BUG: https://unstorage.unjs.io/drivers/vercel#vercel-blob
// token: process.env.BLOB_READ_WRITE_TOKEN, // Optional
},
config: {
driver: "redis",
url: process.env.REDIS_URL,
}
// This driver doesn't exist in upstream unstorage, so it is loaded dynamically as storage plugin asn always
// needs process.env.EDGE_CONFIG
// config: {
// driver: "storage-vercel-edgeconfig",
// // url: process.env.EDGE_CONFIG // Optional
// }
},
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

devStorage was removed from this config, but the vitest injector/mocks still import ~~/nitro.config and mutate/read config.devStorage.*. This will break tests unless the tests are switched to a config that still includes devStorage (e.g. the base config) or the tests are updated to mount drivers without relying on devStorage.

Copilot uses AI. Check for mistakes.
Comment on lines 28 to +32
const role = await event.context.user!.fetchRole()
if (role && role.privileges.aReqMod) {
await event.context.connector.numberedSuccess(role.modLevel,"Yes, you are a mod")
if (role && role.privileges?.aReqMod) {
await event.context.connector.numberedSuccess(event, role?.modLevel,"Yes, you are a mod")
} else {
await event.context.connector.error(-1, "You do not have permission to perform this action")
await event.context.connector.error(event, -1, "You do not have permission to perform this action")
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

The handler awaits connector.numberedSuccess() / connector.error() but does not return the resulting body string. Since the connector methods return response payloads (and don't call send here), this endpoint will respond with an empty body. Return the connector call in both branches.

Copilot uses AI. Check for mistakes.
Comment on lines 55 to 60
const date = quest.timeAdded
date.setHours(0, 0, 0, 0)
date.setDate(date.getDate() + (variant === "daily" ? 1 : 7))

const left = Math.floor(Math.max(0, quest.timeAdded.getTime() - Date.now()) / 1000)
const left = Math.floor(Math.max(0, quest?.timeAdded.getTime() - Date.now()) / 1000)

Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

left is computed from quest.timeAdded, which (given the controller query constraints) is not in the future, so left will always be 0. You already compute the next reset time in date; use date.getTime() (after adding 1/7 days) for the countdown instead.

Copilot uses AI. Check for mistakes.
Comment on lines +61 to 64
await event.context.connector?.quests.getSpecialLevel(
quest?.id,
left
)
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

The handler awaits connector.quests.getSpecialLevel(...) but does not return it, so the route will respond with an empty body. Return the connector output (and avoid optional chaining here if connector is guaranteed by middleware).

Copilot uses AI. Check for mistakes.
Comment on lines +31 to +35
if (platform === "vercel") {
const storage = useStorage("config")
if (storage && typeof storage.mount === "function") {
storage.mount("config", storageDriver({ url: process.env.EDGE_CONFIG_TOKEN || "" }))
}
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

This mounts the driver onto useStorage("config") and then mounts another "config" namespace under it, which is likely the wrong level (and may be a no-op if the namespaced storage doesn't support mount). Mount drivers on the root storage (useStorage()) and mount the config namespace once.

Copilot uses AI. Check for mistakes.
Comment on lines 119 to 123
}

await event.context.connector.numberedSuccess(data.levelID, "Level uploaded successfully")
await event.context.connector.numberedSuccess(event, data?.levelID, "Level uploaded successfully")

}
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

This route awaits connector.numberedSuccess(...) but does not return it, so the response body will be empty. Return the connector call (and consider returning early in both the update and create branches for clarity).

Copilot uses AI. Check for mistakes.
Comment on lines 45 to 49
if (uid > 0) {
await event.context.connector.account.login(uid)
await new ActionController(event.context.drizzle)
.registerAction("login_user", 0, uid, {uname: data.userName})
await event.context.connector?.account.login(uid)
await new ActionController(event.context?.drizzle)
.registerAction(event, "login_user", 0, uid, {uname: data?.userName})

Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

On successful login, the handler calls connector.account.login(uid) but does not return its result, so the response body will be empty. Return the connector output (and consider returning after registering the action to avoid falling through).

Copilot uses AI. Check for mistakes.
@m41denx
Copy link
Copy Markdown
Contributor

m41denx commented Apr 5, 2026

@m41denx check why vercel fails

Nitro internal imports cannot resolve

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants