← Files Codex SecurityARCHIVED FILE

mcp/helpers.mjs

766 Bytes · Nov 24, 2026 · 00:14 UTC

↓ Download file

See the change to this file →

import { readFile } from "node:fs/promises";
import { dirname } from "node:path";
import { createRequire } from "node:module";
import { fileURLToPath } from "node:url";
import { brotliDecompressSync } from "node:zlib";

const compressedRuntime = await readFile(new URL("./helpers.mjs.br", import.meta.url));
const runtimeSource = brotliDecompressSync(compressedRuntime).toString("utf8");
const require = createRequire(import.meta.url);
const Module = require("node:module");
const loaderPath = fileURLToPath(import.meta.url);
const runtimeModule = new Module(loaderPath);
runtimeModule.filename = loaderPath;
runtimeModule.paths = Module._nodeModulePaths(dirname(loaderPath));
runtimeModule._compile(runtimeSource, loaderPath);
export default runtimeModule.exports;

SHA-256: 1cf4f6bfaa9462c467a61f743ca9cd65f0a61fedf8839dc4f78f1179774673ba