From f1f0c08bcd7acbb187b21951b879e4a8d34635f9 Mon Sep 17 00:00:00 2001 From: Noah Santschi-Cooney Date: Thu, 22 May 2025 12:32:03 +0100 Subject: [PATCH] fix: pass html flag correctly to image analysis --- src/analysis.js | 2 +- src/index.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/analysis.js b/src/analysis.js index f841ca99..e611bb42 100644 --- a/src/analysis.js +++ b/src/analysis.js @@ -139,7 +139,7 @@ async function requestComponent(provider, manifest, url, opts = {}) { * @param {Array} imageRefs * @param {string} url * @param {{}} [opts={}] - optional various options to pass along the application - * @returns {Promise} + * @returns {Promise>} */ async function requestImages(imageRefs, url, html = false, opts = {}) { const imageSboms = {} diff --git a/src/index.js b/src/index.js index 30bc662e..0f62871e 100644 --- a/src/index.js +++ b/src/index.js @@ -162,7 +162,7 @@ async function componentAnalysis(manifest, opts = {}) { * @param {Array} imageRefs * @param {false} html * @param {object} [opts={}] - * @returns {Promise>} * @throws {Error} */ @@ -172,13 +172,13 @@ async function componentAnalysis(manifest, opts = {}) { * @param {Array} imageRefs - OCI image references * @param {boolean} [html=false] - true will return a html string, false will return AnalysisReport * @param {{}} [opts={}] - optional various options to pass along the application - * @returns {Promise>} * @throws {Error} if manifest inaccessible, no matching provider, failed to get create content, * or backend request failed */ async function imageAnalysis(imageRefs, html = false, opts = {}) { theUrl = selectExhortBackend(opts) - return await analysis.requestImages(imageRefs, theUrl, opts) + return await analysis.requestImages(imageRefs, theUrl, html, opts) } /**