Skip to content

OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security

315 B
Raw Blame
import { realpathSync } from "node:fs";

export function isMain(url) {
  try {
    return (
      process.argv[1] !== undefined &&
      realpathSync(process.argv[1]) === realpathSync(new URL(url))
    );
  } catch {
    // Imported modules may receive a non-file argument from node --eval.
    return false;
  }
}