chore: rename gateway daemon prompts
This commit is contained in:
@@ -84,9 +84,9 @@ export function registerOnboardCommand(program: Command) {
|
|||||||
.option("--remote-token <token>", "Remote Gateway token (optional)")
|
.option("--remote-token <token>", "Remote Gateway token (optional)")
|
||||||
.option("--tailscale <mode>", "Tailscale: off|serve|funnel")
|
.option("--tailscale <mode>", "Tailscale: off|serve|funnel")
|
||||||
.option("--tailscale-reset-on-exit", "Reset tailscale serve/funnel on exit")
|
.option("--tailscale-reset-on-exit", "Reset tailscale serve/funnel on exit")
|
||||||
.option("--install-daemon", "Install gateway daemon")
|
.option("--install-daemon", "Install gateway service")
|
||||||
.option("--no-install-daemon", "Skip gateway daemon install")
|
.option("--no-install-daemon", "Skip gateway service install")
|
||||||
.option("--skip-daemon", "Skip gateway daemon install")
|
.option("--skip-daemon", "Skip gateway service install")
|
||||||
.option("--daemon-runtime <runtime>", "Daemon runtime: node|bun")
|
.option("--daemon-runtime <runtime>", "Daemon runtime: node|bun")
|
||||||
.option("--skip-channels", "Skip channel setup")
|
.option("--skip-channels", "Skip channel setup")
|
||||||
.option("--skip-skills", "Skip skills setup")
|
.option("--skip-skills", "Skip skills setup")
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export async function finalizeOnboardingWizard(options: FinalizeOnboardingOption
|
|||||||
process.platform === "linux" ? await isSystemdUserServiceAvailable() : true;
|
process.platform === "linux" ? await isSystemdUserServiceAvailable() : true;
|
||||||
if (process.platform === "linux" && !systemdAvailable) {
|
if (process.platform === "linux" && !systemdAvailable) {
|
||||||
await prompter.note(
|
await prompter.note(
|
||||||
"Systemd user services are unavailable. Skipping lingering checks and daemon install.",
|
"Systemd user services are unavailable. Skipping lingering checks and service install.",
|
||||||
"Systemd",
|
"Systemd",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -94,15 +94,15 @@ export async function finalizeOnboardingWizard(options: FinalizeOnboardingOption
|
|||||||
installDaemon = true;
|
installDaemon = true;
|
||||||
} else {
|
} else {
|
||||||
installDaemon = await prompter.confirm({
|
installDaemon = await prompter.confirm({
|
||||||
message: "Install Gateway daemon (recommended)",
|
message: "Install Gateway service (recommended)",
|
||||||
initialValue: true,
|
initialValue: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.platform === "linux" && !systemdAvailable && installDaemon) {
|
if (process.platform === "linux" && !systemdAvailable && installDaemon) {
|
||||||
await prompter.note(
|
await prompter.note(
|
||||||
"Systemd user services are unavailable; skipping daemon install. Use your container supervisor or `docker compose up -d`.",
|
"Systemd user services are unavailable; skipping service install. Use your container supervisor or `docker compose up -d`.",
|
||||||
"Gateway daemon",
|
"Gateway service",
|
||||||
);
|
);
|
||||||
installDaemon = false;
|
installDaemon = false;
|
||||||
}
|
}
|
||||||
@@ -112,14 +112,14 @@ export async function finalizeOnboardingWizard(options: FinalizeOnboardingOption
|
|||||||
flow === "quickstart"
|
flow === "quickstart"
|
||||||
? (DEFAULT_GATEWAY_DAEMON_RUNTIME as GatewayDaemonRuntime)
|
? (DEFAULT_GATEWAY_DAEMON_RUNTIME as GatewayDaemonRuntime)
|
||||||
: ((await prompter.select({
|
: ((await prompter.select({
|
||||||
message: "Gateway daemon runtime",
|
message: "Gateway service runtime",
|
||||||
options: GATEWAY_DAEMON_RUNTIME_OPTIONS,
|
options: GATEWAY_DAEMON_RUNTIME_OPTIONS,
|
||||||
initialValue: opts.daemonRuntime ?? DEFAULT_GATEWAY_DAEMON_RUNTIME,
|
initialValue: opts.daemonRuntime ?? DEFAULT_GATEWAY_DAEMON_RUNTIME,
|
||||||
})) as GatewayDaemonRuntime);
|
})) as GatewayDaemonRuntime);
|
||||||
if (flow === "quickstart") {
|
if (flow === "quickstart") {
|
||||||
await prompter.note(
|
await prompter.note(
|
||||||
"QuickStart uses Node for the Gateway daemon (stable + supported).",
|
"QuickStart uses Node for the Gateway service (stable + supported).",
|
||||||
"Gateway daemon runtime",
|
"Gateway service runtime",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const service = resolveGatewayService();
|
const service = resolveGatewayService();
|
||||||
@@ -135,10 +135,10 @@ export async function finalizeOnboardingWizard(options: FinalizeOnboardingOption
|
|||||||
})) as "restart" | "reinstall" | "skip";
|
})) as "restart" | "reinstall" | "skip";
|
||||||
if (action === "restart") {
|
if (action === "restart") {
|
||||||
await withWizardProgress(
|
await withWizardProgress(
|
||||||
"Gateway daemon",
|
"Gateway service",
|
||||||
{ doneMessage: "Gateway daemon restarted." },
|
{ doneMessage: "Gateway service restarted." },
|
||||||
async (progress) => {
|
async (progress) => {
|
||||||
progress.update("Restarting Gateway daemon…");
|
progress.update("Restarting Gateway service…");
|
||||||
await service.restart({
|
await service.restart({
|
||||||
env: process.env,
|
env: process.env,
|
||||||
stdout: process.stdout,
|
stdout: process.stdout,
|
||||||
@@ -147,10 +147,10 @@ export async function finalizeOnboardingWizard(options: FinalizeOnboardingOption
|
|||||||
);
|
);
|
||||||
} else if (action === "reinstall") {
|
} else if (action === "reinstall") {
|
||||||
await withWizardProgress(
|
await withWizardProgress(
|
||||||
"Gateway daemon",
|
"Gateway service",
|
||||||
{ doneMessage: "Gateway daemon uninstalled." },
|
{ doneMessage: "Gateway service uninstalled." },
|
||||||
async (progress) => {
|
async (progress) => {
|
||||||
progress.update("Uninstalling Gateway daemon…");
|
progress.update("Uninstalling Gateway service…");
|
||||||
await service.uninstall({ env: process.env, stdout: process.stdout });
|
await service.uninstall({ env: process.env, stdout: process.stdout });
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -158,10 +158,10 @@ export async function finalizeOnboardingWizard(options: FinalizeOnboardingOption
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!loaded || (loaded && (await service.isLoaded({ env: process.env })) === false)) {
|
if (!loaded || (loaded && (await service.isLoaded({ env: process.env })) === false)) {
|
||||||
const progress = prompter.progress("Gateway daemon");
|
const progress = prompter.progress("Gateway service");
|
||||||
let installError: string | null = null;
|
let installError: string | null = null;
|
||||||
try {
|
try {
|
||||||
progress.update("Preparing Gateway daemon…");
|
progress.update("Preparing Gateway service…");
|
||||||
const { programArguments, workingDirectory, environment } = await buildGatewayInstallPlan({
|
const { programArguments, workingDirectory, environment } = await buildGatewayInstallPlan({
|
||||||
env: process.env,
|
env: process.env,
|
||||||
port: settings.port,
|
port: settings.port,
|
||||||
@@ -170,7 +170,7 @@ export async function finalizeOnboardingWizard(options: FinalizeOnboardingOption
|
|||||||
warn: (message, title) => prompter.note(message, title),
|
warn: (message, title) => prompter.note(message, title),
|
||||||
});
|
});
|
||||||
|
|
||||||
progress.update("Installing Gateway daemon…");
|
progress.update("Installing Gateway service…");
|
||||||
await service.install({
|
await service.install({
|
||||||
env: process.env,
|
env: process.env,
|
||||||
stdout: process.stdout,
|
stdout: process.stdout,
|
||||||
@@ -182,11 +182,11 @@ export async function finalizeOnboardingWizard(options: FinalizeOnboardingOption
|
|||||||
installError = err instanceof Error ? err.message : String(err);
|
installError = err instanceof Error ? err.message : String(err);
|
||||||
} finally {
|
} finally {
|
||||||
progress.stop(
|
progress.stop(
|
||||||
installError ? "Gateway daemon install failed." : "Gateway daemon installed.",
|
installError ? "Gateway service install failed." : "Gateway service installed.",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (installError) {
|
if (installError) {
|
||||||
await prompter.note(`Gateway daemon install failed: ${installError}`, "Gateway");
|
await prompter.note(`Gateway service install failed: ${installError}`, "Gateway");
|
||||||
await prompter.note(gatewayInstallErrorHint(), "Gateway");
|
await prompter.note(gatewayInstallErrorHint(), "Gateway");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user