@lark-project/cli
Version:
飞书项目插件开发工具
26 lines (25 loc) • 1.37 kB
TypeScript
import { getPluginDescriptionInfo } from "../../../api/tools/update-plugin-description";
type DescInfo = Awaited<ReturnType<typeof getPluginDescriptionInfo>>;
export interface MissingBaseInfoField {
/** 展示名(英文,对齐 update-description flag 语义) */
field: string;
/** 可操作下一步:补这项该跑哪条命令 */
hint: string;
}
/**
* 计算「发布前缺哪些必填 base info」——纯函数,无网络,可单测。
*
* 必填项:name / short / detail-description / icon;category 仅普通插件必填
* (AI 应用 app_type===1 跳过,对齐 ensurePluginMetadataReady 既有行为)。
*
* detail-description 判空对齐 plainTextToRichText(update-plugin-description.ts):
* 填过的富文本 is_empty===false 且 doc_text 为原文;从未填则 description 缺失或 is_empty===true。
* 这一项是本次新增——此前闸门只查 name/short/icon/category,detail 漏填能过闸门、却被后端
* commit 打回,导致版本建成半成品。
*/
export declare function collectMissingBaseInfo(descInfo: DescInfo): MissingBaseInfoField[];
/**
* 把缺失清单格式化成带逐字段可操作指引的错误信息(Layer 1 闸门 / Layer 2 commit 守卫共用)。
*/
export declare function formatMissingBaseInfoError(missing: MissingBaseInfoField[]): string;
export {};