You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.1 KiB
46 lines
1.1 KiB
import { IApi } from '@umijs/types';
|
|
export interface CtxTypes {
|
|
repo?: any;
|
|
branch?: any;
|
|
path?: string;
|
|
id?: string;
|
|
routePath?: string;
|
|
isLocal?: boolean;
|
|
sourcePath?: string;
|
|
repoExists?: boolean;
|
|
filePath?: string;
|
|
templateTmpDirPath?: string;
|
|
pkg?: {
|
|
blockConfig: {
|
|
[key: string]: any;
|
|
};
|
|
};
|
|
}
|
|
export interface AddBlockOption {
|
|
_?: string[];
|
|
url?: string;
|
|
branch?: string;
|
|
path?: string;
|
|
name?: string;
|
|
routePath?: string;
|
|
npmClient?: string;
|
|
dryRun?: boolean;
|
|
skipDependencies?: boolean;
|
|
skipModifyRoutes?: boolean;
|
|
page?: boolean;
|
|
layout?: boolean;
|
|
registry?: string;
|
|
js?: boolean;
|
|
uni18n?: boolean;
|
|
execution?: 'shell' | 'auto';
|
|
index?: number;
|
|
remoteLog?: (log: string) => void;
|
|
}
|
|
export declare const addPrefix: (path: any) => any;
|
|
export declare function getCtx(url: any, args: AddBlockOption, api: IApi): Promise<CtxTypes>;
|
|
export declare function addBlock(args: AddBlockOption, opts: AddBlockOption, api: IApi): Promise<{
|
|
generator: any;
|
|
ctx: CtxTypes;
|
|
logs: any[];
|
|
}>;
|