Fix/builder check plugin options and web desktop preview - #917
Open
tangkaikk wants to merge 4 commits into
Open
Conversation
- checkOptions 中将 checkPluginOptions 校验提前到默认值合并之后, 使插件参数校验失败时能立即中断,避免后续无效流程 - checkPluginOptions 内 warn 级别(带默认值)分支补充 verifyLevel === 'error' 时将 checkRes 置为 false,确保 error 级别 校验失败能正确反映到整体校验结果 Co-Authored-By: Claude Code <noreply@anthropic.com>
此前 previewUrl 仅在 run 阶段(commonUtils.run)中生成并写入 buildExitRes.custom。当 run 阶段被跳过(stage-task-manager 的 isStageSupported 因 options.platform 为空而判定 unsupported)时, buildExitRes.custom.previewUrl 缺失,调用方拿不到预览地址。 将 previewUrl 的生成提前到 onAfterBuild 钩子(构建产物已就绪), 通过 commonUtils.getPreviewUrl(result.paths.dir, options.platform) 计算并写入 buildExitRes.custom,确保无论 run 阶段是否执行, 构建结果都携带预览地址。 Co-Authored-By: Claude Code <noreply@anthropic.com>
- checkOptions 中将 checkPluginOptions 校验提前到默认值合并之后, 仅在 options.packages 存在时执行;校验失败立即中断,避免后续无效流程 - checkPluginOptions 内 warn 级别(带默认值)分支补充 verifyLevel === 'error' 时将 checkRes 置为 false,确保 error 级别 校验失败能正确反映到整体校验结果 Co-Authored-By: Claude Code <noreply@anthropic.com>
star-e
approved these changes
Sep 7, 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.
回值没有 previewUrl,会导致 PinK 构建打不开预览