mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
fix(ui): avoid cache-dependent command startup (#130927)
This commit is contained in:
committed by
GitHub
parent
0b652b0091
commit
eb1c111fbf
+3
-2
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
import { runTsxCliShim } from "./lib/tsx-cli-shim.mjs";
|
||||
import { runUiCli } from "./ui.mts";
|
||||
|
||||
await runTsxCliShim(import.meta.url, { implementation: "./ui.mts", detached: false });
|
||||
// Native imports avoid loader startup and leave process lifetime with the UI owner.
|
||||
runUiCli();
|
||||
|
||||
+2
-2
@@ -409,7 +409,7 @@ function resolveScriptAction(action: string): "dev" | "build" | "test" | null {
|
||||
return null;
|
||||
}
|
||||
|
||||
function main(argv: string[] = process.argv.slice(2)): void {
|
||||
export function runUiCli(argv: string[] = process.argv.slice(2)): void {
|
||||
const [action, ...rest] = argv;
|
||||
if (!action) {
|
||||
usage();
|
||||
@@ -501,5 +501,5 @@ export function isDirectScriptExecution(
|
||||
const isDirectExecution = isDirectScriptExecution();
|
||||
|
||||
if (isDirectExecution) {
|
||||
main();
|
||||
runUiCli();
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Shared build identity normalization for the runtime artifact and Vite config.
|
||||
// Vite loads this module before source-package aliases exist, so use the canonical source path.
|
||||
import { asRecord } from "../../packages/normalization-core/src/record-coerce.js";
|
||||
import { normalizeNullableString } from "../../packages/normalization-core/src/string-coerce.js";
|
||||
import { truncateUtf16Safe } from "../../packages/normalization-core/src/utf16-slice.js";
|
||||
// Vite and native Node need explicit source paths before source-package aliases exist.
|
||||
import { asRecord } from "../../packages/normalization-core/src/record-coerce.ts";
|
||||
import { normalizeNullableString } from "../../packages/normalization-core/src/string-coerce.ts";
|
||||
import { truncateUtf16Safe } from "../../packages/normalization-core/src/utf16-slice.ts";
|
||||
import type { ControlUiBuildInfo } from "./build-info-types.ts";
|
||||
|
||||
type ControlUiBuildMetadata = Pick<
|
||||
|
||||
Reference in New Issue
Block a user