fix: Also build entry.ts into dist/entry.mjs.

This commit is contained in:
cpojer
2026-01-31 17:26:39 +09:00
parent 1766cd4123
commit ed65131c1c
7 changed files with 10 additions and 12 deletions

View File

@@ -47,7 +47,7 @@ export async function resolveControlUiDistIndexPath(
}
const normalized = path.resolve(argv1);
// Case 1: entrypoint is directly inside dist/ (e.g., dist/entry.js)
// Case 1: entrypoint is directly inside dist/ (e.g., dist/entry.mjs)
const distDir = path.dirname(normalized);
if (path.basename(distDir) === "dist") {
return path.join(distDir, "control-ui", "index.html");

View File

@@ -74,10 +74,8 @@ function isGatewayArgv(args: string[]): boolean {
const entryCandidates = [
"dist/index.mjs",
"dist/index.mjs",
"dist/entry.js",
"openclaw.mjs",
"dist/entry.mjs",
"openclaw.mjs",
"scripts/run-node.mjs",
"src/index.ts",
];

View File

@@ -37,7 +37,7 @@ describe("ports helpers", () => {
expect(
classifyPortListener(
{
commandLine: "node /Users/me/Projects/openclaw/dist/entry.js gateway",
commandLine: "node /Users/me/Projects/openclaw/dist/entry.mjs gateway",
},
18789,
),