Skip to content

Commit

Permalink
Update CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Nov 17, 2023
1 parent a204d00 commit 2db1db9
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 29 deletions.
2 changes: 1 addition & 1 deletion cli/Squidex.CLI/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
<PackageTags>Squidex HeadlessCMS</PackageTags>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Version>11.3</Version>
<Version>12.0.0</Version>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private async Task<ChatCompletionCreateResponse> MakeRequestAsync(string descrip
ChatMessage.FromSystem("Also create a JSON object with the field names of this list as keys and the json type as value (string)."),
ChatMessage.FromSystem("Also create a JSON array that only contains the name of the list above as valid slug."),
},
Model = OpenAI.ObjectModels.Models.ChatGpt3_5Turbo
Model = OpenAI.ObjectModels.Models.Gpt_3_5_Turbo
}, cancellationToken: ct);

configurationStore.Set(cacheKey, cachedResponse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,4 @@ public CLIException(string message, Exception inner)
: base(message, inner)
{
}

protected CLIException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public async Task ImportAsync(ISyncService sync, SyncOptions options, ISession s
{
foreach (var (name, rule) in rulesByName.ToList())
{
if (models.All(x => x.Name != name))
if (models.TrueForAll(x => x.Name != name))
{
await log.DoSafeAsync($"Rule '{name}' deleting", async () =>
{
Expand Down Expand Up @@ -181,7 +181,7 @@ await log.DoVersionedAsync($"Rule '{newRule.Name}' disabling", rule.Version, asy
}
}

private async Task MapSchemaIdsToNamesAsync(ISession session, ExtendableRules current)
private async Task MapSchemaIdsToNamesAsync(ISession session, ExtendableRulesDto current)
{
var schemas = await session.Client.Schemas.GetSchemasAsync();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public DynamicData GenerateTestData()

if (stringField.Editor == StringFieldEditor.Slug)
{
result = slugify.GenerateSlug(result).Replace(".", "x", StringComparison.Ordinal);
result = slugify.GenerateSlug(result).Replace('.', 'x');
}

return result;
Expand Down
14 changes: 7 additions & 7 deletions cli/Squidex.CLI/Squidex.CLI.Core/Squidex.CLI.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<RootNamespace>Squidex.CLI</RootNamespace>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Betalgo.OpenAI" Version="7.0.0" />
<PackageReference Include="Betalgo.OpenAI" Version="7.4.1" />
<PackageReference Include="CsvHelper" Version="30.0.1" />
<PackageReference Include="LibGit2Sharp" Version="0.27.2" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.60">
<PackageReference Include="LibGit2Sharp" Version="0.28.0" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.110">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NJsonSchema" Version="10.9.0" />
<PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" />
<PackageReference Include="Slugify.Core" Version="4.0.1" />
<PackageReference Include="Squidex.Text" Version="5.5.0" />
<PackageReference Include="Squidex.Text" Version="6.2.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="7.0.0" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\csharp\Squidex.ClientLibrary\Squidex.ClientLibrary\Squidex.ClientLibrary.csproj" />
Expand Down
12 changes: 6 additions & 6 deletions cli/Squidex.CLI/Squidex.CLI.Tests/Squidex.CLI.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Squidex.CLI</RootNamespace>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FakeItEasy" Version="7.4.0" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.60">
<PackageReference Include="FakeItEasy" Version="8.0.0" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.110">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="CommandDotNet.FluentValidation" Version="6.0.2" />
<PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="xunit" Version="2.6.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
12 changes: 6 additions & 6 deletions cli/Squidex.CLI/Squidex.CLI/Squidex.CLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
<PackAsTool>true</PackAsTool>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<ToolCommandName>sq</ToolCommandName>
</PropertyGroup>
Expand All @@ -16,21 +16,21 @@
<ItemGroup>
<PackageReference Include="CommandDotNet" Version="7.0.2" />
<PackageReference Include="CommandDotNet.FluentValidation" Version="6.0.2" />
<PackageReference Include="ConsoleTables" Version="2.4.2" />
<PackageReference Include="ConsoleTables" Version="2.6.1" />
<PackageReference Include="CommandDotNet.IoC.MicrosoftDependencyInjection" Version="5.0.1" />
<PackageReference Include="CoreTweet" Version="1.0.0.483" />
<PackageReference Include="CsvHelper" Version="30.0.1" />
<PackageReference Include="LibGit2Sharp" Version="0.27.2" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.60">
<PackageReference Include="LibGit2Sharp" Version="0.28.0" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.110">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NJsonSchema" Version="10.9.0" />
<PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" />
<PackageReference Include="Slugify.Core" Version="4.0.1" />
<PackageReference Include="Squidex.Text" Version="5.5.0" />
<PackageReference Include="Squidex.Text" Version="6.2.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="7.0.0" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\csharp\Squidex.ClientLibrary\Squidex.ClientLibrary\Squidex.ClientLibrary.csproj" />
Expand Down

0 comments on commit 2db1db9

Please sign in to comment.