/** * 小游戏源码、打包相关 */ import { SizeLimitConfig } from './source.type'; import { ProjectConfig } from '@byted/miniprogram-utils/dist/data/project'; /** 不参与体积计算的 glob pattern */ export declare const PKG_SIZE_IGNORE_GLOBS: string[]; /** 计算包哈希时不参与计算的文件匹配规则 */ export declare const PKG_HASH_IGNORE_LIST: string[]; /** * 获取上传预览 Settings 配置,支持白名单处理,兜底默认 */ export declare const getSizeLimitConfig: (appId: string) => Promise; /** * 校验包体大小,支持白名单逻辑,具体限制以 Settings 下发为准 * 默认:普通包最大 8MB,开放数据域 & 分包主包最大 4MB,子包不限制,总包 20MB * 体积计算:忽略 dot 文件、node_modules、map 文件等,加上目录体积参与计算,计算结果一般和系统显示的不同 * 保持逻辑严谨,尽量给到用户足够详细、有信息量的检查结果提示 * @param root 小游戏路径 * @returns 错误信息,空串表示校验通过 */ export declare const verifyPkgSize: (root: string, projectConfig: ProjectConfig) => Promise; export declare const getDirHash: (dirPath: string) => Promise; export declare function compressZip(filePath: string, tempStoragePath: string, extraIgnore?: string[]): Promise; export declare const checkUCAppId: (appId: string) => boolean; export declare const checkAppId: (appId: string) => boolean; export declare const getAppId: (projectPath: string) => Promise; export declare const validateAppId: (appId: string) => Promise; export declare const getTechType: (appId: string) => Promise; export declare const isPlayableGame: (appId: string) => Promise; export declare const getConfigUrl: (appid: string) => Promise<{ makeSchema: string; compileProgress: string; preview: string; upload: string; versionInfo: string; sizeLimit: string; unityCompileProgress: string; unityPreview: string; getChannelNumber: string; }>;