import { ICodeItem } from '@cloudbase/cals'; /** * 指定目录下的文件转代码 * 注意:该方法仅仅用于 code to cals 使用,请不要使用于其它用途 */ export declare function fileToCode(dirPath: string, onlyPath?: boolean): Promise; /** * 获取目录下的所有子目录 * @param dirPath 目录路径 */ export declare function lsDirs(dirPath: string): Promise; /** * 合并写入 json 文件 * @param jsonPath * @param data * @returns */ export declare function mergeWriteJSON(jsonPath: string, data: any): Promise; /** * 安全写入文件,如果文件不存在会先创建 * @param filePath * @param content */ export declare function safeWriteFile(filePath: string, content: string): Promise; /** * JSON Schema 转换成 Markdown 表格 * @param schema * @param options */ export declare function jsonschema2MDTable(schema: any, options?: { showIsRequired: boolean; }): string; /** * 将 JSON 转成环境变量格式 * {a: 'a', b: {b1: 'b1'}, c: ['c1']} * => * a=a * b.b1=b1 * c.0=c1 */ export declare function convertJSONToEnvContent(json: { [key: string]: any; }, prefix?: string): string; /** * 将环境变量内容转成 JSON * * a=a * b.b1=b1 * c.0=c1 * => * {a: 'a', b: {b1: 'b1'}, c: ['c1']} */ export declare function convertEnvContentToJSON(envFile: string): Promise<{}>; //# sourceMappingURL=utils.d.ts.map