Download src/node-host/config-worker.test-support.ts from SaylorTwift/openclaw: direct link, hf CLI and curl.
- Browser
- Download file 501 Bytes
-
https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/node-host/config-worker.test-support.ts
- Command line
-
hf download hf://SaylorTwift/openclaw/src/node-host/config-worker.test-support.ts
-
curl -L -o config-worker.test-support.ts https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/node-host/config-worker.test-support.ts
501 Bytes
| import { once } from "node:events"; | |
| import { configureNodeHost } from "./config.js"; | |
| const [candidateNodeId, nowMs] = process.argv.slice(2); | |
| const start = once(process, "message"); | |
| process.send!("ready"); | |
| await start; | |
| const config = await configureNodeHost({ | |
| candidateNodeId, | |
| fallbackDisplayName: "node", | |
| gateway: {}, | |
| nowMs: Number(nowMs), | |
| }); | |
| await new Promise<void>((resolve, reject) => { | |
| process.send!(config, (error) => (error ? reject(error) : resolve())); | |
| }); | |
| process.disconnect!(); | |