import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/join-paths.mjs";
import { __ΩUnresolvedContext } from "powerlines/types/context";
import { defineGenerator } from "automd";

//#region src/helpers/automd-generator.ts
function __assignType(fn, args) {
	fn.__type = args;
	return fn;
}
/**
* AutoMD generator to generate environment variable documentation
*
* @param context - The generator context.
* @returns The generated documentation content.
*/
const env = __assignType((context) => defineGenerator({
	name: "env",
	generate: __assignType(async function generate() {
		const envDocFile = joinPaths(context.config.projectRoot, "docs", "generated", "env.md");
		if (!context.fs.existsSync(envDocFile)) return { contents: "" };
		return { contents: await context.fs.read(envDocFile) || "" };
	}, ["generate", "P\"/!"])
}), [
	() => __ΩUnresolvedContext,
	"context",
	"",
	"Pn!2\"\"/#"
]);

//#endregion
export { env };
//# sourceMappingURL=automd-generator.mjs.map