technical-debt-radar 1.13.1 → 1.14.1

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.
Files changed (2) hide show
  1. package/dist/index.js +23 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -22023,6 +22023,8 @@ async function quickScanFile(targetPath, filePath, options) {
22023
22023
  }
22024
22024
  function resolveViolationPath(vFile, projectRoot) {
22025
22025
  if (path5.isAbsolute(vFile)) return vFile;
22026
+ const withSlash = "/" + vFile;
22027
+ if (withSlash.startsWith(projectRoot)) return withSlash;
22026
22028
  return path5.resolve(projectRoot, vFile);
22027
22029
  }
22028
22030
  function detectTestCommand(projectRoot) {
@@ -22330,6 +22332,27 @@ ${relativePath} (${fileViolations.length} violations)
22330
22332
  if (options.dryRun) {
22331
22333
  console.log(import_chalk4.default.dim(" [dry-run] Would apply this fix"));
22332
22334
  totalSkipped += lineViolations.length;
22335
+ } else if ((applyAll || options.auto) && fix.multiFile && fix.filesToChange?.length) {
22336
+ console.log(import_chalk4.default.magenta(` Auto multi-file fix (${fix.filesToChange.length + 1} files)...`));
22337
+ try {
22338
+ await handleMultiFileFix(
22339
+ client,
22340
+ lineViolations[0],
22341
+ absPath,
22342
+ projectRoot,
22343
+ framework,
22344
+ scanResult.config?.architecture,
22345
+ fix.filesToChange,
22346
+ options
22347
+ );
22348
+ totalFixed += lineViolations.length;
22349
+ } catch (e) {
22350
+ console.log(import_chalk4.default.red(` Multi-file fix failed: ${e instanceof Error ? e.message : e}`));
22351
+ totalFailed += lineViolations.length;
22352
+ }
22353
+ fileContent = await fs5.readFile(absPath, "utf-8");
22354
+ lines = fileContent.split("\n");
22355
+ continue;
22333
22356
  } else if (applyAll || options.auto) {
22334
22357
  shouldApply = true;
22335
22358
  if (!options.auto) console.log(import_chalk4.default.green(" Auto-applying (all)..."));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "technical-debt-radar",
3
- "version": "1.13.1",
3
+ "version": "1.14.1",
4
4
  "description": "Stop Node.js production crashes before merge. 47 detection patterns across 5 categories.",
5
5
  "bin": {
6
6
  "radar": "dist/index.js",