import { y as composeRestart$1, v as composePreflight, aQ as resolveComposeProjectName } from './src-CidJbygh.js';

//#region src/lib/server/docker.ts
async function runPreflight(options) {
	if (options.files.length === 0 || process.env.OP_SKIP_COMPOSE_PREFLIGHT) return;
	const result = await composePreflight(options);
	if (!result.ok) {
		const project = resolveComposeProjectName();
		const fileArgs = options.files.map((f) => `-f ${f}`).join(" ");
		const envArgs = (options.envFiles ?? []).map((f) => `--env-file ${f}`).join(" ");
		throw new Error(`Compose preflight failed: ${result.stderr}\nResolved command: docker compose ${fileArgs} --project-name ${project} ${envArgs} config --quiet`);
	}
}
async function composeRestart(services, options) {
	await runPreflight(options);
	return composeRestart$1(services, options);
}

export { composeRestart as c };
//# sourceMappingURL=docker-CTjWsP_Q.js.map
