@getcodesentinel/codesentinel 1.9.2 → 1.9.4

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
@@ -245,6 +245,7 @@ pnpm dev -- ci . --baseline baseline.json --snapshot current.json --report repor
245
245
 
246
246
  `codesentinel report` produces deterministic engineering artifacts from existing analysis outputs.
247
247
 
248
+ - default format: `md`
248
249
  - formats: `text`, `md`, `json`
249
250
  - optional file output: `--output <path>`
250
251
  - optional snapshot export: `--snapshot <path>`
package/dist/index.js CHANGED
@@ -5343,10 +5343,7 @@ program.command("analyze").argument("[path]", "path to the project to analyze").
5343
5343
  "log verbosity: silent, error, warn, info, debug (logs are written to stderr)"
5344
5344
  ).choices(["silent", "error", "warn", "info", "debug"]).default(parseLogLevel(process.env["CODESENTINEL_LOG_LEVEL"]))
5345
5345
  ).addOption(
5346
- new Option(
5347
- "--output <mode>",
5348
- "output mode: summary (default) or json (full analysis object)"
5349
- ).choices(["summary", "json"]).default("summary")
5346
+ new Option("--output <mode>", "output mode: summary (default) or json (full analysis object)").choices(["summary", "json"]).default("summary")
5350
5347
  ).option("--json", "shortcut for --output json").action(
5351
5348
  async (path, options) => {
5352
5349
  const logger = createStderrLogger(options.logLevel);
@@ -5367,7 +5364,7 @@ program.command("explain").argument("[path]", "path to the project to analyze").
5367
5364
  "log verbosity: silent, error, warn, info, debug (logs are written to stderr)"
5368
5365
  ).choices(["silent", "error", "warn", "info", "debug"]).default(parseLogLevel(process.env["CODESENTINEL_LOG_LEVEL"]))
5369
5366
  ).option("--file <path>", "explain a specific file target").option("--module <name>", "explain a specific module target").option("--top <count>", "number of top hotspots to explain when no target is selected", "5").addOption(
5370
- new Option("--format <mode>", "output format: text, json, md").choices(["text", "json", "md"]).default("text")
5367
+ new Option("--format <mode>", "output format: text, json, md").choices(["text", "json", "md"]).default("md")
5371
5368
  ).action(
5372
5369
  async (path, options) => {
5373
5370
  const logger = createStderrLogger(options.logLevel);
@@ -5378,12 +5375,7 @@ program.command("explain").argument("[path]", "path to the project to analyze").
5378
5375
  top: Number.isFinite(top) ? top : 5,
5379
5376
  format: options.format
5380
5377
  };
5381
- const result = await runExplainCommand(
5382
- path,
5383
- options.authorIdentity,
5384
- explainOptions,
5385
- logger
5386
- );
5378
+ const result = await runExplainCommand(path, options.authorIdentity, explainOptions, logger);
5387
5379
  process.stdout.write(`${formatExplainOutput(result, options.format)}
5388
5380
  `);
5389
5381
  }
@@ -5394,10 +5386,7 @@ program.command("dependency-risk").argument("<dependency>", "dependency spec to
5394
5386
  "log verbosity: silent, error, warn, info, debug (logs are written to stderr)"
5395
5387
  ).choices(["silent", "error", "warn", "info", "debug"]).default(parseLogLevel(process.env["CODESENTINEL_LOG_LEVEL"]))
