Compare commits

..

8 Commits

Author SHA1 Message Date
Smaug123
5992fa1cb8 Deps
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/pr/build Pipeline failed
ci/woodpecker/push/all-checks-complete Pipeline was successful
ci/woodpecker/pr/all-checks-complete unknown status
2023-12-28 19:58:28 +00:00
Smaug123
d7b078e8d6 Use updated WoofWare plugins 2023-12-28 19:54:08 +00:00
Smaug123
6fb9e6e591 Merge main
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/all-checks-complete Pipeline was successful
ci/woodpecker/pr/build Pipeline failed
ci/woodpecker/pr/all-checks-complete unknown status
2023-12-27 23:36:40 +00:00
Smaug123
762fb1b0d4 Revert version
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/all-checks-complete Pipeline was successful
ci/woodpecker/pr/build Pipeline failed
ci/woodpecker/pr/all-checks-complete unknown status
2023-12-27 23:33:14 +00:00
Smaug123
8ae9da6dc0 Revert a bit
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/all-checks-complete Pipeline was successful
2023-12-27 23:31:09 +00:00
Smaug123
ba0abf95f7 NuGet dep on WoofWare.Myriad
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/all-checks-complete Pipeline was successful
2023-12-27 23:28:05 +00:00
Smaug123
5fd1a52bd8 WIP with JSON static parsing 2023-12-27 20:21:08 +00:00
Smaug123
77ceafde0b Add visits info
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/all-checks-complete Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/all-checks-complete Pipeline was successful
2023-11-01 16:43:33 +00:00
35 changed files with 904 additions and 1690 deletions

View File

