adhdev 0.1.3 → 0.1.6

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.
Files changed (2) hide show
  1. package/dist/index.js +44 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -220,8 +220,8 @@ var EXTENSION_CATALOG = [
220
220
  category: "bridge",
221
221
  icon: "\u{1F309}",
222
222
  recommended: true,
223
- vsixUrl: "https://api.adhf.dev/api/v1/releases/bridge/latest.vsix"
224
- // 서버에서 다운로드
223
+ vsixUrl: "https://adhf.dev/releases/bridge/latest.vsix"
224
+ // 웹사이트에서 정적 서빙
225
225
  },
226
226
  // AI Agent extensions
227
227
  {
@@ -350,7 +350,25 @@ async function installExtension(ide, extension) {
350
350
  });
351
351
  });
352
352
  }
353
- } catch {
353
+ if (extension.category === "bridge") {
354
+ return {
355
+ extensionId: extension.id,
356
+ marketplaceId: extension.marketplaceId,
357
+ success: false,
358
+ alreadyInstalled: false,
359
+ error: "VSIX download failed. Check your internet connection and try again."
360
+ };
361
+ }
362
+ } catch (e) {
363
+ if (extension.category === "bridge") {
364
+ return {
365
+ extensionId: extension.id,
366
+ marketplaceId: extension.marketplaceId,
367
+ success: false,
368
+ alreadyInstalled: false,
369
+ error: `VSIX download error: ${e?.message || "Unknown error"}`
370
+ };
371
+ }
354
372
  }
355
373
  }
356
374
  return new Promise((resolve) => {
@@ -753,18 +771,32 @@ async function loginFlow() {
753
771
  }
754
772
  async function injectTokenToIDE(ide, connectionToken) {
755
773
  if (!ide.cliCommand) return;
756
- const { execSync: execSync3 } = await import("child_process");
757
774
  try {
758
- const settingsMap = {
759
- vscode: `${(await import("os")).homedir()}/Library/Application Support/Code/User/settings.json`,
760
- cursor: `${(await import("os")).homedir()}/Library/Application Support/Cursor/User/settings.json`,
761
- antigravity: `${(await import("os")).homedir()}/Library/Application Support/Antigravity/User/settings.json`,
762
- windsurf: `${(await import("os")).homedir()}/Library/Application Support/Windsurf/User/settings.json`
763
- };
764
- const settingsPath = settingsMap[ide.id];
765
- if (!settingsPath) return;
775
+ const os = await import("os");
766
776
  const fs = await import("fs");
767
777
  const path = await import("path");
778
+ const platform2 = os.platform();
779
+ const home = os.homedir();
780
+ const getSettingsPath = (appName2) => {
781
+ if (platform2 === "darwin") {
782
+ return path.join(home, "Library", "Application Support", appName2, "User", "settings.json");
783
+ } else if (platform2 === "win32") {
784
+ return path.join(process.env.APPDATA || path.join(home, "AppData", "Roaming"), appName2, "User", "settings.json");
785
+ } else {
786
+ return path.join(home, ".config", appName2, "User", "settings.json");
787
+ }
788
+ };
789
+ const appNameMap = {
790
+ vscode: "Code",
791
+ cursor: "Cursor",
792
+ antigravity: "Antigravity",
793
+ windsurf: "Windsurf",
794
+ "vscode-insiders": "Code - Insiders",
795
+ vscodium: "VSCodium"
796
+ };
797
+ const appName = appNameMap[ide.id];
798
+ if (!appName) return;
799
+ const settingsPath = getSettingsPath(appName);
768
800
  let settings = {};
769
801
  if (fs.existsSync(settingsPath)) {
770
802
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adhdev",
3
- "version": "0.1.3",
3
+ "version": "0.1.6",
4
4
  "description": "ADHDev CLI — Detect, install and configure your IDE + AI agent extensions",
5
5
  "main": "dist/index.js",
6
6
  "bin": {