mirror of
https://github.com/Smaug123/WoofWare.Myriad
synced 2025-10-05 03:58:40 +00:00
Bring into WoofWare brand (#14)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<MyriadSdkGenerator Include="$(MSBuildThisFileDirectory)..\MyriadPlugin\bin\$(Configuration)\net6.0\MyriadPlugin.dll" />
|
||||
<MyriadSdkGenerator Include="$(MSBuildThisFileDirectory)..\WoofWare.Myriad.Plugins\bin\$(Configuration)\net6.0\WoofWare.Myriad.Plugins.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -28,7 +28,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MyriadPlugin\MyriadPlugin.fsproj" />
|
||||
<ProjectReference Include="..\WoofWare.Myriad.Plugins\WoofWare.Myriad.Plugins.fsproj" />
|
||||
<PackageReference Include="Myriad.Sdk" Version="0.8.3" />
|
||||
<PackageReference Include="Myriad.Core" Version="0.8.3" />
|
||||
</ItemGroup>
|
||||
|
@@ -6,7 +6,7 @@ module Literals =
|
||||
[<Literal>]
|
||||
let something = "something"
|
||||
|
||||
[<MyriadPlugin.JsonParse>]
|
||||
[<WoofWare.Myriad.Plugins.JsonParse>]
|
||||
type InnerType =
|
||||
{
|
||||
[<JsonPropertyName(Literals.something)>]
|
||||
@@ -14,7 +14,7 @@ type InnerType =
|
||||
}
|
||||
|
||||
/// My whatnot
|
||||
[<MyriadPlugin.JsonParse>]
|
||||
[<WoofWare.Myriad.Plugins.JsonParse>]
|
||||
type JsonRecordType =
|
||||
{
|
||||
/// A thing!
|
||||
|
@@ -6,7 +6,7 @@ open System
|
||||
open System.Text.Json.Serialization
|
||||
|
||||
/// Describes the opening hours of a given gym.
|
||||
[<MyriadPlugin.JsonParse>]
|
||||
[<WoofWare.Myriad.Plugins.JsonParse>]
|
||||
type GymOpeningHours =
|
||||
{
|
||||
/// If this is true, there should be no OpeningHours (but nothing enforces that).
|
||||
@@ -23,7 +23,7 @@ type GymOpeningHours =
|
||||
this.OpeningHours |> String.concat ", "
|
||||
|
||||
/// How a human can authenticate with a gym when they physically try to enter it
|
||||
[<MyriadPlugin.JsonParse>]
|
||||
[<WoofWare.Myriad.Plugins.JsonParse>]
|
||||
type GymAccessOptions =
|
||||
{
|
||||
/// This gym has PIN entry pads
|
||||
@@ -33,7 +33,7 @@ type GymAccessOptions =
|
||||
}
|
||||
|
||||
/// Where a gym is on the Earth
|
||||
[<MyriadPlugin.JsonParse>]
|
||||
[<WoofWare.Myriad.Plugins.JsonParse>]
|
||||
type GymLocation =
|
||||
{
|
||||
/// Measured in degrees
|
||||
@@ -45,7 +45,7 @@ type GymLocation =
|
||||
}
|
||||
|
||||
/// The postal address of a gym
|
||||
[<MyriadPlugin.JsonParse>]
|
||||
[<WoofWare.Myriad.Plugins.JsonParse>]
|
||||
type GymAddress =
|
||||
{
|
||||
/// E.g. "Canterbury Court"
|
||||
@@ -80,7 +80,7 @@ type GymAddress =
|
||||
|> String.concat "\n"
|
||||
|
||||
/// Metadata about a physical gym
|
||||
[<MyriadPlugin.JsonParse>]
|
||||
[<WoofWare.Myriad.Plugins.JsonParse>]
|
||||
type Gym =
|
||||
{
|
||||
// The following fields are returned but are always null
|
||||
@@ -135,7 +135,7 @@ Opening hours: %s{string<GymOpeningHours> this.GymOpeningHours}
|
||||
"""
|
||||
|
||||
/// A human member of PureGym
|
||||
[<MyriadPlugin.JsonParse>]
|
||||
[<WoofWare.Myriad.Plugins.JsonParse>]
|
||||
type Member =
|
||||
{
|
||||
/// This member's ID. This is a fairly large number.
|
||||
@@ -171,7 +171,7 @@ type Member =
|
||||
}
|
||||
|
||||
/// Statistics for how many people are currently at a gym
|
||||
[<MyriadPlugin.JsonParse>]
|
||||
[<WoofWare.Myriad.Plugins.JsonParse>]
|
||||
type GymAttendance =
|
||||
{
|
||||
/// This appears always to be just equal to TotalPeopleInGym, but a string.
|
||||
@@ -216,7 +216,7 @@ type MemberActivityThisMonth =
|
||||
}
|
||||
|
||||
/// Don't use this type. It's public because System.Text.Json can't do private types.
|
||||
[<MyriadPlugin.JsonParse>]
|
||||
[<WoofWare.Myriad.Plugins.JsonParse>]
|
||||
type MemberActivityDto =
|
||||
{
|
||||
[<JsonRequired>]
|
||||
@@ -243,7 +243,7 @@ type MemberActivityDto =
|
||||
LastRefreshed = this.LastRefreshed
|
||||
}
|
||||
|
||||
[<MyriadPlugin.JsonParse>]
|
||||
[<WoofWare.Myriad.Plugins.JsonParse>]
|
||||
type SessionsAggregate =
|
||||
{
|
||||
/// Number of gym "activities" within some query-defined time period; presumably this is like classes?
|
||||
@@ -256,7 +256,7 @@ type SessionsAggregate =
|
||||
}
|
||||
|
||||
/// The DTO for gym info returned from the Sessions endpoint.
|
||||
[<MyriadPlugin.JsonParse>]
|
||||
[<WoofWare.Myriad.Plugins.JsonParse>]
|
||||
type VisitGym =
|
||||
{
|
||||
// Omitting Location, GymAccess, ContactInfo, TimeZone because these were all null for me
|
||||
@@ -269,7 +269,7 @@ type VisitGym =
|
||||
}
|
||||
|
||||
/// Summary of a single visit to a gym.
|
||||
[<MyriadPlugin.JsonParse>]
|
||||
[<WoofWare.Myriad.Plugins.JsonParse>]
|
||||
type Visit =
|
||||
{
|
||||
// Omitted Name because it always was null for me
|
||||
@@ -289,7 +289,7 @@ type Visit =
|
||||
$"%s{this.Gym.Name}: %s{startTime} (%i{this.Duration} minutes)"
|
||||
|
||||
/// Aggregate statistics for gym visits across a time period.
|
||||
[<MyriadPlugin.JsonParse>]
|
||||
[<WoofWare.Myriad.Plugins.JsonParse>]
|
||||
type SessionsSummary =
|
||||
{
|
||||
/// Aggregate stats for gym visits within the query-dependent time period.
|
||||
@@ -302,7 +302,7 @@ type SessionsSummary =
|
||||
override this.ToString () =
|
||||
$"%i{this.Total.Visits} visits, totalling %i{this.Total.Duration} minutes"
|
||||
|
||||
[<MyriadPlugin.JsonParse>]
|
||||
[<WoofWare.Myriad.Plugins.JsonParse>]
|
||||
type Sessions =
|
||||
{
|
||||
Summary : SessionsSummary
|
||||
|
@@ -5,7 +5,7 @@ type ParseState =
|
||||
| AwaitingValue of string
|
||||
|
||||
/// My whatnot
|
||||
[<MyriadPlugin.RemoveOptions>]
|
||||
[<WoofWare.Myriad.Plugins.RemoveOptions>]
|
||||
type RecordType =
|
||||
{
|
||||
/// A thing!
|
||||
|
@@ -5,6 +5,8 @@
|
||||
<NetCoreTargetingPackRoot>[UNDEFINED]</NetCoreTargetingPackRoot>
|
||||
<DisableImplicitLibraryPacksFolder>true</DisableImplicitLibraryPacksFolder>
|
||||
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<WarnOn>FS3559</WarnOn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.128" PrivateAssets="all" />
|
||||
|
@@ -26,7 +26,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MyriadPlugin\MyriadPlugin.fsproj" />
|
||||
<ProjectReference Include="..\WoofWare.Myriad.Plugins\WoofWare.Myriad.Plugins.fsproj" />
|
||||
<ProjectReference Include="..\ConsumePlugin\ConsumePlugin.fsproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
namespace MyriadPlugin.Test
|
||||
|
||||
open NUnit.Framework
|
||||
open MyriadPlugin
|
||||
open WoofWare.Myriad.Plugins
|
||||
open ApiSurface
|
||||
|
||||
[<TestFixture>]
|
||||
|
@@ -1,8 +0,0 @@
|
||||
MyriadPlugin.JsonParseAttribute inherit System.Attribute
|
||||
MyriadPlugin.JsonParseAttribute..ctor [constructor]: unit
|
||||
MyriadPlugin.JsonParseGenerator inherit obj, implements Myriad.Core.IMyriadGenerator
|
||||
MyriadPlugin.JsonParseGenerator..ctor [constructor]: unit
|
||||
MyriadPlugin.RemoveOptionsAttribute inherit System.Attribute
|
||||
MyriadPlugin.RemoveOptionsAttribute..ctor [constructor]: unit
|
||||
MyriadPlugin.RemoveOptionsGenerator inherit obj, implements Myriad.Core.IMyriadGenerator
|
||||
MyriadPlugin.RemoveOptionsGenerator..ctor [constructor]: unit
|
@@ -1,4 +1,4 @@
|
||||
namespace MyriadPlugin
|
||||
namespace WoofWare.Myriad.Plugins
|
||||
|
||||
open Fantomas.FCS.Syntax
|
||||
open Fantomas.FCS.SyntaxTrivia
|
@@ -1,4 +1,4 @@
|
||||
namespace MyriadPlugin
|
||||
namespace WoofWare.Myriad.Plugins
|
||||
|
||||
open System
|
||||
open System.Text
|
@@ -1,4 +1,4 @@
|
||||
namespace MyriadPlugin
|
||||
namespace WoofWare.Myriad.Plugins
|
||||
|
||||
open System
|
||||
open Fantomas.FCS.Syntax
|
8
WoofWare.Myriad.Plugins/SurfaceBaseline.txt
Normal file
8
WoofWare.Myriad.Plugins/SurfaceBaseline.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
WoofWare.Myriad.Plugins.JsonParseAttribute inherit System.Attribute
|
||||
WoofWare.Myriad.Plugins.JsonParseAttribute..ctor [constructor]: unit
|
||||
WoofWare.Myriad.Plugins.JsonParseGenerator inherit obj, implements Myriad.Core.IMyriadGenerator
|
||||
WoofWare.Myriad.Plugins.JsonParseGenerator..ctor [constructor]: unit
|
||||
WoofWare.Myriad.Plugins.RemoveOptionsAttribute inherit System.Attribute
|
||||
WoofWare.Myriad.Plugins.RemoveOptionsAttribute..ctor [constructor]: unit
|
||||
WoofWare.Myriad.Plugins.RemoveOptionsGenerator inherit obj, implements Myriad.Core.IMyriadGenerator
|
||||
WoofWare.Myriad.Plugins.RemoveOptionsGenerator..ctor [constructor]: unit
|
@@ -1,31 +1,32 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<Authors>Patrick Stevens</Authors>
|
||||
<Copyright>Copyright (c) Patrick Stevens 2023</Copyright>
|
||||
<Description>Provides some Myriad compile-time code generation plugins.</Description>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<PackageTags>myriad;fsharp;source-generator;source-gen;json</PackageTags>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<WarnOn>FS3559</WarnOn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Myriad.Core" Version="0.8.3" />
|
||||
<!-- the lowest version allowed by Myriad.Core -->
|
||||
<PackageReference Update="FSharp.Core" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="AstHelper.fs" />
|
||||
<Compile Include="RemoveOptionsGenerator.fs" />
|
||||
<Compile Include="JsonParseGenerator.fs" />
|
||||
<None Include="version.json" />
|
||||
<EmbeddedResource Include="SurfaceBaseline.txt" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<Authors>Patrick Stevens</Authors>
|
||||
<Copyright>Copyright (c) Patrick Stevens 2023</Copyright>
|
||||
<Description>Provides some Myriad compile-time code generation plugins.</Description>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<PackageTags>myriad;fsharp;source-generator;source-gen;json</PackageTags>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<WarnOn>FS3559</WarnOn>
|
||||
<PackageId>WoofWare.Myriad.Plugins</PackageId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Myriad.Core" Version="0.8.3" />
|
||||
<!-- the lowest version allowed by Myriad.Core -->
|
||||
<PackageReference Update="FSharp.Core" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="AstHelper.fs" />
|
||||
<Compile Include="RemoveOptionsGenerator.fs" />
|
||||
<Compile Include="JsonParseGenerator.fs" />
|
||||
<None Include="version.json" />
|
||||
<EmbeddedResource Include="SurfaceBaseline.txt" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "0.2",
|
||||
"version": "1.0",
|
||||
"publicReleaseRefSpec": [
|
||||
"^refs/heads/main$"
|
||||
],
|
@@ -2,7 +2,7 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "ConsumePlugin", "ConsumePlugin\ConsumePlugin.fsproj", "{0D174482-9CB2-448A-8BA8-846FAEC65579}"
|
||||
EndProject
|
||||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "MyriadPlugin", "MyriadPlugin\MyriadPlugin.fsproj", "{DB86C53B-4090-4791-884B-024C5759855F}"
|
||||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WoofWare.Myriad.Plugins", "WoofWare.Myriad.Plugins\WoofWare.Myriad.Plugins.fsproj", "{DB86C53B-4090-4791-884B-024C5759855F}"
|
||||
EndProject
|
||||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "MyriadPlugin.Test", "MyriadPlugin.Test\MyriadPlugin.Test.fsproj", "{13370CA7-2A80-4B4D-8DEB-F1AA77F206C4}"
|
||||
EndProject
|
@@ -48,8 +48,8 @@
|
||||
src = ./nix/fetchDeps.sh;
|
||||
pname = pname;
|
||||
binPath = pkgs.lib.makeBinPath [pkgs.coreutils dotnet-sdk (pkgs.nuget-to-nix.override {inherit dotnet-sdk;})];
|
||||
projectFiles = toString ["./MyriadPlugin/MyriadPlugin.fsproj" "./ConsumePlugin/ConsumePlugin.fsproj"];
|
||||
testProjectFiles = ["./MyriadPlugin.Test/MyriadPlugin.Test.fsproj"];
|
||||
projectFiles = toString ["./WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj" "./ConsumePlugin/ConsumePlugin.fsproj"];
|
||||
testProjectFiles = ["./WoofWare.Myriad.Plugins.Test/WoofWare.Myriad.Plugins.Test.fsproj"];
|
||||
rids = pkgs.lib.concatStringsSep "\" \"" runtimeIds;
|
||||
packages = dotnet-sdk.packages;
|
||||
storeSrc = pkgs.srcOnly {
|
||||
@@ -63,7 +63,7 @@
|
||||
name = "argument-helpers";
|
||||
version = version;
|
||||
src = ./.;
|
||||
projectFile = "./MyriadPlugin/MyriadPlugin.fsproj";
|
||||
projectFile = "./WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj";
|
||||
nugetDeps = ./nix/deps.nix;
|
||||
doCheck = true;
|
||||
dotnet-sdk = dotnet-sdk;
|
||||
|
10
runmyriad.sh
10
runmyriad.sh
@@ -2,8 +2,8 @@
|
||||
|
||||
dotnet \
|
||||
"/Users/patrick/.nuget/packages/myriad.sdk/0.8.3/build/../tools/net6.0/any/Myriad.dll" \
|
||||
--inputfile "/Users/patrick/Documents/GitHub/MyriadPlugin/ConsumePlugin/RecordFile.fs" \
|
||||
--outputfile "/Users/patrick/Documents/GitHub/MyriadPlugin/ConsumePlugin/Generated.fs" \
|
||||
--configfile "/Users/patrick/Documents/GitHub/MyriadPlugin/ConsumePlugin/myriad.toml" \
|
||||
--contextfile "/Users/patrick/Documents/GitHub/MyriadPlugin/ConsumePlugin/obj/myriad.context.toml" \
|
||||
--plugin "/Users/patrick/Documents/GitHub/MyriadPlugin/MyriadPlugin/bin/Debug/net8.0/MyriadPlugin.dll"
|
||||
--inputfile "/Users/patrick/Documents/GitHub/WoofWare.Myriad.Plugins/ConsumePlugin/RecordFile.fs" \
|
||||
--outputfile "/Users/patrick/Documents/GitHub/WoofWare.Myriad.Plugins/ConsumePlugin/Generated.fs" \
|
||||
--configfile "/Users/patrick/Documents/GitHub/WoofWare.Myriad.Plugins/ConsumePlugin/myriad.toml" \
|
||||
--contextfile "/Users/patrick/Documents/GitHub/WoofWare.Myriad.Plugins/ConsumePlugin/obj/myriad.context.toml" \
|
||||
--plugin "/Users/patrick/Documents/GitHub/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins/bin/Debug/net8.0/WoofWare.Myriad.Plugins.dll"
|
||||
|
Reference in New Issue
Block a user