Skip to content

Commit 76361ae

Browse files
committed
revert: Switch back to tsc for compiling.
1 parent e25fedf commit 76361ae

36 files changed

Lines changed: 527 additions & 843 deletions

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
command: pnpm canvas:a2ui:bundle && bunx vitest run
9595
- runtime: bun
9696
task: build
97-
command: bunx tsdown
97+
command: bunx tsc -p tsconfig.json --noEmit false
9898
steps:
9999
- name: Checkout
100100
uses: actions/checkout@v4

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ ENV NODE_ENV=production
3636
# This reduces the attack surface by preventing container escape via root privileges
3737
USER node
3838

39-
CMD ["node", "dist/index.mjs"]
39+
CMD ["node", "dist/index.js"]

apps/macos/Sources/OpenClaw/CommandResolver.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ enum CommandResolver {
55
private static let helperName = "openclaw"
66

77
static func gatewayEntrypoint(in root: URL) -> String? {
8-
let distEntry = root.appendingPathComponent("dist/index.mjs").path
8+
let distEntry = root.appendingPathComponent("dist/index.js").path
99
if FileManager().isReadableFile(atPath: distEntry) { return distEntry }
1010
let openclawEntry = root.appendingPathComponent("openclaw.mjs").path
1111
if FileManager().isReadableFile(atPath: openclawEntry) { return openclawEntry }
@@ -271,7 +271,7 @@ enum CommandResolver {
271271
}
272272

273273
let missingEntry = """
274-
openclaw entrypoint missing (looked for dist/index.mjs or openclaw.mjs); run pnpm build.
274+
openclaw entrypoint missing (looked for dist/index.js or openclaw.mjs); run pnpm build.
275275
"""
276276
return self.errorCommand(with: missingEntry)
277277

@@ -360,10 +360,10 @@ enum CommandResolver {
360360
if command -v openclaw >/dev/null 2>&1; then
361361
CLI="$(command -v openclaw)"
362362
openclaw \(quotedArgs);
363-
elif [ -n "${PRJ:-}" ] && [ -f "$PRJ/dist/index.mjs" ]; then
363+
elif [ -n "${PRJ:-}" ] && [ -f "$PRJ/dist/index.js" ]; then
364364
if command -v node >/dev/null 2>&1; then
365-
CLI="node $PRJ/dist/index.mjs"
366-
node "$PRJ/dist/index.mjs" \(quotedArgs);
365+
CLI="node $PRJ/dist/index.js"
366+
node "$PRJ/dist/index.js" \(quotedArgs);
367367
else
368368
echo "Node >=22 required on remote host"; exit 127;
369369
fi

apps/macos/Tests/OpenClawIPCTests/UtilitiesTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import Testing
4545
@Test func gatewayEntrypointPrefersDistOverBin() throws {
4646
let tmp = URL(fileURLWithPath: NSTemporaryDirectory(), isDirectory: true)
4747
.appendingPathComponent(UUID().uuidString, isDirectory: true)
48-
let dist = tmp.appendingPathComponent("dist/index.mjs")
48+
let dist = tmp.appendingPathComponent("dist/index.js")
4949
let bin = tmp.appendingPathComponent("bin/openclaw.js")
5050
try FileManager().createDirectory(at: dist.deletingLastPathComponent(), withIntermediateDirectories: true)
5151
try FileManager().createDirectory(at: bin.deletingLastPathComponent(), withIntermediateDirectories: true)

docker-compose.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ services:
1212
- ${OPENCLAW_CONFIG_DIR}:/home/node/.openclaw
1313
- ${OPENCLAW_WORKSPACE_DIR}:/home/node/.openclaw/workspace
1414
ports:
15-
- "${OPENCLAW_GATEWAY_PORT:-18789}:18789"
16-
- "${OPENCLAW_BRIDGE_PORT:-18790}:18790"
15+
- '${OPENCLAW_GATEWAY_PORT:-18789}:18789'
16+
- '${OPENCLAW_BRIDGE_PORT:-18790}:18790'
1717
init: true
1818
restart: unless-stopped
1919
command:
2020
[
21-
"node",
22-
"dist/index.mjs",
23-
"gateway",
24-
"--bind",
25-
"${OPENCLAW_GATEWAY_BIND:-lan}",
26-
"--port",
27-
"${OPENCLAW_GATEWAY_PORT:-18789}"
21+
'node',
22+
'dist/index.js',
23+
'gateway',
24+
'--bind',
25+
'${OPENCLAW_GATEWAY_BIND:-lan}',
26+
'--port',
27+
'${OPENCLAW_GATEWAY_PORT:-18789}',
2828
]
2929

3030
openclaw-cli:
@@ -42,4 +42,4 @@ services:
4242
stdin_open: true
4343
tty: true
4444
init: true
45-
entrypoint: ["node", "dist/index.mjs"]
45+
entrypoint: ['node', 'dist/index.js']

docker-setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,4 +211,4 @@ echo "Token: $OPENCLAW_GATEWAY_TOKEN"
211211
echo ""
212212
echo "Commands:"
213213
echo " ${COMPOSE_HINT} logs -f openclaw-gateway"
214-
echo " ${COMPOSE_HINT} exec openclaw-gateway node dist/index.mjs health --token \"$OPENCLAW_GATEWAY_TOKEN\""
214+
echo " ${COMPOSE_HINT} exec openclaw-gateway node dist/index.js health --token \"$OPENCLAW_GATEWAY_TOKEN\""

0 commit comments

Comments
 (0)