Skip to content

Commit

Permalink
V14/preview008 (#593)
Browse files Browse the repository at this point in the history
* remove all the obsolete to get 008 to compile.

* DataType config and config object serialization

* tidy up extension methods.

* Clean up mapper code.

* Attempt and Change model tidy

* Serializers

* Tracking cleaning.

* Nullable all the things.

* NoNodes path updates

* Code cleanup.

* Added Workspace use so context doesn't break builds.

* Fix sort test.

* Legacy Check

* Tidy legacy dialog

* v13 Property compatability

* Fix #593 - for v14 release.

* beta-001
  • Loading branch information
KevinJump authored Mar 7, 2024
1 parent 2b13fe0 commit 4ed6a5f
Show file tree
Hide file tree
Showing 267 changed files with 17,479 additions and 14,330 deletions.
9 changes: 5 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<VersionPrefix>13.0.0</VersionPrefix>
<VersionPrefix>14.0.0</VersionPrefix>
<Authors>Kevin Jump</Authors>
<Company>Jumoo</Company>

Expand All @@ -15,11 +15,11 @@

<PackageIcon>usync-logo.png</PackageIcon>

<!--
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
-->

<NoWarn>CS0618</NoWarn>
<Nullable>enable</Nullable>


<PackageReleaseNotes>
<![CDATA[9.0 : Dotnet core version
Expand All @@ -32,7 +32,8 @@
- 10.2 : Upload / Download Syncs
11.0 : Umbraco v11 release
12.0 : Umbraco v12 release
13.o : Umbraco v13 release]]>
13.o : Umbraco v13 release
14.0 : Umbraco v14 release]]>
</PackageReleaseNotes>

<EmbedUntrackedSources>true</EmbedUntrackedSources>
Expand Down
2 changes: 1 addition & 1 deletion dist/build-package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ XCOPY "$outFolder\*.nupkg" "C:\Source\localgit" /Q /Y

