UNPKG

@junobuild/cli-tools

Version:

A collection of tools for Juno CLIs and Plugins.

18 lines (17 loc) 802 B
import type { PruneFilesFn, PruneParams, PruneResult } from '../types/prune'; /** * Identifies and removes stale assets from a satellite's storage. * * @param {Object} options * @param {PruneParams} options.params - Prune parameters including `dryRun` and `batchSize`. * @param {PruneFilesFn} options.pruneFn - Function used to delete the resolved stale assets. * * @returns {Promise<PruneResult>} * - `{ result: 'skipped' }` when no stale assets are found. * - `{ result: 'simulated', files }` when `dryRun` is true; no files are deleted. * - `{ result: 'pruned', files }` when stale assets are successfully deleted. */ export declare const prune: ({ params: { dryRun, batchSize, ...rest }, pruneFn }: { params: PruneParams; pruneFn: PruneFilesFn; }) => Promise<PruneResult>;