mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-09 15:59:30 +00:00
chore(deadcode): drop node daemon runtime alias
This commit is contained in:
parent
6c42f73619
commit
d64a27feeb
3 changed files with 8 additions and 25 deletions
|
|
@ -1,11 +1,11 @@
|
|||
// Node-host daemon lifecycle commands for install, status, start, stop, and restart.
|
||||
import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";
|
||||
import { colorize } from "../../../packages/terminal-core/src/theme.js";
|
||||
import { buildNodeInstallPlan } from "../../commands/node-daemon-install-helpers.js";
|
||||
import {
|
||||
DEFAULT_NODE_DAEMON_RUNTIME,
|
||||
isNodeDaemonRuntime,
|
||||
} from "../../commands/node-daemon-runtime.js";
|
||||
DEFAULT_GATEWAY_DAEMON_RUNTIME,
|
||||
isGatewayDaemonRuntime,
|
||||
} from "../../commands/daemon-runtime.js";
|
||||
import { buildNodeInstallPlan } from "../../commands/node-daemon-install-helpers.js";
|
||||
import {
|
||||
resolveNodeLaunchAgentLabel,
|
||||
resolveNodeSystemdServiceName,
|
||||
|
|
@ -106,8 +106,8 @@ export async function runNodeDaemonInstall(opts: NodeDaemonInstallOptions) {
|
|||
return;
|
||||
}
|
||||
|
||||
const runtimeRaw = opts.runtime ? opts.runtime : DEFAULT_NODE_DAEMON_RUNTIME;
|
||||
if (!isNodeDaemonRuntime(runtimeRaw)) {
|
||||
const runtimeRaw = opts.runtime ? opts.runtime : DEFAULT_GATEWAY_DAEMON_RUNTIME;
|
||||
if (!isGatewayDaemonRuntime(runtimeRaw)) {
|
||||
fail('Invalid --runtime (use "node" or "bun")');
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import {
|
|||
resolveDaemonNodeBinDir,
|
||||
} from "./daemon-install-plan.shared.js";
|
||||
import type { DaemonInstallWarnFn } from "./daemon-install-runtime-warning.js";
|
||||
import type { NodeDaemonRuntime } from "./node-daemon-runtime.js";
|
||||
import type { GatewayDaemonRuntime } from "./daemon-runtime.js";
|
||||
|
||||
type NodeInstallPlan = {
|
||||
programArguments: string[];
|
||||
|
|
@ -37,7 +37,7 @@ export async function buildNodeInstallPlan(params: {
|
|||
tlsFingerprint?: string;
|
||||
nodeId?: string;
|
||||
displayName?: string;
|
||||
runtime: NodeDaemonRuntime;
|
||||
runtime: GatewayDaemonRuntime;
|
||||
devMode?: boolean;
|
||||
nodePath?: string;
|
||||
warn?: DaemonInstallWarnFn;
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
/** Compatibility exports for the Node daemon runtime selector. */
|
||||
import {
|
||||
DEFAULT_GATEWAY_DAEMON_RUNTIME,
|
||||
isGatewayDaemonRuntime,
|
||||
type GatewayDaemonRuntime,
|
||||
} from "./daemon-runtime.js";
|
||||
|
||||
/** Runtime id accepted by Node daemon install/start helpers. */
|
||||
export type NodeDaemonRuntime = GatewayDaemonRuntime;
|
||||
|
||||
/** Default Node daemon runtime, currently shared with the gateway daemon runtime. */
|
||||
export const DEFAULT_NODE_DAEMON_RUNTIME = DEFAULT_GATEWAY_DAEMON_RUNTIME;
|
||||
|
||||
/** Returns true when a string is a supported Node daemon runtime id. */
|
||||
export function isNodeDaemonRuntime(value: string | undefined): value is NodeDaemonRuntime {
|
||||
return isGatewayDaemonRuntime(value);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue