diff --git a/package-lock.json b/package-lock.json index 00a7100..ba325f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@soos-io/api-client", - "version": "1.0.8", + "version": "1.0.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@soos-io/api-client", - "version": "1.0.8", + "version": "1.0.9", "license": "MIT", "dependencies": { "argparse": "^2.0.1", @@ -2231,21 +2231,6 @@ "node": ">= 6" } }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", diff --git a/package.json b/package.json index c997e09..42531f0 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/utilities.ts b/src/utilities.ts index 6b027da..90e36bd 100644 --- a/src/utilities.ts +++ b/src/utilities.ts @@ -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, @@ -222,4 +227,5 @@ export { getAnalysisExitCodeWithMessage, DateUtilities, StringUtilities, + isScanDone, };