UNPKG

rapplus

Version:
35 lines (34 loc) 1.57 kB
import { IGeneratedCode } from './types'; export declare function withoutExt(p: string): string; export declare function relativeImport(from: string, to: string): string; export declare function mixGeneratedCode(codeArr: Array<IGeneratedCode>): string; export declare function writeFile(filepath: string, contents: string): Promise<void>; export declare function moveFile(from: string, to: string): Promise<void>; /** * 命令是否在根目录执行 */ export declare function isInRoot(): boolean; export declare function searchRootPath(rank?: number): string; /** 获取文件md5 */ export declare function getMd5(fileContent: string): string; export declare function getOldProjectId(rappperPath: string): string | undefined; export declare function getRapModuleId(content: string): number; /** 模板文件覆盖确认 */ export declare function templateFilesOverwriteConfirm(): Promise<any>; /** 存在接口依赖被删确认 */ export declare function templateFilesRelyConfirm(): Promise<any>; /** 获取当前包名 */ export declare function getPackageName(): any; export declare function getPackageRegistry(): any; /** 获取最新的版本 */ export declare function latestVersion(packageName: string, isBeta?: boolean): Promise<string>; export declare function getContentMd5(content: string): { oldMd5: string; content: string; newMd5: string; }; export declare function updateFileContent(filePath: any, content: any): Promise<unknown>; export declare function promiseReadFile(path: string): Promise<{ content: string; path: string; }>;