"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProxyClearCommand = void 0;
const proxy_base_1 = require("./proxy-base");
const yok_1 = require("../../yok");
const proxyClearCommandName = "proxy|clear";
class ProxyClearCommand extends proxy_base_1.ProxyCommandBase {
    constructor($analyticsService, $logger, $proxyService) {
        super($analyticsService, $logger, $proxyService, proxyClearCommandName);
        this.$analyticsService = $analyticsService;
        this.$logger = $logger;
        this.$proxyService = $proxyService;
    }
    async execute(args) {
        await this.$proxyService.clearCache();
        this.$logger.info("Successfully cleared proxy.");
        await this.tryTrackUsage();
    }
}
exports.ProxyClearCommand = ProxyClearCommand;
yok_1.injector.registerCommand(proxyClearCommandName, ProxyClearCommand);
