@soos-io/soos-sbom 0.1.1-pre.1 → 0.1.1-pre.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/index.js CHANGED
@@ -64,7 +64,6 @@ class SOOSSBOMAnalysis {
64
64
  parser.add_argument("--integrationName", {
65
65
  help: "Integration Name - Intended for internal use only.",
66
66
  required: false,
67
- default: constants_1.CONSTANTS.SOOS.DEFAULT_INTEGRATION_NAME,
68
67
  });
69
68
  parser.add_argument("--integrationType", {
70
69
  help: "Integration Type - Intended for internal use only.",
@@ -76,13 +75,7 @@ class SOOSSBOMAnalysis {
76
75
  default: api_client_1.LogLevel.INFO,
77
76
  required: false,
78
77
  type: (value) => {
79
- const upperCaseValue = value.toUpperCase();
80
- if (upperCaseValue in api_client_1.LogLevel) {
81
- return api_client_1.LogLevel[upperCaseValue];
82
- }
83
- else {
84
- throw new Error(`Invalid log level: ${value}`);
85
- }
78
+ return (0, utilities_1.ensureEnumValue)(api_client_1.LogLevel, value);
86
79
  },
87
80
  });
88
81
  parser.add_argument("--operatingEnvironment", {
@@ -225,6 +218,8 @@ class SOOSSBOMAnalysis {
225
218
  api_client_1.soosLogger.setVerbose(args.verbose);
226
219
  api_client_1.soosLogger.info("Configuration read");
227
220
  api_client_1.soosLogger.verboseDebug(JSON.stringify((0, utilities_1.obfuscateProperties)(args, ["apiKey"]), null, 2));
221
+ (0, utilities_1.ensureValue)(args.clientId, "clientId");
222
+ (0, utilities_1.ensureValue)(args.apiKey, "apiKey");
228
223
  api_client_1.soosLogger.logLineSeparator();
229
224
  const soosSBOMAnalysis = new SOOSSBOMAnalysis(args);
230
225
  await soosSBOMAnalysis.runAnalysis();
@@ -5,7 +5,6 @@ export declare const CONSTANTS: {
5
5
  SOOS: {
6
6
  API_KEY_ENV_VAR: string;
7
7
  CLIENT_ID_ENV_VAR: string;
8
- DEFAULT_INTEGRATION_NAME: string;
9
8
  DEFAULT_INTEGRATION_TYPE: string;
10
9
  };
11
10
  };
@@ -8,7 +8,6 @@ exports.CONSTANTS = {
8
8
  SOOS: {
9
9
  API_KEY_ENV_VAR: "SOOS_API_KEY",
10
10
  CLIENT_ID_ENV_VAR: "SOOS_CLIENT_ID",
11
- DEFAULT_INTEGRATION_NAME: "None",
12
11
  DEFAULT_INTEGRATION_TYPE: "Script",
13
12
  },
14
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soos-io/soos-sbom",
3
- "version": "0.1.1-pre.1",
3
+ "version": "0.1.1-pre.3",
4
4
  "description": "SOOS wrapper script to upload sboms.",
5
5
  "main": "bin/index.js",
6
6
  "scripts": {