feat(registration): support preset field in registerApp addons#196
Open
mazhe-nerd wants to merge 1 commit into
Open
feat(registration): support preset field in registerApp addons#196mazhe-nerd wants to merge 1 commit into
mazhe-nerd wants to merge 1 commit into
Conversation
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.
改动
为
registerApp的addons配置新增顶层布尔字段preset,用于选择创建应用时使用的模板底座。AppAddons新增可选preset?: boolean:true/ 缺省:保留平台默认模板,叠加声明的 scopes / events / callbacks(与既有行为一致)。false:切到最小基础模板底座,只展示显式声明的项。normalizeAddons/encodeAddons:preset加入顶层键白名单;非 boolean 抛addons.preset must be a boolean,校验先于空载判断(防'false'绕过),仅透传验证后的 boolean。preset: false时允许零增量;其余情况仍要求至少一项。preset经 gzip+base64url 编码进addonsquery;URL 不新增独立参数,提交链路零改动。兼容性
向后兼容:不传
preset时归一化输出不含preset键、空载仍要求至少一项,行为与改动前一致。AppAddons已对外导出,新增可选字段不破坏既有调用方。验收
新增 7 个单测覆盖:true/false 透传 round-trip、
preset:false零增量合法、preset:true/缺省零增量仍报错、缺省不注入、非 boolean 报错(含校验顺序)、无 preset 回归。build 通过、全量单测 399 全绿;e2e 装本地包在沙箱验证
preset:false正确编码进创建链路 URL。