diff --git a/cli/Squidex.CLI/Directory.Build.props b/cli/Squidex.CLI/Directory.Build.props
index 3443a37..7c177b0 100644
--- a/cli/Squidex.CLI/Directory.Build.props
+++ b/cli/Squidex.CLI/Directory.Build.props
@@ -15,6 +15,6 @@
Squidex HeadlessCMS
true
snupkg
- 13.4
+ 13.6
diff --git a/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Contents/ContentsSynchronizer.cs b/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Contents/ContentsSynchronizer.cs
index aff3cd5..99f889c 100644
--- a/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Contents/ContentsSynchronizer.cs
+++ b/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Contents/ContentsSynchronizer.cs
@@ -77,7 +77,7 @@ Task SaveAsync()
});
}
- await client.GetAllAsync(async content =>
+ async Task HandleContentAsync(DynamicContent content)
{
if (content.LastModified < options.MaxAgeDate)
{
@@ -96,7 +96,16 @@ await client.GetAllAsync(async content =>
contents.Clear();
contentBatch++;
}
- }, context: context);
+ }
+
+ if (options.StreamContents)
+ {
+ await client.StreamAllAsync(HandleContentAsync, context: context);
+ }
+ else
+ {
+ await client.GetAllAsync(HandleContentAsync, context: context);
+ }
if (contents.Count > 0)
{
diff --git a/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Schemas/SchemasSynchronizer.cs b/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Schemas/SchemasSynchronizer.cs
index ba36f5f..2a39bcb 100644
--- a/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Schemas/SchemasSynchronizer.cs
+++ b/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Schemas/SchemasSynchronizer.cs
@@ -107,7 +107,7 @@ public async Task ImportAsync(ISyncService sync, SyncOptions options, ISession s
{
foreach (var name in current.Items.Select(x => x.Name))
{
- if (createModels.All(x => x.Name != name))
+ if (createModels.TrueForAll(x => x.Name != name))
{
await log.DoSafeAsync($"Schema {name} deleting", async () =>
{
diff --git a/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/SyncOptions.cs b/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/SyncOptions.cs
index 8c36f04..6562978 100644
--- a/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/SyncOptions.cs
+++ b/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/SyncOptions.cs
@@ -19,6 +19,8 @@ public sealed class SyncOptions
public bool Recreate { get; set; }
+ public bool StreamContents { get; set; }
+
public bool UpdateCurrentClient { get; set; }
public DateTimeOffset MaxAgeDate { get; set; }
diff --git a/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Workflows/WorkflowsSynchronizer.cs b/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Workflows/WorkflowsSynchronizer.cs
index 794b810..a626618 100644
--- a/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Workflows/WorkflowsSynchronizer.cs
+++ b/cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Workflows/WorkflowsSynchronizer.cs
@@ -101,7 +101,7 @@ public async Task ImportAsync(ISyncService sync, SyncOptions options, ISession s
{
foreach (var (name, workflow) in workflowsByName.ToList())
{
- if (models.All(x => x.Name == name))
+ if (models.TrueForAll(x => x.Name == name))
{
await log.DoSafeAsync($"Workflow '{name}' deleting", async () =>
{
diff --git a/cli/Squidex.CLI/Squidex.CLI/Commands/App_Sync.cs b/cli/Squidex.CLI/Squidex.CLI/Commands/App_Sync.cs
index 5ad6067..4598ffe 100644
--- a/cli/Squidex.CLI/Squidex.CLI/Commands/App_Sync.cs
+++ b/cli/Squidex.CLI/Squidex.CLI/Commands/App_Sync.cs
@@ -156,6 +156,9 @@ public sealed class OutArguments : AppArguments
[Option('t', "targets", Description = "The targets to sync, e.g. ‘sync out -t contents -t schemas’. Use 'sync targets' to view all targets.")]
public string[] Targets { get; set; }
+ [Option("stream-contents", Description = "Use the new streaming API for contents.")]
+ public bool StreamContents { get; set; }
+
[Option("max-age", Description = "Content & assets created or last modified within time span defined.")]
public TimeSpan? MaxAge { get; set; }
@@ -164,7 +167,12 @@ public sealed class OutArguments : AppArguments
public SyncOptions ToOptions()
{
- return new SyncOptions { Targets = Targets, MaxAgeDate = GetMaxAgeDate() };
+ return new SyncOptions
+ {
+ Targets = Targets,
+ MaxAgeDate = GetMaxAgeDate(),
+ StreamContents = StreamContents
+ };
}
public sealed class Validator : AbstractValidator