The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import type * as Http from "node:http" |
| 2 | import type * as Https from "node:https" |
| 3 | import { createRequire } from "node:module" |
| 4 | |
| 5 | // Importing node:http as ESM evaluates its lazy WebSocket exports, which loads |
| 6 | // undici. Load the CommonJS modules instead. `__filename` covers bundlers that |
| 7 | // emit CommonJS, where `import.meta.url` is undefined. |
| 8 | const require = createRequire(typeof __filename === "string" ? __filename : import.meta.url) |
| 9 | |
| 10 | export const http: typeof Http = require("node:http") |
| 11 | export const https: typeof Https = require("node:https") |