@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.js CHANGED
@@ -1043,6 +1043,11 @@ async function walkDirectory(current, opts, stats) {
1043
1043
  stats.skipped += 1;
1044
1044
  continue;
1045
1045
  }
1046
+ if (stat.size === 0) {
1047
+ stats.skipped += 1;
1048
+ dirLogger.debug({ relPath }, "Skipping zero-length file");
1049
+ continue;
1050
+ }
1046
1051
  const target = dirent.isSymbolicLink() ? await readSymlinkTarget(absPath, dirLogger) : null;
1047
1052
  const state = opts.filesRepo.upsertFromStat({
1048
1053
  relPath,
@@ -1576,6 +1581,13 @@ var ServiceRunner = class {
1576
1581
  this.runtime.logger.debug({ relPath }, "Watcher event ignored by rules");
1577
1582
  return;
1578
1583
  }
1584
+ if (fileStats.size === 0) {
1585
+ this.runtime.logger.debug(
1586
+ { relPath },
1587
+ "Watcher skipping zero-length file"
1588
+ );
1589
+ return;
1590
+ }
1579
1591
  const isSymlink = fileStats.isSymbolicLink();
1580
1592
  const target = isSymlink ? await readSymlinkTarget2(absPath) : null;
1581
1593
  const state = this.runtime.filesRepo.upsertFromStat({