@soos-io/api-client
Advanced tools
Comparing version 0.2.47-pre.1 to 0.2.47
@@ -71,2 +71,3 @@ import SOOSAnalysisApiClient, { ICreateScanRequestContributingDeveloperAudit, ICreateScanResponse } from "../api/SOOSAnalysisApiClient"; | ||
static create(apiKey: string, apiURL: string): AnalysisService; | ||
private logStatusMessage; | ||
setupScan({ clientId, projectName, branchName, commitHash, buildVersion, buildUri, branchUri, integrationType, operatingEnvironment, integrationName, appVersion, scriptVersion, contributingDeveloperAudit, scanType, toolName, toolVersion, }: ISetupScanParams): Promise<ICreateScanResponse>; | ||
@@ -73,0 +74,0 @@ startScan({ clientId, projectHash, analysisId, scanType, scanUrl, }: IStartScanParams): Promise<void>; |
@@ -53,3 +53,30 @@ "use strict"; | ||
} | ||
logStatusMessage(message) { | ||
if (message) { | ||
switch (message.severity) { | ||
case enums_1.SeverityEnum.Unknown: | ||
case enums_1.SeverityEnum.None: | ||
case enums_1.SeverityEnum.Info: | ||
case enums_1.SeverityEnum.Low: | ||
logging_1.soosLogger.info(message.message); | ||
break; | ||
case enums_1.SeverityEnum.Medium: | ||
case enums_1.SeverityEnum.High: | ||
logging_1.soosLogger.warn(message.message); | ||
break; | ||
case enums_1.SeverityEnum.Critical: | ||
logging_1.soosLogger.error(message.message); | ||
break; | ||
} | ||
if (message.url) { | ||
const linkText = message.linkText ? `[${message.linkText}]` : ""; | ||
logging_1.soosLogger.info(`${linkText}(${message.url})`); | ||
} | ||
} | ||
} | ||
async setupScan({ clientId, projectName, branchName, commitHash, buildVersion, buildUri, branchUri, integrationType, operatingEnvironment, integrationName, appVersion, scriptVersion, contributingDeveloperAudit, scanType, toolName, toolVersion, }) { | ||
logging_1.soosLogger.info("Checking status..."); | ||
const applicationStatus = await this.userApiClient.getApplicationStatus(clientId); | ||
this.logStatusMessage(applicationStatus.statusMessage); | ||
this.logStatusMessage(applicationStatus.clientMessage); | ||
logging_1.soosLogger.logLineSeparator(); | ||
@@ -56,0 +83,0 @@ logging_1.soosLogger.info(`Starting SOOS ${scanType} Analysis`); |
{ | ||
"name": "@soos-io/api-client", | ||
"version": "0.2.47-pre.1", | ||
"version": "0.2.47", | ||
"description": "This is the SOOS API Client for registered clients leveraging the various integrations to the SOOS platform.", | ||
@@ -17,3 +17,4 @@ "main": "dist/index.js", | ||
"test": "jest", | ||
"check": "npm run format && npm run typecheck && npm outdated", | ||
"check": "npm run format && npm run typecheck && npm run test && npm outdated", | ||
"patch": "npm version patch --no-git-tag-version", | ||
"build:link": "npm run build && npm link" | ||
@@ -38,3 +39,6 @@ }, | ||
"oss", | ||
"csa" | ||
"csa", | ||
"sast", | ||
"docker", | ||
"containers" | ||
], | ||
@@ -41,0 +45,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
135320
2901