@@ -3,7 +3,7 @@
"isRoot": true, "isRoot": true,
"tools": { "tools": {
"fantomas": { "fantomas": {
"version": "6.3.15", "version": "6.2.0",
"commands": [ "commands": [
"fantomas" "fantomas"
] ]

View File

@@ -2,6 +2,7 @@ root=true
[*] [*]
charset=utf-8 charset=utf-8
end_of_line=crlf
trim_trailing_whitespace=true trim_trailing_whitespace=true
insert_final_newline=true insert_final_newline=true
indent_style=space indent_style=space

1
.envrc
View File

@@ -1 +0,0 @@
use flake

View File

@@ -1 +0,0 @@
.direnv/

1
.gitignore vendored
View File

@@ -9,7 +9,6 @@ riderModule.iml
.DS_Store .DS_Store
result result
.profile* .profile*
.direnv/
node_modules/ node_modules/
package.json package.json

22
.woodpecker/.build.yml Normal file
View File

@@ -0,0 +1,22 @@
steps:
build:
image: nixos/nix
commands:
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
# Lint
- "nix flake check"
# Test
- nix build
- nix run . -- --help
- nix run . -- auth --help
- nix run . -- lookup-gym --help
- nix run . -- fullness --help
- nix run . -- activity --help
- nix develop --command markdown-link-check README.md
- nix develop --command dotnet test
- nix develop --command dotnet test --configuration Release
when:
- event: "push"
evaluate: 'CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH'
- event: "pull_request"

View File

@@ -1,29 +0,0 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/woodpecker-ci/woodpecker/main/pipeline/frontend/yaml/linter/schema/schema.json
{
"steps": {
"build": {
"image": "nixos/nix",
"commands": [
"echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf",
# Lint
"nix flake check",
# Test
"nix build",
# Reproducibility
"nix build --rebuild",
"nix run . -- --help",
"nix run . -- auth --help",
"nix run . -- lookup-gym --help",
"nix run . -- fullness --help",
"nix run . -- activity --help",
"nix develop --command markdown-link-check README.md",
"nix develop --command dotnet test",
"nix develop --command dotnet test --configuration Release"
],
"when": [
{ "event": "push", "evaluate": "CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH" },
{ "event": "pull_request" }
]
}
}
}

View File

@@ -1,53 +0,0 @@
namespace PureGym.App
open System.Threading
open Argu
open PureGym
type AllGymsArgsFragment =
| [<Unique ; EqualsAssignmentOrSpaced>] Terse of bool
interface IArgParserTemplate with
member s.Usage =
match s with
| Terse _ -> "print only 'id,gym-name'"
type AllGymsArgs =
{
Creds : Auth
Terse : bool
}
static member Parse
(auth : Auth)
(args : AllGymsArgsFragment ParseResults)
: Result<AllGymsArgs, ArguParseException>
=
let terse =
match args.TryGetResult AllGymsArgsFragment.Terse with
| None -> false
| Some x -> x
{
Creds = auth
Terse = terse
}
|> Ok
[<RequireQualifiedAccess>]
module AllGyms =
let run (args : AllGymsArgs) =
task {
let! client = Api.makeWithoutRefresh CancellationToken.None args.Creds
let! s = client.GetGyms ()
if args.Terse then
for gym in s do
System.Console.WriteLine $"%i{gym.Id},%s{gym.Name}"
else
for gym in s do
System.Console.WriteLine (string<Gym> gym)
return 0
}

View File

@@ -1,6 +1,5 @@
namespace PureGym.App namespace PureGym.App
open System.Threading
open Argu open Argu
open System open System
open PureGym open PureGym
@@ -51,7 +50,7 @@ module Authenticate =
let run (creds : UsernamePin) = let run (creds : UsernamePin) =
task { task {
let! cred = AuthToken.get creds CancellationToken.None let! cred = AuthToken.get creds
Console.WriteLine cred.AccessToken Console.WriteLine cred.AccessToken
match cred.ExpiryTime with match cred.ExpiryTime with

View File

@@ -1,6 +1,5 @@
namespace PureGym.App namespace PureGym.App
open System.Threading
open Argu open Argu
open PureGym open PureGym
@@ -49,7 +48,7 @@ module Fullness =
let run (args : FullnessArgs) = let run (args : FullnessArgs) =
task { task {
let! client = Api.makeWithoutRefresh CancellationToken.None args.Creds let! client = Dto.make args.Creds
let! id = GymSelector.canonicalId client args.Gym let! id = GymSelector.canonicalId client args.Gym
let! attendance = client.GetGymAttendance id let! attendance = client.GetGymAttendance id

View File

@@ -1,6 +1,5 @@
namespace PureGym.App namespace PureGym.App
open System.Threading
open Argu open Argu
open PureGym open PureGym
@@ -45,7 +44,7 @@ module LookupGym =
let run (args : LookupGymArgs) = let run (args : LookupGymArgs) =
task { task {
let! client = Api.makeWithoutRefresh CancellationToken.None args.Creds let! client = Dto.make args.Creds
let! s = client.GetGym 19 let! s = client.GetGym 19
System.Console.WriteLine (string<Gym> s) System.Console.WriteLine (string<Gym> s)
return 0 return 0

View File

@@ -1,6 +1,5 @@
namespace PureGym.App namespace PureGym.App
open System.Threading
open Argu open Argu
open PureGym open PureGym
@@ -32,7 +31,7 @@ module MemberActivity =
let run (args : MemberActivityArgs) = let run (args : MemberActivityArgs) =
task { task {
let! client = Api.makeWithoutRefresh CancellationToken.None args.Creds let! client = Dto.make args.Creds
let! activity = client.GetMemberActivity () let! activity = client.GetMemberActivity ()
let activity = activity.ToMemberActivity () let activity = activity.ToMemberActivity ()
System.Console.WriteLine (string<MemberActivityThisMonth> activity) System.Console.WriteLine (string<MemberActivityThisMonth> activity)

View File

@@ -16,10 +16,6 @@ module Program =
("Get information about the physical instantiation of a gym", ("Get information about the physical instantiation of a gym",
RequiresAuth (fun auth -> ArgsCrate.make (LookupGymArgs.Parse auth) LookupGym.run)) RequiresAuth (fun auth -> ArgsCrate.make (LookupGymArgs.Parse auth) LookupGym.run))
"all-gyms",
("List information about all gyms",
RequiresAuth (fun auth -> ArgsCrate.make (AllGymsArgs.Parse auth) AllGyms.run))
"fullness", "fullness",
("Determine how full a gym is", ("Determine how full a gym is",
RequiresAuth (fun auth -> ArgsCrate.make (FullnessArgs.Parse auth) Fullness.run)) RequiresAuth (fun auth -> ArgsCrate.make (FullnessArgs.Parse auth) Fullness.run))

View File

@@ -1,10 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<NuGetAuditMode>all</NuGetAuditMode>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@@ -15,7 +13,6 @@
<Compile Include="Authenticate.fs" /> <Compile Include="Authenticate.fs" />
<Compile Include="Fullness.fs" /> <Compile Include="Fullness.fs" />
<Compile Include="LookupGym.fs" /> <Compile Include="LookupGym.fs" />
<Compile Include="AllGyms.fs" />
<Compile Include="MemberActivity.fs" /> <Compile Include="MemberActivity.fs" />
<Compile Include="Sessions.fs" /> <Compile Include="Sessions.fs" />
<Compile Include="Program.fs" /> <Compile Include="Program.fs" />
@@ -26,8 +23,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Argu" Version="6.2.5" /> <PackageReference Include="Argu" Version="6.1.1" />
<PackageReference Include="System.Text.Json" Version="9.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -1,6 +1,5 @@
namespace PureGym.App namespace PureGym.App
open System.Threading
open Argu open Argu
open PureGym open PureGym
open System open System
@@ -42,7 +41,7 @@ module Sessions =
let run (args : SessionsArgs) = let run (args : SessionsArgs) =
task { task {
let! client = Api.makeWithoutRefresh CancellationToken.None args.Creds let! client = Dto.make args.Creds
let! activity = client.GetSessions (args.FromDate, args.ToDate) let! activity = client.GetSessions (args.FromDate, args.ToDate)
System.Console.WriteLine (string<Sessions> activity) System.Console.WriteLine (string<Sessions> activity)

View File

@@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net9.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject> <IsTestProject>true</IsTestProject>
<WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@@ -14,12 +13,14 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="ApiSurface" Version="5.0.1" /> <PackageReference Include="ApiSurface" Version="4.0.12" />
<PackageReference Include="FsCheck" Version="3.3.1" /> <PackageReference Include="FsCheck" Version="2.16.6" />
<PackageReference Include="FsUnit" Version="7.1.0" /> <PackageReference Include="FsUnit" Version="5.6.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1"/> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0"/>
<PackageReference Include="NUnit" Version="4.4.0"/> <PackageReference Include="NUnit" Version="3.14.0"/>
<PackageReference Include="NUnit3TestAdapter" Version="5.1.0"/> <PackageReference Include="NUnit3TestAdapter" Version="4.4.2"/>
<PackageReference Include="NUnit.Analyzers" Version="3.6.1"/>
<PackageReference Include="coverlet.collector" Version="3.2.0"/>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -1,12 +1,7 @@
namespace PureGym.Test namespace PureGym.Test
open System open System
open System.IO
open System.Reflection.Metadata
open System.Reflection.PortableExecutable
open System.Text.Json
open System.Text.Json.Nodes open System.Text.Json.Nodes
open System.Text.Json.Serialization
open NUnit.Framework open NUnit.Framework
open FsUnitTyped open FsUnitTyped
open PureGym open PureGym
@@ -129,7 +124,7 @@ module TestJson =
Latitude = 51.480401 Latitude = 51.480401
} }
TimeZone = "Europe/London" TimeZone = "Europe/London"
ReopenDate = Some "2021-04-12T00:00:00+01 Europe/London" ReopenDate = "2021-04-12T00:00:00+01 Europe/London"
} }
[ ovalJson, oval ] |> List.map TestCaseData [ ovalJson, oval ] |> List.map TestCaseData
@@ -201,7 +196,7 @@ module TestJson =
{ {
Description = "65" Description = "65"
TotalPeopleInGym = 65 TotalPeopleInGym = 65
TotalPeopleInClasses = Some 2 TotalPeopleInClasses = 2
TotalPeopleSuffix = None TotalPeopleSuffix = None
IsApproximate = false IsApproximate = false
AttendanceTime = AttendanceTime =

View File

@@ -6,6 +6,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "PureGym.App", "PureGym.App\
EndProject EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "PureGym.Test", "PureGym.Test\PureGym.Test.fsproj", "{F09DF609-5F53-4BB3-BD64-DDB136CD4D2E}" Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "PureGym.Test", "PureGym.Test\PureGym.Test.fsproj", "{F09DF609-5F53-4BB3-BD64-DDB136CD4D2E}"
EndProject EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WoofWare.Myriad.Plugins", "..\WoofWare.Myriad\WoofWare.Myriad.Plugins\WoofWare.Myriad.Plugins.fsproj", "{ECA6B986-ED3A-4CC0-B37E-8E928C9DB9B3}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@@ -24,5 +26,9 @@ Global
{F09DF609-5F53-4BB3-BD64-DDB136CD4D2E}.Debug|Any CPU.Build.0 = Debug|Any CPU {F09DF609-5F53-4BB3-BD64-DDB136CD4D2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F09DF609-5F53-4BB3-BD64-DDB136CD4D2E}.Release|Any CPU.ActiveCfg = Release|Any CPU {F09DF609-5F53-4BB3-BD64-DDB136CD4D2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F09DF609-5F53-4BB3-BD64-DDB136CD4D2E}.Release|Any CPU.Build.0 = Release|Any CPU {F09DF609-5F53-4BB3-BD64-DDB136CD4D2E}.Release|Any CPU.Build.0 = Release|Any CPU
{ECA6B986-ED3A-4CC0-B37E-8E928C9DB9B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ECA6B986-ED3A-4CC0-B37E-8E928C9DB9B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ECA6B986-ED3A-4CC0-B37E-8E928C9DB9B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ECA6B986-ED3A-4CC0-B37E-8E928C9DB9B3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View File

@@ -2,44 +2,26 @@ namespace PureGym
open System open System
open System.Net.Http open System.Net.Http
open System.Threading
open System.Threading.Tasks open System.Threading.Tasks
/// Methods for interacting with the PureGym REST API. /// Methods for interacting with the PureGym REST API.
[<RequireQualifiedAccess>] [<RequireQualifiedAccess>]
module Api = module Dto =
/// Create a REST client, authenticated as the specified user.
/// Create a REST client, authenticated as the specified user. Creds will be refreshed if possible as long as let make (auth : Auth) : IPureGymApi Task =
/// the returned disposable is not disposed. task {
let make (auth : Auth) : (IPureGymApi * IDisposable) Task =
let cache, getToken =
match auth with
| Auth.Token t ->
{ new IDisposable with
member _.Dispose () = ()
},
fun () -> t
| Auth.User cred ->
let cache = new Cache<_> (AuthToken.get cred, _.ExpiryTime)
cache :> _, (fun () -> Async.RunSynchronously (cache.GetCurrentValue ()))
async {
let client = new HttpClient ()
return PureGymApi.make (getToken >> _.AccessToken >> sprintf "Bearer %s") client, cache
}
|> Async.StartAsTask
/// Create a REST client, authenticated as the specified user. Do not refresh creds.
let makeWithoutRefresh (ct : CancellationToken) (auth : Auth) : IPureGymApi Task =
async {
let! token = let! token =
match auth with match auth with
| Auth.Token t -> async.Return t | Auth.Token t -> Task.FromResult<_> t
| Auth.User cred -> Async.AwaitTask (AuthToken.get cred ct) | Auth.User cred -> AuthToken.get cred
let client = new HttpClient () let client = new HttpClient ()
client.BaseAddress <- Uri "https://capi.puregym.com/api"
return PureGymApi.make (fun () -> $"Bearer %s{token.AccessToken}") client client.DefaultRequestHeaders.Authorization <-
Headers.AuthenticationHeaderValue ("Bearer", token.AccessToken)
client.DefaultRequestHeaders.Add ("User-Agent", "PureGym/1523 CFNetwork/1312 Darwin/21.0.0")
return PureGymApi.make client
} }
|> Async.StartAsTask

View File

@@ -5,7 +5,6 @@ open System.Collections.Generic
open System.Net.Http open System.Net.Http
open System.Text.Json open System.Text.Json
open System.Text.Json.Serialization open System.Text.Json.Serialization
open System.Threading
open System.Threading.Tasks open System.Threading.Tasks
// System.Text.Json does not support internal F# records as of .NET 8, presumably because it can't find the constructor. // System.Text.Json does not support internal F# records as of .NET 8, presumably because it can't find the constructor.
@@ -73,9 +72,8 @@ module AuthToken =
let private options = JsonSerializerOptions (IncludeFields = true) let private options = JsonSerializerOptions (IncludeFields = true)
/// Get an AuthToken for the given user email address with the given eight-digit PureGym PIN. /// Get an AuthToken for the given user email address with the given eight-digit PureGym PIN.
let get (creds : UsernamePin) (ct : CancellationToken) : Task<AuthToken> = let get (creds : UsernamePin) : Task<AuthToken> =
async { task {
let! ct = Async.CancellationToken
use client = new HttpClient () use client = new HttpClient ()
client.BaseAddress <- Uri "https://auth.puregym.com" client.BaseAddress <- Uri "https://auth.puregym.com"
client.DefaultRequestHeaders.Add ("User-Agent", "PureGym/1523 CFNetwork/1312 Darwin/21.0.0") client.DefaultRequestHeaders.Add ("User-Agent", "PureGym/1523 CFNetwork/1312 Darwin/21.0.0")
@@ -91,21 +89,14 @@ module AuthToken =
|> List.map KeyValuePair |> List.map KeyValuePair
use content = new FormUrlEncodedContent (request) use content = new FormUrlEncodedContent (request)
let! response = client.PostAsync (Uri "https://auth.puregym.com/connect/token", content)
let! response =
Async.AwaitTask (
client.PostAsync (Uri "https://auth.puregym.com/connect/token", content, cancellationToken = ct)
)
if response.IsSuccessStatusCode then if response.IsSuccessStatusCode then
let! content = Async.AwaitTask (response.Content.ReadAsStreamAsync ct) let! content = response.Content.ReadAsStreamAsync ()
let! response = JsonSerializer.DeserializeAsync<AuthResponseRaw> (content, options)
let! response = // let! response = JsonSerializer.DeserializeAsync<AuthResponseRaw> (content, options)
Async.AwaitTask (JsonSerializer.DeserializeAsync<AuthResponseRaw>(content, options, ct).AsTask ())
return AuthToken.Parse response return AuthToken.Parse response
else else
let! content = Async.AwaitTask (response.Content.ReadAsStringAsync ct) let! content = response.Content.ReadAsStringAsync ()
return failwithf $"bad status code: %+A{response.StatusCode}\n%s{content}" return failwithf $"bad status code: %+A{response.StatusCode}\n%s{content}"
} }
|> fun a -> Async.StartAsTask (a, cancellationToken = ct)

View File

@@ -1,85 +0,0 @@
namespace PureGym
open System
open System.Threading
open System.Threading.Tasks
type private CacheMessage<'a> =
| TriggerUpdate
| UpdateStored of 'a Task
| Get of AsyncReplyChannel<'a>
| Quit of AsyncReplyChannel<unit>
type internal Cache<'a> (obtainNew : CancellationToken -> 'a Task, expiry : 'a -> DateTime option) =
let cts = new CancellationTokenSource ()
let initialValue = obtainNew cts.Token
let rec handle (value : 'a Task) (mailbox : MailboxProcessor<CacheMessage<'a>>) : Async<unit> =
async {
let! message = mailbox.Receive ()
match message with
| Quit channel ->
channel.Reply ()
return ()
| CacheMessage.UpdateStored newValue -> return! handle newValue mailbox
| CacheMessage.TriggerUpdate ->
async {
let! a = Async.AwaitTask (obtainNew cts.Token)
let expiry = expiry a
match expiry with
| None -> return ()
| Some expiry ->
// a bit sloppy but :shrug:
do! Async.Sleep ((expiry - DateTime.Now) - TimeSpan.FromMinutes 1.0)
try
mailbox.Post CacheMessage.TriggerUpdate
with _ ->
// Post during shutdown sequence: drop it on the floor
()
return ()
}
|> fun a -> Async.Start (a, cancellationToken = cts.Token)
return! handle value mailbox
| CacheMessage.Get reply ->
let! valueAwaited = Async.AwaitTask value
reply.Reply valueAwaited
return! handle value mailbox
}
let mailbox = new MailboxProcessor<_> (handle initialValue)
do
mailbox.Start ()
mailbox.Post CacheMessage.TriggerUpdate
let isDisposing = ref 0
let hasDisposed = TaskCompletionSource<unit> ()
member this.GetCurrentValue () =
try
mailbox.PostAndAsyncReply CacheMessage.Get
with
// TODO I think this is the right exception...
| :? InvalidOperationException ->
raise (ObjectDisposedException (nameof (Cache)))
interface IDisposable with
member _.Dispose () =
if Interlocked.Increment isDisposing = 1 then
mailbox.PostAndReply CacheMessage.Quit
(mailbox :> IDisposable).Dispose ()
// We can't terminate the CTS until the mailbox has processed all client requests.
// Otherwise we terminate the mailbox's state Task before it has finished querying that
// task on behalf of clients.
cts.Cancel ()
cts.Dispose ()
hasDisposed.SetResult ()
else
hasDisposed.Task.Result

View File

@@ -9,11 +9,7 @@ open RestEase
/// The PureGym REST API. You probably want to instantiate one of these with `Api.make`. /// The PureGym REST API. You probably want to instantiate one of these with `Api.make`.
[<WoofWare.Myriad.Plugins.HttpClient>] [<WoofWare.Myriad.Plugins.HttpClient>]
[<Header("User-Agent", "PureGym/1523 CFNetwork/1312 Darwin/21.0.0")>] [<Header("User-Agent", "PureGym/1523 CFNetwork/1312 Darwin/21.0.0")>]
[<BaseAddress "https://capi.puregym.com/api/">]
type IPureGymApi = type IPureGymApi =
[<Header "Authorization">]
abstract AuthHeader : string
/// Get the complete list of all gyms known to PureGym. /// Get the complete list of all gyms known to PureGym.
[<Get "v1/gyms/">] [<Get "v1/gyms/">]
abstract GetGyms : ?ct : CancellationToken -> Task<Gym list> abstract GetGyms : ?ct : CancellationToken -> Task<Gym list>

View File

@@ -60,7 +60,6 @@ type GymAddress =
/// E.g. "LONDON" /// E.g. "LONDON"
[<JsonRequired>] [<JsonRequired>]
Town : string Town : string
/// Never seen this in the wild, sorry
County : string option County : string option
/// E.g. "SW9 6DE" /// E.g. "SW9 6DE"
[<JsonRequired>] [<JsonRequired>]
@@ -125,7 +124,7 @@ type Gym =
[<JsonRequired>] [<JsonRequired>]
TimeZone : string TimeZone : string
/// This is a date-time in the format yyyy-MM-ddTHH:mm:ss+01 Europe/London /// This is a date-time in the format yyyy-MM-ddTHH:mm:ss+01 Europe/London
ReopenDate : string option ReopenDate : string
} }
/// Human-readable representation of the most important information about this gym /// Human-readable representation of the most important information about this gym
@@ -168,11 +167,8 @@ type Member =
Postcode : string Postcode : string
/// E.g. "Corporate" /// E.g. "Corporate"
MembershipName : string MembershipName : string
/// No idea what this is
MembershipLevel : int MembershipLevel : int
/// No idea what this is
SuspendedReason : int SuspendedReason : int
/// No idea what this is
MemberStatus : int MemberStatus : int
} }
@@ -187,11 +183,10 @@ type GymAttendance =
[<JsonRequired>] [<JsonRequired>]
TotalPeopleInGym : int TotalPeopleInGym : int
/// How many people are in classes at the gym as of this statistics snapshot /// How many people are in classes at the gym as of this statistics snapshot
TotalPeopleInClasses : int option [<JsonRequired>]
TotalPeopleInClasses : int
/// E.g. " or fewer" /// E.g. " or fewer"
TotalPeopleSuffix : string option TotalPeopleSuffix : string option
/// Whether the number of people in the gym is approximate. This appears to become true when the number
/// of people in the gym is small enough (e.g. in Oval the threshold is 10).
[<JsonRequired>] [<JsonRequired>]
IsApproximate : bool IsApproximate : bool
/// When the query was received (I think) /// When the query was received (I think)
@@ -218,10 +213,10 @@ type GymAttendance =
$" out of %i{this.MaximumCapacity} maximum" $" out of %i{this.MaximumCapacity} maximum"
let classes = let classes =
match this.TotalPeopleInClasses with if this.TotalPeopleInClasses = 0 then
| None ""
| Some 0 -> "" else
| Some totalPeopleInClasses -> $"\n%i{totalPeopleInClasses} in classes" $"\n%i{this.TotalPeopleInClasses} in classes"
$"""%i{this.TotalPeopleInGym}%s{totalPeopleSuffix} in gym%s{capacity} (is exact: %c{Char.emoji (not this.IsApproximate)})%s{classes} $"""%i{this.TotalPeopleInGym}%s{totalPeopleSuffix} in gym%s{capacity} (is exact: %c{Char.emoji (not this.IsApproximate)})%s{classes}
Query made at %s{this.AttendanceTime.ToString "s"}%s{this.AttendanceTime.ToString "zzz"} Query made at %s{this.AttendanceTime.ToString "s"}%s{this.AttendanceTime.ToString "zzz"}
@@ -274,7 +269,6 @@ type MemberActivityDto =
LastRefreshed = this.LastRefreshed LastRefreshed = this.LastRefreshed
} }
/// Aggregation of visits made to some particular gym in some defined time period.
[<WoofWare.Myriad.Plugins.JsonParse>] [<WoofWare.Myriad.Plugins.JsonParse>]
type SessionsAggregate = type SessionsAggregate =
{ {
@@ -342,18 +336,14 @@ type SessionsSummary =
ThisWeek : SessionsAggregate ThisWeek : SessionsAggregate
} }
/// Human-readable non-round-trippable representation
override this.ToString () = override this.ToString () =
$"%i{this.Total.Visits} visits, totalling %i{this.Total.Duration} minutes" $"%i{this.Total.Visits} visits, totalling %i{this.Total.Duration} minutes"
/// Information about a particular user's visits to a particular gym.
[<WoofWare.Myriad.Plugins.JsonParse>] [<WoofWare.Myriad.Plugins.JsonParse>]
type Sessions = type Sessions =
{ {
/// Aggregated summary over some time period.
[<JsonPropertyName "Summary">] [<JsonPropertyName "Summary">]
Summary : SessionsSummary Summary : SessionsSummary
/// List of all individual visits made within some time period.
[<JsonPropertyName "Visits">] [<JsonPropertyName "Visits">]
Visits : Visit list Visits : Visit list
} }

View File

@@ -4,8 +4,6 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace PureGym namespace PureGym
open System open System
@@ -15,221 +13,157 @@ open System.Threading.Tasks
open RestEase open RestEase
/// Module for constructing a REST client. /// Module for constructing a REST client.
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix) ; RequireQualifiedAccess>] [<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
[<RequireQualifiedAccess>]
module PureGymApi = module PureGymApi =
/// Create a REST client. The input functions will be re-evaluated on every HTTP request to obtain the required values for the corresponding header properties. /// Create a REST client.
let make (authHeader : unit -> string) (client : System.Net.Http.HttpClient) : IPureGymApi = let make (client : System.Net.Http.HttpClient) : IPureGymApi =
{ new IPureGymApi with { new IPureGymApi with
member _.AuthHeader : string = authHeader () member _.GetGyms (ct : CancellationToken option) =
member this.GetGyms (ct : CancellationToken option) =
async { async {
let! ct = Async.CancellationToken let! ct = Async.CancellationToken
let uri =
System.Uri (
(match client.BaseAddress with
| null -> System.Uri "https://capi.puregym.com/api/"
| v -> v),
System.Uri ("v1/gyms/", System.UriKind.Relative)
)
let httpMessage = let httpMessage =
new System.Net.Http.HttpRequestMessage ( new System.Net.Http.HttpRequestMessage (
Method = System.Net.Http.HttpMethod.Get, Method = System.Net.Http.HttpMethod.Get,
RequestUri = uri RequestUri = System.Uri (client.BaseAddress.ToString () + "/v1/gyms/")
) )
do httpMessage.Headers.Add ("Authorization", this.AuthHeader.ToString ())
do httpMessage.Headers.Add ("User-Agent", "PureGym/1523 CFNetwork/1312 Darwin/21.0.0")
let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask
let response = response.EnsureSuccessStatusCode () let response = response.EnsureSuccessStatusCode ()
let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! stream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask
let! jsonNode = let! node =
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) System.Text.Json.Nodes.JsonNode.ParseAsync (stream, cancellationToken = ct)
|> Async.AwaitTask |> Async.AwaitTask
return jsonNode.AsArray () |> Seq.map (fun elt -> Gym.jsonParse elt) |> List.ofSeq return node.AsArray () |> Seq.map (fun elt -> Gym.jsonParse elt) |> List.ofSeq
} }
|> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct))
member this.GetMember (ct : CancellationToken option) = member _.GetMember (ct : CancellationToken option) =
async { async {
let! ct = Async.CancellationToken let! ct = Async.CancellationToken
let uri =
System.Uri (
(match client.BaseAddress with
| null -> System.Uri "https://capi.puregym.com/api/"
| v -> v),
System.Uri ("v1/member", System.UriKind.Relative)
)
let httpMessage = let httpMessage =
new System.Net.Http.HttpRequestMessage ( new System.Net.Http.HttpRequestMessage (
Method = System.Net.Http.HttpMethod.Get, Method = System.Net.Http.HttpMethod.Get,
RequestUri = uri RequestUri = System.Uri (client.BaseAddress.ToString () + "/v1/member")
) )
do httpMessage.Headers.Add ("Authorization", this.AuthHeader.ToString ())
do httpMessage.Headers.Add ("User-Agent", "PureGym/1523 CFNetwork/1312 Darwin/21.0.0")
let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask
let response = response.EnsureSuccessStatusCode () let response = response.EnsureSuccessStatusCode ()
let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! stream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask
let! jsonNode = let! node =
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) System.Text.Json.Nodes.JsonNode.ParseAsync (stream, cancellationToken = ct)
|> Async.AwaitTask |> Async.AwaitTask
return Member.jsonParse jsonNode return Member.jsonParse node
} }
|> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct))
member this.GetGymAttendance (gymId : int, ct : CancellationToken option) = member _.GetGymAttendance (gymId : int, ct : CancellationToken option) =
async { async {
let! ct = Async.CancellationToken let! ct = Async.CancellationToken
let uri =
System.Uri (
(match client.BaseAddress with
| null -> System.Uri "https://capi.puregym.com/api/"
| v -> v),
System.Uri (
"v1/gyms/{gym_id}/attendance"
.Replace ("{gym_id}", gymId.ToString () |> System.Uri.EscapeDataString),
System.UriKind.Relative
)
)
let httpMessage = let httpMessage =
new System.Net.Http.HttpRequestMessage ( new System.Net.Http.HttpRequestMessage (
Method = System.Net.Http.HttpMethod.Get, Method = System.Net.Http.HttpMethod.Get,
RequestUri = uri RequestUri =
System.Uri (
client.BaseAddress.ToString ()
+ "/v1/gyms/{gym_id}/attendance".Replace ("{gym_id}", gymId.ToString ())
)
) )
do httpMessage.Headers.Add ("Authorization", this.AuthHeader.ToString ())
do httpMessage.Headers.Add ("User-Agent", "PureGym/1523 CFNetwork/1312 Darwin/21.0.0")
let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask
let response = response.EnsureSuccessStatusCode () let response = response.EnsureSuccessStatusCode ()
let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! stream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask
let! jsonNode = let! node =
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) System.Text.Json.Nodes.JsonNode.ParseAsync (stream, cancellationToken = ct)
|> Async.AwaitTask |> Async.AwaitTask
return GymAttendance.jsonParse jsonNode return GymAttendance.jsonParse node
} }
|> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct))
member this.GetGym (gymId : int, ct : CancellationToken option) = member _.GetGym (gymId : int, ct : CancellationToken option) =
async { async {
let! ct = Async.CancellationToken let! ct = Async.CancellationToken
let uri =
System.Uri (
(match client.BaseAddress with
| null -> System.Uri "https://capi.puregym.com/api/"
| v -> v),
System.Uri (
"v1/gyms/{gym_id}"
.Replace ("{gym_id}", gymId.ToString () |> System.Uri.EscapeDataString),
System.UriKind.Relative
)
)
let httpMessage = let httpMessage =
new System.Net.Http.HttpRequestMessage ( new System.Net.Http.HttpRequestMessage (
Method = System.Net.Http.HttpMethod.Get, Method = System.Net.Http.HttpMethod.Get,
RequestUri = uri RequestUri =
System.Uri (
client.BaseAddress.ToString ()
+ "/v1/gyms/{gym_id}".Replace ("{gym_id}", gymId.ToString ())
)
) )
do httpMessage.Headers.Add ("Authorization", this.AuthHeader.ToString ())
do httpMessage.Headers.Add ("User-Agent", "PureGym/1523 CFNetwork/1312 Darwin/21.0.0")
let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask
let response = response.EnsureSuccessStatusCode () let response = response.EnsureSuccessStatusCode ()
let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! stream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask
let! jsonNode = let! node =
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) System.Text.Json.Nodes.JsonNode.ParseAsync (stream, cancellationToken = ct)
|> Async.AwaitTask |> Async.AwaitTask
return Gym.jsonParse jsonNode return Gym.jsonParse node
} }
|> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct))
member this.GetMemberActivity (ct : CancellationToken option) = member _.GetMemberActivity (ct : CancellationToken option) =
async { async {
let! ct = Async.CancellationToken let! ct = Async.CancellationToken
let uri =
System.Uri (
(match client.BaseAddress with
| null -> System.Uri "https://capi.puregym.com/api/"
| v -> v),
System.Uri ("v1/member/activity", System.UriKind.Relative)
)
let httpMessage = let httpMessage =
new System.Net.Http.HttpRequestMessage ( new System.Net.Http.HttpRequestMessage (
Method = System.Net.Http.HttpMethod.Get, Method = System.Net.Http.HttpMethod.Get,
RequestUri = uri RequestUri = System.Uri (client.BaseAddress.ToString () + "/v1/member/activity")
) )
do httpMessage.Headers.Add ("Authorization", this.AuthHeader.ToString ())
do httpMessage.Headers.Add ("User-Agent", "PureGym/1523 CFNetwork/1312 Darwin/21.0.0")
let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask
let response = response.EnsureSuccessStatusCode () let response = response.EnsureSuccessStatusCode ()
let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! stream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask
let! jsonNode = let! node =
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) System.Text.Json.Nodes.JsonNode.ParseAsync (stream, cancellationToken = ct)
|> Async.AwaitTask |> Async.AwaitTask
return MemberActivityDto.jsonParse jsonNode return MemberActivityDto.jsonParse node
} }
|> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct))
member this.GetSessions (fromDate : DateOnly, toDate : DateOnly, ct : CancellationToken option) = member _.GetSessions (fromDate : DateOnly, toDate : DateOnly, ct : CancellationToken option) =
async { async {
let! ct = Async.CancellationToken let! ct = Async.CancellationToken
let uri =
System.Uri (
(match client.BaseAddress with
| null -> System.Uri "https://capi.puregym.com/api/"
| v -> v),
System.Uri (
("v2/gymSessions/member"
+ (if "v2/gymSessions/member".IndexOf (char 63) >= 0 then
"&"
else
"?")
+ "fromDate="
+ ((fromDate.ToString "yyyy-MM-dd") |> System.Uri.EscapeDataString)
+ "&toDate="
+ ((toDate.ToString "yyyy-MM-dd") |> System.Uri.EscapeDataString)),
System.UriKind.Relative
)
)
let httpMessage = let httpMessage =
new System.Net.Http.HttpRequestMessage ( new System.Net.Http.HttpRequestMessage (
Method = System.Net.Http.HttpMethod.Get, Method = System.Net.Http.HttpMethod.Get,
RequestUri = uri RequestUri =
System.Uri (
client.BaseAddress.ToString ()
+ ("/v2/gymSessions/member"
+ "?fromDate="
+ ((fromDate.ToString "yyyy-MM-dd") |> System.Web.HttpUtility.UrlEncode)
+ "&toDate="
+ ((toDate.ToString "yyyy-MM-dd") |> System.Web.HttpUtility.UrlEncode))
)
) )
do httpMessage.Headers.Add ("Authorization", this.AuthHeader.ToString ())
do httpMessage.Headers.Add ("User-Agent", "PureGym/1523 CFNetwork/1312 Darwin/21.0.0")
let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask
let response = response.EnsureSuccessStatusCode () let response = response.EnsureSuccessStatusCode ()
let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! stream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask
let! jsonNode = let! node =
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) System.Text.Json.Nodes.JsonNode.ParseAsync (stream, cancellationToken = ct)
|> Async.AwaitTask |> Async.AwaitTask
return Sessions.jsonParse jsonNode return Sessions.jsonParse node
} }
|> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct))
} }

