Skip to content

Commit

Permalink
add isScanDone func (#68)
Browse files Browse the repository at this point in the history
add isScanDone func
  • Loading branch information
SOOS-GSteen authored Oct 14, 2024
1 parent 03eb965 commit 3cefc17
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
19 changes: 2 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@soos-io/api-client",
"version": "1.0.8",
"version": "1.0.9",
"description": "This is the SOOS API Client for registered clients leveraging the various integrations to the SOOS platform.",
"main": "dist/index.js",
"scripts": {
Expand Down
6 changes: 6 additions & 0 deletions src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ const generateFileHash = (
.digest(binaryToTextEncoding);
};

const isScanDone = (scanStatus: ScanStatus): boolean =>
[ScanStatus.Finished, ScanStatus.FailedWithIssues, ScanStatus.Incomplete, ScanStatus.Error].some(
(s) => s === scanStatus,
);

const getAnalysisExitCodeWithMessage = (
scanStatus: ScanStatus,
integrationName: IntegrationName,
Expand Down Expand Up @@ -222,4 +227,5 @@ export {
getAnalysisExitCodeWithMessage,
DateUtilities,
StringUtilities,
isScanDone,
};

0 comments on commit 3cefc17

Please sign in to comment.