UNPKG

@codenoobforreal/clitools

Version:

CLI tool for video processing (H.265/HEVC encoding & QuickTime compatibility) using FFmpeg, and batch lossless image compression with format preservation

15 lines 726 B
import { NothingToProcessError } from "../../error.js"; import { resolveAndNormalizePath } from "../../utils/path.js"; import { sanitizePathLikeInput } from "../../utils/sanitize.js"; import { getImagePathsFromPath } from "./collector.js"; export async function getImageListFromUserInput(input) { const sanitizedPath = sanitizePathLikeInput(input); const normalizedPath = resolveAndNormalizePath(sanitizedPath, process.cwd()); const collectedImagePaths = await getImagePathsFromPath(normalizedPath); // TODO: scan error class if (collectedImagePaths.length === 0) { throw new NothingToProcessError("no image to process"); } return collectedImagePaths; } //# sourceMappingURL=pipeline.js.map