/** * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途 */ import { CommandPromiseRes, EnvCustom, ConfigOptions, PkgMap, ConfigInfoResponse, ArgsResponse, ProjectConfig, Platform, ProgressType, BranchMap, ProjectType } from "types"; export declare const tagPattern: RegExp; export declare function noop(): void; export declare const getDir: () => { rootPath: string; npmDir: string; sourceDir: string; destinationDir: string; sourceRoot: string; appEntryPath: string; appEntryConfigPath: string; needCopy: boolean; }; export declare function getHelper(): any; /** * * @description 获取alias配置 * 注意 alias 已经使用 SOURCE_ROOT_PATH 替换,需要做一次还原为源路径 */ export declare function getAlias(): any; export declare const moduleSuffix: string[]; export declare const styleSuffix: string[]; export declare const imageSuffix: string[]; export declare const filesSuffix: string[]; export declare function checkIsModuleSuffix(suffix: any): boolean; export declare function checkIsStyleSuffix(suffix: any): boolean; export declare function checkIsImageSuffix(suffix: any): boolean; export declare function checkIsFileSuffix(suffix: any): boolean; /** * * @description 进度描述信息 * @param type * @param status * @returns */ export declare function CreateProgress(type: ProgressType, item: string): void; export declare const pkgMap: PkgMap; /** * * @description 命令触发器:执行系统指令 * @param commandStr 命令行字符串 * @returns */ export declare function commandTrigger(commandStr: string, isWatch: boolean, isDebug: boolean, item: string, env?: EnvCustom): Promise; export declare function readConfigPure(name?: string): ConfigOptions; export declare function readConfig(name?: string): ConfigOptions; /** * * @description 从tagname 获取类型和版本 */ export declare function getTypeAndVersionFromTagName(): { type?: undefined; version?: undefined; } | { type: string; version: string; }; export declare function getArgs(branchMap?: BranchMap): ArgsResponse; /** * * @description 获取类似Taro的环境变量,包含aliapp,weapp * @param item * @returns */ export declare function getTARO_ENV(): Platform; /** * * @param item * @returns */ export declare function getProjectConfigPath(): string; /** * * @description 读取项目配置信息 * @param item * @returns */ export declare function readProjectConfig(): Promise; export declare const compileTypeMap: { [k: string]: ProjectType; }; /** * * @description 重新微信小程序模板ext文件 * @param item */ export declare function rewriteExt(item: string): Promise; /** * * @description 重写小程序配置文件 project.config.json */ export declare function rewriteProjectConfig(item: string): Promise; /** * * @description 获取taro-ci.config.info 并根据一定规则格式化 * @param item * @param robot */ export declare function getAndFormatConfigInfo(item: string): ConfigInfoResponse; /** * * @description 格式化指令,首位为平台信息 * @param item * @returns */ export declare function formateCommand(item: string, defaultMode?: string): [Platform, string, string]; export declare function isObject(obj: any): boolean; export declare function isArray(arr: any): boolean; /** * @description 合并数据 * @param target * @param arg * @returns */ export declare function merge(target: any, ...arg: any[]): any; /** * * @description 处理路径 * @param pathname * @param suffix * @returns */ export declare function resolvePath(pathname: string, suffix?: string): string; /** * * @description 安装指令 * @param name * @returns */ export declare function installCommand(name: any): Promise; /** * * @description 替换 * @param obj * @param keyMap */ export declare function recursiveReplaceObjectKeys(obj: any, keyMap: any): void; export declare const checkIsDynamicRoot: (root: string) => boolean; export declare function isInSameFolder(pathA: any, pathB: any): boolean; export declare function checkIsOldTaroVersion(): boolean; export declare function isFunciton(fun: any): boolean;