adhdev 0.1.16 → 0.1.17

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 +23 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -177,8 +177,8 @@ async function detectIDEs() {
177
177
  if ((0, import_fs.existsSync)(bundledCli)) resolvedCli = bundledCli;
178
178
  }
179
179
  if (!resolvedCli && appPath && os2 === "win32") {
180
- const { dirname } = await import("path");
181
- const appDir = dirname(appPath);
180
+ const { dirname: dirname2 } = await import("path");
181
+ const appDir = dirname2(appPath);
182
182
  const candidates = [
183
183
  `${appDir}\\bin\\${def.cli}.cmd`,
184
184
  `${appDir}\\bin\\${def.cli}`,
@@ -1342,12 +1342,28 @@ async function launchLinux(ide, port, workspace, newWindow) {
1342
1342
  }
1343
1343
 
1344
1344
  // src/index.ts
1345
- var import_module = require("module");
1346
- var import_meta = {};
1347
- var require2 = (0, import_module.createRequire)(import_meta.url);
1348
- var pkg = require2("../package.json");
1345
+ var import_fs3 = require("fs");
1346
+ var import_path2 = require("path");
1347
+ var pkgVersion = "unknown";
1348
+ try {
1349
+ const possiblePaths = [
1350
+ (0, import_path2.join)(__dirname, "..", "package.json"),
1351
+ (0, import_path2.join)(__dirname, "package.json")
1352
+ ];
1353
+ for (const p of possiblePaths) {
1354
+ try {
1355
+ const data = JSON.parse((0, import_fs3.readFileSync)(p, "utf-8"));
1356
+ if (data.version) {
1357
+ pkgVersion = data.version;
1358
+ break;
1359
+ }
1360
+ } catch {
1361
+ }
1362
+ }
1363
+ } catch {
1364
+ }
1349
1365
  var program = new import_commander.Command();
1350
- program.name("adhdev").description("\u{1F309} ADHDev \u2014 Agent Dashboard Hub for your IDE").version(pkg.version);
1366
+ program.name("adhdev").description("\u{1F309} ADHDev \u2014 Agent Dashboard Hub for your IDE").version(pkgVersion);
1351
1367
  program.command("setup").description("Run the interactive setup wizard").option("-f, --force", "Force re-run setup even if already configured").action(async (options) => {
1352
1368
  await runWizard({ force: options.force });
1353
1369
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adhdev",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "ADHDev CLI — Detect, install and configure your IDE + AI agent extensions",
5
5
  "main": "dist/index.js",
6
6
  "bin": {