if ($push) {
""; "##### Pushing to our nighly package feed"; "----------------------------------" ; ""
nuget push "$outFolder\*.nupkg" -ApiKey AzureDevOps -src https://pkgs.dev.azure.com/jumoo/Public/_packaging/nightly/nuget/v3/index.json
.\nuget.exe push "$outFolder\*.nupkg" -ApiKey AzureDevOps -src https://pkgs.dev.azure.com/jumoo/Public/_packaging/nightly/nuget/v3/index.json

Remove-Item ".\last-push-*"
Out-File -FilePath ".\last-push-$fullVersion.txt" -InputObject $fullVersion
Expand Down
11 changes: 5 additions & 6 deletions uSync.AutoTemplates/AutoTemplateComposer.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.DependencyInjection;

namespace uSync.AutoTemplates
namespace uSync.AutoTemplates;

public class AutoTemplateComposer : IComposer
{
public class AutoTemplateComposer : IComposer
public void Compose(IUmbracoBuilder builder)
{
public void Compose(IUmbracoBuilder builder)
{
builder.AdduSyncAutoTemplates();
}
builder.AdduSyncAutoTemplates();
}
}
59 changes: 29 additions & 30 deletions uSync.AutoTemplates/AutoTemplateNotificationHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,43 @@
using Umbraco.Cms.Core.Hosting;
using Umbraco.Cms.Core.Notifications;

namespace uSync.AutoTemplates
namespace uSync.AutoTemplates;

public class AutoTemplateNotificationHandler :
INotificationHandler<UmbracoApplicationStartingNotification>,
INotificationHandler<TemplateSavingNotification>
{
public class AutoTemplateNotificationHandler :
INotificationHandler<UmbracoApplicationStartingNotification>,
INotificationHandler<TemplateSavingNotification>
{

private readonly IHostingEnvironment _hostingEnvironment;
private readonly TemplateWatcher _templateWatcher;
private readonly IHostingEnvironment _hostingEnvironment;
private readonly TemplateWatcher _templateWatcher;

public AutoTemplateNotificationHandler(
IHostingEnvironment hostingEnvironment,
TemplateWatcher templateWatcher)
{
_hostingEnvironment = hostingEnvironment;
_templateWatcher = templateWatcher;
}
public AutoTemplateNotificationHandler(
IHostingEnvironment hostingEnvironment,
TemplateWatcher templateWatcher)
{
_hostingEnvironment = hostingEnvironment;
_templateWatcher = templateWatcher;
}

public void Handle(UmbracoApplicationStartingNotification notification)
{
// we only run in debug mode.
if (!_hostingEnvironment.IsDebugMode) return;
public void Handle(UmbracoApplicationStartingNotification notification)
{
// we only run in debug mode.
if (!_hostingEnvironment.IsDebugMode) return;

// we only run when Umbraco is setup.
if (notification.RuntimeLevel == Umbraco.Cms.Core.RuntimeLevel.Run)
{
_templateWatcher.CheckViewsFolder();
_templateWatcher.WatchViewsFolder();
}
// we only run when Umbraco is setup.
if (notification.RuntimeLevel == Umbraco.Cms.Core.RuntimeLevel.Run)
{
_templateWatcher.CheckViewsFolder();
_templateWatcher.WatchViewsFolder();
}
}

public void Handle(TemplateSavingNotification notification)
public void Handle(TemplateSavingNotification notification)
{
foreach (var item in notification.SavedEntities)
{
foreach (var item in notification.SavedEntities)
{
// tells the watcher this has been saved in umbraco.
_templateWatcher.QueueChange(item.Alias);
}
// tells the watcher this has been saved in umbraco.
_templateWatcher.QueueChange(item.Alias);
}
}
}
15 changes: 7 additions & 8 deletions uSync.AutoTemplates/AutoTemplates.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
namespace uSync.AutoTemplates
namespace uSync.AutoTemplates;

public class AutoTemplates
{
public class AutoTemplates
{
/// <summary>
/// the regex to fine the layout file in a .cshtml file
/// </summary>
public const string LayoutRegEx = "Layout\\s*=\\s*(\"*[A-z.]+\"*)";
/// <summary>
/// the regex to fine the layout file in a .cshtml file
/// </summary>
public const string LayoutRegEx = "Layout\\s*=\\s*(\"*[A-z.]+\"*)";

}
}
25 changes: 12 additions & 13 deletions uSync.AutoTemplates/AutoTemplatesBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@
using Umbraco.Cms.Core.Notifications;
using Umbraco.Extensions;

namespace uSync.AutoTemplates
{
public static class AutoTemplatesBuilderExtensions
namespace uSync.AutoTemplates;

public static class AutoTemplatesBuilderExtensions
{
public static IUmbracoBuilder AdduSyncAutoTemplates(this IUmbracoBuilder builder)
{
// check to see if we've been registerd before.
if (builder.Services.FindIndex(x => x.ServiceType == typeof(TemplateWatcher)) != -1)
return builder;
public static IUmbracoBuilder AdduSyncAutoTemplates(this IUmbracoBuilder builder)
{
// check to see if we've been registerd before.
if (builder.Services.FindIndex(x => x.ServiceType == typeof(TemplateWatcher)) != -1)
return builder;

builder.Services.AddSingleton<TemplateWatcher>();
builder.AddNotificationHandler<UmbracoApplicationStartingNotification, AutoTemplateNotificationHandler>();
builder.AddNotificationHandler<TemplateSavingNotification, AutoTemplateNotificationHandler>();
builder.Services.AddSingleton<TemplateWatcher>();
builder.AddNotificationHandler<UmbracoApplicationStartingNotification, AutoTemplateNotificationHandler>();
builder.AddNotificationHandler<TemplateSavingNotification, AutoTemplateNotificationHandler>();

return builder;
return builder;

}
}
}
Loading

0 comments on commit 4ed6a5f

Please sign in to comment.