//#region src/infra/update-channels.ts
const DEFAULT_PACKAGE_CHANNEL = "stable";
const DEFAULT_GIT_CHANNEL = "dev";
/**
* Map update channel to the npm dist-tag used for querying registry.
* stable → latest, beta → beta, dev → dev
*/
function channelToNpmTag(channel) {
	if (channel === "beta") return "beta";
	if (channel === "dev") return "dev";
	return "latest";
}
/** Normalize a user-provided string to a valid UpdateChannel, or null. */
function normalizeUpdateChannel(value) {
	const normalized = value?.trim().toLowerCase();
	if (normalized === "stable" || normalized === "beta" || normalized === "dev") return normalized;
	return null;
}
/** Return true if a version/tag string contains a beta prerelease identifier. */
function isBetaVersion(version) {
	return /(?:^|[.-])beta(?:[.-]|$)/i.test(version);
}
/** Return true if a version string is a stable release (no beta marker in this heuristic). */
function isStableVersion(version) {
	return !isBetaVersion(version);
}
//#endregion
export { DEFAULT_GIT_CHANNEL, DEFAULT_PACKAGE_CHANNEL, channelToNpmTag, isBetaVersion, isStableVersion, normalizeUpdateChannel };

//# sourceMappingURL=update-channels.js.map