md4ai 0.13.1 → 0.13.3

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.
@@ -73,7 +73,7 @@ var CURRENT_VERSION;
73
73
  var init_check_update = __esm({
74
74
  "dist/check-update.js"() {
75
75
  "use strict";
76
- CURRENT_VERSION = true ? "0.13.1" : "0.0.0-dev";
76
+ CURRENT_VERSION = true ? "0.13.3" : "0.0.0-dev";
77
77
  }
78
78
  });
79
79
 
@@ -3307,6 +3307,7 @@ function isJwtError(error) {
3307
3307
  return msg.includes("jwt expired") || msg.includes("invalid jwt") || msg.includes("invalid token") || msg.includes("not authenticated") || msg.includes("invalid refresh_token");
3308
3308
  }
3309
3309
  async function mcpWatchCommand() {
3310
+ await autoCheckForUpdate();
3310
3311
  let { supabase, userId } = await getLongLivedClient();
3311
3312
  const deviceId = await resolveDeviceId(supabase, userId);
3312
3313
  const deviceName = detectDeviceName();
@@ -4525,6 +4526,7 @@ Manifest created: ${relative4(projectRoot, manifestPath)}`));
4525
4526
  // dist/commands/update.js
4526
4527
  init_check_update();
4527
4528
  init_config();
4529
+ init_auth();
4528
4530
  import chalk23 from "chalk";
4529
4531
  import { execFileSync as execFileSync6, spawn } from "node:child_process";
4530
4532
  async function fetchLatestVersion() {
@@ -4595,13 +4597,28 @@ async function postUpdateFlow() {
4595
4597
  return;
4596
4598
  }
4597
4599
  }
4600
+ const { supabase } = await getAuthenticatedClient();
4601
+ const { data: linkedPaths } = await supabase.from("device_paths").select("path, folder_id").order("path");
4602
+ let linkedDisplay = "";
4603
+ if (linkedPaths?.length) {
4604
+ const folderIds = [...new Set(linkedPaths.map((p) => p.folder_id))];
4605
+ const { data: folders } = await supabase.from("claude_folders").select("id, name").in("id", folderIds);
4606
+ const nameMap = new Map((folders ?? []).map((f) => [f.id, f.name]));
4607
+ const lines = linkedPaths.map((p) => {
4608
+ const name = nameMap.get(p.folder_id) ?? "Unknown";
4609
+ return ` ${name} (${p.path})`;
4610
+ });
4611
+ linkedDisplay = `
4612
+ ${lines.join("\n")}`;
4613
+ }
4598
4614
  const { select: selectPrompt } = await import("@inquirer/prompts");
4599
4615
  const cwd = process.cwd();
4616
+ const allLabel = linkedPaths?.length ? `All ${linkedPaths.length} linked project${linkedPaths.length === 1 ? "" : "s"} on this device${linkedDisplay}` : "All linked projects on this device";
4600
4617
  const scanChoice = await selectPrompt({
4601
4618
  message: "What would you like to scan?",
4602
4619
  choices: [
4603
4620
  { name: `Current folder (${cwd})`, value: "cwd" },
4604
- { name: "All linked projects on this device", value: "all" },
4621
+ { name: allLabel, value: "all" },
4605
4622
  { name: "Skip scanning", value: "skip" }
4606
4623
  ]
4607
4624
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "md4ai",
3
- "version": "0.13.1",
3
+ "version": "0.13.3",
4
4
  "description": "CLI for MD4AI — scan Claude projects and sync to your dashboard",
5
5
  "type": "module",
6
6
  "bin": {