"use strict";var e=this&&this.__awaiter||function(e,t,s,r){return new(s||(s=Promise))((function(n,o){function i(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?n(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(i,u)}a((r=r.apply(e,t||[])).next())}))},t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.deleteUselessHarStoreDir=void 0;const s=t(require("path")),r=require("../../../common/Constants"),n=require("../visitor"),o=require("./deleteUselessDir"),i=t(require("../../../log"));exports.deleteUselessHarStoreDir=function(t){return e(this,void 0,void 0,(function*(){i.default.debug("","start to delete useless har store directories.");const e=n.DepNodeInstaller.getInstance(),u=s.default.join(t,r.Constants.MyModules,r.Constants.PmDir);yield(0,o.deleteUselessDir)(u,(t=>!e.harStoreDirCache.has(t)&&s.default.basename(t)!==r.Constants.MyModules)),i.default.debug("","delete useless har store directories success.")}))};