@coderule/mcp 1.6.3 → 1.7.0

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/dist/index.cjs CHANGED
@@ -1057,6 +1057,11 @@ async function walkDirectory(current, opts, stats) {
1057
1057
  stats.skipped += 1;
1058
1058
  continue;
1059
1059
  }
1060
+ if (stat.size === 0) {
1061
+ stats.skipped += 1;
1062
+ dirLogger.debug({ relPath }, "Skipping zero-length file");
1063
+ continue;
1064
+ }
1060
1065
  const target = dirent.isSymbolicLink() ? await readSymlinkTarget(absPath, dirLogger) : null;
1061
1066
  const state = opts.filesRepo.upsertFromStat({
1062
1067
  relPath,
@@ -1590,6 +1595,13 @@ var ServiceRunner = class {
1590
1595
  this.runtime.logger.debug({ relPath }, "Watcher event ignored by rules");
1591
1596
  return;
1592
1597
  }
1598
+ if (fileStats.size === 0) {
1599
+ this.runtime.logger.debug(
1600
+ { relPath },
1601
+ "Watcher skipping zero-length file"
1602
+ );
1603
+ return;
1604
+ }
1593
1605
  const isSymlink = fileStats.isSymbolicLink();
1594
1606
  const target = isSymlink ? await readSymlinkTarget2(absPath) : null;
1595
1607
  const state = this.runtime.filesRepo.upsertFromStat({