Skip to content
This repository was archived by the owner on Dec 13, 2021. It is now read-only.

Commit 6e30f41

Browse files
authored
Merge pull request #16 from umco/develop
Preparing v1.1.0 release
2 parents cdac41c + fbc2479 commit 6e30f41

33 files changed

+826
-432
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The issue tracker is the preferred channel for [bug reports](#bugs),
1616
requests](#pull-requests), but please respect the following restrictions:
1717

1818
* Please **do not** use the issue tracker for personal support requests (use
19-
[Our Umbraco](https://our.umbraco.org/projects/backoffice-extensions/nested-content/nested-content-feedback) or Twitter).
19+
Our Umbraco or Twitter).
2020

2121
* Please **do not** derail or troll issues. Keep the discussion on topic and
2222
respect the opinions of others.

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ We also have a [MyGet package repository](https://www.myget.org/gallery/umbraco-
2626

2727
If you prefer, you can compile Inner Content yourself, you'll need:
2828

29-
* Visual Studio 2015 (or above)
29+
* [Visual Studio 2017 (or above, including Community Editions)](https://www.visualstudio.com/downloads/)
30+
* Microsoft Build Tools 2015 (aka [MSBuild 15](https://www.microsoft.com/en-us/download/details.aspx?id=48159))
3031

3132
To clone it locally click the "Clone in Windows" button above or run the following git commands.
3233

@@ -38,30 +39,38 @@ To clone it locally click the "Clone in Windows" button above or run the followi
3839

3940
## Known Issues
4041

41-
* _[TBC]_
42+
- _[TBC]_
43+
44+
---
45+
46+
## Implementations
47+
48+
Umbraco packages that use Inner Content as a dependency library.
49+
50+
- [Stacked Content](https://github.com/umco/umbraco-stacked-content)
4251

4352
---
4453

4554
## Contributing to this project
4655

4756
Anyone and everyone is welcome to contribute. Please take a moment to review the [guidelines for contributing](CONTRIBUTING.md).
4857

49-
* [Bug reports](CONTRIBUTING.md#bugs)
50-
* [Feature requests](CONTRIBUTING.md#features)
51-
* [Pull requests](CONTRIBUTING.md#pull-requests)
58+
- [Bug reports](CONTRIBUTING.md#bugs)
59+
- [Feature requests](CONTRIBUTING.md#features)
60+
- [Pull requests](CONTRIBUTING.md#pull-requests)
5261

5362
---
5463

5564
## Contact
5665

5766
Have a question?
5867

59-
* [Raise an issue](https://github.com/umco/umbraco-inner-content/issues) on GitHub
68+
- [Raise an issue](https://github.com/umco/umbraco-inner-content/issues) on GitHub
6069

6170
## Dev Team
6271

63-
* [Matt Brailsford](https://github.com/mattbrailsford)
64-
* [Lee Kelleher](https://github.com/leekelleher)
72+
- [Matt Brailsford](https://github.com/mattbrailsford)
73+
- [Lee Kelleher](https://github.com/leekelleher)
6574

6675
## License
6776

appveyor.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
os: Visual Studio 2015
1+
image: Visual Studio 2017
22

33
# version format
4-
version: 1.0.3.{build}
4+
version: 1.1.0.{build}
55

66
# UMBRACO_PACKAGE_PRERELEASE_SUFFIX if a rtm release build this should be blank, otherwise if empty will default to alpha
77
# example UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta
@@ -15,7 +15,7 @@ before_build:
1515
- nuget restore src
1616

1717
build_script:
18-
- build-appveyor.cmd
18+
- build-appveyor.cmd
1919

2020
artifacts:
2121
- path: artifacts\*.nupkg
@@ -24,8 +24,8 @@ artifacts:
2424
deploy:
2525
# MyGet Deployment for builds & releases
2626
- provider: NuGet
27-
server: https://www.myget.org/F/umbraco-packages/
28-
symbol_server: https://nuget.symbolsource.org/MyGet/umbraco-packages
27+
server: https://www.myget.org/F/umbraco-packages/api/v2/package
28+
symbol_server: https://www.myget.org/F/umbraco-packages/symbols/api/v2/package
2929
api_key:
3030
secure: 36/Ax5O+e6wENlhoTwgvoEBZV3FG4XjF429SNTej2qsGTAL+cdfA1kT/tm1St8vx
3131
artifact: /.*\.nupkg/
@@ -47,7 +47,7 @@ deploy:
4747
- provider: NuGet
4848
server:
4949
api_key:
50-
secure: eSLiOXbGVrxSG+X7PV6qTTUZ5VzS9EFj5+EufaWPfd+QXkF6gc8rZ4mGoHIVp/fL
50+
secure: 0+oAleUTnr9UuJrhLW5rphRR+QGz00XX1Ui3k5kwyr2kUdEamiQ3F+gW0q8MJbDT
5151
artifact: /.*\.nupkg/
5252
on:
5353
branch: master

build-appveyor.cmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ ECHO APPVEYOR_BUILD_NUMBER : %APPVEYOR_BUILD_NUMBER%
44
ECHO APPVEYOR_BUILD_VERSION : %APPVEYOR_BUILD_VERSION%
55

66
CALL build\tools\NuGet\NuGet.exe restore src\Our.Umbraco.InnerContent.sln
7-
CALL "%programfiles(x86)%\MSBuild\14.0\Bin\amd64\MsBuild.exe" build\package.proj
7+
CALL "%programfiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\amd64\MsBuild.exe" build\package.proj
8+
REM CALL "%programfiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\amd64\MsBuild.exe" build\package.proj

build/package.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<language></language>
1717
<tags></tags>
1818
<dependencies>
19-
<dependency id="Our.Umbraco.InnerContent.Core" version="0.0.0" />
19+
<dependency id="Our.Umbraco.InnerContent.Core" version="0.0.0" />
2020
</dependencies>
2121
</metadata>
2222
<files />

build/tools/NuGet/NuGet.exe

781 KB
Binary file not shown.

src/Our.Umbraco.InnerContent.sln

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.24720.0
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27004.2008
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Our.Umbraco.InnerContent", "Our.Umbraco.InnerContent\Our.Umbraco.InnerContent.csproj", "{4B0C20EA-3B2B-4C56-A09A-C4F208D577EC}"
77
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{ABCCCFCD-7ABB-4480-ACA6-E32A79B89990}"
9+
ProjectSection(SolutionItems) = preProject
10+
..\CONTRIBUTING.md = ..\CONTRIBUTING.md
11+
..\LICENSE.md = ..\LICENSE.md
12+
..\README.md = ..\README.md
13+
EndProjectSection
14+
EndProject
15+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build Scripts", "Build Scripts", "{0EDC340A-DCE2-459A-9114-99B7334A1D2D}"
16+
ProjectSection(SolutionItems) = preProject
17+
..\appveyor.yml = ..\appveyor.yml
18+
..\build-appveyor.cmd = ..\build-appveyor.cmd
19+
..\build.cmd = ..\build.cmd
20+
..\build\install.ps1 = ..\build\install.ps1
21+
..\build\package.core.nuspec = ..\build\package.core.nuspec
22+
..\build\package.nuspec = ..\build\package.nuspec
23+
..\build\package.proj = ..\build\package.proj
24+
..\build\package.xml = ..\build\package.xml
25+
EndProjectSection
26+
EndProject
827
Global
928
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1029
Debug|Any CPU = Debug|Any CPU
@@ -19,4 +38,10 @@ Global
1938
GlobalSection(SolutionProperties) = preSolution
2039
HideSolutionNode = FALSE
2140
EndGlobalSection
41+
GlobalSection(NestedProjects) = preSolution
42+
{0EDC340A-DCE2-459A-9114-99B7334A1D2D} = {ABCCCFCD-7ABB-4480-ACA6-E32A79B89990}
43+
EndGlobalSection
44+
GlobalSection(ExtensibilityGlobals) = postSolution
45+
SolutionGuid = {3DB20A45-23C8-4D1F-9007-7E6FAD1B4C06}
46+
EndGlobalSection
2247
EndGlobal

src/Our.Umbraco.InnerContent/Boostrap.cs

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
using System.Linq;
2+
using Newtonsoft.Json;
3+
using Our.Umbraco.InnerContent.Helpers;
4+
using Umbraco.Core;
5+
using Umbraco.Core.Sync;
6+
using Umbraco.Web.Cache;
7+
8+
namespace Our.Umbraco.InnerContent
9+
{
10+
public class Bootstrap : ApplicationEventHandler
11+
{
12+
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
13+
{
14+
DataTypeCacheRefresher.CacheUpdated += (sender, e) =>
15+
{
16+
if (e.MessageType != MessageType.RefreshByJson)
17+
return;
18+
19+
// NOTE: The properties for the JSON payload are available here: (Currently there isn't a public API to deserialize the payload)
20+
// https://github.com/umbraco/Umbraco-CMS/blob/release-7.4.0/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs#L64-L68
21+
var payload = JsonConvert.DeserializeAnonymousType((string)e.MessageObject, new[] { new { Id = default(int) } });
22+
if (payload == null)
23+
return;
24+
25+
foreach (var item in payload)
26+
{
27+
applicationContext.ApplicationCache.RuntimeCache.ClearCacheItem(string.Format(InnerContentConstants.PreValuesCacheKey, item.Id));
28+
}
29+
};
30+
31+
ContentTypeCacheRefresher.CacheUpdated += (sender, e) =>
32+
{
33+
if (e.MessageType != MessageType.RefreshByJson)
34+
return;
35+
36+
// NOTE: The properties for the JSON payload are available here: (Currently there isn't a public API to deserialize the payload)
37+
// https://github.com/umbraco/Umbraco-CMS/blob/release-7.4.0/src/Umbraco.Web/Cache/ContentTypeCacheRefresher.cs#L93-L109
38+
var payload = JsonConvert.DeserializeAnonymousType((string)e.MessageObject, new[] { new { Id = default(int), AliasChanged = default(bool) } });
39+
if (payload == null)
40+
return;
41+
42+
// Only update if the content-type alias has changed.
43+
var ids = payload.Where(x => x.AliasChanged).Select(x => x.Id).ToArray();
44+
if (ids.Length == 0)
45+
return;
46+
47+
var contentTypes = applicationContext.Services.ContentTypeService.GetAllContentTypes(ids);
48+
foreach (var contentType in contentTypes)
49+
{
50+
ContentTypeCacheHelper.TryRemove(contentType);
51+
ContentTypeCacheHelper.TryAdd(contentType);
52+
}
53+
};
54+
}
55+
}
56+
}

src/Our.Umbraco.InnerContent/Converters/InnerContentValueConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ protected IPublishedContent ConvertInnerContentDataToSource(
2727
return InnerContentHelper.ConvertInnerContentToPublishedContent(item, parentNode, sortOrder, level, preview);
2828
}
2929
}
30-
}
30+
}

0 commit comments

Comments
 (0)