Conversation
Keep a tracked root handler so EdgeOne enables its Node function builder before running the project build. Generate the backend bundle in dist-server and keep it out of function discovery and version control. Verify the entry before building and exercise diagnostics and SPA responses after bundling. Remove a duplicate DbCipher type import that blocked lint. Co-authored-by: Codex <noreply@openai.com>
ycbhk
added a commit
to ycbhk/OpenList-Worker
that referenced
this pull request
Oct 4, 2026
EdgeOne CLI 在执行项目构建前就决定启用哪些函数构建器,而 Node 后端入口 (api/_makers.ts -> cloud-functions/[[default]].js) 原先由 pnpm run build 在 构建过程中生成;CLI 决策时它尚不存在,于是该 Node 函数从未被注册:前端构建 成功,但 /api/* 全部落到 SPA 兜底,只有 4 个 KV 边缘函数被部署。 本提交跟踪一个显式导出 onRequest 的入口文件,使 Node 函数能在构建前被发现; 实际后端包改由 dist-server/edgeone-entry.js 生成,避免被平台注册为额外路由。 对应上游 PR OpenListTeam#101。
ycbhk
added a commit
to ycbhk/OpenList-Worker
that referenced
this pull request
Oct 4, 2026
EdgeOne CLI 在执行项目构建前就决定启用哪些函数构建器,而 Node 后端入口 (api/_makers.ts -> cloud-functions/[[default]].js) 原先由 pnpm run build 在 构建过程中生成;CLI 决策时它尚不存在,于是该 Node 函数从未被注册:前端构建 成功,但 /api/* 全部落到 SPA 兜底,只有 4 个 KV 边缘函数被部署。 本提交跟踪一个显式导出 onRequest 的入口文件,使 Node 函数能在构建前被发现; 实际后端包改由 dist-server/edgeone-entry.js 生成,避免被平台注册为额外路由。 对应上游 PR OpenListTeam#101。
ycbhk
added a commit
to ycbhk/OpenList-Worker
that referenced
this pull request
Oct 4, 2026
EdgeOne CLI 在执行项目构建前就决定启用哪些函数构建器,而 Node 后端入口 (api/_makers.ts -> cloud-functions/[[default]].js) 原先由 pnpm run build 在 构建过程中生成;CLI 决策时它尚不存在,于是该 Node 函数从未被注册:前端构建 成功,但 /api/* 全部落到 SPA 兜底,只有 4 个 KV 边缘函数被部署。 本提交跟踪一个显式导出 onRequest 的入口文件,使 Node 函数能在构建前被发现; 实际后端包改由 dist-server/edgeone-entry.js 生成,避免被平台注册为额外路由。 对应上游 PR OpenListTeam#101。
ycbhk
added a commit
to ycbhk/OpenList-Worker
that referenced
this pull request
Oct 4, 2026
EdgeOne CLI 在执行项目构建前就决定启用哪些函数构建器,而 Node 后端入口 (api/_makers.ts -> cloud-functions/[[default]].js) 原先由 pnpm run build 在 构建过程中生成;CLI 决策时它尚不存在,于是该 Node 函数从未被注册:前端构建 成功,但 /api/* 全部落到 SPA 兜底,只有 4 个 KV 边缘函数被部署。 本提交跟踪一个显式导出 onRequest 的入口文件,使 Node 函数能在构建前被发现; 实际后端包改由 dist-server/edgeone-entry.js 生成,避免被平台注册为额外路由。 对应上游 PR OpenListTeam#101。
ycbhk
added a commit
to ycbhk/OpenList-Worker
that referenced
this pull request
Oct 4, 2026
EdgeOne CLI 在执行项目构建前就决定启用哪些函数构建器,而 Node 后端入口 (api/_makers.ts -> cloud-functions/[[default]].js) 原先由 pnpm run build 在 构建过程中生成;CLI 决策时它尚不存在,于是该 Node 函数从未被注册:前端构建 成功,但 /api/* 全部落到 SPA 兜底,只有 4 个 KV 边缘函数被部署。 本提交跟踪一个显式导出 onRequest 的入口文件,使 Node 函数能在构建前被发现; 实际后端包改由 dist-server/edgeone-entry.js 生成,避免被平台注册为额外路由。 对应上游 PR OpenListTeam#101。
ycbhk
added a commit
to ycbhk/OpenList-Worker
that referenced
this pull request
Oct 4, 2026
EdgeOne CLI 在执行项目构建前就决定启用哪些函数构建器,而 Node 后端入口 (api/_makers.ts -> cloud-functions/[[default]].js) 原先由 pnpm run build 在 构建过程中生成;CLI 决策时它尚不存在,于是该 Node 函数从未被注册:前端构建 成功,但 /api/* 全部落到 SPA 兜底,只有 4 个 KV 边缘函数被部署。 本提交跟踪一个显式导出 onRequest 的入口文件,使 Node 函数能在构建前被发现; 实际后端包改由 dist-server/edgeone-entry.js 生成,避免被平台注册为额外路由。 对应上游 PR OpenListTeam#101。
ycbhk
added a commit
to ycbhk/OpenList-Worker
that referenced
this pull request
Oct 4, 2026
EdgeOne CLI 在执行项目构建前就决定启用哪些函数构建器,而 Node 后端入口 (api/_makers.ts -> cloud-functions/[[default]].js) 原先由 pnpm run build 在 构建过程中生成;CLI 决策时它尚不存在,于是该 Node 函数从未被注册:前端构建 成功,但 /api/* 全部落到 SPA 兜底,只有 4 个 KV 边缘函数被部署。 本提交跟踪一个显式导出 onRequest 的入口文件,使 Node 函数能在构建前被发现; 实际后端包改由 dist-server/edgeone-entry.js 生成,避免被平台注册为额外路由。 对应上游 PR OpenListTeam#101。
ycbhk
added a commit
to ycbhk/OpenList-Worker
that referenced
this pull request
Oct 4, 2026
EdgeOne CLI 在执行项目构建前就决定启用哪些函数构建器,而 Node 后端入口 (api/_makers.ts -> cloud-functions/[[default]].js) 原先由 pnpm run build 在 构建过程中生成;CLI 决策时它尚不存在,于是该 Node 函数从未被注册:前端构建 成功,但 /api/* 全部落到 SPA 兜底,只有 4 个 KV 边缘函数被部署。 本提交跟踪一个显式导出 onRequest 的入口文件,使 Node 函数能在构建前被发现; 实际后端包改由 dist-server/edgeone-entry.js 生成,避免被平台注册为额外路由。 对应上游 PR OpenListTeam#101。
4 tasks done
MoeFurina
approved these changes
Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 摘要
On a fresh EdgeOne deployment, the frontend build can succeed while
/api/public/env_checkreturns the SPA HTML and only the four KV proxy Edge Functions are deployed. The Node backend entry was generated duringpnpm run build, after the CLI had already decided which function builders to enable.Track a small
cloud-functions/[[default]].jsentry with an explicitonRequestexport, so Node functions can be discovered before the project build.Generate the actual backend bundle at
dist-server/edgeone-entry.js. The entry imports that bundle, keeping generated code out of Git and preventing it from being registered as an additional function route.Preserve the root catch-all to cover existing
/api/*, download, WebDAV, S3 and SPA routes.Update ignore rules, middleware documentation and Build Verify. CI checks that the tracked entry exists before building and tests JSON diagnostics and SPA responses through both the entry and a second bundle.
Remove an existing duplicate
DbCiphertype import that preventedpnpm run lintfrom passing.This PR has breaking changes.
This PR changes public API, config, storage format, or migration behavior.
This PR requires corresponding changes in related repositories.
Related Issues / 关联 Issue
Relates to #93.
Testing / 测试
Validated locally with Node 22.21.1 and pnpm 9.15.4:
pnpm install --frozen-lockfilenode scripts/fetch-frontend.mjsandpnpm run build:edgepnpm run lintnode --import tsx --test src/backend/server/*.test.ts— 175 passed.node --test tests/edgeone-entry.test.mjs— 4 passed.git diff --check.edgeone@1.6.41CLI comparison using clean before/after snapshots: the original code completed its project build without producing a Node function; the fixed code produced.edgeone/cloud-functions/api-node/index.mjswith a single^/(.*)$route. Dependencies and official frontend assets were provided beforehand; the snapshot install command was a no-op and its build command wasnode scripts/build-edge.mjs./api/public/env_checkand/api/public/init_status: both returned HTTP 200 and JSON diagnostic data. This check intentionally had no production storage binding; it verifies the handler and diagnostics, not production storage readiness.An EdgeOne production redeployment has not been performed. After redeploying, verify that the Node function appears and
/api/public/env_checkreturns JSON before investigating storage availability.Checklist / 检查清单
AI Disclosure / AI 使用声明
Co-authored-byattribution.The user supplied the deployment symptoms, logs and proposed discovery fix, and requested this contribution. Codex implemented and reviewed the changes and ran the validation above. Human code review remains pending.