adhdev 0.5.1 → 0.5.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/index.js CHANGED
@@ -20473,6 +20473,7 @@ var require_dist = __commonJS({
20473
20473
  watchers = [];
20474
20474
  logFn;
20475
20475
  versionArchive = null;
20476
+ scriptsCache = /* @__PURE__ */ new Map();
20476
20477
  /** Inject VersionArchive so resolve() can auto-detect installed versions */
20477
20478
  setVersionArchive(archive) {
20478
20479
  this.versionArchive = archive;
@@ -20825,12 +20826,15 @@ var require_dist = __commonJS({
20825
20826
  this.log(` [loadScriptsFromDir] ${type}: dir not found: ${dir}`);
20826
20827
  return null;
20827
20828
  }
20829
+ const cached2 = this.scriptsCache.get(dir);
20830
+ if (cached2) return cached2;
20828
20831
  const scriptsJs = path4.join(dir, "scripts.js");
20829
20832
  if (fs4.existsSync(scriptsJs)) {
20830
20833
  try {
20831
20834
  delete require.cache[require.resolve(scriptsJs)];
20832
20835
  const loaded = require(scriptsJs);
20833
20836
  this.log(` [loadScriptsFromDir] ${type}: loaded scripts.js from ${dir} (${Object.keys(loaded).length} exports)`);
20837
+ this.scriptsCache.set(dir, loaded);
20834
20838
  return loaded;
20835
20839
  } catch (e) {
20836
20840
  this.log(` \u26A0 scripts.js load failed: ${scriptsJs}: ${e.message}`);
@@ -20838,6 +20842,7 @@ var require_dist = __commonJS({
20838
20842
  }
20839
20843
  const result = this.buildScriptWrappersFromDir(dir);
20840
20844
  this.log(` [loadScriptsFromDir] ${type}: built wrappers from ${dir} (${Object.keys(result).length} scripts)`);
20845
+ this.scriptsCache.set(dir, result);
20841
20846
  return result;
20842
20847
  }
20843
20848
  /**
@@ -20885,6 +20890,7 @@ var require_dist = __commonJS({
20885
20890
  */
20886
20891
  reload() {
20887
20892
  this.log("Reloading all providers...");
20893
+ this.scriptsCache.clear();
20888
20894
  for (const key of Object.keys(require.cache)) {
20889
20895
  if (key.includes("providers") && (key.endsWith(".js") || key.endsWith(".json"))) {
20890
20896
  delete require.cache[key];
@@ -22074,14 +22080,14 @@ var require_dist = __commonJS({
22074
22080
  const acpSummary = acpStates.map((s) => `${s.type}(${s.status})`).join(", ");
22075
22081
  const logLevel = opts?.p2pOnly ? "debug" : "info";
22076
22082
  const summary = `\u2192${target} IDE: ${ideStates.length} [${ideSummary}] CLI: ${cliStates.length} [${cliSummary}] ACP: ${acpStates.length} [${acpSummary}]`;
22077
- if (logLevel === "debug") {
22078
- if (summary !== this.lastStatusSummary) {
22079
- this.lastStatusSummary = summary;
22083
+ const summaryChanged = summary !== this.lastStatusSummary;
22084
+ if (summaryChanged) {
22085
+ this.lastStatusSummary = summary;
22086
+ if (logLevel === "debug") {
22080
22087
  LOG4.debug("StatusReport", summary);
22088
+ } else {
22089
+ LOG4.info("StatusReport", summary);
22081
22090
  }
22082
- } else {
22083
- this.lastStatusSummary = summary;
22084
- LOG4.info("StatusReport", summary);
22085
22091
  }
22086
22092
  const managedIdes = ideStates.map((s) => ({
22087
22093
  ideType: s.type,