@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
29 lines • 1.31 kB
TypeScript
import type { ApplicationService } from '@adonisjs/core/types';
/**
* Mounts the media-management console INTO `@adonis-agora/media` itself: a React SPA plus a JSON
* API, both under a configurable path and an optional host auth guard. The API delegates to the
* already-bound {@link MediaManager} singleton (bound by this same package's `MediaProvider`) via a
* pure {@link DashboardService} — disk `list`/`stat`/`copy`/`move`/`deleteMany` and the resumable
* session store. Nothing about storage is reimplemented here.
*
* Registering this provider is all a consuming app needs to do to get the dashboard — no separate
* `@adonis-agora/media-dashboard` install:
* ```ts
* providers: [
* () => import('@adonis-agora/media/media_provider'),
* () => import('@adonis-agora/media/dashboard_provider'),
* ]
* ```
*
* Route registration is deferred to `app.booted(...)` — same reason `MediaProvider#boot()` defers
* (see its long comment): the router service isn't safely resolvable synchronously inside a
* provider's own `boot()`.
*/
export default class MediaDashboardProvider {
#private;
protected app: ApplicationService;
constructor(app: ApplicationService);
boot(): Promise<void>;
shutdown(): Promise<void>;
}
//# sourceMappingURL=dashboard_provider.d.ts.map