File diff suppressed because it is too large Load Diff

View File

@@ -21,17 +21,14 @@ module GymSelector =
let canonicalId (client : IPureGymApi) (gym : GymSelector) : int Task = let canonicalId (client : IPureGymApi) (gym : GymSelector) : int Task =
match gym with match gym with
| GymSelector.Home -> | GymSelector.Home ->
async { task {
let! ct = Async.CancellationToken let! self = client.GetMember ()
let! self = Async.AwaitTask (client.GetMember ct)
return self.HomeGymId return self.HomeGymId
} }
|> Async.StartAsTask
| GymSelector.Id i -> Task.FromResult<_> i | GymSelector.Id i -> Task.FromResult<_> i
| GymSelector.Name name -> | GymSelector.Name name ->
async { task {
let! ct = Async.CancellationToken let! allGyms = client.GetGyms ()
let! allGyms = Async.AwaitTask (client.GetGyms ct)
if allGyms.IsEmpty then if allGyms.IsEmpty then
return failwith "PureGym API returned no gyms!" return failwith "PureGym API returned no gyms!"
@@ -49,4 +46,3 @@ module GymSelector =
return bestGym.Id return bestGym.Id
} }
|> Async.StartAsTask

View File

@@ -1,27 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
<WarnOn>FS3559</WarnOn> <WarnOn>FS3559</WarnOn>
<WoofWareMyriadPluginVersion>4.0.9</WoofWareMyriadPluginVersion> <WoofWareMyriadPluginVersion>1.1.1</WoofWareMyriadPluginVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="String.fs" /> <Compile Include="String.fs" />
<Compile Include="Auth.fs" /> <Compile Include="Auth.fs" />
<Compile Include="Dto.fs" /> <Compile Include="Dto.fs" />
<Compile Include="GeneratedDto.fs"> <Compile Include="GeneratedDto.fs"> <!--1-->
<MyriadFile>Dto.fs</MyriadFile> <MyriadFile>Dto.fs</MyriadFile> <!--2-->
</Compile> </Compile>
<Compile Include="Client.fs" /> <Compile Include="Client.fs" />
<Compile Include="GeneratedClient.fs"> <Compile Include="GeneratedClient.fs">
<MyriadFile>Client.fs</MyriadFile> <MyriadFile>Client.fs</MyriadFile> <!--2-->
</Compile> </Compile>
<Compile Include="Cache.fs" />
<Compile Include="Api.fs" /> <Compile Include="Api.fs" />
<Compile Include="GymSelector.fs" /> <Compile Include="GymSelector.fs" />
<EmbeddedResource Include="SurfaceBaseline.txt" /> <EmbeddedResource Include="SurfaceBaseline.txt" />
@@ -36,10 +34,10 @@
<PackageReference Include="RestEase" Version="1.6.4" /> <PackageReference Include="RestEase" Version="1.6.4" />
<PackageReference Update="FSharp.Core" Version="6.0.1" /> <PackageReference Update="FSharp.Core" Version="6.0.1" />
<PackageReference Include="System.Text.Json" Version="8.0.0" /> <PackageReference Include="System.Text.Json" Version="8.0.0" />
<PackageReference Include="Fastenshtein" Version="1.0.10" /> <PackageReference Include="Fastenshtein" Version="1.0.0.8" />
<PackageReference Include="Myriad.Sdk" Version="0.8.3" PrivateAssets="all" /> <PackageReference Include="Myriad.Core" Version="0.8.3" />
<PackageReference Include="WoofWare.Myriad.Plugins" Version="$(WoofWareMyriadPluginVersion)" PrivateAssets="all" /> <PackageReference Include="Myriad.Sdk" Version="0.8.3" />
<PackageReference Include="WoofWare.Myriad.Plugins.Attributes" Version="3.6.6" /> <PackageReference Include="WoofWare.Myriad.Plugins" Version="$(WoofWareMyriadPluginVersion)" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -1,6 +1,3 @@
PureGym.Api inherit obj
PureGym.Api.make [static method]: PureGym.Auth -> (PureGym.IPureGymApi * IDisposable) System.Threading.Tasks.Task
PureGym.Api.makeWithoutRefresh [static method]: System.Threading.CancellationToken -> PureGym.Auth -> PureGym.IPureGymApi System.Threading.Tasks.Task
PureGym.Auth inherit obj, implements PureGym.Auth System.IEquatable, System.Collections.IStructuralEquatable, PureGym.Auth System.IComparable, System.IComparable, System.Collections.IStructuralComparable - union type with 2 cases PureGym.Auth inherit obj, implements PureGym.Auth System.IEquatable, System.Collections.IStructuralEquatable, PureGym.Auth System.IComparable, System.IComparable, System.Collections.IStructuralComparable - union type with 2 cases
PureGym.Auth+Tags inherit obj PureGym.Auth+Tags inherit obj
PureGym.Auth+Tags.Token [static field]: int = 1 PureGym.Auth+Tags.Token [static field]: int = 1
@@ -11,7 +8,6 @@ PureGym.Auth+Token.Item [property]: [read-only] PureGym.AuthToken
PureGym.Auth+User inherit PureGym.Auth PureGym.Auth+User inherit PureGym.Auth
PureGym.Auth+User.get_Item [method]: unit -> PureGym.UsernamePin PureGym.Auth+User.get_Item [method]: unit -> PureGym.UsernamePin
PureGym.Auth+User.Item [property]: [read-only] PureGym.UsernamePin PureGym.Auth+User.Item [property]: [read-only] PureGym.UsernamePin
PureGym.Auth.Equals [method]: (PureGym.Auth, System.Collections.IEqualityComparer) -> bool
PureGym.Auth.get_IsToken [method]: unit -> bool PureGym.Auth.get_IsToken [method]: unit -> bool
PureGym.Auth.get_IsUser [method]: unit -> bool PureGym.Auth.get_IsUser [method]: unit -> bool
PureGym.Auth.get_Tag [method]: unit -> int PureGym.Auth.get_Tag [method]: unit -> int
@@ -33,19 +29,19 @@ PureGym.AuthResponseRaw.token_type [property]: [read-only] string
PureGym.AuthToken inherit obj, implements PureGym.AuthToken System.IEquatable, System.Collections.IStructuralEquatable, PureGym.AuthToken System.IComparable, System.IComparable, System.Collections.IStructuralComparable PureGym.AuthToken inherit obj, implements PureGym.AuthToken System.IEquatable, System.Collections.IStructuralEquatable, PureGym.AuthToken System.IComparable, System.IComparable, System.Collections.IStructuralComparable
PureGym.AuthToken..ctor [constructor]: (string, System.DateTime option) PureGym.AuthToken..ctor [constructor]: (string, System.DateTime option)
PureGym.AuthToken.AccessToken [property]: [read-only] string PureGym.AuthToken.AccessToken [property]: [read-only] string
PureGym.AuthToken.Equals [method]: (PureGym.AuthToken, System.Collections.IEqualityComparer) -> bool
PureGym.AuthToken.ExpiryTime [property]: [read-only] System.DateTime option PureGym.AuthToken.ExpiryTime [property]: [read-only] System.DateTime option
PureGym.AuthToken.get_AccessToken [method]: unit -> string PureGym.AuthToken.get_AccessToken [method]: unit -> string
PureGym.AuthToken.get_ExpiryTime [method]: unit -> System.DateTime option PureGym.AuthToken.get_ExpiryTime [method]: unit -> System.DateTime option
PureGym.AuthTokenModule inherit obj PureGym.AuthTokenModule inherit obj
PureGym.AuthTokenModule.get [static method]: PureGym.UsernamePin -> System.Threading.CancellationToken -> PureGym.AuthToken System.Threading.Tasks.Task PureGym.AuthTokenModule.get [static method]: PureGym.UsernamePin -> PureGym.AuthToken System.Threading.Tasks.Task
PureGym.AuthTokenModule.ofBearerToken [static method]: string -> PureGym.AuthToken PureGym.AuthTokenModule.ofBearerToken [static method]: string -> PureGym.AuthToken
PureGym.Dto inherit obj
PureGym.Dto.make [static method]: PureGym.Auth -> PureGym.IPureGymApi System.Threading.Tasks.Task
PureGym.Gym inherit obj, implements PureGym.Gym System.IEquatable, System.Collections.IStructuralEquatable, PureGym.Gym System.IComparable, System.IComparable, System.Collections.IStructuralComparable PureGym.Gym inherit obj, implements PureGym.Gym System.IEquatable, System.Collections.IStructuralEquatable, PureGym.Gym System.IComparable, System.IComparable, System.Collections.IStructuralComparable
PureGym.Gym..ctor [constructor]: (string, int, int, PureGym.GymAddress, string, string, PureGym.GymOpeningHours, PureGym.GymAccessOptions, PureGym.GymLocation, string, string option) PureGym.Gym..ctor [constructor]: (string, int, int, PureGym.GymAddress, string, string, PureGym.GymOpeningHours, PureGym.GymAccessOptions, PureGym.GymLocation, string, string)
PureGym.Gym.AccessOptions [property]: [read-only] PureGym.GymAccessOptions PureGym.Gym.AccessOptions [property]: [read-only] PureGym.GymAccessOptions
PureGym.Gym.Address [property]: [read-only] PureGym.GymAddress PureGym.Gym.Address [property]: [read-only] PureGym.GymAddress
PureGym.Gym.EmailAddress [property]: [read-only] string PureGym.Gym.EmailAddress [property]: [read-only] string
PureGym.Gym.Equals [method]: (PureGym.Gym, System.Collections.IEqualityComparer) -> bool
PureGym.Gym.get_AccessOptions [method]: unit -> PureGym.GymAccessOptions PureGym.Gym.get_AccessOptions [method]: unit -> PureGym.GymAccessOptions
PureGym.Gym.get_Address [method]: unit -> PureGym.GymAddress PureGym.Gym.get_Address [method]: unit -> PureGym.GymAddress
PureGym.Gym.get_EmailAddress [method]: unit -> string PureGym.Gym.get_EmailAddress [method]: unit -> string
@@ -54,7 +50,7 @@ PureGym.Gym.get_Id [method]: unit -> int
PureGym.Gym.get_Location [method]: unit -> PureGym.GymLocation PureGym.Gym.get_Location [method]: unit -> PureGym.GymLocation
PureGym.Gym.get_Name [method]: unit -> string PureGym.Gym.get_Name [method]: unit -> string
PureGym.Gym.get_PhoneNumber [method]: unit -> string PureGym.Gym.get_PhoneNumber [method]: unit -> string
PureGym.Gym.get_ReopenDate [method]: unit -> string option PureGym.Gym.get_ReopenDate [method]: unit -> string
PureGym.Gym.get_Status [method]: unit -> int PureGym.Gym.get_Status [method]: unit -> int
PureGym.Gym.get_TimeZone [method]: unit -> string PureGym.Gym.get_TimeZone [method]: unit -> string
PureGym.Gym.GymOpeningHours [property]: [read-only] PureGym.GymOpeningHours PureGym.Gym.GymOpeningHours [property]: [read-only] PureGym.GymOpeningHours
@@ -62,12 +58,11 @@ PureGym.Gym.Id [property]: [read-only] int
PureGym.Gym.Location [property]: [read-only] PureGym.GymLocation PureGym.Gym.Location [property]: [read-only] PureGym.GymLocation
PureGym.Gym.Name [property]: [read-only] string PureGym.Gym.Name [property]: [read-only] string
PureGym.Gym.PhoneNumber [property]: [read-only] string PureGym.Gym.PhoneNumber [property]: [read-only] string
PureGym.Gym.ReopenDate [property]: [read-only] string option PureGym.Gym.ReopenDate [property]: [read-only] string
PureGym.Gym.Status [property]: [read-only] int PureGym.Gym.Status [property]: [read-only] int
PureGym.Gym.TimeZone [property]: [read-only] string PureGym.Gym.TimeZone [property]: [read-only] string
PureGym.GymAccessOptions inherit obj, implements PureGym.GymAccessOptions System.IEquatable, System.Collections.IStructuralEquatable, PureGym.GymAccessOptions System.IComparable, System.IComparable, System.Collections.IStructuralComparable PureGym.GymAccessOptions inherit obj, implements PureGym.GymAccessOptions System.IEquatable, System.Collections.IStructuralEquatable, PureGym.GymAccessOptions System.IComparable, System.IComparable, System.Collections.IStructuralComparable
PureGym.GymAccessOptions..ctor [constructor]: (bool, bool) PureGym.GymAccessOptions..ctor [constructor]: (bool, bool)
PureGym.GymAccessOptions.Equals [method]: (PureGym.GymAccessOptions, System.Collections.IEqualityComparer) -> bool
PureGym.GymAccessOptions.get_PinAccess [method]: unit -> bool PureGym.GymAccessOptions.get_PinAccess [method]: unit -> bool
PureGym.GymAccessOptions.get_QrCodeAccess [method]: unit -> bool PureGym.GymAccessOptions.get_QrCodeAccess [method]: unit -> bool
PureGym.GymAccessOptions.PinAccess [property]: [read-only] bool PureGym.GymAccessOptions.PinAccess [property]: [read-only] bool
@@ -80,7 +75,6 @@ PureGym.GymAddress.AddressLine1 [property]: [read-only] string
PureGym.GymAddress.AddressLine2 [property]: [read-only] string option PureGym.GymAddress.AddressLine2 [property]: [read-only] string option
PureGym.GymAddress.AddressLine3 [property]: [read-only] string option PureGym.GymAddress.AddressLine3 [property]: [read-only] string option
PureGym.GymAddress.County [property]: [read-only] string option PureGym.GymAddress.County [property]: [read-only] string option
PureGym.GymAddress.Equals [method]: (PureGym.GymAddress, System.Collections.IEqualityComparer) -> bool
PureGym.GymAddress.get_AddressLine1 [method]: unit -> string PureGym.GymAddress.get_AddressLine1 [method]: unit -> string
PureGym.GymAddress.get_AddressLine2 [method]: unit -> string option PureGym.GymAddress.get_AddressLine2 [method]: unit -> string option
PureGym.GymAddress.get_AddressLine3 [method]: unit -> string option PureGym.GymAddress.get_AddressLine3 [method]: unit -> string option
@@ -92,31 +86,29 @@ PureGym.GymAddress.Town [property]: [read-only] string
PureGym.GymAddressModule inherit obj PureGym.GymAddressModule inherit obj
PureGym.GymAddressModule.jsonParse [static method]: System.Text.Json.Nodes.JsonNode -> PureGym.GymAddress PureGym.GymAddressModule.jsonParse [static method]: System.Text.Json.Nodes.JsonNode -> PureGym.GymAddress
PureGym.GymAttendance inherit obj, implements PureGym.GymAttendance System.IEquatable, System.Collections.IStructuralEquatable, PureGym.GymAttendance System.IComparable, System.IComparable, System.Collections.IStructuralComparable PureGym.GymAttendance inherit obj, implements PureGym.GymAttendance System.IEquatable, System.Collections.IStructuralEquatable, PureGym.GymAttendance System.IComparable, System.IComparable, System.Collections.IStructuralComparable
PureGym.GymAttendance..ctor [constructor]: (string, int, int option, string option, bool, System.DateTime, System.DateTime, System.DateTime, int) PureGym.GymAttendance..ctor [constructor]: (string, int, int, string option, bool, System.DateTime, System.DateTime, System.DateTime, int)
PureGym.GymAttendance.AttendanceTime [property]: [read-only] System.DateTime PureGym.GymAttendance.AttendanceTime [property]: [read-only] System.DateTime
PureGym.GymAttendance.Description [property]: [read-only] string PureGym.GymAttendance.Description [property]: [read-only] string
PureGym.GymAttendance.Equals [method]: (PureGym.GymAttendance, System.Collections.IEqualityComparer) -> bool
PureGym.GymAttendance.get_AttendanceTime [method]: unit -> System.DateTime PureGym.GymAttendance.get_AttendanceTime [method]: unit -> System.DateTime
PureGym.GymAttendance.get_Description [method]: unit -> string PureGym.GymAttendance.get_Description [method]: unit -> string
PureGym.GymAttendance.get_IsApproximate [method]: unit -> bool PureGym.GymAttendance.get_IsApproximate [method]: unit -> bool
PureGym.GymAttendance.get_LastRefreshed [method]: unit -> System.DateTime PureGym.GymAttendance.get_LastRefreshed [method]: unit -> System.DateTime
PureGym.GymAttendance.get_LastRefreshedPeopleInClasses [method]: unit -> System.DateTime PureGym.GymAttendance.get_LastRefreshedPeopleInClasses [method]: unit -> System.DateTime
PureGym.GymAttendance.get_MaximumCapacity [method]: unit -> int PureGym.GymAttendance.get_MaximumCapacity [method]: unit -> int
PureGym.GymAttendance.get_TotalPeopleInClasses [method]: unit -> int option PureGym.GymAttendance.get_TotalPeopleInClasses [method]: unit -> int
PureGym.GymAttendance.get_TotalPeopleInGym [method]: unit -> int PureGym.GymAttendance.get_TotalPeopleInGym [method]: unit -> int
PureGym.GymAttendance.get_TotalPeopleSuffix [method]: unit -> string option PureGym.GymAttendance.get_TotalPeopleSuffix [method]: unit -> string option
PureGym.GymAttendance.IsApproximate [property]: [read-only] bool PureGym.GymAttendance.IsApproximate [property]: [read-only] bool
PureGym.GymAttendance.LastRefreshed [property]: [read-only] System.DateTime PureGym.GymAttendance.LastRefreshed [property]: [read-only] System.DateTime
PureGym.GymAttendance.LastRefreshedPeopleInClasses [property]: [read-only] System.DateTime PureGym.GymAttendance.LastRefreshedPeopleInClasses [property]: [read-only] System.DateTime
PureGym.GymAttendance.MaximumCapacity [property]: [read-only] int PureGym.GymAttendance.MaximumCapacity [property]: [read-only] int
PureGym.GymAttendance.TotalPeopleInClasses [property]: [read-only] int option PureGym.GymAttendance.TotalPeopleInClasses [property]: [read-only] int
PureGym.GymAttendance.TotalPeopleInGym [property]: [read-only] int PureGym.GymAttendance.TotalPeopleInGym [property]: [read-only] int
PureGym.GymAttendance.TotalPeopleSuffix [property]: [read-only] string option PureGym.GymAttendance.TotalPeopleSuffix [property]: [read-only] string option
PureGym.GymAttendanceModule inherit obj PureGym.GymAttendanceModule inherit obj
PureGym.GymAttendanceModule.jsonParse [static method]: System.Text.Json.Nodes.JsonNode -> PureGym.GymAttendance PureGym.GymAttendanceModule.jsonParse [static method]: System.Text.Json.Nodes.JsonNode -> PureGym.GymAttendance
PureGym.GymLocation inherit obj, implements PureGym.GymLocation System.IEquatable, System.Collections.IStructuralEquatable, PureGym.GymLocation System.IComparable, System.IComparable, System.Collections.IStructuralComparable PureGym.GymLocation inherit obj, implements PureGym.GymLocation System.IEquatable, System.Collections.IStructuralEquatable, PureGym.GymLocation System.IComparable, System.IComparable, System.Collections.IStructuralComparable
PureGym.GymLocation..ctor [constructor]: (float, float) PureGym.GymLocation..ctor [constructor]: (float, float)
PureGym.GymLocation.Equals [method]: (PureGym.GymLocation, System.Collections.IEqualityComparer) -> bool
PureGym.GymLocation.get_Latitude [method]: unit -> float PureGym.GymLocation.get_Latitude [method]: unit -> float
PureGym.GymLocation.get_Longitude [method]: unit -> float PureGym.GymLocation.get_Longitude [method]: unit -> float
PureGym.GymLocation.Latitude [property]: [read-only] float PureGym.GymLocation.Latitude [property]: [read-only] float
@@ -127,7 +119,6 @@ PureGym.GymModule inherit obj
PureGym.GymModule.jsonParse [static method]: System.Text.Json.Nodes.JsonNode -> PureGym.Gym PureGym.GymModule.jsonParse [static method]: System.Text.Json.Nodes.JsonNode -> PureGym.Gym
PureGym.GymOpeningHours inherit obj, implements PureGym.GymOpeningHours System.IEquatable, System.Collections.IStructuralEquatable, PureGym.GymOpeningHours System.IComparable, System.IComparable, System.Collections.IStructuralComparable PureGym.GymOpeningHours inherit obj, implements PureGym.GymOpeningHours System.IEquatable, System.Collections.IStructuralEquatable, PureGym.GymOpeningHours System.IComparable, System.IComparable, System.Collections.IStructuralComparable
PureGym.GymOpeningHours..ctor [constructor]: (bool, string list) PureGym.GymOpeningHours..ctor [constructor]: (bool, string list)
PureGym.GymOpeningHours.Equals [method]: (PureGym.GymOpeningHours, System.Collections.IEqualityComparer) -> bool
PureGym.GymOpeningHours.get_IsAlwaysOpen [method]: unit -> bool PureGym.GymOpeningHours.get_IsAlwaysOpen [method]: unit -> bool
PureGym.GymOpeningHours.get_OpeningHours [method]: unit -> string list PureGym.GymOpeningHours.get_OpeningHours [method]: unit -> string list
PureGym.GymOpeningHours.IsAlwaysOpen [property]: [read-only] bool PureGym.GymOpeningHours.IsAlwaysOpen [property]: [read-only] bool
@@ -145,7 +136,6 @@ PureGym.GymSelector+Tags inherit obj
PureGym.GymSelector+Tags.Home [static field]: int = 2 PureGym.GymSelector+Tags.Home [static field]: int = 2
PureGym.GymSelector+Tags.Id [static field]: int = 0 PureGym.GymSelector+Tags.Id [static field]: int = 0
PureGym.GymSelector+Tags.Name [static field]: int = 1 PureGym.GymSelector+Tags.Name [static field]: int = 1
PureGym.GymSelector.Equals [method]: (PureGym.GymSelector, System.Collections.IEqualityComparer) -> bool
PureGym.GymSelector.get_Home [static method]: unit -> PureGym.GymSelector PureGym.GymSelector.get_Home [static method]: unit -> PureGym.GymSelector
PureGym.GymSelector.get_IsHome [method]: unit -> bool PureGym.GymSelector.get_IsHome [method]: unit -> bool
PureGym.GymSelector.get_IsId [method]: unit -> bool PureGym.GymSelector.get_IsId [method]: unit -> bool
@@ -160,21 +150,18 @@ PureGym.GymSelector.NewName [static method]: string -> PureGym.GymSelector
PureGym.GymSelector.Tag [property]: [read-only] int PureGym.GymSelector.Tag [property]: [read-only] int
PureGym.GymSelectorModule inherit obj PureGym.GymSelectorModule inherit obj
PureGym.GymSelectorModule.canonicalId [static method]: PureGym.IPureGymApi -> PureGym.GymSelector -> int System.Threading.Tasks.Task PureGym.GymSelectorModule.canonicalId [static method]: PureGym.IPureGymApi -> PureGym.GymSelector -> int System.Threading.Tasks.Task
PureGym.IPureGymApi - interface with 8 member(s) PureGym.IPureGymApi - interface with 6 member(s)
PureGym.IPureGymApi.AuthHeader [property]: [read-only] string PureGym.IPureGymApi.GetGym [method]: int -> PureGym.Gym System.Threading.Tasks.Task
PureGym.IPureGymApi.get_AuthHeader [method]: unit -> string PureGym.IPureGymApi.GetGymAttendance [method]: int -> PureGym.GymAttendance System.Threading.Tasks.Task
PureGym.IPureGymApi.GetGym [method]: (int, System.Threading.CancellationToken option) -> PureGym.Gym System.Threading.Tasks.Task PureGym.IPureGymApi.GetGyms [method]: unit -> PureGym.Gym list System.Threading.Tasks.Task
PureGym.IPureGymApi.GetGymAttendance [method]: (int, System.Threading.CancellationToken option) -> PureGym.GymAttendance System.Threading.Tasks.Task PureGym.IPureGymApi.GetMember [method]: unit -> PureGym.Member System.Threading.Tasks.Task
PureGym.IPureGymApi.GetGyms [method]: System.Threading.CancellationToken option -> PureGym.Gym list System.Threading.Tasks.Task PureGym.IPureGymApi.GetMemberActivity [method]: unit -> PureGym.MemberActivityDto System.Threading.Tasks.Task
PureGym.IPureGymApi.GetMember [method]: System.Threading.CancellationToken option -> PureGym.Member System.Threading.Tasks.Task PureGym.IPureGymApi.GetSessions [method]: System.DateTime -> System.DateTime -> PureGym.Sessions System.Threading.Tasks.Task
PureGym.IPureGymApi.GetMemberActivity [method]: System.Threading.CancellationToken option -> PureGym.MemberActivityDto System.Threading.Tasks.Task
PureGym.IPureGymApi.GetSessions [method]: (System.DateOnly, System.DateOnly, System.Threading.CancellationToken option) -> PureGym.Sessions System.Threading.Tasks.Task
PureGym.Member inherit obj, implements PureGym.Member System.IEquatable, System.Collections.IStructuralEquatable, PureGym.Member System.IComparable, System.IComparable, System.Collections.IStructuralComparable PureGym.Member inherit obj, implements PureGym.Member System.IEquatable, System.Collections.IStructuralEquatable, PureGym.Member System.IComparable, System.IComparable, System.Collections.IStructuralComparable
PureGym.Member..ctor [constructor]: (int, string, string, string, int, string, string, string, System.DateOnly, string, string, string, int, int, int) PureGym.Member..ctor [constructor]: (int, string, string, string, int, string, string, string, System.DateOnly, string, string, string, int, int, int)
PureGym.Member.CompoundMemberId [property]: [read-only] string PureGym.Member.CompoundMemberId [property]: [read-only] string
PureGym.Member.DateOfBirth [property]: [read-only] System.DateOnly PureGym.Member.DateOfBirth [property]: [read-only] System.DateOnly
PureGym.Member.EmailAddress [property]: [read-only] string PureGym.Member.EmailAddress [property]: [read-only] string
PureGym.Member.Equals [method]: (PureGym.Member, System.Collections.IEqualityComparer) -> bool
PureGym.Member.FirstName [property]: [read-only] string PureGym.Member.FirstName [property]: [read-only] string
PureGym.Member.get_CompoundMemberId [method]: unit -> string PureGym.Member.get_CompoundMemberId [method]: unit -> string
PureGym.Member.get_DateOfBirth [method]: unit -> System.DateOnly PureGym.Member.get_DateOfBirth [method]: unit -> System.DateOnly
@@ -205,7 +192,6 @@ PureGym.Member.SuspendedReason [property]: [read-only] int
PureGym.MemberActivityDto inherit obj, implements PureGym.MemberActivityDto System.IEquatable, System.Collections.IStructuralEquatable, PureGym.MemberActivityDto System.IComparable, System.IComparable, System.Collections.IStructuralComparable PureGym.MemberActivityDto inherit obj, implements PureGym.MemberActivityDto System.IEquatable, System.Collections.IStructuralEquatable, PureGym.MemberActivityDto System.IComparable, System.IComparable, System.Collections.IStructuralComparable
PureGym.MemberActivityDto..ctor [constructor]: (int, int, int, int, bool, System.DateTime) PureGym.MemberActivityDto..ctor [constructor]: (int, int, int, int, bool, System.DateTime)
PureGym.MemberActivityDto.AverageDuration [property]: [read-only] int PureGym.MemberActivityDto.AverageDuration [property]: [read-only] int
PureGym.MemberActivityDto.Equals [method]: (PureGym.MemberActivityDto, System.Collections.IEqualityComparer) -> bool
PureGym.MemberActivityDto.get_AverageDuration [method]: unit -> int PureGym.MemberActivityDto.get_AverageDuration [method]: unit -> int
PureGym.MemberActivityDto.get_IsEstimated [method]: unit -> bool PureGym.MemberActivityDto.get_IsEstimated [method]: unit -> bool
PureGym.MemberActivityDto.get_LastRefreshed [method]: unit -> System.DateTime PureGym.MemberActivityDto.get_LastRefreshed [method]: unit -> System.DateTime
@@ -223,7 +209,6 @@ PureGym.MemberActivityDtoModule.jsonParse [static method]: System.Text.Json.Node
PureGym.MemberActivityThisMonth inherit obj, implements PureGym.MemberActivityThisMonth System.IEquatable, System.Collections.IStructuralEquatable, PureGym.MemberActivityThisMonth System.IComparable, System.IComparable, System.Collections.IStructuralComparable PureGym.MemberActivityThisMonth inherit obj, implements PureGym.MemberActivityThisMonth System.IEquatable, System.Collections.IStructuralEquatable, PureGym.MemberActivityThisMonth System.IComparable, System.IComparable, System.Collections.IStructuralComparable
PureGym.MemberActivityThisMonth..ctor [constructor]: (int, int, int, int, bool, System.DateTime) PureGym.MemberActivityThisMonth..ctor [constructor]: (int, int, int, int, bool, System.DateTime)
PureGym.MemberActivityThisMonth.AverageDurationMinutes [property]: [read-only] int PureGym.MemberActivityThisMonth.AverageDurationMinutes [property]: [read-only] int
PureGym.MemberActivityThisMonth.Equals [method]: (PureGym.MemberActivityThisMonth, System.Collections.IEqualityComparer) -> bool
PureGym.MemberActivityThisMonth.get_AverageDurationMinutes [method]: unit -> int PureGym.MemberActivityThisMonth.get_AverageDurationMinutes [method]: unit -> int
PureGym.MemberActivityThisMonth.get_IsEstimated [method]: unit -> bool PureGym.MemberActivityThisMonth.get_IsEstimated [method]: unit -> bool
PureGym.MemberActivityThisMonth.get_LastRefreshed [method]: unit -> System.DateTime PureGym.MemberActivityThisMonth.get_LastRefreshed [method]: unit -> System.DateTime
@@ -237,11 +222,8 @@ PureGym.MemberActivityThisMonth.TotalDurationMinutes [property]: [read-only] int
PureGym.MemberActivityThisMonth.TotalVisits [property]: [read-only] int PureGym.MemberActivityThisMonth.TotalVisits [property]: [read-only] int
PureGym.MemberModule inherit obj PureGym.MemberModule inherit obj
PureGym.MemberModule.jsonParse [static method]: System.Text.Json.Nodes.JsonNode -> PureGym.Member PureGym.MemberModule.jsonParse [static method]: System.Text.Json.Nodes.JsonNode -> PureGym.Member
PureGym.PureGymApiModule inherit obj
PureGym.PureGymApiModule.make [static method]: (unit -> string) -> System.Net.Http.HttpClient -> PureGym.IPureGymApi
PureGym.Sessions inherit obj, implements PureGym.Sessions System.IEquatable, System.Collections.IStructuralEquatable, PureGym.Sessions System.IComparable, System.IComparable, System.Collections.IStructuralComparable PureGym.Sessions inherit obj, implements PureGym.Sessions System.IEquatable, System.Collections.IStructuralEquatable, PureGym.Sessions System.IComparable, System.IComparable, System.Collections.IStructuralComparable
PureGym.Sessions..ctor [constructor]: (PureGym.SessionsSummary, PureGym.Visit list) PureGym.Sessions..ctor [constructor]: (PureGym.SessionsSummary, PureGym.Visit list)
PureGym.Sessions.Equals [method]: (PureGym.Sessions, System.Collections.IEqualityComparer) -> bool
PureGym.Sessions.get_Summary [method]: unit -> PureGym.SessionsSummary PureGym.Sessions.get_Summary [method]: unit -> PureGym.SessionsSummary
PureGym.Sessions.get_Visits [method]: unit -> PureGym.Visit list PureGym.Sessions.get_Visits [method]: unit -> PureGym.Visit list
PureGym.Sessions.Summary [property]: [read-only] PureGym.SessionsSummary PureGym.Sessions.Summary [property]: [read-only] PureGym.SessionsSummary
@@ -250,7 +232,6 @@ PureGym.SessionsAggregate inherit obj, implements PureGym.SessionsAggregate Syst
PureGym.SessionsAggregate..ctor [constructor]: (int, int, int) PureGym.SessionsAggregate..ctor [constructor]: (int, int, int)
PureGym.SessionsAggregate.Activities [property]: [read-only] int PureGym.SessionsAggregate.Activities [property]: [read-only] int
PureGym.SessionsAggregate.Duration [property]: [read-only] int PureGym.SessionsAggregate.Duration [property]: [read-only] int
PureGym.SessionsAggregate.Equals [method]: (PureGym.SessionsAggregate, System.Collections.IEqualityComparer) -> bool
PureGym.SessionsAggregate.get_Activities [method]: unit -> int PureGym.SessionsAggregate.get_Activities [method]: unit -> int
PureGym.SessionsAggregate.get_Duration [method]: unit -> int PureGym.SessionsAggregate.get_Duration [method]: unit -> int
PureGym.SessionsAggregate.get_Visits [method]: unit -> int PureGym.SessionsAggregate.get_Visits [method]: unit -> int
@@ -261,7 +242,6 @@ PureGym.SessionsModule inherit obj
PureGym.SessionsModule.jsonParse [static method]: System.Text.Json.Nodes.JsonNode -> PureGym.Sessions PureGym.SessionsModule.jsonParse [static method]: System.Text.Json.Nodes.JsonNode -> PureGym.Sessions
PureGym.SessionsSummary inherit obj, implements PureGym.SessionsSummary System.IEquatable, System.Collections.IStructuralEquatable, PureGym.SessionsSummary System.IComparable, System.IComparable, System.Collections.IStructuralComparable PureGym.SessionsSummary inherit obj, implements PureGym.SessionsSummary System.IEquatable, System.Collections.IStructuralEquatable, PureGym.SessionsSummary System.IComparable, System.IComparable, System.Collections.IStructuralComparable
PureGym.SessionsSummary..ctor [constructor]: (PureGym.SessionsAggregate, PureGym.SessionsAggregate) PureGym.SessionsSummary..ctor [constructor]: (PureGym.SessionsAggregate, PureGym.SessionsAggregate)
PureGym.SessionsSummary.Equals [method]: (PureGym.SessionsSummary, System.Collections.IEqualityComparer) -> bool
PureGym.SessionsSummary.get_ThisWeek [method]: unit -> PureGym.SessionsAggregate PureGym.SessionsSummary.get_ThisWeek [method]: unit -> PureGym.SessionsAggregate
PureGym.SessionsSummary.get_Total [method]: unit -> PureGym.SessionsAggregate PureGym.SessionsSummary.get_Total [method]: unit -> PureGym.SessionsAggregate
PureGym.SessionsSummary.ThisWeek [property]: [read-only] PureGym.SessionsAggregate PureGym.SessionsSummary.ThisWeek [property]: [read-only] PureGym.SessionsAggregate
@@ -270,7 +250,6 @@ PureGym.SessionsSummaryModule inherit obj
PureGym.SessionsSummaryModule.jsonParse [static method]: System.Text.Json.Nodes.JsonNode -> PureGym.SessionsSummary PureGym.SessionsSummaryModule.jsonParse [static method]: System.Text.Json.Nodes.JsonNode -> PureGym.SessionsSummary
PureGym.UsernamePin inherit obj, implements PureGym.UsernamePin System.IEquatable, System.Collections.IStructuralEquatable, PureGym.UsernamePin System.IComparable, System.IComparable, System.Collections.IStructuralComparable PureGym.UsernamePin inherit obj, implements PureGym.UsernamePin System.IEquatable, System.Collections.IStructuralEquatable, PureGym.UsernamePin System.IComparable, System.IComparable, System.Collections.IStructuralComparable
PureGym.UsernamePin..ctor [constructor]: (string, string) PureGym.UsernamePin..ctor [constructor]: (string, string)
PureGym.UsernamePin.Equals [method]: (PureGym.UsernamePin, System.Collections.IEqualityComparer) -> bool
PureGym.UsernamePin.get_Pin [method]: unit -> string PureGym.UsernamePin.get_Pin [method]: unit -> string
PureGym.UsernamePin.get_Username [method]: unit -> string PureGym.UsernamePin.get_Username [method]: unit -> string
PureGym.UsernamePin.Pin [property]: [read-only] string PureGym.UsernamePin.Pin [property]: [read-only] string
@@ -278,7 +257,6 @@ PureGym.UsernamePin.Username [property]: [read-only] string
PureGym.Visit inherit obj, implements PureGym.Visit System.IEquatable, System.Collections.IStructuralEquatable, PureGym.Visit System.IComparable, System.IComparable, System.Collections.IStructuralComparable PureGym.Visit inherit obj, implements PureGym.Visit System.IEquatable, System.Collections.IStructuralEquatable, PureGym.Visit System.IComparable, System.IComparable, System.Collections.IStructuralComparable
PureGym.Visit..ctor [constructor]: (bool, System.DateTime, int, PureGym.VisitGym) PureGym.Visit..ctor [constructor]: (bool, System.DateTime, int, PureGym.VisitGym)
PureGym.Visit.Duration [property]: [read-only] int PureGym.Visit.Duration [property]: [read-only] int
PureGym.Visit.Equals [method]: (PureGym.Visit, System.Collections.IEqualityComparer) -> bool
PureGym.Visit.get_Duration [method]: unit -> int PureGym.Visit.get_Duration [method]: unit -> int
PureGym.Visit.get_Gym [method]: unit -> PureGym.VisitGym PureGym.Visit.get_Gym [method]: unit -> PureGym.VisitGym
PureGym.Visit.get_IsDurationEstimated [method]: unit -> bool PureGym.Visit.get_IsDurationEstimated [method]: unit -> bool
@@ -288,7 +266,6 @@ PureGym.Visit.IsDurationEstimated [property]: [read-only] bool
PureGym.Visit.StartTime [property]: [read-only] System.DateTime PureGym.Visit.StartTime [property]: [read-only] System.DateTime
PureGym.VisitGym inherit obj, implements PureGym.VisitGym System.IEquatable, System.Collections.IStructuralEquatable, PureGym.VisitGym System.IComparable, System.IComparable, System.Collections.IStructuralComparable PureGym.VisitGym inherit obj, implements PureGym.VisitGym System.IEquatable, System.Collections.IStructuralEquatable, PureGym.VisitGym System.IComparable, System.IComparable, System.Collections.IStructuralComparable
PureGym.VisitGym..ctor [constructor]: (int, string, string) PureGym.VisitGym..ctor [constructor]: (int, string, string)
PureGym.VisitGym.Equals [method]: (PureGym.VisitGym, System.Collections.IEqualityComparer) -> bool
PureGym.VisitGym.get_Id [method]: unit -> int PureGym.VisitGym.get_Id [method]: unit -> int
PureGym.VisitGym.get_Name [method]: unit -> string PureGym.VisitGym.get_Name [method]: unit -> string
PureGym.VisitGym.get_Status [method]: unit -> string PureGym.VisitGym.get_Status [method]: unit -> string

