t-comm
Version:
专业、稳定、纯粹的工具库
36 lines (35 loc) • 962 B
TypeScript
import type { IUploadResult } from './types';
export declare function getInnerBundleBuildDesc({ env, branch, author, message, }: {
env: string;
branch: string;
author: string;
message: string;
}): string;
export declare function getBundleBuildDesc({ root, env, branch, author, message, }: {
root: string;
env?: string;
branch?: string;
author?: string;
message?: string;
}): string;
export declare function getBundleVersion(root: string): any;
/**
* 解析上传结果
* @example
* ```ts
* parseUploadResult({
* subPackageInfo: [
* { name: '__APP__', size: 102400 },
* { name: 'pages/foo', size: 51200 },
* ],
* });
* // [
* // 'PACKAGE SIZE INFO: ',
* // '- 主包: 100KB',
* // '- pages/foo: 50KB',
* // ]
* ```
* @ignore
*/
export declare function parseUploadResult(result: IUploadResult): string[];
export declare function flattenSubPackages(result: IUploadResult): Record<string, any>;