/// import { MiniProgramCore } from './core'; import { MiniProgramSummer, IBasicCodeExt } from './summer'; export declare namespace MiniProgramDevtools { type IBuildLogType = 'doing' | 'success' | 'error' | 'info' | 'warn'; interface IAppConf { app: any; ext: any; packages: Record; pages: Record; comps: Record; sitemap: any; theme: any; } type IFilterFactory = (resultType: MiniProgramCore.IResultType) => Promise<(graph: GraphId, abFilePath: string) => number>; interface IGameConf { app: any; packages: Record; } interface IPluginConf { plugin: any; pages: Record; comps: Record; } interface IGamePluginConf { plugin: any; } type IShowBuildLog = (msgId: string, type: IBuildLogType, text: string) => void; type ProgressUpdate = (id: number | string, status: IBuildLogType, message: string) => void; type ISummerPluginConfig = Array; type IBabelSetting = { outputPath?: string; ignore?: any[]; }; type ISWCSetting = { ignore?: string[]; outputPath?: string; rc?: Record; }; type ISassSetting = { scssCommonUseFilePath?: string; sassCommonUseFilePath?: string; }; type ILessSetting = { commonUseFilePath?: string; }; interface IDevtoolsProjectInfo { appid: string; attr: any; compileType: MiniProgramCore.ProjectType; projectArchitecture: MiniProgramCore.IProjectArchitecture; miniprogramRoot: string; pluginRoot: string; summerPlugins: ISummerPluginConfig; setting: MiniProgramDevtools.IProjectSetting; packOptions?: { ignore: MiniProgramDevtools.IProjectConfigPackOption[]; include: MiniProgramDevtools.IProjectConfigPackOption[]; }; injectedPages?: string[]; } type GraphId = MiniProgramCore.ProjectType; type IGetConfOptions = { graphId: GraphId; }; type ICompileSingleCodeOptions = { graphId: GraphId; filePath: string; sourceCode?: string; }; type IGetCodeOptions = { graphId: GraphId; cacheMd5: Record; package?: string; }; type IGetCodeByFileListOptions = { graphId: GraphId; cacheMd5: Record; fileList: string[]; }; interface IDevtoolsProject { id: string; appid: string; projectid: string; projectname: string; miniprogramRoot: string; pluginRoot?: string; } interface EventMsg { type: 'event'; name: string; data: any; } interface ProgressMsg { type: 'progress'; id: number; taskId: number; status: 'doing' | 'success'; message: string; } interface RequestMsg { type: 'request'; id: number; name: string; data: any; } interface LogMsg { type: 'log'; id: string; status: IBuildLogType; text: string; } interface ResponseMsg { type: 'response'; id: number; data: any; error?: any; } interface ReadyMsg { type: 'ready' | 'noReady'; data?: any; error?: any; } interface InitMsg { type: 'init'; data: any; } type SummerProcessMessage = InitMsg | RequestMsg | ResponseMsg | EventMsg | ProgressMsg; type IPackageCodeOptions = { package: string; partialCompilePath?: string[]; }; interface CodeFile { path: string; md5: string; code: string; map?: MiniProgramSummer.SourceMap | string; mtime?: number; jsTag?: { isLargeFile: boolean; isBabelIgnore: boolean; helpers: string[]; }; } interface CodeError { path: string; error: any; } type CodeFiles = Record; interface ICompilerStatus { codeExts: string[]; codeConf: { [key in IBasicCodeExt]: { exts: string[]; template?: { ext: string; content: string; }; }; }; } type ICompileResult = Record; interface ITask { name?: string; data?: any; resolve: any; reject: any; progressUpdate?: ProgressUpdate; } interface IProjectConfigPackOption { type: string; value: string; } type Void = T | undefined | null; interface IProjectSetting { localPlugins?: boolean; autoAudits?: boolean; condition?: boolean; es6?: boolean; minified?: boolean; newFeature?: boolean; postcss?: boolean; urlCheck?: boolean; scopeDataCheck?: boolean; uglifyFileName?: boolean; compileHotReLoad?: boolean; uploadWithSourceMap?: boolean; preloadBackgroundData?: boolean; scriptsEnable?: boolean; lazyloadPlaceholderEnable?: boolean; skylineRenderEnable?: boolean; compileWorklet?: boolean; nodeModules?: boolean; checkInvalidKey?: boolean; checkSiteMap?: boolean; enhance?: boolean; swc?: boolean; swcSetting?: ISWCSetting; sassSetting?: ISassSetting; lessSetting?: ILessSetting; disableSWC?: boolean | null | undefined; coverView?: boolean; showShadowRootInWxmlPanel?: boolean; babelSetting?: { ignore: string[]; disablePlugins: string[]; outputPath: string; }; minifyWXMLSetting?: { global: { collapseWhitespace?: boolean; conservativeCollapse?: boolean; preserveLineBreaks?: boolean; }; [filePath: string]: { collapseWhitespace?: boolean; conservativeCollapse?: boolean; preserveLineBreaks?: boolean; }; }; bundle?: boolean; userConfirmedBundleSwitch?: boolean; useIsolateContext?: boolean; userConfirmedUseIsolateContext?: boolean; useCompilerModule?: boolean; useMultiFrameRuntime?: boolean | string; useApiHook?: boolean; useApiHostProcess?: boolean; userConfirmedUseCompilerModuleSwitch?: boolean; skeletonGenerateFilesWithoutConfirm?: boolean; packNpmManually?: boolean; packNpmRelationList?: Array<{ packageJsonPath: string; miniprogramNpmDistDir: string; }>; enableEngineNative?: boolean; useStaticServer?: boolean; minifyWXSS?: boolean; disableUseStrict?: boolean; minifyWXML?: boolean; useLanDebug?: boolean; showES6CompileOption?: boolean; useCompilerPlugins?: false | Array; useSummerCompiler?: false | Array; ignoreUploadUnusedFiles?: boolean; ignoreCodeQuality?: boolean; ignoreDevUnusedFiles?: boolean; bigPackageSizeSupport?: boolean; } interface IPluginInfo { provider: string; version: string; } }