import path from "node:path";
import Executor from "../../sockets/clients/Executor.js";
import { normalize } from "./executor-configurator.js";
const { default: executorConfig } = await import(
  path.resolve("executor.config.js")
);

// Load config and args
const args = process.argv.slice(2);
const payload = JSON.parse(Buffer.from(args[0], "base64").toString("utf8"));
const config = normalize(executorConfig(payload));
// Start Executor
const exec = new Executor(config, payload);
exec.runJob();
