@coderule/mcp 1.6.1 → 1.6.2

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/mcp-cli.js CHANGED
@@ -837,6 +837,9 @@ var Hasher = class {
837
837
  await this.worker.terminate();
838
838
  }
839
839
  }
840
+ async yieldToEventLoop() {
841
+ await new Promise((resolve) => setImmediate(resolve));
842
+ }
840
843
  resolveAbsolutePath(record) {
841
844
  if (path.isAbsolute(record.display_path)) {
842
845
  return record.display_path;
@@ -907,6 +910,9 @@ var Hasher = class {
907
910
  const absPath = this.resolveAbsolutePath(record);
908
911
  const exists = await this.ensureExists(absPath, record);
909
912
  if (!exists) {
913
+ if (this.inlineMode) {
914
+ await this.yieldToEventLoop();
915
+ }
910
916
  continue;
911
917
  }
912
918
  try {
@@ -931,6 +937,9 @@ var Hasher = class {
931
937
  failures.push(record.id);
932
938
  }
933
939
  }
940
+ if (this.inlineMode) {
941
+ await this.yieldToEventLoop();
942
+ }
934
943
  }
935
944
  if (successes.length) {
936
945
  this.log.debug({ count: successes.length }, "Hashing succeeded");