import { StandaloneBuilder } from "@workflow/builders";

//#region src/domains/evals/scripts/build-workflow.ts
/**
* Custom workflow build script that supports externalizing native modules.
*
* The default `workflow build` CLI doesn't expose the externalPackages option,
* so we use the builder directly to exclude native modules like @napi-rs/keyring.
*/
const config = {
	dirs: ["./src/domains/evals/workflow"],
	workingDir: process.cwd(),
	buildTarget: "standalone",
	stepsBundlePath: "./.well-known/workflow/v1/step.cjs",
	workflowsBundlePath: "./.well-known/workflow/v1/flow.cjs",
	webhookBundlePath: "./.well-known/workflow/v1/webhook.mjs",
	externalPackages: ["@napi-rs/keyring"]
};
async function build() {
	console.log("Building workflow bundles...");
	console.log("External packages:", config.externalPackages);
	await new StandaloneBuilder(config).build();
	console.log("Workflow build completed!");
}
build().catch((err) => {
	console.error("Build failed:", err);
	process.exit(1);
});

//#endregion
export {  };