Skip to content

Commit 1e378c9

Browse files
authored
fix: pass html flag correctly to image analysis (#208)
1 parent 7869daa commit 1e378c9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/analysis.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ async function requestComponent(provider, manifest, url, opts = {}) {
139139
* @param {Array<string>} imageRefs
140140
* @param {string} url
141141
* @param {{}} [opts={}] - optional various options to pass along the application
142-
* @returns {Promise<string|import('@trustification/exhort-api-spec/model/v4/AnalysisReport').AnalysisReport>}
142+
* @returns {Promise<string|Object.<string, import('@trustification/exhort-api-spec/model/v4/AnalysisReport').AnalysisReport>>}
143143
*/
144144
async function requestImages(imageRefs, url, html = false, opts = {}) {
145145
const imageSboms = {}

src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ async function componentAnalysis(manifest, opts = {}) {
162162
* @param {Array<string>} imageRefs
163163
* @param {false} html
164164
* @param {object} [opts={}]
165-
* @returns {Promise<import('@trustification/exhort-api-spec/model/v4/AnalysisReport').AnalysisReport}
165+
* @returns {Promise<Object.<string, import('@trustification/exhort-api-spec/model/v4/AnalysisReport').AnalysisReport>>}
166166
* @throws {Error}
167167
*/
168168

@@ -172,13 +172,13 @@ async function componentAnalysis(manifest, opts = {}) {
172172
* @param {Array<string>} imageRefs - OCI image references
173173
* @param {boolean} [html=false] - true will return a html string, false will return AnalysisReport
174174
* @param {{}} [opts={}] - optional various options to pass along the application
175-
* @returns {Promise<string|import('@trustification/exhort-api-spec/model/v4/AnalysisReport').AnalysisReport}
175+
* @returns {Promise<string|Object.<string, import('@trustification/exhort-api-spec/model/v4/AnalysisReport').AnalysisReport>>}
176176
* @throws {Error} if manifest inaccessible, no matching provider, failed to get create content,
177177
* or backend request failed
178178
*/
179179
async function imageAnalysis(imageRefs, html = false, opts = {}) {
180180
theUrl = selectExhortBackend(opts)
181-
return await analysis.requestImages(imageRefs, theUrl, opts)
181+
return await analysis.requestImages(imageRefs, theUrl, html, opts)
182182
}
183183

184184
/**

0 commit comments

Comments
 (0)