5396
5388
  ).addOption(
5397
- new Option(
5398
- "--output <mode>",
5399
- "output mode: summary (default) or json (full analysis object)"
5400
- ).choices(["summary", "json"]).default("summary")
5389
+ new Option("--output <mode>", "output mode: summary (default) or json (full analysis object)").choices(["summary", "json"]).default("summary")
5401
5390
  ).option("--json", "shortcut for --output json").option("--max-nodes <count>", "maximum dependency nodes to resolve", "250").option("--max-depth <count>", "maximum dependency depth to traverse", "6").action(
5402
5391
  async (dependency, options) => {
5403
5392
  const logger = createStderrLogger(options.logLevel);
@@ -5432,7 +5421,7 @@ program.command("report").argument("[path]", "path to the project to analyze").a
5432
5421
  "log verbosity: silent, error, warn, info, debug (logs are written to stderr)"
5433
5422
  ).choices(["silent", "error", "warn", "info", "debug"]).default(parseLogLevel(process.env["CODESENTINEL_LOG_LEVEL"]))
5434
5423
  ).addOption(
5435
- new Option("--format <mode>", "output format: text, json, md").choices(["text", "json", "md"]).default("text")
5424
+ new Option("--format <mode>", "output format: text, json, md").choices(["text", "json", "md"]).default("md")
5436
5425
  ).option("--output <path>", "write rendered report to a file path").option("--compare <baseline>", "compare against a baseline snapshot JSON file").option("--snapshot <path>", "write current snapshot JSON artifact").option("--no-trace", "disable trace embedding in generated snapshot").action(
5437
5426
  async (path, options) => {
5438
5427
  const logger = createStderrLogger(options.logLevel);
@@ -5505,7 +5494,11 @@ program.command("check").argument("[path]", "path to the project to analyze").ad
5505
5494
  "--log-level <level>",
5506
5495
  "log verbosity: silent, error, warn, info, debug (logs are written to stderr)"
5507
5496
  ).choices(["silent", "error", "warn", "info", "debug"]).default(parseLogLevel(process.env["CODESENTINEL_LOG_LEVEL"]))
5508
- ).option("--compare <baseline>", "baseline snapshot path").option("--max-repo-delta <value>", "maximum allowed normalized repository score increase").option("--no-new-cycles", "fail if new structural cycles are introduced").option("--no-new-high-risk-deps", "fail if new high-risk direct dependencies are introduced").option("--max-new-hotspots <count>", "maximum allowed number of new hotspots").option("--new-hotspot-score-threshold <score>", "minimum hotspot score to count as new hotspot").option("--max-repo-score <score>", "absolute repository score limit (0..100)").addOption(new Option("--fail-on <level>", "failing severity threshold").choices(["error", "warn"]).default("error")).addOption(new Option("--format <mode>", "output format: text, json, md").choices(["text", "json", "md"]).default("text")).option("--output <path>", "write check output to a file path").option("--no-trace", "disable trace embedding in generated snapshot").action(
5497
+ ).option("--compare <baseline>", "baseline snapshot path").option("--max-repo-delta <value>", "maximum allowed normalized repository score increase").option("--no-new-cycles", "fail if new structural cycles are introduced").option("--no-new-high-risk-deps", "fail if new high-risk direct dependencies are introduced").option("--max-new-hotspots <count>", "maximum allowed number of new hotspots").option("--new-hotspot-score-threshold <score>", "minimum hotspot score to count as new hotspot").option("--max-repo-score <score>", "absolute repository score limit (0..100)").addOption(
5498
+ new Option("--fail-on <level>", "failing severity threshold").choices(["error", "warn"]).default("error")
5499
+ ).addOption(
5500
+ new Option("--format <mode>", "output format: text, json, md").choices(["text", "json", "md"]).default("text")
5501
+ ).option("--output <path>", "write check output to a file path").option("--no-trace", "disable trace embedding in generated snapshot").action(
5509
5502
  async (path, options) => {
5510
5503
  const logger = createStderrLogger(options.logLevel);
5511
5504
  try {
@@ -5548,7 +5541,13 @@ program.command("ci").argument("[path]", "path to the project to analyze").addOp
5548
5541
  "--log-level <level>",
5549
5542
  "log verbosity: silent, error, warn, info, debug (logs are written to stderr)"
5550
5543
  ).choices(["silent", "error", "warn", "info", "debug"]).default(parseLogLevel(process.env["CODESENTINEL_LOG_LEVEL"]))
5551
- ).option("--baseline <path>", "baseline snapshot path").option("--baseline-ref <gitRef>", "resolve baseline snapshot from a git reference (for example origin/main)").option("--baseline-sha <sha>", "explicit baseline commit SHA (only valid with --baseline-ref auto)").addOption(
5544
+ ).option("--baseline <path>", "baseline snapshot path").option(
5545
+ "--baseline-ref <gitRef>",
5546
+ "resolve baseline snapshot from a git reference (for example origin/main)"
5547
+ ).option(
5548
+ "--baseline-sha <sha>",
5549
+ "explicit baseline commit SHA (only valid with --baseline-ref auto)"
5550
+ ).addOption(
5552
5551
  new Option(
5553
5552
  "--main-branch <name>",
5554
5553
  "add a default branch candidate for auto baseline resolution (repeatable)"
@@ -5556,7 +5555,9 @@ program.command("ci").argument("[path]", "path to the project to analyze").addOp
5556
5555
  ).option(
5557
5556
  "--main-branches <names>",
5558
5557
  "comma-separated default branch candidates for auto baseline resolution (for example: main,master)"
5559
- ).option("--snapshot <path>", "write current snapshot JSON to path").option("--report <path>", "write markdown CI summary report").option("--json-output <path>", "write machine-readable CI JSON output").option("--max-repo-delta <value>", "maximum allowed normalized repository score increase").option("--no-new-cycles", "fail if new structural cycles are introduced").option("--no-new-high-risk-deps", "fail if new high-risk direct dependencies are introduced").option("--max-new-hotspots <count>", "maximum allowed number of new hotspots").option("--new-hotspot-score-threshold <score>", "minimum hotspot score to count as new hotspot").option("--max-repo-score <score>", "absolute repository score limit (0..100)").addOption(new Option("--fail-on <level>", "failing severity threshold").choices(["error", "warn"]).default("error")).option("--no-trace", "disable trace embedding in generated snapshot").action(
5558
+ ).option("--snapshot <path>", "write current snapshot JSON to path").option("--report <path>", "write markdown CI summary report").option("--json-output <path>", "write machine-readable CI JSON output").option("--max-repo-delta <value>", "maximum allowed normalized repository score increase").option("--no-new-cycles", "fail if new structural cycles are introduced").option("--no-new-high-risk-deps", "fail if new high-risk direct dependencies are introduced").option("--max-new-hotspots <count>", "maximum allowed number of new hotspots").option("--new-hotspot-score-threshold <score>", "minimum hotspot score to count as new hotspot").option("--max-repo-score <score>", "absolute repository score limit (0..100)").addOption(
5559
+ new Option("--fail-on <level>", "failing severity threshold").choices(["error", "warn"]).default("error")
5560
+ ).option("--no-trace", "disable trace embedding in generated snapshot").action(
5560
5561
  async (path, options) => {
5561
5562
  const logger = createStderrLogger(options.logLevel);
5562
5563
  try {