namespace CursorLang.Core.Services;
///
/// Where the application learns about new versions from.
///
///
/// These settings belong to the build rather than to the user: the repository is
/// chosen by whoever releases the application, and these values have no business
/// being in settings.json. The defaults point at the repository the
/// application is built from.
///
public sealed class UpdateOptions
{
///
/// The address of the Gitea server. Its API lives on the same host as the
/// repository pages, so this is the same address the repository is opened at
/// in a browser.
///
public Uri ServiceUri { get; init; } = new("https://git.alrakis.kz/");
/// The project: owner/repository.
public string Project { get; init; } = "alrakis/cursor-lang";
///
/// An access token for a private repository.
///
///
/// Taken from an environment variable rather than from a file in the repository:
/// a secret that gets into a build gets to everyone who received it as well.
/// A public repository needs no token at all.
///
public string? AccessToken { get; init; } =
Environment.GetEnvironmentVariable("CURSORLANG_UPDATE_TOKEN");
}