/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/syde@0.0.1/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
var bower=require("bower"),path=require("path"),async=require("async"),Bower=require("./lib/bower"),utils=require("./lib/utils"),Commands=require("./lib/commands"),installOrUpdate=function(e){var o=e.configPath,n=e.repos,s=e.force,r=e.onEnd||function(){},c={processes:[]},t=utils.getConfigEnvironment(o),a={_process:null},i=[],l=utils.getRepos(n,t);require("./lib/safe-exit")(c,a),async.eachSeries(l,(function(e,o){Commands.execute({cwd:process.cwd(),detachedProcesses:c,lastProcess:a,commands:Commands.getPreCommands(t[e]),callback:function(){var n,r=[],l=path.resolve(process.cwd(),e),u={save:!1},d={interactive:!1,directory:e};s&&(d["force-latest"]=!0),utils.isString(t[e])?r.push([t[e]],u,d):utils.isObject(t[e])&&r.push([t[e].endpoint],u,d),"update"===(n=Bower.getBowerCommand(e,r))&&(e=e.replace(/\//g,"__"),Bower.saveToUpdate(e)),bower.commands[n].apply(bower,r).on("log",(function(e){(e&&e.level&&console[e.level]?console[e.level]:console.log)(e.message)})).on("error",(function(){console.warn("error",arguments)})).on("end",(function(s){"install"===n&&Bower.saveDependencies(s,e),Bower.cleanDependencies(),i.push(function(o,n){return function(s){utils.correctParentFolder(o,n,(function(){Bower.cleanDependencies(),Commands.execute({cwd:process.cwd(),detachedProcesses:c,lastProcess:a,commands:Commands.getPostCommands(t[e]),callback:function(){s()}})}))}}(s,l)),o()}))}})}),(function(){async.series(i,(function(){r()}))}))};module.exports={installOrUpdate:installOrUpdate};
//# sourceMappingURL=/sm/cf6ac07ed172b1d0231ea4eec0cc28bf8767fcb44bb808b5b99714ba5dca12cf.map