muaddib-scanner 2.10.36 → 2.10.39

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/muaddib.js CHANGED
@@ -92,7 +92,7 @@ for (let i = 0; i < options.length; i++) {
92
92
  explainMode = true;
93
93
  } else if (options[i] === '--fail-on') {
94
94
  const val = (options[i + 1] || 'high').toLowerCase();
95
- const validLevels = ['critical', 'high', 'medium', 'low'];
95
+ const validLevels = ['critical', 'high', 'medium', 'low', 'none'];
96
96
  if (!validLevels.includes(val)) {
97
97
  console.error(`[ERROR] --fail-on must be one of: ${validLevels.join(', ')} (got: "${val}")`);
98
98
  process.exit(1);
@@ -260,10 +260,12 @@ if (command === 'version' || command === '--version' || command === '-v') {
260
260
  configPath: configPath,
261
261
  autoSandbox: autoSandbox
262
262
  }).then(exitCode => {
263
- process.exit(exitCode);
263
+ // Use process.exitCode instead of process.exit() to let pending async work
264
+ // (the non-blocking version update check) complete before the process exits.
265
+ process.exitCode = exitCode;
264
266
  }).catch(err => {
265
267
  console.error('[ERROR]', err.message);
266
- process.exit(1);
268
+ process.exitCode = 1;
267
269
  });
268
270
  } else if (command === 'feed') {
269
271
  if (wantHelp) showHelp('feed');