@soos-io/api-client
Advanced tools
Comparing version 1.1.0-pre.11 to 1.1.0-pre.12
@@ -8,3 +8,2 @@ "use strict"; | ||
const utilities_1 = require("../utilities"); | ||
const logging_1 = require("../logging"); | ||
const getIntegrateUrl = (scanType) => `${constants_1.SOOS_CONSTANTS.Urls.App.Home}integrate/${scanType == enums_2.ScanType.CSA ? "containers" : (scanType ?? enums_2.ScanType.SCA).toLowerCase()}`; | ||
@@ -89,6 +88,4 @@ class ArgumentParserBase { | ||
case enums_1.AttributionFormatEnum.CycloneDx: | ||
const isValid = isGeneratedScanType && | ||
(fileType === enums_1.AttributionFileTypeEnum.Json || fileType === enums_1.AttributionFileTypeEnum.Xml); | ||
logging_1.soosLogger.info(`Valid: (${isValid}) (${fileType === enums_1.AttributionFileTypeEnum.Json})`); | ||
return isValid; | ||
return (isGeneratedScanType && | ||
(fileType === enums_1.AttributionFileTypeEnum.Json || fileType === enums_1.AttributionFileTypeEnum.Xml)); | ||
case enums_1.AttributionFormatEnum.Sarif: | ||
@@ -107,3 +104,2 @@ return fileType === enums_1.AttributionFileTypeEnum.Json; | ||
default: | ||
logging_1.soosLogger.warn(`No match for (${format})`); | ||
return false; | ||
@@ -117,4 +113,3 @@ } | ||
ensureArgumentCombinationsAreValid(args) { | ||
const argumentsAreValid = this.isValidExportArguments(this.scanType, args.format, args.fileType); | ||
logging_1.soosLogger.info(`Arguments are valid (${argumentsAreValid})`); | ||
const argumentsAreValid = this.isValidExportArguments(this.scanType, args.exportFormat, args.exportFileType); | ||
if (!argumentsAreValid) { | ||
@@ -121,0 +116,0 @@ throw new Error(`Invalid argument combination for ${this.scanType}. Change ${args.exportFormat} and ${args.exportFileType} to a supported combination (https://kb.soos.io/help/soos-reports-for-export).`); |
{ | ||
"name": "@soos-io/api-client", | ||
"version": "1.1.0-pre.11", | ||
"version": "1.1.0-pre.12", | ||
"description": "This is the SOOS API Client for registered clients leveraging the various integrations to the SOOS platform.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
335114
3388