adhdev 0.6.10 → 0.6.12

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
@@ -16732,14 +16732,14 @@ var require_dist = __commonJS({
16732
16732
  ProviderCliAdapter: () => ProviderCliAdapter,
16733
16733
  ProviderInstanceManager: () => ProviderInstanceManager,
16734
16734
  ProviderLoader: () => ProviderLoader,
16735
- VersionArchive: () => VersionArchive2,
16735
+ VersionArchive: () => VersionArchive,
16736
16736
  addCliHistory: () => addCliHistory,
16737
16737
  buildAllManagedEntries: () => buildAllManagedEntries,
16738
16738
  buildManagedAcps: () => buildManagedAcps,
16739
16739
  buildManagedClis: () => buildManagedClis,
16740
16740
  buildManagedIdes: () => buildManagedIdes,
16741
16741
  connectCdpManager: () => connectCdpManager,
16742
- detectAllVersions: () => detectAllVersions2,
16742
+ detectAllVersions: () => detectAllVersions,
16743
16743
  detectCLIs: () => detectCLIs,
16744
16744
  detectIDEs: () => detectIDEs,
16745
16745
  findCdpManager: () => findCdpManager,
@@ -25866,7 +25866,7 @@ ${installInfo}`
25866
25866
  var import_os3 = require("os");
25867
25867
  var ARCHIVE_PATH = path11.join(os13.homedir(), ".adhdev", "version-history.json");
25868
25868
  var MAX_ENTRIES_PER_PROVIDER = 20;
25869
- var VersionArchive2 = class {
25869
+ var VersionArchive = class {
25870
25870
  history = {};
25871
25871
  constructor() {
25872
25872
  this.load();
@@ -25967,7 +25967,7 @@ ${installInfo}`
25967
25967
  const raw = runCommand(`/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${plistPath}"`);
25968
25968
  return raw || null;
25969
25969
  }
25970
- async function detectAllVersions2(loader, archive) {
25970
+ async function detectAllVersions(loader, archive) {
25971
25971
  const results = [];
25972
25972
  const currentOs = (0, import_os3.platform)();
25973
25973
  for (const provider of loader.getAll()) {
@@ -26073,6 +26073,7 @@ ${installInfo}`
26073
26073
  } else {
26074
26074
  meta3.inputMethod = "cdp-type-and-send";
26075
26075
  meta3.inputSelector = '[contenteditable="true"][role="textbox"]';
26076
+ if (cli) meta3.versionCommand = `${cli} --version`;
26076
26077
  meta3.providerVersion = "1.0.0";
26077
26078
  meta3.compatibility = [
26078
26079
  { ideVersion: `>=${version2}.0`, scriptDir }
@@ -27371,8 +27372,8 @@ async (params) => {
27371
27372
  // ─── Version Detection ───
27372
27373
  async handleDetectVersions(req, res) {
27373
27374
  try {
27374
- const archive = new VersionArchive2();
27375
- const results = await detectAllVersions2(this.providerLoader, archive);
27375
+ const archive = new VersionArchive();
27376
+ const results = await detectAllVersions(this.providerLoader, archive);
27376
27377
  const installed = results.filter((r) => r.installed);
27377
27378
  const notInstalled = results.filter((r) => !r.installed);
27378
27379
  this.json(res, 200, {
@@ -29142,6 +29143,21 @@ data: ${JSON.stringify(msg.data)}
29142
29143
  }
29143
29144
  providerLoader.loadAll();
29144
29145
  providerLoader.registerToDetector();
29146
+ const versionArchive = new VersionArchive();
29147
+ providerLoader.setVersionArchive(versionArchive);
29148
+ detectAllVersions(providerLoader, versionArchive).then((versionResults) => {
29149
+ const installedProviders = versionResults.filter((v) => v.installed);
29150
+ const withVersion = installedProviders.filter((v) => v.version);
29151
+ LOG5.info("Init", `Provider versions: ${installedProviders.length} installed, ${withVersion.length} versioned`);
29152
+ for (const v of withVersion) {
29153
+ LOG5.info("Init", ` ${v.type} (${v.category}): v${v.version}${v.warning ? " \u26A0 " + v.warning : ""}`);
29154
+ }
29155
+ const noVersion = installedProviders.filter((v) => !v.version);
29156
+ if (noVersion.length > 0) {
29157
+ LOG5.warn("Init", ` ${noVersion.length} installed but version unknown: ${noVersion.map((v) => v.type).join(", ")}`);
29158
+ }
29159
+ }).catch(() => {
29160
+ });
29145
29161
  const instanceManager = new ProviderInstanceManager();
29146
29162
  const cdpManagers = /* @__PURE__ */ new Map();
29147
29163
  const instanceIdMap = /* @__PURE__ */ new Map();
@@ -30524,7 +30540,7 @@ var init_adhdev_daemon = __esm({
30524
30540
  fs2 = __toESM(require("fs"));
30525
30541
  path2 = __toESM(require("path"));
30526
30542
  import_chalk = __toESM(require("chalk"));
30527
- pkgVersion = "0.6.10";
30543
+ pkgVersion = "0.6.12";
30528
30544
  if (pkgVersion === "unknown") {
30529
30545
  try {
30530
30546
  const possiblePaths = [
@@ -30624,14 +30640,6 @@ var init_adhdev_daemon = __esm({
30624
30640
  }
30625
30641
  }
30626
30642
  });
30627
- const versionArchive = new import_daemon_core4.VersionArchive();
30628
- (0, import_daemon_core4.detectAllVersions)(this.components.providerLoader, versionArchive).then((results) => {
30629
- this.components.providerLoader.setVersionArchive(versionArchive);
30630
- for (const info of results) {
30631
- if (info.warning) import_daemon_core4.LOG.warn("Provider", `\u26A0 [${info.name}] ${info.warning}`);
30632
- }
30633
- }).catch(() => {
30634
- });
30635
30643
  this.components.providerLoader.fetchLatest().then(({ updated }) => {
30636
30644
  if (updated) {
30637
30645
  this.components.providerLoader.reload();