View File

@@ -1,7 +1,7 @@
{ {
"version": "6.0", "version": "3.0",
"publicReleaseRefSpec": [ "publicReleaseRefSpec": [
"^refs/heads/main$" "^refs/heads/main$"
], ],
"pathFilters": null "pathFilters": null
} }

13
flake.lock generated
View File

@@ -5,11 +5,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1694529238,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -20,16 +20,15 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1757068644, "lastModified": 1696981262,
"narHash": "sha256-NOrUtIhTkIIumj1E/Rsv1J37Yi3xGStISEo8tZm3KW4=", "narHash": "sha256-YaCOjdqhbjBeyMjxlgFWt4XD/b9pGKWURgS3uEwNLtc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8eb28adfa3dc4de28e792e3bf49fcf9007ca8ac9", "rev": "a2b87a4f66f309d2f4b789fd0457f5fc5db0a9a6",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View File

@@ -1,12 +1,12 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs";
flake-utils = { flake-utils = {
url = "github:numtide/flake-utils"; url = "github:numtide/flake-utils";
}; };
}; };
outputs = { outputs = inputs @ {
self, self,
nixpkgs, nixpkgs,
flake-utils, flake-utils,
@@ -14,14 +14,13 @@
}: }:
flake-utils.lib.eachDefaultSystem (system: let flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
deps = builtins.fromJSON (builtins.readFile ./nix/deps.json);
projectFile = "./PureGym.App/PureGym.App.fsproj"; projectFile = "./PureGym.App/PureGym.App.fsproj";
testProjectFile = "./PureGym.Test/PureGym.Test.fsproj"; testProjectFile = "./PureGym.Test/PureGym.Test.fsproj";
pname = "puregym"; pname = "puregym";
dotnet-sdk = pkgs.dotnetCorePackages.sdk_9_0; dotnet-sdk = pkgs.dotnet-sdk_8;
dotnet-runtime = pkgs.dotnetCorePackages.runtime_9_0; dotnet-runtime = pkgs.dotnetCorePackages.runtime_8_0;
version = "0.1"; version = "0.1";
dotnetTool = dllOverride: toolName: toolVersion: hash: dotnetTool = toolName: toolVersion: sha256:
pkgs.stdenvNoCC.mkDerivation rec { pkgs.stdenvNoCC.mkDerivation rec {
name = toolName; name = toolName;
version = toolVersion; version = toolVersion;
@@ -29,32 +28,49 @@
src = pkgs.fetchNuGet { src = pkgs.fetchNuGet {
pname = name; pname = name;
version = version; version = version;
hash = hash; sha256 = sha256;
installPhase = ''mkdir -p $out/bin && cp -r tools/*/any/* $out/bin''; installPhase = ''mkdir -p $out/bin && cp -r tools/net6.0/any/* $out/bin'';
}; };
installPhase = let installPhase = ''
dll =
if isNull dllOverride
then name
else dllOverride;
in ''
runHook preInstall runHook preInstall
mkdir -p "$out/lib" mkdir -p "$out/lib"
cp -r ./bin/* "$out/lib" cp -r ./bin/* "$out/lib"
makeWrapper "${dotnet-runtime}/bin/dotnet" "$out/bin/${name}" --set DOTNET_HOST_PATH "${dotnet-sdk}/bin/dotnet" --add-flags "$out/lib/${dll}.dll" makeWrapper "${dotnet-runtime}/bin/dotnet" "$out/bin/${name}" --add-flags "$out/lib/${name}.dll"
runHook postInstall runHook postInstall
''; '';
}; };
fantomas = dotnetTool null "fantomas" (builtins.fromJSON (builtins.readFile ./.config/dotnet-tools.json)).tools.fantomas.version (builtins.head (builtins.filter (elem: elem.pname == "fantomas") deps)).hash; fantomas = dotnetTool "fantomas" (builtins.fromJSON (builtins.readFile ./.config/dotnet-tools.json)).tools.fantomas.version "sha256-83RodORaC3rkYfbFMHsYLEtl0+8+akZXcKoSJdgwuUo=";
in { in {
packages = { packages = {
fantomas = fantomas; fantomas = fantomas;
fetchDeps = let
flags = [];
runtimeIds = ["win-x64"] ++ map (system: pkgs.dotnetCorePackages.systemToDotnetRid system) dotnet-sdk.meta.platforms;
in
pkgs.writeShellScriptBin "fetch-${pname}-deps" (builtins.readFile (pkgs.substituteAll {
src = ./nix/fetchDeps.sh;
pname = pname;
binPath = pkgs.lib.makeBinPath [pkgs.coreutils dotnet-sdk (pkgs.nuget-to-nix.override {inherit dotnet-sdk;})];
projectFiles = toString (pkgs.lib.toList projectFile);
testProjectFiles = toString (pkgs.lib.toList testProjectFile);
rids = pkgs.lib.concatStringsSep "\" \"" runtimeIds;
packages = dotnet-sdk.packages;
storeSrc = pkgs.srcOnly {
src = ./.;
pname = pname;
version = version;
};
}));
default = pkgs.buildDotnetModule { default = pkgs.buildDotnetModule {
inherit pname version projectFile testProjectFile dotnet-sdk dotnet-runtime; pname = pname;
name = "puregym"; name = "puregym";
version = version;
src = ./.; src = ./.;
nugetDeps = ./nix/deps.json; # `nix build .#default.fetch-deps && ./result nix/deps.json` and put the result here projectFile = projectFile;
nugetDeps = ./nix/deps.nix;
doCheck = true; doCheck = true;
dotnet-sdk = dotnet-sdk;
dotnet-runtime = dotnet-runtime;
}; };
}; };
apps = { apps = {
@@ -64,7 +80,13 @@
}; };
}; };
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = [pkgs.alejandra dotnet-sdk pkgs.python3 pkgs.nodePackages.markdown-link-check]; buildInputs =
[pkgs.alejandra pkgs.dotnet-sdk_8 pkgs.python3 pkgs.nodePackages.markdown-link-check]
++ (
if pkgs.stdenv.isDarwin
then [pkgs.darwin.apple_sdk.frameworks.CoreServices]
else []
);
}; };
checks = { checks = {
alejandra = pkgs.stdenvNoCC.mkDerivation { alejandra = pkgs.stdenvNoCC.mkDerivation {

View File

@@ -1,377 +0,0 @@
[
{
"pname": "ApiSurface",
"version": "5.0.1",
"hash": "sha256-0GMXEMFgWbbE2OGxW+6h4zGgQHg+IZy1aI13Dn97xSU="
},
{
"pname": "Argu",
"version": "6.2.5",
"hash": "sha256-5HcZcvco4e8+hgLhzlxk7ZmFVLtZL9LVr7LbmXsLmNU="
},
{
"pname": "fantomas",
"version": "6.3.15",
"hash": "sha256-Gjw7MxjUNckMWSfnOye4UTe5fZWnor6RHCls3PNsuG8="
},
{
"pname": "Fantomas.Core",
"version": "6.1.1",
"hash": "sha256-FcTLHQFvKkQY/kV08jhhy/St/+FmXpp3epp/R3zUXMA="
},
{
"pname": "Fantomas.FCS",
"version": "6.1.1",
"hash": "sha256-NuZ8msPEHYA8T3EYREB28F1RcNgUU8V54eg2+UttYxw="
},
{
"pname": "Fastenshtein",
"version": "1.0.10",
"hash": "sha256-9qE1zKJhfRvx7X/66MAk2+F7pwrd/2EKKl7r5qjTPCk="
},
{
"pname": "FsCheck",
"version": "3.3.1",
"hash": "sha256-k65ksdOSOGz+meRUUND+yuqJtm5ChaKuaxmRIdKzx2Y="
},
{
"pname": "FSharp.Core",
"version": "6.0.1",
"hash": "sha256-Ehsgt3nCJijpaVuJguC1TPVEKSkJd6PSc07D2ZQSemI="
},
{
"pname": "FsUnit",
"version": "7.1.0",
"hash": "sha256-HHuIEocJrm6PSiTJeMWaYDsPYow8A/NFthU7sgB88sk="
},
{
"pname": "Microsoft.ApplicationInsights",
"version": "2.23.0",
"hash": "sha256-5sf3bg7CZZjHseK+F3foOchEhmVeioePxMZVvS6Rjb0="
},
{
"pname": "Microsoft.AspNetCore.App.Ref",
"version": "6.0.36",
"hash": "sha256-9jDkWbjw/nd8yqdzVTagCuqr6owJ/DUMi4BlUZT4hWU="
},
{
"pname": "Microsoft.AspNetCore.App.Runtime.linux-arm64",
"version": "6.0.36",
"hash": "sha256-JQULJyF0ivLoUU1JaFfK/HHg+/qzpN7V2RR2Cc+WlQ4="
},
{
"pname": "Microsoft.AspNetCore.App.Runtime.linux-x64",
"version": "6.0.36",
"hash": "sha256-zUsVIpV481vMLAXaLEEUpEMA9/f1HGOnvaQnaWdzlyY="
},
{
"pname": "Microsoft.AspNetCore.App.Runtime.osx-arm64",
"version": "6.0.36",
"hash": "sha256-2seqZcz0JeUjkzh3QcGa9TcJ4LUafpFjTRk+Nm8T6T0="
},
{
"pname": "Microsoft.AspNetCore.App.Runtime.osx-x64",
"version": "6.0.36",
"hash": "sha256-yxLafxiBKkvfkDggPk0P9YZIHBkDJOsFTO7/V9mEHuU="
},
{
"pname": "Microsoft.CodeCoverage",
"version": "17.14.1",
"hash": "sha256-f8QytG8GvRoP47rO2KEmnDLxIpyesaq26TFjDdW40Gs="
},
{
"pname": "Microsoft.NET.Test.Sdk",
"version": "17.14.1",
"hash": "sha256-mZUzDFvFp7x1nKrcnRd0hhbNu5g8EQYt8SKnRgdhT/A="
},
{
"pname": "Microsoft.NETCore.App.Host.linux-arm64",
"version": "6.0.36",
"hash": "sha256-9lC/LYnthYhjkWWz2kkFCvlA5LJOv11jdt59SDnpdy0="
},
{
"pname": "Microsoft.NETCore.App.Host.linux-x64",
"version": "6.0.36",
"hash": "sha256-VFRDzx7LJuvI5yzKdGmw/31NYVbwHWPKQvueQt5xc10="
},
{
"pname": "Microsoft.NETCore.App.Host.osx-arm64",
"version": "6.0.36",
"hash": "sha256-DaSWwYACJGolEBuMhzDVCj/rQTdDt061xCVi+gyQnuo="
},
{
"pname": "Microsoft.NETCore.App.Host.osx-x64",
"version": "6.0.36",
"hash": "sha256-FrRny9EI6HKCKQbu6mcLj5w4ooSRrODD4Vj2ZMGnMd4="
},
{
"pname": "Microsoft.NETCore.App.Ref",
"version": "6.0.36",
"hash": "sha256-9LZgVoIFF8qNyUu8kdJrYGLutMF/cL2K82HN2ywwlx8="
},
{
"pname": "Microsoft.NETCore.App.Runtime.linux-arm64",
"version": "6.0.36",
"hash": "sha256-k3rxvUhCEU0pVH8KgEMtkPiSOibn+nBh+0zT2xIfId8="
},
{
"pname": "Microsoft.NETCore.App.Runtime.linux-x64",
"version": "6.0.36",
"hash": "sha256-U8wJ2snSDFqeAgDVLXjnniidC7Cr5aJ1/h/BMSlyu0c="
},
{
"pname": "Microsoft.NETCore.App.Runtime.osx-arm64",
"version": "6.0.36",
"hash": "sha256-UfLcrL2Gj/OLz0s92Oo+OCJeDpZFAcQLPLiSNND8D5Y="
},
{
"pname": "Microsoft.NETCore.App.Runtime.osx-x64",
"version": "6.0.36",
"hash": "sha256-0xIJYFzxdMcnCj3wzkFRQZSnQcPHzPHMzePRIOA3oJs="
},
{
"pname": "Microsoft.NETCore.Platforms",
"version": "1.1.0",
"hash": "sha256-FeM40ktcObQJk4nMYShB61H/E8B7tIKfl9ObJ0IOcCM="
},
{
"pname": "Microsoft.NETCore.Platforms",
"version": "1.1.1",
"hash": "sha256-8hLiUKvy/YirCWlFwzdejD2Db3DaXhHxT7GSZx/znJg="
},
{
"pname": "Microsoft.NETCore.Targets",
"version": "1.1.0",
"hash": "sha256-0AqQ2gMS8iNlYkrD+BxtIg7cXMnr9xZHtKAuN4bjfaQ="
},
{
"pname": "Microsoft.NETCore.Targets",
"version": "1.1.3",
"hash": "sha256-WLsf1NuUfRWyr7C7Rl9jiua9jximnVvzy6nk2D2bVRc="
},
{
"pname": "Microsoft.Testing.Extensions.Telemetry",
"version": "1.7.3",
"hash": "sha256-Z6WsY2FCUbNnT5HJd7IOrfOvqknVXp6PWzTVeb0idVg="
},
{
"pname": "Microsoft.Testing.Extensions.TrxReport.Abstractions",
"version": "1.7.3",
"hash": "sha256-PTee04FHyTHx/gF5NLckXuVje807G51MzkPrZ1gkgCw="
},
{
"pname": "Microsoft.Testing.Extensions.VSTestBridge",
"version": "1.7.3",
"hash": "sha256-8d+wZmucfSO7PsviHjVxYB4q6NcjgxvnCUpLePq35sM="
},
{
"pname": "Microsoft.Testing.Platform",
"version": "1.7.3",
"hash": "sha256-cavX11P5o9rooqC3ZHw5h002OKRg2ZNR/VaRwpNTQYA="
},
{
"pname": "Microsoft.Testing.Platform.MSBuild",
"version": "1.7.3",
"hash": "sha256-cREl529UQ/c5atT8KimMgrgNdy6MrAd0sBGT8sXRRPM="
},
{
"pname": "Microsoft.TestPlatform.AdapterUtilities",
"version": "17.13.0",
"hash": "sha256-Vr+3Tad/h/nk7f/5HMExn3HvCGFCarehFAzJSfCBaOc="
},
{
"pname": "Microsoft.TestPlatform.ObjectModel",
"version": "17.13.0",
"hash": "sha256-6S0fjfj8vA+h6dJVNwLi6oZhYDO/I/6hBZaq2VTW+Uk="
},
{
"pname": "Microsoft.TestPlatform.ObjectModel",
"version": "17.14.1",
"hash": "sha256-QMf6O+w0IT+16Mrzo7wn+N20f3L1/mDhs/qjmEo1rYs="
},
{
"pname": "Microsoft.TestPlatform.TestHost",
"version": "17.14.1",
"hash": "sha256-1cxHWcvHRD7orQ3EEEPPxVGEkTpxom1/zoICC9SInJs="
},
{
"pname": "Myriad.Core",
"version": "0.8.3",
"hash": "sha256-vBOxfq8QriX/yUtaXN69rEQaY/psRNJWxqATLidrt2g="
},
{
"pname": "Myriad.Sdk",
"version": "0.8.3",
"hash": "sha256-7O397WKhskKOvE3MkJT37BvxorDWngDR6gTUogtDZ2M="
},
{
"pname": "Newtonsoft.Json",
"version": "13.0.1",
"hash": "sha256-K2tSVW4n4beRPzPu3rlVaBEMdGvWSv/3Q1fxaDh4Mjo="
},
{
"pname": "Newtonsoft.Json",
"version": "13.0.3",
"hash": "sha256-hy/BieY4qxBWVVsDqqOPaLy1QobiIapkbrESm6v2PHc="
},
{
"pname": "NuGet.Common",
"version": "6.14.0",
"hash": "sha256-jDOwt3veI1GSG8CfBnf2+dJxD3E/Nmlc+vHtD4J76Ms="
},
{
"pname": "NuGet.Configuration",
"version": "6.14.0",
"hash": "sha256-1PN9s6fhCw3wd2260U6hQ4vG3jIvcG8GIn1oQgxMXA0="
},
{
"pname": "NuGet.Frameworks",
"version": "6.14.0",
"hash": "sha256-3ViM3R1ucQMEL2hQYsivT86kI6veMQK2xDsiAcFcVQk="
},
{
"pname": "NuGet.Packaging",
"version": "6.14.0",
"hash": "sha256-Yafbnxs3maj55bJ1oKQiZ0QkntFUzXdhorL94YEUOhY="
},
{
"pname": "NuGet.Protocol",
"version": "6.14.0",
"hash": "sha256-uLDKfs+QN1MdnuQtTES8qfNzzsmYKM6XB9pwJc4G+eo="
},
{
"pname": "NuGet.Versioning",
"version": "6.14.0",
"hash": "sha256-DqdOJgsphKxSvqB8b60zNPCaiLfbiu3WnUJ/90feLrY="
},
{
"pname": "NUnit",
"version": "4.4.0",
"hash": "sha256-5geF5QOF+X/WkuCEgkPVKH4AdKx4U0olpU07S8+G3nU="
},
{
"pname": "NUnit3TestAdapter",
"version": "5.1.0",
"hash": "sha256-5z470sFjV67wGHaw8KfmSloIAYe81Dokp0f8I6zXsDc="
},
{
"pname": "RestEase",
"version": "1.6.4",
"hash": "sha256-FFmqFwlHhIln46k56Z8KM1G+xuPEh/bceKCQnJcdcdc="
},
{
"pname": "runtime.any.System.Runtime",
"version": "4.3.0",
"hash": "sha256-qwhNXBaJ1DtDkuRacgHwnZmOZ1u9q7N8j0cWOLYOELM="
},
{
"pname": "runtime.native.System",
"version": "4.3.0",
"hash": "sha256-ZBZaodnjvLXATWpXXakFgcy6P+gjhshFXmglrL5xD5Y="
},
{
"pname": "runtime.unix.System.Private.Uri",
"version": "4.3.0",
"hash": "sha256-c5tXWhE/fYbJVl9rXs0uHh3pTsg44YD1dJvyOA0WoMs="
},
{
"pname": "System.Collections.Immutable",
"version": "8.0.0",
"hash": "sha256-F7OVjKNwpqbUh8lTidbqJWYi476nsq9n+6k0+QVRo3w="
},
{
"pname": "System.Configuration.ConfigurationManager",
"version": "4.4.0",
"hash": "sha256-+8wGYllXnIxRzy9dLhZFB88GoPj8ivYXS0KUfcivT8I="
},
{
"pname": "System.Diagnostics.DiagnosticSource",
"version": "5.0.0",
"hash": "sha256-6mW3N6FvcdNH/pB58pl+pFSCGWgyaP4hfVtC/SMWDV4="
},
{
"pname": "System.Diagnostics.DiagnosticSource",
"version": "7.0.0",
"hash": "sha256-9Wk8cHSkjKtqkN6xW7KnXoQVtF/VNbKeBq79WqDesMs="
},
{
"pname": "System.Formats.Asn1",
"version": "6.0.0",
"hash": "sha256-KaMHgIRBF7Nf3VwOo+gJS1DcD+41cJDPWFh+TDQ8ee8="
},
{
"pname": "System.Memory",
"version": "4.5.5",
"hash": "sha256-EPQ9o1Kin7KzGI5O3U3PUQAZTItSbk9h/i4rViN3WiI="
},
{
"pname": "System.Private.Uri",
"version": "4.3.0",
"hash": "sha256-fVfgcoP4AVN1E5wHZbKBIOPYZ/xBeSIdsNF+bdukIRM="
},
{
"pname": "System.Reflection.Metadata",
"version": "8.0.0",
"hash": "sha256-dQGC30JauIDWNWXMrSNOJncVa1umR1sijazYwUDdSIE="
},
{
"pname": "System.Runtime",
"version": "4.3.1",
"hash": "sha256-R9T68AzS1PJJ7v6ARz9vo88pKL1dWqLOANg4pkQjkA0="
},
{
"pname": "System.Runtime.CompilerServices.Unsafe",
"version": "6.0.0",
"hash": "sha256-bEG1PnDp7uKYz/OgLOWs3RWwQSVYm+AnPwVmAmcgp2I="
},
{
"pname": "System.Security.Cryptography.Pkcs",
"version": "6.0.4",
"hash": "sha256-2e0aRybote+OR66bHaNiYpF//4fCiaO3zbR2e9GABUI="
},
{
"pname": "System.Security.Cryptography.ProtectedData",
"version": "4.4.0",
"hash": "sha256-Ri53QmFX8I8UH0x4PikQ1ZA07ZSnBUXStd5rBfGWFOE="
},
{
"pname": "System.Text.Encodings.Web",
"version": "8.0.0",
"hash": "sha256-IUQkQkV9po1LC0QsqrilqwNzPvnc+4eVvq+hCvq8fvE="
},
{
"pname": "System.Text.Json",
"version": "8.0.0",
"hash": "sha256-XFcCHMW1u2/WujlWNHaIWkbW1wn8W4kI0QdrwPtWmow="
},
{
"pname": "System.Text.Json",
"version": "8.0.5",
"hash": "sha256-yKxo54w5odWT6nPruUVsaX53oPRe+gKzGvLnnxtwP68="
},
{
"pname": "System.Text.Json",
"version": "9.0.0",
"hash": "sha256-aM5Dh4okLnDv940zmoFAzRmqZre83uQBtGOImJpoIqk="
},
{
"pname": "TypeEquality",
"version": "0.3.0",
"hash": "sha256-V50xAOzzyUJrY+MYPRxtnqW5MVeATXCes89wPprv1r4="
},
{
"pname": "WoofWare.Myriad.Plugins",
"version": "4.0.9",
"hash": "sha256-VWpStkuvdFZWsEs/tC0mjChneFgxWw+1YETH+3aCoz4="
},
{
"pname": "WoofWare.Myriad.Plugins.Attributes",
"version": "3.6.6",
"hash": "sha256-68T5JQNp4V0DDad0I3snVh8BCe7rz11mLyvm60hxwaA="
},
{
"pname": "WoofWare.Whippet.Fantomas",
"version": "0.3.1",
"hash": "sha256-i5oiqcrxzM90Ocuq5MIu2Ha5lV0aYu5nCvuwmFqp6NA="
}
]

444
nix/deps.nix Normal file
View File

@@ -0,0 +1,444 @@
# This file was automatically generated by passthru.fetch-deps.
# Please don't edit it manually, your changes might get overwritten!
{fetchNuGet}: [
(fetchNuGet {
pname = "fantomas";
version = "6.2.0";
sha256 = "sha256-83RodORaC3rkYfbFMHsYLEtl0+8+akZXcKoSJdgwuUo=";
})
(fetchNuGet {
pname = "ApiSurface";
version = "4.0.12";
sha256 = "0v56sv4cz8bgrfqjjg0q96619qs9dvvi0a6lp7hzz2mi82i1inmq";
})
(fetchNuGet {
pname = "Argu";
version = "6.1.1";
sha256 = "1v996g0760qhiys2ahdpnvkldaxr2jn5f1falf789glnk4a6f3xl";
})
(fetchNuGet {
pname = "coverlet.collector";
version = "3.2.0";
sha256 = "1qxpv8v10p5wn162lzdm193gdl6c5f81zadj8h889dprlnj3g8yr";
})
(fetchNuGet {
pname = "Fantomas.Core";
version = "6.1.1";
sha256 = "1h2wsiy4fzwsg9vrlpk6w7zsvx6bc4wg4x25zqc48akg04fwpi0m";
})
(fetchNuGet {
pname = "Fantomas.FCS";
version = "6.1.1";
sha256 = "0733dm5zjdp8w5wwalqlv1q52pghfr04863i9wy807f4qfd7rrin";
})
(fetchNuGet {
pname = "Fastenshtein";
version = "1.0.0.8";
sha256 = "1rvw27rz7qb2n68i0jvvcr224fcpy5yzzxaj1bp89jw41cpdabp2";
})
(fetchNuGet {
pname = "FsCheck";
version = "2.16.6";
sha256 = "176rwky6b5rk8dzldiz4068p7m9c5y9ygzbhadrs14jkl94pc56n";
})
(fetchNuGet {
pname = "FSharp.Core";
version = "6.0.1";
sha256 = "0qks2aadkhsffg9a6xq954ll9xacnph852avd7ljh9n2g6vj06qj";
})
(fetchNuGet {
pname = "FSharp.Core";
version = "8.0.100-beta.23418.2";
sha256 = "05wfbfqphk27qp1v8pmssl3fhs4yggyrmzvxwcx6m3xryix7bjkk";
})
(fetchNuGet {
pname = "FsUnit";
version = "5.6.1";
sha256 = "1zffn9dm2c44v8qjzwfg6y3psydiv2bn3n305rf7mc57cmm4ygv3";
})
(fetchNuGet {
pname = "Microsoft.AspNetCore.App.Ref";
version = "6.0.22";
sha256 = "0fqpl1fr213b4fb3c6xw3fy6669yxqcp1bzcnayw80yrskw8lpxs";
})
(fetchNuGet {
pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64";
version = "6.0.22";
sha256 = "1xvqqc7bzj764g3scp0saqxlfiv866crgi8chz57vhjp9sgd61jw";
})
(fetchNuGet {
pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64";
version = "8.0.0-rc.1.23421.29";
sha256 = "1sz6skh1ddvdcib8ydi6km593ah3cchgz2fs61kj03z6jg2vz9la";
})
(fetchNuGet {
pname = "Microsoft.AspNetCore.App.Runtime.linux-x64";
version = "6.0.22";
sha256 = "1gcv99y295fnhy12fyx8wqvbhbj6mz8p5bm66ppwdxb3zykjg2l8";
})
(fetchNuGet {
pname = "Microsoft.AspNetCore.App.Runtime.linux-x64";
version = "8.0.0-rc.1.23421.29";
sha256 = "1m6a47bnrl8n9ahnh01mg2fkc20lmfjjg3f7xzbdngnikm6vzcxv";
})
(fetchNuGet {
pname = "Microsoft.AspNetCore.App.Runtime.osx-arm64";
version = "6.0.22";
sha256 = "1ib0x1w33wqy7lgzjf14dvgx981xpjffjqd800d7wgxisgmakrmr";
})
(fetchNuGet {
pname = "Microsoft.AspNetCore.App.Runtime.osx-arm64";
version = "8.0.0-rc.1.23421.29";
sha256 = "16vy79c7byrqwd9f7vm0xbah3k4y6yis0flm9jkfk0hp4bb0y0js";
})
(fetchNuGet {
pname = "Microsoft.AspNetCore.App.Runtime.osx-x64";
version = "6.0.22";
sha256 = "026r38a7by7wdfd3virjdaah3y2sjjmnabgf5l25vdnwpwc7c31d";
})
(fetchNuGet {
pname = "Microsoft.AspNetCore.App.Runtime.osx-x64";
version = "8.0.0-rc.1.23421.29";
sha256 = "0ygb60mpk1rkz67v1d9vf3f7zfvdzg5a4ckc1yqcfb2n4a64rdbv";
})
(fetchNuGet {
pname = "Microsoft.AspNetCore.App.Runtime.win-x64";
version = "6.0.22";
sha256 = "0ygdqsd312kqpykwb0k2942n45q1w3yn1nia6m1ahf7b74926qb5";
})
(fetchNuGet {
pname = "Microsoft.AspNetCore.App.Runtime.win-x64";
version = "8.0.0-rc.1.23421.29";
sha256 = "0cir3vy94ki9v0zzkm49f33mxmp25i2v0c3gp4fhmnhpsfn0x7rb";
})
(fetchNuGet {
pname = "Microsoft.CodeCoverage";
version = "17.6.0";
sha256 = "02s98d8nwz5mg4mymcr86qdamy71a29g2091xg452czmd3s3x2di";
})
(fetchNuGet {
pname = "Microsoft.NET.Test.Sdk";
version = "17.6.0";
sha256 = "1bnwpwg7k72z06027ip4yi222863r8sv14ck9nj8h64ckiw2r256";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Host.linux-arm64";
version = "6.0.22";
sha256 = "0gri1gqznm5c8fsb6spqb3j88a3b0br0iy50y66fh4hz9wc4fwzm";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Host.linux-arm64";
version = "8.0.0-rc.1.23419.4";
sha256 = "1254rvx06wjblf0y2msh1zdg0fky861l8x5f5w7hm5l14ys1firb";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Host.linux-x64";
version = "6.0.22";
sha256 = "0k1i74wn6j7nq0bd8m6jrpl65wda6qc9pglppvz4ybk0n2ab1rbi";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Host.linux-x64";
version = "8.0.0-rc.1.23419.4";
sha256 = "10kjms0wx5iialcvd0fp64vriv4cyk7k22wqh3km9mh43i620px7";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Host.osx-arm64";
version = "6.0.22";
sha256 = "0166gwarhhnary19lf80ff33bkx00mkm24f17bc8j6v7g3a7zvq6";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Host.osx-x64";
version = "6.0.22";
sha256 = "038bjwk201p2kzs3jflrkhlnszf7cwalafq0nvs2v8bp7jlnx5ib";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Host.osx-x64";
version = "8.0.0-rc.1.23419.4";
sha256 = "03sgkb2ar63wllisx8rmpc3yrngl61yhlmqinwbc5bhyaxpmqnk5";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Host.win-x64";
version = "6.0.22";
sha256 = "1bjy3zmrmaq97xp0f3nzs3ax330ji632avrfpg8xz4vc5p8s1xpc";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Host.win-x64";
version = "8.0.0-rc.1.23419.4";
sha256 = "0lnxq6risl59ig9svhra6papn0i9rs2pr4zgnysnbfg7gvd3fiwh";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Ref";
version = "6.0.22";
sha256 = "0km8184kma8kgz7iyl3j6apj1n7vskzdhzmq3myy3y36ysqrb4wf";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Runtime.linux-arm64";
version = "6.0.22";
sha256 = "01gbl9dgky4h7ijxryz3527l39v23lkcvk4fs4w91ra4pris2n8p";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Runtime.linux-arm64";
version = "8.0.0-rc.1.23419.4";
sha256 = "1x5pq1y4gn1gwnqmq9mj02wki5yncidlnmaf2przz8yingfw0hq6";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Runtime.linux-x64";
version = "6.0.22";
sha256 = "09gfqdxbh36bjx20fw9k94b9qa9bwffhrq0ldwn834mx31bgrfs8";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Runtime.linux-x64";
version = "8.0.0-rc.1.23419.4";
sha256 = "1arzm0mqdj0hnlsfcki8z3zbbp5mpv73133wc8yxpymh6f000bv2";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Runtime.osx-arm64";
version = "6.0.22";
sha256 = "1x7wclv93q8wp7rip5nwnsxbqcami92yilvzbp0yn42ddkw177ds";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Runtime.osx-arm64";
version = "8.0.0-rc.1.23419.4";
sha256 = "04k93say7b842bvh2x853skj5ymxsq3b11vf6rkfcqz6b7hvn7pj";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Runtime.osx-x64";
version = "6.0.22";
sha256 = "1sq1ygsrpv2sl85wrs8382wgkjic0zylaj1y8kcvhczcmkpk3wr5";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Runtime.osx-x64";
version = "8.0.0-rc.1.23419.4";
sha256 = "0f403j2sis8p7y1w2nkbp03xq8qq06f7q94d8clm9c98vppw75sj";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Runtime.win-x64";
version = "6.0.22";
sha256 = "1nn254xv1hi5c4rg38fbfkln3031vv545lv9f4df31i8c1yfzz24";
})
(fetchNuGet {
pname = "Microsoft.NETCore.App.Runtime.win-x64";
version = "8.0.0-rc.1.23419.4";
sha256 = "00whfl9s9qd43jv68rff5g6da0k6y11yc2pg6v681967fnq31jqp";
})
(fetchNuGet {
pname = "Microsoft.NETCore.Platforms";
version = "1.1.0";
sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm";
})
(fetchNuGet {
pname = "Microsoft.NETCore.Platforms";
version = "1.1.1";
sha256 = "164wycgng4mi9zqi2pnsf1pq6gccbqvw6ib916mqizgjmd8f44pj";
})
(fetchNuGet {
pname = "Microsoft.NETCore.Platforms";
version = "2.0.0";
sha256 = "1fk2fk2639i7nzy58m9dvpdnzql4vb8yl8vr19r2fp8lmj9w2jr0";
})
(fetchNuGet {
pname = "Microsoft.NETCore.Targets";
version = "1.1.3";
sha256 = "05smkcyxir59rgrmp7d6327vvrlacdgldfxhmyr1azclvga1zfsq";
})
(fetchNuGet {
pname = "Microsoft.TestPlatform.ObjectModel";
version = "17.6.0";
sha256 = "1rz22chnis11dwjrqrcvvmfw80fi2a7756a7ahwy6jlnr250zr61";
})
(fetchNuGet {
pname = "Microsoft.TestPlatform.TestHost";
version = "17.6.0";
sha256 = "16vpicp4q2kbpgr3qwpsxg7srabxqszx23x6smjvvrvz7qmr5v8i";
})
(fetchNuGet {
pname = "Myriad.Core";
version = "0.8.3";
sha256 = "0s5pdckjw4x0qrbd4i3cz9iili5cppg5qnjbr7zjbbhhmxzb24xw";
})
(fetchNuGet {
pname = "Myriad.Sdk";
version = "0.8.3";
sha256 = "0qv78c5s5m04xb8h17nnn2ig26zcyya91k2dpj745cm1cbnzvvgc";
})
(fetchNuGet {
pname = "NETStandard.Library";
version = "2.0.0";
sha256 = "1bc4ba8ahgk15m8k4nd7x406nhi0kwqzbgjk2dmw52ss553xz7iy";
})
(fetchNuGet {
pname = "Newtonsoft.Json";
version = "13.0.1";
sha256 = "0fijg0w6iwap8gvzyjnndds0q4b8anwxxvik7y8vgq97dram4srb";
})
(fetchNuGet {
pname = "NuGet.Common";
version = "6.6.1";
sha256 = "1q7k5rqwchxgs5pnrn22d1rkdb7l2qblvsb9hy046ll69i71vv45";
})
(fetchNuGet {
pname = "NuGet.Configuration";
version = "6.6.1";
sha256 = "0pw4ikd8784iya920wxigacqn5g2v0zlpwxjlswyq5mnj2ha7gpk";
})
(fetchNuGet {
pname = "NuGet.Frameworks";
version = "5.11.0";
sha256 = "0wv26gq39hfqw9md32amr5771s73f5zn1z9vs4y77cgynxr73s4z";
})
(fetchNuGet {
pname = "NuGet.Frameworks";
version = "6.6.1";
sha256 = "1zq79mklzq7qyiyhcv3w8pznw6rq1ddcl8fvy7j1c6n8qh3mglhx";
})
(fetchNuGet {
pname = "NuGet.Packaging";
version = "6.6.1";
sha256 = "1lmx8kgpg220q8kic4wm8skccj53cbkdqggirq9js34gnxxi9b88";
})
(fetchNuGet {
pname = "NuGet.Protocol";
version = "6.6.1";
sha256 = "01n8cw114npvzfk3m3803lb8plk0wm1zg496gpq9az8hw20nmd8g";
})
(fetchNuGet {
pname = "NuGet.Versioning";
version = "6.6.1";
sha256 = "0n2p05y8ciw6jc5s238rlnx6q4dgxvm14v06pcd84ji5j1iirc30";
})
(fetchNuGet {
pname = "NUnit";
version = "3.14.0";
sha256 = "19p8911lrfds1k9rv47jk1bbn665s0pvghkd06gzbg78j6mzzqqa";
})
(fetchNuGet {
pname = "NUnit.Analyzers";
version = "3.6.1";
sha256 = "16dw5375k2wyhiw9x387y7pjgq6zms30y036qb8z7idx4lxw9yi9";
})
(fetchNuGet {
pname = "NUnit3TestAdapter";
version = "4.4.2";
sha256 = "1n2jlc16vjdd81cb1by4qbp75sq73zsjz5w3zc61ssmbdci1q2ri";
})
(fetchNuGet {
pname = "RestEase";
version = "1.6.4";
sha256 = "1mvi3nbrr450g3fgd1y4wg3bwl9k1agyjfd9wdkqk12714bsln8l";
})
(fetchNuGet {
pname = "runtime.any.System.Runtime";
version = "4.3.0";
sha256 = "1cqh1sv3h5j7ixyb7axxbdkqx6cxy00p4np4j91kpm492rf4s25b";
})
(fetchNuGet {
pname = "runtime.native.System";
version = "4.3.0";
sha256 = "15hgf6zaq9b8br2wi1i3x0zvmk410nlmsmva9p0bbg73v6hml5k4";
})
(fetchNuGet {
pname = "runtime.unix.System.Private.Uri";
version = "4.3.0";
sha256 = "1jx02q6kiwlvfksq1q9qr17fj78y5v6mwsszav4qcz9z25d5g6vk";
})
(fetchNuGet {
pname = "System.Configuration.ConfigurationManager";
version = "4.4.0";
sha256 = "1hjgmz47v5229cbzd2pwz2h0dkq78lb2wp9grx8qr72pb5i0dk7v";
})
(fetchNuGet {
pname = "System.Diagnostics.DiagnosticSource";
version = "7.0.0";
sha256 = "1jxhvsh5mzdf0sgb4dfmbys1b12ylyr5pcfyj1map354fiq3qsgm";
})
(fetchNuGet {
pname = "System.Formats.Asn1";
version = "5.0.0";
sha256 = "1axc8z0839yvqi2cb63l73l6d9j6wd20lsbdymwddz9hvrsgfwpn";
})
(fetchNuGet {
pname = "System.IO.Abstractions";
version = "4.2.13";
sha256 = "0s784iphsmj4vhkrzq9q3w39vsn76w44zclx3hsygsw458zbyh4y";
})
(fetchNuGet {
pname = "System.IO.FileSystem.AccessControl";
version = "4.5.0";
sha256 = "1gq4s8w7ds1sp8f9wqzf8nrzal40q5cd2w4pkf4fscrl2ih3hkkj";
})
(fetchNuGet {
pname = "System.Memory";
version = "4.5.5";
sha256 = "08jsfwimcarfzrhlyvjjid61j02irx6xsklf32rv57x2aaikvx0h";
})
(fetchNuGet {
pname = "System.Private.Uri";
version = "4.3.0";
sha256 = "04r1lkdnsznin0fj4ya1zikxiqr0h6r6a1ww2dsm60gqhdrf0mvx";
})
(fetchNuGet {
pname = "System.Reflection.Metadata";
version = "1.6.0";
sha256 = "1wdbavrrkajy7qbdblpbpbalbdl48q3h34cchz24gvdgyrlf15r4";
})
(fetchNuGet {
pname = "System.Runtime";
version = "4.3.1";
sha256 = "03ch4d2acf6q037a4njxpll2kkx3dwzlg07yxr4z5m6j1kqgmm27";
})
(fetchNuGet {
pname = "System.Runtime.CompilerServices.Unsafe";
version = "6.0.0";
sha256 = "0qm741kh4rh57wky16sq4m0v05fxmkjjr87krycf5vp9f0zbahbc";
})
(fetchNuGet {
pname = "System.Security.AccessControl";
version = "4.5.0";
sha256 = "1wvwanz33fzzbnd2jalar0p0z3x0ba53vzx1kazlskp7pwyhlnq0";
})
(fetchNuGet {
pname = "System.Security.Cryptography.Cng";
version = "5.0.0";
sha256 = "06hkx2za8jifpslkh491dfwzm5dxrsyxzj5lsc0achb6yzg4zqlw";
})
(fetchNuGet {
pname = "System.Security.Cryptography.Pkcs";
version = "5.0.0";
sha256 = "0hb2mndac3xrw3786bsjxjfh19bwnr991qib54k6wsqjhjyyvbwj";
})
(fetchNuGet {
pname = "System.Security.Cryptography.ProtectedData";
version = "4.4.0";
sha256 = "1q8ljvqhasyynp94a1d7jknk946m20lkwy2c3wa8zw2pc517fbj6";
})
(fetchNuGet {
pname = "System.Security.Principal.Windows";
version = "4.5.0";
sha256 = "0rmj89wsl5yzwh0kqjgx45vzf694v9p92r4x4q6yxldk1cv1hi86";
})
(fetchNuGet {
pname = "System.Text.Encodings.Web";
version = "6.0.0";
sha256 = "06n9ql3fmhpjl32g3492sj181zjml5dlcc5l76xq2h38c4f87sai";
})
(fetchNuGet {
pname = "System.Text.Encodings.Web";
version = "8.0.0";
sha256 = "1wbypkx0m8dgpsaqgyywz4z760xblnwalb241d5qv9kx8m128i11";
})
(fetchNuGet {
pname = "System.Text.Json";
version = "6.0.0";
sha256 = "1si2my1g0q0qv1hiqnji4xh9wd05qavxnzj9dwgs23iqvgjky0gl";
})
(fetchNuGet {
pname = "System.Text.Json";
version = "8.0.0";
sha256 = "134savxw0sq7s448jnzw17bxcijsi1v38mirpbb6zfxmqlf04msw";
})
(fetchNuGet {
pname = "WoofWare.Myriad.Plugins";
version = "1.1.1";
sha256 = "1maj1p93cg8c22l9ldq310n21cbhg5rpjkkrm6cjh7dm4rpvr9mg";
})
]

73
nix/fetchDeps.sh Executable file
View File

@@ -0,0 +1,73 @@
#!/bin/bash
# This file was adapted from
# https://github.com/NixOS/nixpkgs/blob/b981d811453ab84fb3ea593a9b33b960f1ab9147/pkgs/build-support/dotnet/build-dotnet-module/default.nix#L173
set -euo pipefail
export PATH="@binPath@"
for arg in "$@"; do
case "$arg" in
--keep-sources|-k)
keepSources=1
shift
;;
--help|-h)
echo "usage: $0 [--keep-sources] [--help] <output path>"
echo " <output path> The path to write the lockfile to. A temporary file is used if this is not set"
echo " --keep-sources Don't remove temporary directories upon exit, useful for debugging"
echo " --help Show this help message"
exit
;;
esac
done
tmp=$(mktemp -td "@pname@-tmp-XXXXXX")
export tmp
HOME=$tmp/home
exitTrap() {
test -n "${ranTrap-}" && return
ranTrap=1
if test -n "${keepSources-}"; then
echo -e "Path to the source: $tmp/src\nPath to the fake home: $tmp/home"
else
rm -rf "$tmp"
fi
# Since mktemp is used this will be empty if the script didnt succesfully complete
if ! test -s "$depsFile"; then
rm -rf "$depsFile"
fi
}
trap exitTrap EXIT INT TERM
dotnetRestore() {
local -r project="${1-}"
local -r rid="$2"
dotnet restore "${project-}" \
-p:ContinuousIntegrationBuild=true \
-p:Deterministic=true \
--packages "$tmp/nuget_pkgs" \
--runtime "$rid" \
--no-cache \
--force
}
declare -a projectFiles=( @projectFiles@ )
declare -a testProjectFiles=( @testProjectFiles@ )
export DOTNET_NOLOGO=1
export DOTNET_CLI_TELEMETRY_OPTOUT=1
depsFile=$(realpath "${1:-$(mktemp -t "@pname@-deps-XXXXXX.nix")}")
mkdir -p "$tmp/nuget_pkgs"
storeSrc="@storeSrc@"
src="$tmp/src"
cp -rT "$storeSrc" "$src"
chmod -R +w "$src"
cd "$src"
echo "Restoring project..."
rids=("@rids@")
for rid in "${rids[@]}"; do
(( ${#projectFiles[@]} == 0 )) && dotnetRestore "" "$rid"
for project in "${projectFiles[@]-}" "${testProjectFiles[@]-}"; do
dotnetRestore "$project" "$rid"
done
done
echo "Successfully restored project"
echo "Writing lockfile..."
echo -e "# This file was automatically generated by passthru.fetch-deps.\n# Please don't edit it manually, your changes might get overwritten!\n" > "$depsFile"
nuget-to-nix "$tmp/nuget_pkgs" "@packages@" >> "$depsFile"
echo "Successfully wrote lockfile to $depsFile"