Repository navigation
修复文章 SSR 离线包遗漏 jsdom,切换前验证真实文章渲染 - #89
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
文章页面的 Markdown SSR 懒加载块需要仓库已有的 jsdom 渲染依赖。此前离线包只携带编译输出,服务器缺少该依赖,实际渲染文章时返回 503;仅导入 document.mjs 无法发现懒加载依赖缺失。
主站离线包现在携带 scripts/document-runtime 已声明并锁定的纯 JavaScript jsdom 依赖,在本机构建后随 runtime 一起上传;线上无需 npm 或业务依赖安装。部署前用暂存渲染器及现有只读公共 API loader 渲染真实 article/17,成功后才切换文件。原有备份、校验和自动回滚保留,海外包仍仅包含静态资源。
验证:两项打包测试覆盖缺少依赖时中止、纯 JS 文件完整打包与拒绝 native .node 文件;bash 语法检查通过。本机从原有锁文件 npm ci --omit=dev --ignore-scripts,39 包、审计 0 漏洞。页面源码、API 数据结构、业务依赖声明及数据库均未修改。