adhdev 0.6.6 → 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/cli/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 = [
|
|
@@ -30945,46 +30945,65 @@ async function runWizard(options = {}) {
|
|
|
30945
30945
|
console.log(LOGO);
|
|
30946
30946
|
if ((0, import_daemon_core5.isSetupComplete)() && !options.force) {
|
|
30947
30947
|
const config2 = (0, import_daemon_core5.loadConfig)();
|
|
30948
|
-
console.log(import_chalk2.default.green("\u2713") + " ADHDev is already
|
|
30949
|
-
console.log(import_chalk2.default.gray(`
|
|
30948
|
+
console.log(import_chalk2.default.green("\u2713") + " ADHDev is already configured.");
|
|
30949
|
+
console.log(import_chalk2.default.gray(` Account: ${config2.userEmail || "not logged in"}`));
|
|
30950
30950
|
console.log();
|
|
30951
|
-
|
|
30952
|
-
|
|
30953
|
-
|
|
30954
|
-
|
|
30955
|
-
|
|
30956
|
-
|
|
30957
|
-
|
|
30958
|
-
|
|
30959
|
-
|
|
30960
|
-
|
|
30961
|
-
|
|
30962
|
-
|
|
30963
|
-
|
|
30964
|
-
|
|
30965
|
-
|
|
30966
|
-
|
|
30967
|
-
|
|
30951
|
+
await checkForUpdate();
|
|
30952
|
+
await startDaemonFlow();
|
|
30953
|
+
return;
|
|
30954
|
+
}
|
|
30955
|
+
await quickSetup();
|
|
30956
|
+
}
|
|
30957
|
+
async function checkForUpdate() {
|
|
30958
|
+
try {
|
|
30959
|
+
const { execSync } = await import("child_process");
|
|
30960
|
+
let currentVersion = null;
|
|
30961
|
+
try {
|
|
30962
|
+
currentVersion = execSync("adhdev --version", {
|
|
30963
|
+
encoding: "utf-8",
|
|
30964
|
+
timeout: 3e3,
|
|
30965
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
30966
|
+
}).trim();
|
|
30967
|
+
} catch {
|
|
30968
30968
|
return;
|
|
30969
30969
|
}
|
|
30970
|
-
|
|
30971
|
-
|
|
30972
|
-
|
|
30973
|
-
|
|
30974
|
-
|
|
30975
|
-
|
|
30976
|
-
|
|
30977
|
-
|
|
30978
|
-
console.log(import_chalk2.default.green("\u2713 Login saved successfully!"));
|
|
30979
|
-
}
|
|
30970
|
+
let latestVersion = null;
|
|
30971
|
+
try {
|
|
30972
|
+
latestVersion = execSync("npm show adhdev version", {
|
|
30973
|
+
encoding: "utf-8",
|
|
30974
|
+
timeout: 5e3,
|
|
30975
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
30976
|
+
}).trim();
|
|
30977
|
+
} catch {
|
|
30980
30978
|
return;
|
|
30981
30979
|
}
|
|
30982
|
-
if (
|
|
30983
|
-
|
|
30980
|
+
if (!currentVersion || !latestVersion || currentVersion === latestVersion) return;
|
|
30981
|
+
console.log(import_chalk2.default.yellow(` Update available: ${currentVersion} \u2192 ${latestVersion}`));
|
|
30982
|
+
const { doUpdate } = await (await import("inquirer")).default.prompt([{
|
|
30983
|
+
type: "confirm",
|
|
30984
|
+
name: "doUpdate",
|
|
30985
|
+
message: `Update adhdev CLI to v${latestVersion}?`,
|
|
30986
|
+
default: true
|
|
30987
|
+
}]);
|
|
30988
|
+
if (!doUpdate) {
|
|
30989
|
+
console.log(import_chalk2.default.gray(" Skipping update. Run: npm install -g adhdev@latest\n"));
|
|
30984
30990
|
return;
|
|
30985
30991
|
}
|
|
30992
|
+
const spinner = (await import("ora")).default("Updating adhdev CLI...").start();
|
|
30993
|
+
try {
|
|
30994
|
+
execSync("npm install -g adhdev@latest", {
|
|
30995
|
+
encoding: "utf-8",
|
|
30996
|
+
timeout: 6e4,
|
|
30997
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
30998
|
+
});
|
|
30999
|
+
spinner.succeed(`Updated to v${latestVersion}`);
|
|
31000
|
+
console.log();
|
|
31001
|
+
} catch (e) {
|
|
31002
|
+
spinner.fail("Update failed");
|
|
31003
|
+
console.log(import_chalk2.default.gray(" Manual: npm install -g adhdev@latest\n"));
|
|
31004
|
+
}
|
|
31005
|
+
} catch {
|
|
30986
31006
|
}
|
|
30987
|
-
await quickSetup();
|
|
30988
31007
|
}
|
|
30989
31008
|
async function quickSetup() {
|
|
30990
31009
|
console.log(import_chalk2.default.bold("\n\u{1F680} Quick Setup\n"));
|
|
@@ -31000,20 +31019,23 @@ async function quickSetup() {
|
|
|
31000
31019
|
userName: loginResult.name
|
|
31001
31020
|
});
|
|
31002
31021
|
}
|
|
31022
|
+
await installCliOnly();
|
|
31023
|
+
await startDaemonFlow();
|
|
31003
31024
|
console.log(DIVIDER);
|
|
31004
31025
|
console.log(import_chalk2.default.bold("\n\u{1F389} Setup Complete!\n"));
|
|
31005
31026
|
console.log(` ${import_chalk2.default.bold("User:")} ${loginResult?.email || "not logged in"}`);
|
|
31006
31027
|
console.log(` ${import_chalk2.default.bold("Status:")} ${import_chalk2.default.green("Ready to connect")}`);
|
|
31007
31028
|
console.log();
|
|
31008
|
-
console.log(import_chalk2.default.gray("
|
|
31009
|
-
console.log(import_chalk2.default.gray(" adhdev daemon
|
|
31010
|
-
console.log(import_chalk2.default.gray(" adhdev launch
|
|
31011
|
-
console.log(import_chalk2.default.gray(" adhdev launch
|
|
31012
|
-
console.log(import_chalk2.default.gray(" adhdev
|
|
31013
|
-
console.log(import_chalk2.default.gray(" adhdev
|
|
31029
|
+
console.log(import_chalk2.default.gray(" Next steps:"));
|
|
31030
|
+
console.log(import_chalk2.default.gray(" adhdev daemon \u2014 Start the main daemon (required for all features)"));
|
|
31031
|
+
console.log(import_chalk2.default.gray(" adhdev launch cursor \u2014 Launch Cursor IDE with remote control"));
|
|
31032
|
+
console.log(import_chalk2.default.gray(" adhdev launch windsurf \u2014 Launch Windsurf IDE with remote control"));
|
|
31033
|
+
console.log(import_chalk2.default.gray(" adhdev launch gemini \u2014 Start Gemini CLI agent via daemon"));
|
|
31034
|
+
console.log(import_chalk2.default.gray(" adhdev launch claude \u2014 Start Claude Code agent via daemon"));
|
|
31035
|
+
console.log(import_chalk2.default.gray(" adhdev status \u2014 Check setup status"));
|
|
31036
|
+
console.log();
|
|
31037
|
+
console.log(import_chalk2.default.cyan(" Dashboard: https://adhf.dev/dashboard"));
|
|
31014
31038
|
console.log();
|
|
31015
|
-
await installCliOnly();
|
|
31016
|
-
await startDaemonFlow();
|
|
31017
31039
|
}
|
|
31018
31040
|
async function loginFlow() {
|
|
31019
31041
|
console.log(import_chalk2.default.bold("\n\u{1F510} Login to ADHDev\n"));
|
|
@@ -31133,11 +31155,18 @@ async function startDaemonFlow() {
|
|
|
31133
31155
|
daemon.start({ localPort: 19222, foreground: false }).catch(() => {
|
|
31134
31156
|
});
|
|
31135
31157
|
}
|
|
31136
|
-
|
|
31137
|
-
|
|
31158
|
+
let started = false;
|
|
31159
|
+
for (let i = 0; i < 5; i++) {
|
|
31160
|
+
await new Promise((r) => setTimeout(r, 1e3));
|
|
31161
|
+
if (isDaemonRunning2()) {
|
|
31162
|
+
started = true;
|
|
31163
|
+
break;
|
|
31164
|
+
}
|
|
31165
|
+
}
|
|
31166
|
+
if (started) {
|
|
31138
31167
|
daemonSpinner.succeed("Daemon started");
|
|
31139
31168
|
} else {
|
|
31140
|
-
daemonSpinner.
|
|
31169
|
+
daemonSpinner.warn("Daemon starting in background (may take a few seconds)");
|
|
31141
31170
|
}
|
|
31142
31171
|
console.log(import_chalk2.default.gray(" Dashboard: https://adhf.dev/dashboard"));
|
|
31143
31172
|
console.log(import_chalk2.default.gray(` Logs: ${logPath}`));
|