mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:30:42 +00:00
refactor: trim daemon helper exports
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
export type ArgSplitEscapeMode = "none" | "backslash" | "backslash-quote-only";
|
||||
type ArgSplitEscapeMode = "none" | "backslash" | "backslash-quote-only";
|
||||
|
||||
export function splitArgsPreservingQuotes(
|
||||
value: string,
|
||||
|
||||
@@ -13,7 +13,7 @@ export function quoteCmdScriptArg(value: string): string {
|
||||
return `"${escaped}"`;
|
||||
}
|
||||
|
||||
export function unescapeCmdScriptArg(value: string): string {
|
||||
function unescapeCmdScriptArg(value: string): string {
|
||||
return value.replace(/\^!/g, "!").replace(/%%/g, "%");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export type CmdSetAssignment = { key: string; value: string };
|
||||
type CmdSetAssignment = { key: string; value: string };
|
||||
|
||||
export function assertNoCmdLineBreak(value: string, field: string): void {
|
||||
if (/[\r\n]/.test(value)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { execFile, type ExecFileOptionsWithStringEncoding } from "node:child_process";
|
||||
|
||||
export type ExecResult = { stdout: string; stderr: string; code: number };
|
||||
type ExecResult = { stdout: string; stderr: string; code: number };
|
||||
|
||||
export async function execFileUtf8(
|
||||
command: string,
|
||||
|
||||
Reference in New Issue
Block a user