namespace YMhut.Box.Core.Updates;

public static class UpdateInfoEndpointPolicy
{
    public static readonly IReadOnlyList<string> DefaultRelativePaths =
    [
        "api/client/bootstrap",
        "update-info.json",
        "update-info",
        "api/update-info"
    ];

    public static IReadOnlyList<Uri> BuildDefaultUris(string baseUri = "https://update.ymhut.cn/")
    {
        var root = new Uri(baseUri.TrimEnd('/') + "/");
        return DefaultRelativePaths
            .Select(path => new Uri(root, path))
            .ToArray();
    }
}
