"use strict";
const path = require("path");
const rimraf = require("rimraf-then");
const constantDefaults_1 = require("./constantDefaults");
const expandTilde_1 = require("../fs/expandTilde");
function cleanCache(globalPath) {
    globalPath = globalPath || constantDefaults_1.DEFAULT_GLOBAL_PATH;
    const cachePath = getCachePath(globalPath);
    return rimraf(cachePath);
}
exports.cleanCache = cleanCache;
function getCachePath(globalPath) {
    return path.join(expandTilde_1.default(globalPath), 'cache');
}
exports.getCachePath = getCachePath;
//# sourceMappingURL=cache.js.map