"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compile=compile;const common_1=require("../original/compile/common"),progressRecorder_1=require("../../../utils/progressRecorder"),summer_1=require("./summer"),pluginconfig_1=require("./pluginconfig");async function compile(e,r,i,o){const s=await e.serialize(),n=Object.assign(Object.assign({},s),{compileType:e.type,summerPlugins:(0,pluginconfig_1.getSummerPluginConfig)(e.setting)});n.files=n.files.filter(common_1.isNotIgnoredByProjectConfig.bind(null,r,e.miniprogramRoot));const t=new summer_1.SummerCompiler(e,"",n),m=new progressRecorder_1.Recorder((e,r,o)=>{var s;null===(s=i.onProgressUpdate)||void 0===s||s.call(i,{id:e.toString(),message:o,status:r})});return await t.compile(i,m)}