import { Jsonc } from "../../../util/schema-utils/index.js";
import { z } from "zod/v3";
//#region lib/modules/manager/nuget/schema.ts
/**
* The roll-forward policy to use when selecting an SDK version, either as a fallback when a specific SDK version is missing or as a directive to use a later version. A version must be specified with a rollForward value, unless you're setting it to latestMajor. The default roll forward behavior is determined by the matching rules.
*
* https://learn.microsoft.com/de-de/dotnet/core/tools/global-json#rollforward
*/
const RollForward = z.enum([
	"patch",
	"feature",
	"minor",
	"major",
	"latestPatch",
	"latestFeature",
	"latestMinor",
	"latestMajor",
	"disable"
]);
/**
* global.json schema
*
* https://learn.microsoft.com/en-us/dotnet/core/tools/global-json#allowprerelease
*/
const GlobalJson = Jsonc.pipe(z.object({
	sdk: z.object({
		version: z.string().optional(),
		rollForward: RollForward.optional(),
		allowPrerelease: z.boolean().optional()
	}).optional(),
	"msbuild-sdks": z.record(z.string()).optional()
}));
//#endregion
export { GlobalJson };

//# sourceMappingURL=schema.js.map