UNPKG

@adonis-agora/media

Version:

Media-library for AdonisJS — owner collections (MIME whitelist, single-file replace, ordering), image conversions (eager/lazy), pluggable content transformers (HLS video via mediabunny, metadata probe, image blur-up placeholder), and column attachments, a

23 lines • 979 B
import { MediaConsoleCommand } from '../src/commands/console_command.js'; /** `node ace media:disks:list` — the disks the media console browses, and what each supports. */ export class MediaDisksList extends MediaConsoleCommand { static commandName = 'media:disks:list'; static description = 'List the disks the media console browses'; async handle(service) { const disks = service.disks(); if (this.json) return this.printJson(disks); this.printTable(['Disk', 'Default', 'List', 'Presign', 'Multipart', 'Public URLs'], disks.data.map((disk) => [ disk.name, disk.default ? 'yes' : '', yesNo(disk.capabilities.list), yesNo(disk.capabilities.presign), yesNo(disk.capabilities.multipart), yesNo(disk.capabilities.publicUrls), ]), 'No disks.'); } } function yesNo(value) { return value ? 'yes' : 'no'; } //# sourceMappingURL=console_disks.js.map