import { ProjectConfig } from '@byted/miniprogram-utils/dist/data/project'; import { ServerSize } from '@byted/miniprogram-utils/typings/project'; import { ProjectInfo, QrcodeInfo } from '../types'; import { IMetrics } from '../utils/metrics'; import { IDEConfig, MakeSchemaOption } from '../utils/qrcode'; export declare type PreviewMode = 'plugin' | 'normal'; export declare type ProjectQRCode = { expireTime: number; shortUrl: string; originSchema: string; qrcodeSVG?: string; qrcodeFilePath?: string; useCache: boolean; timeReport?: { [k: string]: number; }; } & Pick; export declare function checkChannel(appid: string, channel: string): Promise; declare type CompileProgressResult = { success: boolean; /** error code */ error: number; done: boolean; msg: string; metrics?: IMetrics; errLink?: string; passJson: { packageSize?: ServerSize; } & Record; }; export declare function checkProjectMatchAppid(projectConfig: ProjectConfig, appid?: string): Promise; declare type PreviewOption = Pick; /** * 预览上传(功能入口) * @param options * @returns */ export declare function preview(options: PreviewOption): Promise; export declare type UploadOption = Pick & { version: string; changeLog: string; needUploadSourcemap?: boolean; needUploadCheck?: boolean; extraCheckInfoJson?: string; channel?: string; minJssdk?: string; }; /** * 发布上传(功能入口) * @param options * @returns */ export declare function upload(options: UploadOption): Promise; export declare type ProjectToQRCodeOption = { project: ProjectInfo; page: { path: string; query: string; scene: string; launchFrom: string; location: string; } & Pick; qrcode: QrcodeInfo; cache: boolean; copyToClipboard: boolean; uploadOptions?: { version: string; changeLog: string; needUploadSourcemap: boolean; needUploadCheck: boolean; extraCheckInfoJson?: string; channel?: string; minJssdk?: string; }; extraInfoJson?: string; localCompileVersion?: string; previewPluginMode?: PreviewMode; ideConfig?: IDEConfig; debug?: { query: { gtoken: string; roomid: string; session: string; }; }; uploadCache?: boolean; interactGame?: { extra: string; }; supportSourcemap?: boolean; enableHotRestartCache?: boolean; xScreen?: boolean; penetrateMapJson?: Record; traceVersion?: number; traceMode?: number; updateStatus?: (status: { upload: number; check: number; compile: number; uploadSuccess?: boolean; }) => any; setCheckResult?: (result: any) => any; lynxPackages?: string; useLocalSchema?: string; needTimeReport?: boolean; }; export declare function projectToQRCode(options: ProjectToQRCodeOption, hashTimeout?: number): Promise; export {};