UNPKG

cross-tools

Version:

Cross-platform fundamental tools for developers

1 lines 605 B
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const baseDockerAction_1=require("../baseDockerAction");class DockerAction extends baseDockerAction_1.BaseDockerAction{constructor(){super(...arguments),this.cmd="remove-all-volumes"}async handle(){let e=0;await this.asyncLoader(async()=>{const o=await this.docker.listVolumes();await this.docker.pruneVolumes();const s=await this.docker.listVolumes();e=o.Volumes.length-s.Volumes.length},"Removing all unnecessary volumes");const o=this.colors.cyan(`✅ total ${e}: volume(s) removed.`);console.log(o)}}exports.default=new DockerAction;