SuperAPI AI 工具集

fix-manifest-json

通用与其它

查看项目

更新于 10-15 23:57

技能介绍

用途:修复 UI5 linter 能检测但无法自动修复的 manifest.json 问题,这些问题通常需要理解应用依赖与结构。

主要能力:处理 no-outdated-manifest-version(将根 _version 更新为 "2.0.0",不改嵌套 _version)、no-legacy-ui5-version-in-manifest(将 minUI5Version 更新为 "1.136.0")、no-deprecated-library(从 dependencies/libs 移除废弃库)、no-deprecated-component(移除废弃组件)、no-deprecated-api(视图类型改为 "XML";空的 sap.ui5/resources/js 移除)、no-removed-manifest-property(移除已删除属性)。更新到 2.0.0 时还需重命名路由属性:viewPath→path、viewName→name、viewId→id、viewLevel→level,并添加 type: "View";async 仅从 sap.ui5/rootView 和 sap.ui5/routing/config 移除,模型设置、dataSources 等处的 async 必须保留。

使用方式:当 linter 输出上述规则时应用本技能,按规则逐条修改 manifest.json,保留 JSON 缩进格式后写回文件。

限制:视图类型改为 XML 需同步转换实际视图文件,属人工后续任务;移除废弃库需检查代码引用;minUI5Version 提升后应用无法在旧版 UI5 运行;IAsyncContentCreation 不由本技能处理,需用 fix-component-async;HTML bootstrap 中的废弃库应改用 fix-bootstrap-params。