@probelabs/visor 0.1.52 → 0.1.53

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/README.md CHANGED
@@ -237,12 +237,12 @@ Learn more: [docs/performance.md](docs/performance.md)
237
237
 
238
238
  ## 👀 Observability
239
239
 
240
- Use JSON for pipelines or SARIF for code scanning.
240
+ Use JSON for pipelines or SARIF for code scanning. To avoid any chance of logs mixing with the result stream, prefer the built‑in `--output-file`.
241
241
 
242
242
  Examples:
243
243
  ```bash
244
- visor --check security --output json
245
- visor --check security --output sarif > visor-results.sarif
244
+ visor --check security --output json --output-file visor-results.json
245
+ visor --check security --output sarif --output-file visor-results.sarif
246
246
  ```
247
247
 
248
248
  Learn more: [docs/observability.md](docs/observability.md)
@@ -1 +1 @@
1
- {"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/check-execution-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EAEb,mBAAmB,EAGpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAKvC,OAAO,EAAE,sBAAsB,EAAe,MAAM,gBAAgB,CAAC;AAyCrE,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,GAAG,EAAE,MAAM,OAAO,CAAC;gBAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;aAAE,CAAC,CAAC;YACtD,SAAS,EAAE,MAAM,OAAO,CAAC;gBAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;aAAE,CAAC,CAAC;SAC/D,CAAC;QACF,MAAM,EAAE;YACN,YAAY,EAAE,MAAM,OAAO,CAAC;gBAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CA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EAAE,MAAM,EAAE,CAAA;KAAE;IAgBnF;;OAEG;IACG,aAAa,IAAI,OAAO,CAC5B,KAAK,CAAC;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,OAAO,CAAC;QACnB,YAAY,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC,CACH;IAID;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAsDzB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAgCzB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IA+B3B,OAAO,CAAC,cAAc;IAkBtB;;OAEG;IACG,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC;IASzC;;OAEG;IACG,yBAAyB,CAC7B,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,aAAa,EAC5B,MAAM,CAAC,EAAE,OAAO,gBAAgB,EAAE,WAAW,GAC5C,OAAO,CAAC,sBAAsB,EAAE,CAAC;IA+EpC;;OAEG;IACG,mBAAmB,IAAI,OAAO,CAAC;QACnC,eAAe,EAAE,OAAO,CAAC;QACzB,UAAU,EAAE,OAAO,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IAmBF;;OAEG;YACW,sBAAsB;IAiEpC;;OAEG;YACW,4BAA4B;IA4B1C;;OAEG;YACW,+BAA+B;IA2E7C;;OAEG;YACW,6BAA6B;IAyB3C;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IA4F3B;;OAEG;IACH,OAAO,CAAC,mBAAmB;CAa5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/cli-main.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAsW1C"}
1
+ {"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/cli-main.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAqZ1C"}
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/cli.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAA2B,MAAM,aAAa,CAAC;AAIlE;;GAEG;AACH,qBAAa,GAAG;IACd,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,WAAW,CAA4E;IAC/F,OAAO,CAAC,YAAY,CAA0D;;IAO9E;;OAEG;IACH,OAAO,CAAC,YAAY;IAwCpB;;OAEG;IACH,OAAO,CAAC,aAAa,CAEnB;IAEF;;OAEG;IACI,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU;IAkI5C;;OAEG;IACH,OAAO,CAAC,eAAe;IAkCvB;;OAEG;IACI,WAAW,IAAI,MAAM;IAsC5B;;OAEG;IACI,UAAU,IAAI,MAAM;IAoC3B;;OAEG;IACI,eAAe,IAAI,MAAM;IAiBhC;;OAEG;IACI,QAAQ,IAAI,IAAI;IAIvB;;OAEG;IACI,WAAW,IAAI,IAAI;CAG3B"}
1
+ {"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/cli.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAA2B,MAAM,aAAa,CAAC;AAIlE;;GAEG;AACH,qBAAa,GAAG;IACd,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,WAAW,CAA4E;IAC/F,OAAO,CAAC,YAAY,CAA0D;;IAO9E;;OAEG;IACH,OAAO,CAAC,YAAY;IA2CpB;;OAEG;IACH,OAAO,CAAC,aAAa,CAEnB;IAEF;;OAEG;IACI,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU;IAwI5C;;OAEG;IACH,OAAO,CAAC,eAAe;IAkCvB;;OAEG;IACI,WAAW,IAAI,MAAM;IAyC5B;;OAEG;IACI,UAAU,IAAI,MAAM;IAoC3B;;OAEG;IACI,eAAe,IAAI,MAAM;IAkBhC;;OAEG;IACI,QAAQ,IAAI,IAAI;IAIvB;;OAEG;IACI,WAAW,IAAI,IAAI;CAG3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/failure-condition-evaluator.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EACL,iBAAiB,EAGjB,sBAAsB,EAEvB,MAAM,gBAAgB,CAAC;AAGxB;;GAEG;AACH,qBAAa,yBAAyB;IACpC,OAAO,CAAC,OAAO,CAAU;;IAMzB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IA6D3B;;OAEG;IACG,uBAAuB,CAC3B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAC9C,OAAO,CAAC,OAAO,CAAC;IAiBnB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAO9B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAOxB;;OAEG;IACG,mBAAmB,CACvB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,WAAW,CAAC,EAAE;QACZ,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACrC,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;KAC9C,GACA,OAAO,CAAC,OAAO,CAAC;IAyDnB;;OAEG;IACG,kBAAkB,CACtB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,aAAa,EAC5B,gBAAgB,CAAC,EAAE,iBAAiB,EACpC,eAAe,CAAC,EAAE,iBAAiB,EACnC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAC9C,OAAO,CAAC,sBAAsB,EAAE,CAAC;IAkCpC;;OAEG;YACW,oBAAoB;IA6BlC;;OAEG;YACW,uBAAuB;IA0BrC;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAuJ1B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAOzB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAe9B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAgD9B;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,OAAO;IAItE;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,sBAAsB,EAAE;IAIvF;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG;QAChE,KAAK,EAAE,sBAAsB,EAAE,CAAC;QAChC,OAAO,EAAE,sBAAsB,EAAE,CAAC;QAClC,IAAI,EAAE,sBAAsB,EAAE,CAAC;KAChC;IASD;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,MAAM;CAiChE"}
1
+ {"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/failure-condition-evaluator.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EACL,iBAAiB,EAGjB,sBAAsB,EAEvB,MAAM,gBAAgB,CAAC;AAGxB;;GAEG;AACH,qBAAa,y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,OAAO,CAAC,iBAAiB;IAOzB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAe9B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAgD9B;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,OAAO;IAItE;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,sBAAsB,EAAE;IAIvF;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG;QAChE,KAAK,EAAE,sBAAsB,EAAE,CAAC;QAChC,OAAO,EAAE,sBAAsB,EAAE,CAAC;QAClC,IAAI,EAAE,sBAAsB,EAAE,CAAC;KAChC;IASD;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,MAAM;CAiChE"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- process.env.VISOR_VERSION = '0.1.52';
2
+ process.env.VISOR_VERSION = '0.1.53';
3
3
  /******/ (() => { // webpackBootstrap
4
4
  /******/ var __webpack_modules__ = ({
5
5
 
@@ -95027,6 +95027,7 @@ const dependency_resolver_1 = __nccwpck_require__(98645);
95027
95027
  const failure_condition_evaluator_1 = __nccwpck_require__(54429);
95028
95028
  const github_check_service_1 = __nccwpck_require__(21367);
95029
95029
  const issue_filter_1 = __nccwpck_require__(36879);
95030
+ const logger_1 = __nccwpck_require__(86999);
95030
95031
  /**
95031
95032
  * Filter environment variables to only include safe ones for sandbox evaluation
95032
95033
  */
@@ -95127,9 +95128,7 @@ class CheckExecutionEngine {
95127
95128
  // Store webhook context if provided
95128
95129
  this.webhookContext = options.webhookContext;
95129
95130
  // Determine where to send log messages based on output format
95130
- const logFn = options.outputFormat === 'json' || options.outputFormat === 'sarif'
95131
- ? console.error
95132
- : console.log;
95131
+ const logFn = (msg) => logger_1.logger.info(msg);
95133
95132
  // Initialize GitHub checks if enabled
95134
95133
  if (options.githubChecks?.enabled && options.githubChecks.octokit) {
95135
95134
  await this.initializeGitHubChecks(options, logFn);
@@ -95149,7 +95148,7 @@ class CheckExecutionEngine {
95149
95148
  // Apply tag filtering if specified
95150
95149
  const filteredChecks = this.filterChecksByTags(options.checks, options.config, options.tagFilter || options.config?.tag_filter);
95151
95150
  if (filteredChecks.length === 0) {
95152
- logFn('⚠️ No checks match the tag filter criteria');
95151
+ logger_1.logger.warn('⚠️ No checks match the tag filter criteria');
95153
95152
  // Complete GitHub checks with no checks message if they were initialized
95154
95153
  if (this.checkRunMap) {
95155
95154
  await this.completeGitHubChecksWithError('No checks match the tag filter criteria');
@@ -95191,7 +95190,7 @@ class CheckExecutionEngine {
95191
95190
  };
95192
95191
  }
95193
95192
  catch (error) {
95194
- console.error('Error executing checks:', error);
95193
+ logger_1.logger.error('Error executing checks: ' + (error instanceof Error ? error.message : String(error)));
95195
95194
  // Complete GitHub checks with error if they were initialized
95196
95195
  if (this.checkRunMap) {
95197
95196
  const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
@@ -95267,11 +95266,8 @@ class CheckExecutionEngine {
95267
95266
  // Store config for use in filtering
95268
95267
  this.config = config;
95269
95268
  // Determine where to send log messages based on output format
95270
- const logFn = outputFormat === 'json' || outputFormat === 'sarif'
95271
- ? debug
95272
- ? console.error
95273
- : () => { }
95274
- : console.log;
95269
+ // Use debug logger for internal engine messages; important notices use logger.warn/info directly.
95270
+ const logFn = (msg) => logger_1.logger.debug(msg);
95275
95271
  // Only output debug messages if debug mode is enabled
95276
95272
  if (debug) {
95277
95273
  logFn(`🔧 Debug: executeReviewChecks called with checks: ${JSON.stringify(checks)}`);
@@ -95400,24 +95396,24 @@ class CheckExecutionEngine {
95400
95396
  : console.log;
95401
95397
  // Only output debug messages if debug mode is enabled
95402
95398
  if (debug) {
95403
- logFn(`🔧 Debug: executeGroupedChecks called with checks: ${JSON.stringify(checks)}`);
95404
- logFn(`🔧 Debug: Config available: ${!!config}, Config has checks: ${!!config?.checks}`);
95399
+ logger_1.logger.debug(`🔧 Debug: executeGroupedChecks called with checks: ${JSON.stringify(checks)}`);
95400
+ logger_1.logger.debug(`🔧 Debug: Config available: ${!!config}, Config has checks: ${!!config?.checks}`);
95405
95401
  }
95406
95402
  // Filter checks based on current event type to prevent execution of checks that shouldn't run
95407
95403
  const filteredChecks = this.filterChecksByEvent(checks, config, prInfo, logFn, debug);
95408
95404
  if (filteredChecks.length !== checks.length && debug) {
95409
- logFn(`🔧 Debug: Event filtering reduced checks from ${checks.length} to ${filteredChecks.length}: ${JSON.stringify(filteredChecks)}`);
95405
+ logger_1.logger.debug(`🔧 Debug: Event filtering reduced checks from ${checks.length} to ${filteredChecks.length}: ${JSON.stringify(filteredChecks)}`);
95410
95406
  }
95411
95407
  // Apply tag filtering if specified
95412
95408
  const tagFilteredChecks = this.filterChecksByTags(filteredChecks, config, tagFilter || config?.tag_filter);
95413
95409
  if (tagFilteredChecks.length !== filteredChecks.length && debug) {
95414
- logFn(`🔧 Debug: Tag filtering reduced checks from ${filteredChecks.length} to ${tagFilteredChecks.length}: ${JSON.stringify(tagFilteredChecks)}`);
95410
+ logger_1.logger.debug(`🔧 Debug: Tag filtering reduced checks from ${filteredChecks.length} to ${tagFilteredChecks.length}: ${JSON.stringify(tagFilteredChecks)}`);
95415
95411
  }
95416
95412
  // Use filtered checks for execution
95417
95413
  checks = tagFilteredChecks;
95418
95414
  // Check if we have any checks left after filtering
95419
95415
  if (checks.length === 0) {
95420
- logFn('⚠️ No checks remain after tag filtering');
95416
+ logger_1.logger.warn('⚠️ No checks remain after tag filtering');
95421
95417
  return {};
95422
95418
  }
95423
95419
  if (!config?.checks) {
@@ -95430,14 +95426,14 @@ class CheckExecutionEngine {
95430
95426
  });
95431
95427
  if (checks.length > 1 || hasDependencies) {
95432
95428
  if (debug) {
95433
- logFn(`🔧 Debug: Using grouped dependency-aware execution for ${checks.length} checks (has dependencies: ${hasDependencies})`);
95429
+ logger_1.logger.debug(`🔧 Debug: Using grouped dependency-aware execution for ${checks.length} checks (has dependencies: ${hasDependencies})`);
95434
95430
  }
95435
95431
  return await this.executeGroupedDependencyAwareChecks(prInfo, checks, timeout, config, logFn, debug, maxParallelism, failFast);
95436
95432
  }
95437
95433
  // Single check execution
95438
95434
  if (checks.length === 1) {
95439
95435
  if (debug) {
95440
- logFn(`🔧 Debug: Using grouped single check execution for: ${checks[0]}`);
95436
+ logger_1.logger.debug(`🔧 Debug: Using grouped single check execution for: ${checks[0]}`);
95441
95437
  }
95442
95438
  const checkResult = await this.executeSingleGroupedCheck(prInfo, checks[0], timeout, config, logFn, debug);
95443
95439
  const groupedResults = {};
@@ -95926,7 +95922,7 @@ class CheckExecutionEngine {
95926
95922
  if (process.env.DEBUG && checkConfig.forEach) {
95927
95923
  const finalResultWithOutput = finalResult;
95928
95924
  const outputPreview = JSON.stringify(finalResultWithOutput.output).slice(0, 200);
95929
- console.log(`🔧 Debug: Check "${checkName}" provider returned:`, outputPreview);
95925
+ logger_1.logger.debug(`🔧 Debug: Check "${checkName}" provider returned: ${outputPreview}`);
95930
95926
  }
95931
95927
  log(`🔧 Debug: Completed check: ${checkName}, issues found: ${(finalResult.issues || []).length}`);
95932
95928
  }
@@ -96348,8 +96344,7 @@ class CheckExecutionEngine {
96348
96344
  if (result.status === 'fulfilled') {
96349
96345
  const checkResult = result.value;
96350
96346
  if (checkResult.error) {
96351
- const log = console.error;
96352
- log(`🔧 Debug: Check ${checkName} failed: ${checkResult.error}`);
96347
+ logger_1.logger.debug(`🔧 Debug: Check ${checkName} failed: ${checkResult.error}`);
96353
96348
  debugInfo.push(`❌ Check "${checkName}" failed: ${checkResult.error}`);
96354
96349
  // Check if this is a critical error
96355
96350
  const isCriticalError = checkResult.error.includes('API rate limit') ||
@@ -96373,7 +96368,7 @@ class CheckExecutionEngine {
96373
96368
  });
96374
96369
  }
96375
96370
  else if (checkResult.result) {
96376
- console.error(`🔧 Debug: Check ${checkName} succeeded with ${(checkResult.result.issues || []).length} issues`);
96371
+ logger_1.logger.debug(`🔧 Debug: Check ${checkName} succeeded with ${(checkResult.result.issues || []).length} issues`);
96377
96372
  debugInfo.push(`✅ Check "${checkName}" completed: ${(checkResult.result.issues || []).length} issues found`);
96378
96373
  // Issues are already prefixed and enriched with group/schema info
96379
96374
  aggregatedIssues.push(...(checkResult.result.issues || []));
@@ -96381,8 +96376,7 @@ class CheckExecutionEngine {
96381
96376
  }
96382
96377
  else {
96383
96378
  const errorMessage = result.reason instanceof Error ? result.reason.message : String(result.reason);
96384
- const log = console.error;
96385
- log(`🔧 Debug: Check ${checkName} promise rejected: ${errorMessage}`);
96379
+ logger_1.logger.debug(`🔧 Debug: Check ${checkName} promise rejected: ${errorMessage}`);
96386
96380
  debugInfo.push(`❌ Check "${checkName}" promise rejected: ${errorMessage}`);
96387
96381
  // Check if this is a critical error
96388
96382
  const isCriticalError = errorMessage.includes('API rate limit') ||
@@ -97031,6 +97025,9 @@ const cli_1 = __nccwpck_require__(95581);
97031
97025
  const config_1 = __nccwpck_require__(22973);
97032
97026
  const check_execution_engine_1 = __nccwpck_require__(80299);
97033
97027
  const output_formatters_1 = __nccwpck_require__(25508);
97028
+ const logger_1 = __nccwpck_require__(86999);
97029
+ const fs = __importStar(__nccwpck_require__(79896));
97030
+ const path = __importStar(__nccwpck_require__(16928));
97034
97031
  /**
97035
97032
  * Main CLI entry point for Visor
97036
97033
  */
@@ -97048,6 +97045,13 @@ async function main() {
97048
97045
  // Set environment variables early for proper logging in all modules
97049
97046
  process.env.VISOR_OUTPUT_FORMAT = options.output;
97050
97047
  process.env.VISOR_DEBUG = options.debug ? 'true' : 'false';
97048
+ // Configure centralized logger
97049
+ (0, logger_1.configureLoggerFromCli)({
97050
+ output: options.output,
97051
+ debug: options.debug,
97052
+ verbose: options.verbose,
97053
+ quiet: options.quiet,
97054
+ });
97051
97055
  // Handle help and version flags
97052
97056
  if (options.help) {
97053
97057
  console.log(cli.getHelpText());
@@ -97061,38 +97065,40 @@ async function main() {
97061
97065
  let config;
97062
97066
  if (options.configPath) {
97063
97067
  try {
97068
+ logger_1.logger.step('Loading configuration');
97064
97069
  config = await configManager.loadConfig(options.configPath);
97065
97070
  }
97066
97071
  catch (error) {
97067
97072
  // Show the actual error message, not just assume "file not found"
97068
97073
  if (error instanceof Error) {
97069
- console.error(`❌ Error loading configuration from ${options.configPath}:`);
97070
- console.error(` ${error.message}`);
97074
+ logger_1.logger.error(`❌ Error loading configuration from ${options.configPath}:`);
97075
+ logger_1.logger.error(` ${error.message}`);
97071
97076
  // Provide helpful hints based on the error type
97072
97077
  if (error.message.includes('not found')) {
97073
- console.error('\n💡 Hint: Check that the file path is correct and the file exists.');
97074
- console.error(' You can use an absolute path: --config $(pwd)/.visor.yaml');
97078
+ logger_1.logger.warn('\n💡 Hint: Check that the file path is correct and the file exists.');
97079
+ logger_1.logger.warn(' You can use an absolute path: --config $(pwd)/.visor.yaml');
97075
97080
  }
97076
97081
  else if (error.message.includes('Invalid YAML')) {
97077
- console.error('\n💡 Hint: Check your YAML syntax. You can validate it at https://www.yamllint.com/');
97082
+ logger_1.logger.warn('\n💡 Hint: Check your YAML syntax. You can validate it at https://www.yamllint.com/');
97078
97083
  }
97079
97084
  else if (error.message.includes('extends')) {
97080
- console.error('\n💡 Hint: Check that extended configuration files exist and are accessible.');
97085
+ logger_1.logger.warn('\n💡 Hint: Check that extended configuration files exist and are accessible.');
97081
97086
  }
97082
97087
  else if (error.message.includes('permission')) {
97083
- console.error('\n💡 Hint: Check file permissions. The file must be readable.');
97088
+ logger_1.logger.warn('\n💡 Hint: Check file permissions. The file must be readable.');
97084
97089
  }
97085
97090
  }
97086
97091
  else {
97087
- console.error(`❌ Error loading configuration: ${error}`);
97092
+ logger_1.logger.error(`❌ Error loading configuration: ${error}`);
97088
97093
  }
97089
97094
  // Exit with error when explicit config path fails
97090
- console.error('\n🛑 Exiting: Cannot proceed when specified configuration file fails to load.');
97095
+ logger_1.logger.error('\n🛑 Exiting: Cannot proceed when specified configuration file fails to load.');
97091
97096
  process.exit(1);
97092
97097
  }
97093
97098
  }
97094
97099
  else {
97095
97100
  // Auto-discovery mode - fallback to defaults is OK
97101
+ logger_1.logger.step('Discovering configuration');
97096
97102
  config = await configManager
97097
97103
  .findAndLoadConfig()
97098
97104
  .catch(() => configManager.getDefaultConfig());
@@ -97103,7 +97109,7 @@ async function main() {
97103
97109
  const availableChecks = Object.keys(config.checks || {});
97104
97110
  const invalidChecks = checksToRun.filter(check => !availableChecks.includes(check));
97105
97111
  if (invalidChecks.length > 0) {
97106
- console.error(`❌ Error: No configuration found for check: ${invalidChecks[0]}`);
97112
+ logger_1.logger.error(`❌ Error: No configuration found for check: ${invalidChecks[0]}`);
97107
97113
  process.exit(1);
97108
97114
  }
97109
97115
  // Include dependencies of requested checks
@@ -97127,7 +97133,7 @@ async function main() {
97127
97133
  checksToRun = Array.from(checksWithDependencies);
97128
97134
  // Use stderr for status messages when outputting formatted results to stdout
97129
97135
  // Suppress all status messages when outputting JSON to avoid breaking parsers
97130
- const logFn = options.output === 'json' ? () => { } : console.error;
97136
+ const logFn = (msg) => logger_1.logger.info(msg);
97131
97137
  // Determine if we should include code context (diffs)
97132
97138
  // In CLI mode (local), we do smart detection. PR mode always includes context.
97133
97139
  const isPRContext = false; // This is CLI mode, not GitHub Action
@@ -97149,48 +97155,48 @@ async function main() {
97149
97155
  // Auto-detect based on schemas (CLI mode only)
97150
97156
  const hasCodeReviewSchema = checksToRun.some(check => config.checks?.[check]?.schema === 'code-review');
97151
97157
  includeCodeContext = hasCodeReviewSchema;
97152
- if (hasCodeReviewSchema) {
97158
+ if (hasCodeReviewSchema)
97153
97159
  logFn('📝 Code context: ENABLED (code-review schema detected in local mode)');
97154
- }
97155
- else {
97160
+ else
97156
97161
  logFn('📝 Code context: DISABLED (no code-review schema found in local mode)');
97157
- }
97158
97162
  }
97159
97163
  // Get repository info using GitRepositoryAnalyzer
97160
97164
  const { GitRepositoryAnalyzer } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(71259)));
97161
97165
  const analyzer = new GitRepositoryAnalyzer(process.cwd());
97162
97166
  let repositoryInfo;
97163
97167
  try {
97168
+ logger_1.logger.step('Analyzing repository');
97164
97169
  repositoryInfo = await analyzer.analyzeRepository(includeCodeContext);
97165
97170
  }
97166
97171
  catch (error) {
97167
- console.error('❌ Error analyzing git repository:', error);
97168
- console.error('💡 Make sure you are in a git repository or initialize one with "git init"');
97172
+ logger_1.logger.error('❌ Error analyzing git repository: ' +
97173
+ (error instanceof Error ? error.message : String(error)));
97174
+ logger_1.logger.warn('💡 Make sure you are in a git repository or initialize one with "git init"');
97169
97175
  process.exit(1);
97170
97176
  }
97171
97177
  // Check if we're in a git repository
97172
97178
  if (!repositoryInfo.isGitRepository) {
97173
- console.error('❌ Error: Not a git repository. Run "git init" to initialize a repository.');
97179
+ logger_1.logger.error('❌ Error: Not a git repository. Run "git init" to initialize a repository.');
97174
97180
  process.exit(1);
97175
97181
  }
97176
- logFn('🔍 Visor - AI-powered code review tool');
97177
- logFn(`Configuration version: ${config.version}`);
97178
- logFn(`Configuration source: ${options.configPath || 'default search locations'}`);
97182
+ logger_1.logger.info('🔍 Visor - AI-powered code review tool');
97183
+ logger_1.logger.info(`Configuration version: ${config.version}`);
97184
+ logger_1.logger.verbose(`Configuration source: ${options.configPath || 'default search locations'}`);
97179
97185
  // Check if there are any changes to analyze (only when code context is needed)
97180
97186
  if (includeCodeContext && repositoryInfo.files.length === 0) {
97181
- console.error('❌ Error: No changes to analyze. Make some file changes first.');
97187
+ logger_1.logger.error('❌ Error: No changes to analyze. Make some file changes first.');
97182
97188
  process.exit(1);
97183
97189
  }
97184
97190
  // Show registered providers if in debug mode
97185
97191
  if (options.debug) {
97186
97192
  const { CheckProviderRegistry } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(57140)));
97187
97193
  const registry = CheckProviderRegistry.getInstance();
97188
- logFn('Registered providers:', registry.getAvailableProviders().join(', '));
97194
+ logger_1.logger.debug('Registered providers: ' + registry.getAvailableProviders().join(', '));
97189
97195
  }
97190
- logFn(`📂 Repository: ${repositoryInfo.base} branch`);
97191
- logFn(`📁 Files changed: ${repositoryInfo.files?.length || 0}`);
97192
- logFn('🔍 Analyzing local git repository...');
97193
- logFn(`🤖 Executing checks: ${checksToRun.join(', ')}`);
97196
+ logger_1.logger.info(`📂 Repository: ${repositoryInfo.base} branch`);
97197
+ logger_1.logger.info(`📁 Files changed: ${repositoryInfo.files?.length || 0}`);
97198
+ logger_1.logger.step(`Executing ${checksToRun.length} check(s)`);
97199
+ logger_1.logger.verbose(`Checks: ${checksToRun.join(', ')}`);
97194
97200
  // Create CheckExecutionEngine for running checks
97195
97201
  const engine = new check_execution_engine_1.CheckExecutionEngine();
97196
97202
  // Build tag filter from CLI options
@@ -97233,6 +97239,7 @@ async function main() {
97233
97239
  }
97234
97240
  const executedCheckNames = Array.from(new Set(Object.values(groupedResultsToUse).flatMap((checks) => checks.map(check => check.checkName))));
97235
97241
  // Format output based on format type
97242
+ logger_1.logger.step(`Formatting results as ${options.output}`);
97236
97243
  let output;
97237
97244
  if (options.output === 'json') {
97238
97245
  output = JSON.stringify(groupedResultsToUse, null, 2);
@@ -97282,9 +97289,41 @@ async function main() {
97282
97289
  };
97283
97290
  output = output_formatters_1.OutputFormatters.formatAsTable(analysisResult, { showDetails: true });
97284
97291
  }
97285
- console.log(output);
97286
- // Check for critical issues
97292
+ // Emit or save output
97293
+ if (options.outputFile) {
97294
+ try {
97295
+ const outPath = path.resolve(process.cwd(), options.outputFile);
97296
+ fs.mkdirSync(path.dirname(outPath), { recursive: true });
97297
+ fs.writeFileSync(outPath, output, 'utf8');
97298
+ logger_1.logger.success(`Saved ${options.output} output to ${outPath}`);
97299
+ }
97300
+ catch (writeErr) {
97301
+ logger_1.logger.error(`Failed to write output to file: ${writeErr instanceof Error ? writeErr.message : String(writeErr)}`);
97302
+ process.exit(1);
97303
+ }
97304
+ }
97305
+ else {
97306
+ console.log(output);
97307
+ }
97308
+ // Summarize execution (stderr only; suppressed in JSON/SARIF unless verbose/debug)
97287
97309
  const allResults = Object.values(groupedResultsToUse).flat();
97310
+ const allIssues = allResults.flatMap((r) => r.issues || []);
97311
+ const counts = allIssues.reduce((acc, issue) => {
97312
+ const sev = (issue.severity || 'info').toLowerCase();
97313
+ acc.total++;
97314
+ if (sev === 'critical')
97315
+ acc.critical++;
97316
+ else if (sev === 'error')
97317
+ acc.error++;
97318
+ else if (sev === 'warning' || sev === 'warn')
97319
+ acc.warning++;
97320
+ else
97321
+ acc.info++;
97322
+ return acc;
97323
+ }, { total: 0, critical: 0, error: 0, warning: 0, info: 0 });
97324
+ logger_1.logger.success(`Completed ${executedCheckNames.length} check(s): ${counts.total} issues (${counts.critical} critical, ${counts.error} error, ${counts.warning} warning)`);
97325
+ logger_1.logger.verbose(`Checks executed: ${executedCheckNames.join(', ')}`);
97326
+ // Check for critical issues
97288
97327
  const criticalCount = allResults.reduce((sum, result) => {
97289
97328
  const issues = result.issues || [];
97290
97329
  return (sum + issues.filter((issue) => issue.severity === 'critical').length);
@@ -97302,38 +97341,38 @@ async function main() {
97302
97341
  const { ClaudeCodeSDKNotInstalledError, ClaudeCodeAPIKeyMissingError } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(17985))).catch(() => ({ ClaudeCodeSDKNotInstalledError: null, ClaudeCodeAPIKeyMissingError: null }));
97303
97342
  // Provide user-friendly error messages for known errors
97304
97343
  if (ClaudeCodeSDKNotInstalledError && error instanceof ClaudeCodeSDKNotInstalledError) {
97305
- console.error('\n❌ Error: Claude Code SDK is not installed.');
97306
- console.error('To use the claude-code provider, you need to install the required packages:');
97307
- console.error('\n npm install @anthropic/claude-code-sdk @modelcontextprotocol/sdk');
97308
- console.error('\nOr if using yarn:');
97309
- console.error('\n yarn add @anthropic/claude-code-sdk @modelcontextprotocol/sdk\n');
97344
+ logger_1.logger.error('\n❌ Error: Claude Code SDK is not installed.');
97345
+ logger_1.logger.error('To use the claude-code provider, you need to install the required packages:');
97346
+ logger_1.logger.error('\n npm install @anthropic/claude-code-sdk @modelcontextprotocol/sdk');
97347
+ logger_1.logger.error('\nOr if using yarn:');
97348
+ logger_1.logger.error('\n yarn add @anthropic/claude-code-sdk @modelcontextprotocol/sdk\n');
97310
97349
  }
97311
97350
  else if (ClaudeCodeAPIKeyMissingError && error instanceof ClaudeCodeAPIKeyMissingError) {
97312
- console.error('\n❌ Error: No API key found for Claude Code provider.');
97313
- console.error('Please set one of the following environment variables:');
97314
- console.error(' - CLAUDE_CODE_API_KEY');
97315
- console.error(' - ANTHROPIC_API_KEY');
97316
- console.error('\nExample:');
97317
- console.error(' export CLAUDE_CODE_API_KEY="your-api-key-here"\n');
97351
+ logger_1.logger.error('\n❌ Error: No API key found for Claude Code provider.');
97352
+ logger_1.logger.error('Please set one of the following environment variables:');
97353
+ logger_1.logger.error(' - CLAUDE_CODE_API_KEY');
97354
+ logger_1.logger.error(' - ANTHROPIC_API_KEY');
97355
+ logger_1.logger.error('\nExample:');
97356
+ logger_1.logger.error(' export CLAUDE_CODE_API_KEY="your-api-key-here"\n');
97318
97357
  }
97319
97358
  else if (error instanceof Error && error.message.includes('No API key configured')) {
97320
- console.error('\n❌ Error: No API key or credentials configured for AI provider.');
97321
- console.error('Please set one of the following:');
97322
- console.error('\nFor Google Gemini:');
97323
- console.error(' export GOOGLE_API_KEY="your-api-key"');
97324
- console.error('\nFor Anthropic Claude:');
97325
- console.error(' export ANTHROPIC_API_KEY="your-api-key"');
97326
- console.error('\nFor OpenAI:');
97327
- console.error(' export OPENAI_API_KEY="your-api-key"');
97328
- console.error('\nFor AWS Bedrock:');
97329
- console.error(' export AWS_ACCESS_KEY_ID="your-access-key"');
97330
- console.error(' export AWS_SECRET_ACCESS_KEY="your-secret-key"');
97331
- console.error(' export AWS_REGION="us-east-1"');
97332
- console.error('\nOr use API key authentication for Bedrock:');
97333
- console.error(' export AWS_BEDROCK_API_KEY="your-api-key"\n');
97359
+ logger_1.logger.error('\n❌ Error: No API key or credentials configured for AI provider.');
97360
+ logger_1.logger.error('Please set one of the following:');
97361
+ logger_1.logger.error('\nFor Google Gemini:');
97362
+ logger_1.logger.error(' export GOOGLE_API_KEY="your-api-key"');
97363
+ logger_1.logger.error('\nFor Anthropic Claude:');
97364
+ logger_1.logger.error(' export ANTHROPIC_API_KEY="your-api-key"');
97365
+ logger_1.logger.error('\nFor OpenAI:');
97366
+ logger_1.logger.error(' export OPENAI_API_KEY="your-api-key"');
97367
+ logger_1.logger.error('\nFor AWS Bedrock:');
97368
+ logger_1.logger.error(' export AWS_ACCESS_KEY_ID="your-access-key"');
97369
+ logger_1.logger.error(' export AWS_SECRET_ACCESS_KEY="your-secret-key"');
97370
+ logger_1.logger.error(' export AWS_REGION="us-east-1"');
97371
+ logger_1.logger.error('\nOr use API key authentication for Bedrock:');
97372
+ logger_1.logger.error(' export AWS_BEDROCK_API_KEY="your-api-key"\n');
97334
97373
  }
97335
97374
  else {
97336
- console.error('❌ Error:', error instanceof Error ? error.message : error);
97375
+ logger_1.logger.error('❌ Error: ' + (error instanceof Error ? error.message : String(error)));
97337
97376
  }
97338
97377
  process.exit(1);
97339
97378
  }
@@ -97408,10 +97447,13 @@ class CLI {
97408
97447
  .version(this.getVersion())
97409
97448
  .option('-c, --check <type>', 'Specify check type (can be used multiple times)', this.collectChecks, [])
97410
97449
  .option('-o, --output <format>', 'Output format (table, json, markdown, sarif)', 'table')
97450
+ .option('--output-file <path>', 'Write formatted output to a file instead of stdout')
97411
97451
  .option('--config <path>', 'Path to configuration file')
97412
97452
  .option('--timeout <ms>', 'Timeout for check operations in milliseconds (default: 600000ms / 10 minutes)', value => parseInt(value, 10))
97413
97453
  .option('--max-parallelism <count>', 'Maximum number of checks to run in parallel (default: 3)', value => parseInt(value, 10))
97414
97454
  .option('--debug', 'Enable debug mode for detailed output')
97455
+ .option('-v, --verbose', 'Increase verbosity (without full debug)')
97456
+ .option('-q, --quiet', 'Reduce verbosity to warnings and errors')
97415
97457
  .option('--fail-fast', 'Stop execution on first failure condition')
97416
97458
  .option('--tags <tags>', 'Include checks with these tags (comma-separated)')
97417
97459
  .option('--exclude-tags <tags>', 'Exclude checks with these tags (comma-separated)')
@@ -97447,10 +97489,13 @@ class CLI {
97447
97489
  .version(this.getVersion())
97448
97490
  .option('-c, --check <type>', 'Specify check type (can be used multiple times)', this.collectChecks, [])
97449
97491
  .option('-o, --output <format>', 'Output format (table, json, markdown, sarif)', 'table')
97492
+ .option('--output-file <path>', 'Write formatted output to a file instead of stdout')
97450
97493
  .option('--config <path>', 'Path to configuration file')
97451
97494
  .option('--timeout <ms>', 'Timeout for check operations in milliseconds (default: 600000ms / 10 minutes)', value => parseInt(value, 10))
97452
97495
  .option('--max-parallelism <count>', 'Maximum number of checks to run in parallel (default: 3)', value => parseInt(value, 10))
97453
97496
  .option('--debug', 'Enable debug mode for detailed output')
97497
+ .option('-v, --verbose', 'Increase verbosity (without full debug)')
97498
+ .option('-q, --quiet', 'Reduce verbosity to warnings and errors')
97454
97499
  .option('--fail-fast', 'Stop execution on first failure condition')
97455
97500
  .option('--tags <tags>', 'Include checks with these tags (comma-separated)')
97456
97501
  .option('--exclude-tags <tags>', 'Exclude checks with these tags (comma-separated)')
@@ -97498,10 +97543,13 @@ class CLI {
97498
97543
  return {
97499
97544
  checks: uniqueChecks,
97500
97545
  output: options.output,
97546
+ outputFile: options.outputFile,
97501
97547
  configPath: options.config,
97502
97548
  timeout: options.timeout,
97503
97549
  maxParallelism: options.maxParallelism,
97504
97550
  debug: options.debug,
97551
+ verbose: options.verbose,
97552
+ quiet: options.quiet,
97505
97553
  failFast: options.failFast,
97506
97554
  tags,
97507
97555
  excludeTags,
@@ -97572,10 +97620,13 @@ class CLI {
97572
97620
  .version(this.getVersion())
97573
97621
  .option('-c, --check <type>', 'Specify check type (can be used multiple times)', this.collectChecks, [])
97574
97622
  .option('-o, --output <format>', 'Output format (table, json, markdown, sarif)', 'table')
97623
+ .option('--output-file <path>', 'Write formatted output to a file instead of stdout')
97575
97624
  .option('--config <path>', 'Path to configuration file')
97576
97625
  .option('--timeout <ms>', 'Timeout for check operations in milliseconds (default: 600000ms / 10 minutes)', value => parseInt(value, 10))
97577
97626
  .option('--max-parallelism <count>', 'Maximum number of checks to run in parallel (default: 3)', value => parseInt(value, 10))
97578
97627
  .option('--debug', 'Enable debug mode for detailed output')
97628
+ .option('-v, --verbose', 'Increase verbosity (without full debug)')
97629
+ .option('-q, --quiet', 'Reduce verbosity to warnings and errors')
97579
97630
  .option('--fail-fast', 'Stop execution on first failure condition')
97580
97631
  .option('--tags <tags>', 'Include checks with these tags (comma-separated)')
97581
97632
  .option('--exclude-tags <tags>', 'Exclude checks with these tags (comma-separated)')
@@ -97634,6 +97685,7 @@ Examples:
97634
97685
  visor --check all --output json
97635
97686
  visor --check architecture --check security --output markdown
97636
97687
  visor --check security --output sarif > results.sarif
97688
+ visor --check all --output json --output-file results.json # Save to file reliably
97637
97689
  visor --check all --timeout 300000 --output json # 5 minute timeout
97638
97690
  visor --check all --max-parallelism 5 --output json # Run up to 5 checks in parallel
97639
97691
  visor --check all --debug --output markdown # Enable debug mode
@@ -98862,6 +98914,34 @@ class FailureConditionEvaluator {
98862
98914
  */
98863
98915
  evaluateExpression(condition, context) {
98864
98916
  try {
98917
+ // Normalize multi-line or semicolon-separated expressions.
98918
+ // Allows writing debug statements on separate lines, e.g.:
98919
+ // log("start")
98920
+ // log(outputs)
98921
+ // outputs["fetch-tickets"].issueType === 'Bug'
98922
+ // We convert to a single expression using the comma operator so the
98923
+ // final expression determines the boolean result.
98924
+ const normalize = (expr) => {
98925
+ const trimmed = expr.trim();
98926
+ // If it's already a single-line expression without semicolons, keep it.
98927
+ if (!/[\n;]/.test(trimmed))
98928
+ return trimmed;
98929
+ // Split on newlines/semicolons, drop empty and comment-only lines.
98930
+ const parts = trimmed
98931
+ .split(/[\n;]+/)
98932
+ .map(s => s.trim())
98933
+ .filter(s => s.length > 0 && !s.startsWith('//'));
98934
+ if (parts.length === 0)
98935
+ return 'true';
98936
+ // Support an explicit return in the last statement.
98937
+ const lastRaw = parts.pop();
98938
+ const last = lastRaw.replace(/^return\s+/i, '').trim();
98939
+ // Join leading statements with comma operator; last expression returns value.
98940
+ if (parts.length === 0)
98941
+ return last;
98942
+ return `(${parts.join(', ')}, ${last})`;
98943
+ };
98944
+ // note: normalization happens later only if raw compilation fails
98865
98945
  // Helper functions for GitHub Actions-style expressions
98866
98946
  const contains = (searchString, searchValue) => String(searchString).toLowerCase().includes(String(searchValue).toLowerCase());
98867
98947
  const startsWith = (searchString, searchValue) => String(searchString).toLowerCase().startsWith(String(searchValue).toLowerCase());
@@ -98984,7 +99064,17 @@ class FailureConditionEvaluator {
98984
99064
  hasFileWith,
98985
99065
  };
98986
99066
  // Compile and execute the expression in the sandbox
98987
- const exec = this.sandbox.compile(`return (${condition.trim()});`);
99067
+ const raw = condition.trim();
99068
+ let exec;
99069
+ try {
99070
+ // Try compiling the raw expression as-is first (supports multi-line logical expressions)
99071
+ exec = this.sandbox.compile(`return (${raw});`);
99072
+ }
99073
+ catch {
99074
+ // Fallback: normalize multi-line statements into a comma-chain expression
99075
+ const normalizedExpr = normalize(condition);
99076
+ exec = this.sandbox.compile(`return (${normalizedExpr});`);
99077
+ }
98988
99078
  const result = exec(scope).run();
98989
99079
  // Ensure we return a boolean
98990
99080
  return Boolean(result);
@@ -101614,6 +101704,134 @@ function createExtendedLiquid(options = {}) {
101614
101704
  }
101615
101705
 
101616
101706
 
101707
+ /***/ }),
101708
+
101709
+ /***/ 86999:
101710
+ /***/ ((__unused_webpack_module, exports) => {
101711
+
101712
+ "use strict";
101713
+
101714
+ /*
101715
+ * Centralized logger for Visor CLI and Action modes.
101716
+ * - Respects output format (suppresses info in JSON/SARIF unless debug)
101717
+ * - Supports levels: silent < error < warn < info < verbose < debug
101718
+ * - Routes logs to stderr to keep stdout clean for machine-readable output
101719
+ */
101720
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
101721
+ exports.logger = void 0;
101722
+ exports.configureLoggerFromCli = configureLoggerFromCli;
101723
+ function levelToNumber(level) {
101724
+ switch (level) {
101725
+ case 'silent':
101726
+ return 0;
101727
+ case 'error':
101728
+ return 10;
101729
+ case 'warn':
101730
+ return 20;
101731
+ case 'info':
101732
+ return 30;
101733
+ case 'verbose':
101734
+ return 40;
101735
+ case 'debug':
101736
+ return 50;
101737
+ }
101738
+ }
101739
+ class Logger {
101740
+ level = 'info';
101741
+ isJsonLike = false;
101742
+ isTTY = typeof process !== 'undefined' ? !!process.stderr.isTTY : false;
101743
+ configure(opts = {}) {
101744
+ // Determine base level
101745
+ let lvl = 'info';
101746
+ if (opts.debug || process.env.VISOR_DEBUG === 'true') {
101747
+ lvl = 'debug';
101748
+ }
101749
+ else if (opts.verbose || process.env.VISOR_LOG_LEVEL === 'verbose') {
101750
+ lvl = 'verbose';
101751
+ }
101752
+ else if (opts.quiet || process.env.VISOR_LOG_LEVEL === 'quiet') {
101753
+ lvl = 'warn';
101754
+ }
101755
+ else if (opts.level) {
101756
+ lvl = opts.level;
101757
+ }
101758
+ else if (process.env.VISOR_LOG_LEVEL) {
101759
+ const envLvl = process.env.VISOR_LOG_LEVEL;
101760
+ if (['silent', 'error', 'warn', 'info', 'verbose', 'debug'].includes(envLvl)) {
101761
+ lvl = envLvl;
101762
+ }
101763
+ }
101764
+ this.level = lvl;
101765
+ const output = opts.outputFormat || process.env.VISOR_OUTPUT_FORMAT || 'table';
101766
+ // In JSON/SARIF we suppress non-error logs unless explicitly verbose/debug
101767
+ this.isJsonLike = output === 'json' || output === 'sarif';
101768
+ }
101769
+ shouldLog(level) {
101770
+ const desired = levelToNumber(level);
101771
+ const current = levelToNumber(this.level);
101772
+ if (desired > current)
101773
+ return false;
101774
+ if (this.isJsonLike &&
101775
+ desired < levelToNumber('error') &&
101776
+ this.level !== 'debug' &&
101777
+ this.level !== 'verbose') {
101778
+ // In JSON/SARIF, hide info/warn unless explicitly verbose/debug
101779
+ return false;
101780
+ }
101781
+ return true;
101782
+ }
101783
+ write(msg) {
101784
+ // Always route to stderr to keep stdout clean for results
101785
+ try {
101786
+ process.stderr.write(msg + '\n');
101787
+ }
101788
+ catch {
101789
+ // Ignore write errors
101790
+ }
101791
+ }
101792
+ info(msg) {
101793
+ if (this.shouldLog('info'))
101794
+ this.write(msg);
101795
+ }
101796
+ warn(msg) {
101797
+ if (this.shouldLog('warn'))
101798
+ this.write(msg);
101799
+ }
101800
+ error(msg) {
101801
+ if (this.shouldLog('error'))
101802
+ this.write(msg);
101803
+ }
101804
+ verbose(msg) {
101805
+ if (this.shouldLog('verbose'))
101806
+ this.write(msg);
101807
+ }
101808
+ debug(msg) {
101809
+ if (this.shouldLog('debug'))
101810
+ this.write(msg);
101811
+ }
101812
+ step(msg) {
101813
+ // High-level phase indicator
101814
+ if (this.shouldLog('info'))
101815
+ this.write(`▶ ${msg}`);
101816
+ }
101817
+ success(msg) {
101818
+ if (this.shouldLog('info'))
101819
+ this.write(`✔ ${msg}`);
101820
+ }
101821
+ }
101822
+ // Singleton instance
101823
+ exports.logger = new Logger();
101824
+ // Helper to configure from CLI options in a single place
101825
+ function configureLoggerFromCli(options) {
101826
+ exports.logger.configure({
101827
+ outputFormat: options.output,
101828
+ debug: options.debug,
101829
+ verbose: options.verbose,
101830
+ quiet: options.quiet,
101831
+ });
101832
+ }
101833
+
101834
+
101617
101835
  /***/ }),
101618
101836
 
101619
101837
  /***/ 25508:
@@ -105079,6 +105297,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
105079
105297
  exports.LogCheckProvider = void 0;
105080
105298
  const check_provider_interface_1 = __nccwpck_require__(14131);
105081
105299
  const liquid_extensions_1 = __nccwpck_require__(33042);
105300
+ const logger_1 = __nccwpck_require__(86999);
105082
105301
  /**
105083
105302
  * Check provider that outputs debugging and logging information.
105084
105303
  * Useful for troubleshooting check workflows and understanding execution flow.
@@ -105129,9 +105348,15 @@ class LogCheckProvider extends check_provider_interface_1.CheckProvider {
105129
105348
  const renderedMessage = await this.liquid.parseAndRender(message, templateContext);
105130
105349
  // Build the log output
105131
105350
  const logOutput = this.formatLogOutput(level, renderedMessage, templateContext, includePrContext, includeDependencies, includeMetadata);
105132
- // Output to console based on log level
105133
- const logFn = level === 'error' ? console.error : level === 'warn' ? console.warn : console.log;
105134
- logFn(logOutput);
105351
+ // Route through centralized logger to keep stdout clean in JSON/SARIF
105352
+ if (level === 'error')
105353
+ logger_1.logger.error(logOutput);
105354
+ else if (level === 'warn')
105355
+ logger_1.logger.warn(logOutput);
105356
+ else if (level === 'debug')
105357
+ logger_1.logger.debug(logOutput);
105358
+ else
105359
+ logger_1.logger.info(logOutput);
105135
105360
  // Return with the log content as custom data for dependent checks
105136
105361
  return {
105137
105362
  issues: [],
@@ -0,0 +1,30 @@
1
+ export type LogLevel = 'silent' | 'error' | 'warn' | 'info' | 'verbose' | 'debug';
2
+ declare class Logger {
3
+ private level;
4
+ private isJsonLike;
5
+ private isTTY;
6
+ configure(opts?: {
7
+ outputFormat?: string;
8
+ level?: LogLevel;
9
+ debug?: boolean;
10
+ verbose?: boolean;
11
+ quiet?: boolean;
12
+ }): void;
13
+ private shouldLog;
14
+ private write;
15
+ info(msg: string): void;
16
+ warn(msg: string): void;
17
+ error(msg: string): void;
18
+ verbose(msg: string): void;
19
+ debug(msg: string): void;
20
+ step(msg: string): void;
21
+ success(msg: string): void;
22
+ }
23
+ export declare const logger: Logger;
24
+ export declare function configureLoggerFromCli(options: {
25
+ output?: string;
26
+ debug?: boolean;
27
+ verbose?: boolean;
28
+ quiet?: boolean;
29
+ }): void;
30
+ export {};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/logger.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAmBlF,cAAM,MAAM;IACV,OAAO,CAAC,KAAK,CAAoB;IACjC,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,KAAK,CAA4E;IAEzF,SAAS,CACP,IAAI,GAAE;QACJ,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,KAAK,CAAC,EAAE,QAAQ,CAAC;QACjB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,KAAK,CAAC,EAAE,OAAO,CAAC;KACZ,GACL,IAAI;IAyBP,OAAO,CAAC,SAAS;IAgBjB,OAAO,CAAC,KAAK;IASb,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIvB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIvB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIxB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI1B,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIxB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKvB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;CAG3B;AAGD,eAAO,MAAM,MAAM,QAAe,CAAC;AAGnC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,IAAI,CAOP"}
@@ -1 +1 @@
1
- {"version":3,"file":"log-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/log-check-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAI5C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AIlB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAyBjD,OAAO,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,EAC3B,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,EAC9C,YAAY,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,GAClE,OAAO,CAAC,aAAa,CAAC;IA2CzB,OAAO,CAAC,oBAAoB;IAmE5B,OAAO,CAAC,eAAe;IAyDvB,OAAO,CAAC,aAAa;IAerB,sBAAsB,IAAI,MAAM,EAAE;IAgB5B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAKrC,eAAe,IAAI,MAAM,EAAE;CAM5B"}
@@ -22,6 +22,10 @@ export interface CliOptions {
22
22
  maxParallelism?: number;
23
23
  /** Enable debug mode for detailed output */
24
24
  debug?: boolean;
25
+ /** Increase verbosity (more than info, less than debug) */
26
+ verbose?: boolean;
27
+ /** Reduce verbosity to warnings and errors */
28
+ quiet?: boolean;
25
29
  /** Stop execution on first failure condition */
26
30
  failFast?: boolean;
27
31
  /** Tags to include - checks must have at least one of these tags */
@@ -36,6 +40,8 @@ export interface CliOptions {
36
40
  version?: boolean;
37
41
  /** Code context mode: auto (default), enabled (force include), disabled (force exclude) */
38
42
  codeContext?: 'auto' | 'enabled' | 'disabled';
43
+ /** When set, write formatted output to this file instead of stdout */
44
+ outputFile?: string;
39
45
  }
40
46
  /**
41
47
  * CLI command configuration
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/types/cli.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,cAAc,GAAG,UAAU,GAAG,OAAO,GAAG,KAAK,CAAC;AAEtF;;GAEG;AACH,MAAM,MAAM,YAAY,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UAAU,GAAG,OAAO,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,sCAAsC;IACtC,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,gCAAgC;IAChC,MAAM,EAAE,YAAY,CAAC;IACrB,iCAAiC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oFAAoF;IACpF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8CAA8C;IAC9C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,qDAAqD;IACrD,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,qBAAqB;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mBAAmB;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2FAA2F;IAC3F,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;IAC9C,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB;IACtB,OAAO,EAAE,UAAU,CAAC;CACrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@probelabs/visor",
3
- "version": "0.1.52",
3
+ "version": "0.1.53",
4
4
  "main": "dist/index.js",
5
5
  "bin": {
6
6
  "visor": "./dist/index.js"