import { IApi } from '@umijs/types'; /** * 判断一个路径是否为空 * 只要有一个文件就算非空 * @param {*} path */ export declare const isEmptyFolder: (path: any) => boolean; export declare function getNameFromPkg(pkg: any): string; /** * 删除重复依赖,projectDeps 中的依赖从 blockDeps 中删除 * @param {*} blockDeps * @param {*} projectDeps */ export declare function filterDependenciesRepeat(blockDeps: any, projectDeps: any): {}; export declare function getAllBlockDependencies(rootDir: any, pkg: any): {}; /** * 检查依赖项之间的冲突 * @param {*}} blockPkgDeps * @param {*} projectPkgDeps * @param {*} blockPkgDevDeps * @param {*} projectPkgAllDeps */ export declare function dependenciesConflictCheck(blockPkgDeps?: {}, projectPkgDeps?: {}, blockPkgDevDeps?: {}, projectPkgAllDeps?: {}): { conflicts: any[]; lacks: any[]; devConflicts: any[]; devLacks: any[]; }; /** * 获取 mock 的依赖 * @param {*} mockContent * @param {*} blockPkg */ export declare function getMockDependencies(mockContent: any, blockPkg: any): {}; export declare function parseContentToSingular(content: any): any; export declare function getSingularName(name: any): any; export declare const getBlockGenerator: (api: IApi) => { new ({ args, name }: { args: any; name: any; }): { isTypeScript: any; sourcePath: any; dryRun: any; path: any; blockFolderPath: any; routePath: any; blockName: any; isPageBlock: any; execution: any; needCreateNewRoute: any; blockFolderName: any; entryPath: any; routes: any; on: any; prompt: any; fs: any; store: any; blockType: 'block' | 'template'; addType: 'git' | 'files'; files: string[]; run(): Promise; gitBlockWriting(): Promise; filesBlockWriting(): Promise; writing(): Promise; cwd: string; args: { [argName: string]: unknown; _: string[]; $0: string; }; copyTpl(opts: { templatePath: string; target: string; context: object; }): void; copyDirectory(opts: { path: string; context: object; target: string; }): void; }; };