diff --git a/package-lock.json b/package-lock.json index 51908bb..3d241ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "soos-dast", - "version": "2.0.2", + "version": "2.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "soos-dast", - "version": "2.0.2", + "version": "2.0.3", "license": "MIT", "dependencies": { - "@soos-io/api-client": "^0.1.9", + "@soos-io/api-client": "0.2.5", "argparse": "^2.0.1", "tslib": "^2.6.2" }, @@ -22,9 +22,9 @@ } }, "node_modules/@soos-io/api-client": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/@soos-io/api-client/-/api-client-0.1.9.tgz", - "integrity": "sha512-r5BFY9Pr+UZxxomNWknSdBM2f5+A3AafGywOuBT8jBaO68+TcEjAyGp9BkiTdkEmJyj1Zn+IhKFb0wbuue4Gpw==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@soos-io/api-client/-/api-client-0.2.5.tgz", + "integrity": "sha512-sAzrH+19mwxaHNUSF0/RGiFU6ppamA8HMdBaM4AV2r2Mxggohy5+Lrn2IcKK0bEgELJZa7a0zLMbIXaw2fkgpA==", "dependencies": { "axios": "^1.6.2", "tslib": "^2.6.2" diff --git a/package.json b/package.json index 684644c..c61d0d1 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "check": "npm run format && npm run typecheck && npm outdated" }, "dependencies": { - "@soos-io/api-client": "^0.1.9", + "@soos-io/api-client": "0.2.5", "argparse": "^2.0.1", "tslib": "^2.6.2" }, diff --git a/src/index.ts b/src/index.ts index 125111c..1ec0847 100644 --- a/src/index.ts +++ b/src/index.ts @@ -21,7 +21,9 @@ import { LogLevel, OutputFormat, SOOS_CONSTANTS, + IntegrationName, } from "@soos-io/api-client"; +import { version } from "../package.json"; import { ZAPCommandGenerator, CONSTANTS } from "./utils"; export interface SOOSDASTAnalysisArgs { @@ -53,7 +55,7 @@ export interface SOOSDASTAnalysisArgs { debug: boolean; disableRules: string; fullScanMinutes: number; - integrationName: string; + integrationName: IntegrationName; integrationType: string; logLevel: LogLevel; oauthParameters: string; @@ -250,6 +252,10 @@ class SOOSDASTAnalysis { parser.add_argument("--integrationName", { help: "Integration Name - Intended for internal use only.", required: false, + type: (value: string) => { + return ensureEnumValue(IntegrationName, value); + }, + default: IntegrationName.SoosDast, }); parser.add_argument("--integrationType", { @@ -339,6 +345,7 @@ class SOOSDASTAnalysis { parser.add_argument("--scriptVersion", { help: "Script Version - Intended for internal use only.", required: false, + default: version, }); parser.add_argument("--updateAddons", { diff --git a/tsconfig.json b/tsconfig.json index b4413ea..e7e3e72 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,6 +14,7 @@ "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ "skipLibCheck": false, /* Skip type checking of declaration files. */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ + "resolveJsonModule": true, } } \ No newline at end of file