adhdev 0.5.0 → 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.
@@ -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,
@@ -29409,7 +29415,7 @@ async function startDaemonFlow() {
29409
29415
  const { isDaemonRunning: isDaemonRunning2 } = await Promise.resolve().then(() => (init_adhdev_daemon(), adhdev_daemon_exports));
29410
29416
  if (isDaemonRunning2()) {
29411
29417
  console.log(import_chalk2.default.green(" \u2713 Daemon is already running"));
29412
- console.log(import_chalk2.default.gray(" Dashboard: https://app.adhf.dev/dashboard\n"));
29418
+ console.log(import_chalk2.default.gray(" Dashboard: https://adhf.dev/dashboard\n"));
29413
29419
  return;
29414
29420
  }
29415
29421
  const { startDaemon } = await import_inquirer.default.prompt([
@@ -29444,11 +29450,11 @@ async function startDaemonFlow() {
29444
29450
  await new Promise((r) => setTimeout(r, 2e3));
29445
29451
  if (isDaemonRunning2()) {
29446
29452
  daemonSpinner.succeed("Daemon started");
29447
- console.log(import_chalk2.default.gray(" Dashboard: https://app.adhf.dev/dashboard"));
29453
+ console.log(import_chalk2.default.gray(" Dashboard: https://adhf.dev/dashboard"));
29448
29454
  console.log(import_chalk2.default.gray(` Logs: ${logPath}`));
29449
29455
  } else {
29450
29456
  daemonSpinner.succeed("Daemon starting in background");
29451
- console.log(import_chalk2.default.gray(" Dashboard: https://app.adhf.dev/dashboard"));
29457
+ console.log(import_chalk2.default.gray(" Dashboard: https://adhf.dev/dashboard"));
29452
29458
  console.log(import_chalk2.default.gray(` Logs: ${logPath}`));
29453
29459
  }
29454
29460
  console.log();
@@ -29601,7 +29607,7 @@ program.command("launch [target]").description("Launch IDE with CDP or start CLI
29601
29607
  console.log(` ${import_chalk3.default.bold("Dir:")} ${workingDir}`);
29602
29608
  console.log(` ${import_chalk3.default.bold("Mode:")} via running daemon`);
29603
29609
  console.log();
29604
- console.log(import_chalk3.default.gray(" Open dashboard: https://app.adhf.dev/dashboard"));
29610
+ console.log(import_chalk3.default.gray(" Open dashboard: https://adhf.dev/dashboard"));
29605
29611
  console.log();
29606
29612
  } else {
29607
29613
  spinner2.stop();