adhdev 0.6.7 → 0.6.8
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/cli/index.js +73 -44
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +73 -44
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30524,7 +30524,7 @@ var init_adhdev_daemon = __esm({
|
|
|
30524
30524
|
fs2 = __toESM(require("fs"));
|
|
30525
30525
|
path2 = __toESM(require("path"));
|
|
30526
30526
|
import_chalk = __toESM(require("chalk"));
|
|
30527
|
-
pkgVersion = "0.6.
|
|
30527
|
+
pkgVersion = "0.6.8";
|
|
30528
30528
|
if (pkgVersion === "unknown") {
|
|
30529
30529
|
try {
|
|
30530
30530
|
const possiblePaths = [
|
|
@@ -30970,46 +30970,65 @@ async function runWizard(options = {}) {
|
|
|
30970
30970
|
console.log(LOGO);
|
|
30971
30971
|
if ((0, import_daemon_core5.isSetupComplete)() && !options.force) {
|
|
30972
30972
|
const config2 = (0, import_daemon_core5.loadConfig)();
|
|
30973
|
-
console.log(import_chalk2.default.green("\u2713") + " ADHDev is already
|
|
30974
|
-
console.log(import_chalk2.default.gray(`
|
|
30973
|
+
console.log(import_chalk2.default.green("\u2713") + " ADHDev is already configured.");
|
|
30974
|
+
console.log(import_chalk2.default.gray(` Account: ${config2.userEmail || "not logged in"}`));
|
|
30975
30975
|
console.log();
|
|
30976
|
-
|
|
30977
|
-
|
|
30978
|
-
|
|
30979
|
-
|
|
30980
|
-
|
|
30981
|
-
|
|
30982
|
-
|
|
30983
|
-
|
|
30984
|
-
|
|
30985
|
-
|
|
30986
|
-
|
|
30987
|
-
|
|
30988
|
-
|
|
30989
|
-
|
|
30990
|
-
|
|
30991
|
-
|
|
30992
|
-
|
|
30976
|
+
await checkForUpdate();
|
|
30977
|
+
await startDaemonFlow();
|
|
30978
|
+
return;
|
|
30979
|
+
}
|
|
30980
|
+
await quickSetup();
|
|
30981
|
+
}
|
|
30982
|
+
async function checkForUpdate() {
|
|
30983
|
+
try {
|
|
30984
|
+
const { execSync } = await import("child_process");
|
|
30985
|
+
let currentVersion = null;
|
|
30986
|
+
try {
|
|
30987
|
+
currentVersion = execSync("adhdev --version", {
|
|
30988
|
+
encoding: "utf-8",
|
|
30989
|
+
timeout: 3e3,
|
|
30990
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
30991
|
+
}).trim();
|
|
30992
|
+
} catch {
|
|
30993
30993
|
return;
|
|
30994
30994
|
}
|
|
30995
|
-
|
|
30996
|
-
|
|
30997
|
-
|
|
30998
|
-
|
|
30999
|
-
|
|
31000
|
-
|
|
31001
|
-
|
|
31002
|
-
|
|
31003
|
-
console.log(import_chalk2.default.green("\u2713 Login saved successfully!"));
|
|
31004
|
-
}
|
|
30995
|
+
let latestVersion = null;
|
|
30996
|
+
try {
|
|
30997
|
+
latestVersion = execSync("npm show adhdev version", {
|
|
30998
|
+
encoding: "utf-8",
|
|
30999
|
+
timeout: 5e3,
|
|
31000
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
31001
|
+
}).trim();
|
|
31002
|
+
} catch {
|
|
31005
31003
|
return;
|
|
31006
31004
|
}
|
|
31007
|
-
if (
|
|
31008
|
-
|
|
31005
|
+
if (!currentVersion || !latestVersion || currentVersion === latestVersion) return;
|
|
31006
|
+
console.log(import_chalk2.default.yellow(` Update available: ${currentVersion} \u2192 ${latestVersion}`));
|
|
31007
|
+
const { doUpdate } = await (await import("inquirer")).default.prompt([{
|
|
31008
|
+
type: "confirm",
|
|
31009
|
+
name: "doUpdate",
|
|
31010
|
+
message: `Update adhdev CLI to v${latestVersion}?`,
|
|
31011
|
+
default: true
|
|
31012
|
+
}]);
|
|
31013
|
+
if (!doUpdate) {
|
|
31014
|
+
console.log(import_chalk2.default.gray(" Skipping update. Run: npm install -g adhdev@latest\n"));
|
|
31009
31015
|
return;
|
|
31010
31016
|
}
|
|
31017
|
+
const spinner = (await import("ora")).default("Updating adhdev CLI...").start();
|
|
31018
|
+
try {
|
|
31019
|
+
execSync("npm install -g adhdev@latest", {
|
|
31020
|
+
encoding: "utf-8",
|
|
31021
|
+
timeout: 6e4,
|
|
31022
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
31023
|
+
});
|
|
31024
|
+
spinner.succeed(`Updated to v${latestVersion}`);
|
|
31025
|
+
console.log();
|
|
31026
|
+
} catch (e) {
|
|
31027
|
+
spinner.fail("Update failed");
|
|
31028
|
+
console.log(import_chalk2.default.gray(" Manual: npm install -g adhdev@latest\n"));
|
|
31029
|
+
}
|
|
31030
|
+
} catch {
|
|
31011
31031
|
}
|
|
31012
|
-
await quickSetup();
|
|
31013
31032
|
}
|
|
31014
31033
|
async function quickSetup() {
|
|
31015
31034
|
console.log(import_chalk2.default.bold("\n\u{1F680} Quick Setup\n"));
|
|
@@ -31025,20 +31044,23 @@ async function quickSetup() {
|
|
|
31025
31044
|
userName: loginResult.name
|
|
31026
31045
|
});
|
|
31027
31046
|
}
|
|
31047
|
+
await installCliOnly();
|
|
31048
|
+
await startDaemonFlow();
|
|
31028
31049
|
console.log(DIVIDER);
|
|
31029
31050
|
console.log(import_chalk2.default.bold("\n\u{1F389} Setup Complete!\n"));
|
|
31030
31051
|
console.log(` ${import_chalk2.default.bold("User:")} ${loginResult?.email || "not logged in"}`);
|
|
31031
31052
|
console.log(` ${import_chalk2.default.bold("Status:")} ${import_chalk2.default.green("Ready to connect")}`);
|
|
31032
31053
|
console.log();
|
|
31033
|
-
console.log(import_chalk2.default.gray("
|
|
31034
|
-
console.log(import_chalk2.default.gray(" adhdev daemon
|
|
31035
|
-
console.log(import_chalk2.default.gray(" adhdev launch
|
|
31036
|
-
console.log(import_chalk2.default.gray(" adhdev launch
|
|
31037
|
-
console.log(import_chalk2.default.gray(" adhdev
|
|
31038
|
-
console.log(import_chalk2.default.gray(" adhdev
|
|
31054
|
+
console.log(import_chalk2.default.gray(" Next steps:"));
|
|
31055
|
+
console.log(import_chalk2.default.gray(" adhdev daemon \u2014 Start the main daemon (required for all features)"));
|
|
31056
|
+
console.log(import_chalk2.default.gray(" adhdev launch cursor \u2014 Launch Cursor IDE with remote control"));
|
|
31057
|
+
console.log(import_chalk2.default.gray(" adhdev launch windsurf \u2014 Launch Windsurf IDE with remote control"));
|
|
31058
|
+
console.log(import_chalk2.default.gray(" adhdev launch gemini \u2014 Start Gemini CLI agent via daemon"));
|
|
31059
|
+
console.log(import_chalk2.default.gray(" adhdev launch claude \u2014 Start Claude Code agent via daemon"));
|
|
31060
|
+
console.log(import_chalk2.default.gray(" adhdev status \u2014 Check setup status"));
|
|
31061
|
+
console.log();
|
|
31062
|
+
console.log(import_chalk2.default.cyan(" Dashboard: https://adhf.dev/dashboard"));
|
|
31039
31063
|
console.log();
|
|
31040
|
-
await installCliOnly();
|
|
31041
|
-
await startDaemonFlow();
|
|
31042
31064
|
}
|
|
31043
31065
|
async function loginFlow() {
|
|
31044
31066
|
console.log(import_chalk2.default.bold("\n\u{1F510} Login to ADHDev\n"));
|
|
@@ -31158,11 +31180,18 @@ async function startDaemonFlow() {
|
|
|
31158
31180
|
daemon.start({ localPort: 19222, foreground: false }).catch(() => {
|
|
31159
31181
|
});
|
|
31160
31182
|
}
|
|
31161
|
-
|
|
31162
|
-
|
|
31183
|
+
let started = false;
|
|
31184
|
+
for (let i = 0; i < 5; i++) {
|
|
31185
|
+
await new Promise((r) => setTimeout(r, 1e3));
|
|
31186
|
+
if (isDaemonRunning2()) {
|
|
31187
|
+
started = true;
|
|
31188
|
+
break;
|
|
31189
|
+
}
|
|
31190
|
+
}
|
|
31191
|
+
if (started) {
|
|
31163
31192
|
daemonSpinner.succeed("Daemon started");
|
|
31164
31193
|
} else {
|
|
31165
|
-
daemonSpinner.
|
|
31194
|
+
daemonSpinner.warn("Daemon starting in background (may take a few seconds)");
|
|
31166
31195
|
}
|
|
31167
31196
|
console.log(import_chalk2.default.gray(" Dashboard: https://adhf.dev/dashboard"));
|
|
31168
31197
|
console.log(import_chalk2.default.gray(` Logs: ${logPath}`));
|