Merge release/10.0.0 into v10/dev
commite0aa430d4cAuthor: Paul Johnson <pmj@umbraco.com> Date: Thu May 19 10:00:57 2022 +0100 Fix typo in pipeline yaml commit2ec450f2d6Author: Paul Johnson <pmj@umbraco.com> Date: Thu May 19 09:14:47 2022 +0100 Fix yaml conditions commitc2d548039aAuthor: Paul Johnson <pmj@umbraco.com> Date: Thu May 19 09:02:50 2022 +0100 Azure pipeline refactor (#12428) * Skip symbols for Umbraco.Templates * Resolve some test issues + Fixed whitespace dependant tests to pass regardless of build OS vs run OS. + Snap dictionary tests were failing when Configuration was release + Removed hardcoded baseUrl from one of the acceptance tests * Move docfx setup to ./build and fix * Update UI docs title * Added dockerfile that can be used when running the acceptance tests. * Take explicit dependency on System.Security.Cryptography.Pkcs * Refactor ci/cd pipeline commitee8359af75Author: Mole <nikolajlauridsen@protonmail.ch> Date: Thu May 19 09:57:21 2022 +0200 V10: Reintroduce appsettings-schema.json (#12416) * Reintroduce language files tests (#12367) * Reintroducing language files tests * Fix casing * Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/EmbeddedResources/LanguageXmlTests.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Change Umbraco.Cms and Umbraco.Templates nuspecs to csproj * Remove Umbraco.Templates from VerifyNuGet step * Remove duplicate and unnecessary properties * Generate json schema on build * Add targets file * Gitignore auto generated appsettings schema * Fix build not copying file * Use the new path in appsettings * Update copy message * Build json schema as release * Update json schema options Otherwise just running the project will put the file in the wrong place * Generate schema if it doesn't exist in Web.Ui * Update json schema options Otherwise just running the project will put the file in the wrong place Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> Co-authored-by: Ronald Barendse <ronald@barend.se> commitdd617ede80Author: Ronald Barendse <ronald@barend.se> Date: Thu May 19 09:51:11 2022 +0200 v10: Change Umbraco.Cms and Umbraco.Templates nuspecs to csproj (#12413) * Reintroduce language files tests (#12367) * Reintroducing language files tests * Fix casing * Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/EmbeddedResources/LanguageXmlTests.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Change Umbraco.Cms and Umbraco.Templates nuspecs to csproj * Remove Umbraco.Templates from VerifyNuGet step * Remove duplicate and unnecessary properties Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> commitb83216876fAuthor: Ronald Barendse <ronald@barend.se> Date: Thu May 19 08:36:04 2022 +0200 v10: Project template database/connection string improvements (#12407) * Add new connection-string-provider-name parameter * Use template value forms to correctly encode JSON values * Add new development-database-type parameter * Update package template and fix App_Plugins directory rename * Remove conflicting short parameter name * Lowercase framework parameter to align with MS templates * Cleanup default template settings * Write unattended install parameters when either connection string or development database is set * Include RootNamespace in UmbracoPackage template * Update Umbraco specific gitignore rules * Revert "Lowercase framework parameter to align with MS templates" This reverts commit 22de389272a7e119df569ec2e54190265f6d0ae0. * Add exclude-gitignore parameter * Update template schemas * Add minimal-gitignore parameter commite40049dcf1Author: Mole <nikolajlauridsen@protonmail.ch> Date: Wed May 18 15:22:51 2022 +0200 Fix domain for invariant content nodes (#12405) Co-authored-by: Elitsa Marinovska <elm@umbraco.dk> commita3692b887aAuthor: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> Date: Mon May 9 11:42:10 2022 +0200 Use SnippetCollection to when working with snippets (#12355) * Introducing a new Snippet type * Adding a SnippetCollection and SnippetCollectionBuilder * Using snippetCollection to get the snippets instead of fileService * Fixed fetching the correct content * Make ISnippet non-discoverable * Split the SnippetCollection into PartialViewSnippetCollection and PartialViewMacroSnippetCollection * Update CodeFileController to use the 2 snippet collections * Display the names with Empty.cshtml on top * Remove merging embedded snippets with custom snippets from ~\Umbraco.Web.UI\umbraco\PartialViewMacros\Templates folder for the Partial View Collection * Fix naming * Fix another naming * Cleanup + Use base items Co-authored-by: Bjarke Berg <mail@bergmania.dk> (cherry picked from commit9326cc5fc6) commit4f48a4937bAuthor: patrickdemooij9 <patrickdemooij98@hotmail.com> Date: Fri Oct 8 11:18:00 2021 +0200 Cherry picked from4c08b44684commit4fdbfee597Author: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com> Date: Wed May 11 00:51:37 2022 +0200 Show nicer overlay when clicking block card for deleted element type (#12140) * Show nicer overlay when clicking block card for deleted element type * Cleanup * Remove stop-scrolling container * Use flex-start instead on start * Remove legacy flexbox fallback * Remove unnecessary hack * Use standard gap property instead * Localization of message * Fix translation * End sentence with a dot (cherry picked from commitebb1dc21a9) commit3856bf8288Author: Henk Jan Pluim <henkjan.pluim@greenchoice.nl> Date: Mon Apr 25 10:02:06 2022 +0200 #fix 12254 return emptyresult (cherry picked from commit7993d19c1b) commit7087c3d9f6Author: Ronald Barendse <ronald@barend.se> Date: Tue May 17 12:59:01 2022 +0200 v10: Use ForceCreateDatabase during unattended install and extend GetUmbracoConnectionString extension methods (#12397) * Add extension methods to get the Umbraco connection string/provider name from configuration * Added tests for configuration extension methods. * Fix issue with InstallMissingDatabase and ForceCreateDatabase * Fix comments * Revert casing change in GenerateConnectionString * Re-add AddOptions (without config binding) to fix test * Update src/Umbraco.Core/Configuration/Models/ConnectionStrings.cs Co-authored-by: Ronald Barendse <ronald@barend.se> * Update src/Umbraco.Core/Configuration/Models/ConnectionStrings.cs * Update src/Umbraco.Infrastructure/Runtime/RuntimeState.cs * Whitespace and documentation updates * Add DatabaseProviderMetadataExtensions * Filter before ordering * Replace DataDirectory placeholder when setting connection string Co-authored-by: Andy Butland <abutland73@gmail.com> Co-authored-by: Bjarke Berg <mail@bergmania.dk> (cherry picked from commit8e6e262c7f) commite90bf26577Author: Ronald Barendse <ronald@barend.se> Date: Tue May 17 07:33:54 2022 +0200 v10: Support System.Data.SqlClient provider name (#12408) * Add support for System.Data.SqlClient provider name * Only update connection string when required (cherry picked from commite82bcb1b76) commitfd0637c96dAuthor: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> Date: Mon May 16 14:23:59 2022 +0200 Reintroduce language files tests (#12367) * Reintroducing language files tests * Fix casing * Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/EmbeddedResources/LanguageXmlTests.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> (cherry picked from commit2ed71a64ec)
This commit is contained in:
3
.artifactignore
Normal file
3
.artifactignore
Normal file
@@ -0,0 +1,3 @@
|
||||
**/*
|
||||
!**/bin/**
|
||||
!**/obj/**
|
||||
9
.gitignore
vendored
9
.gitignore
vendored
@@ -54,6 +54,10 @@ preserve.belle
|
||||
/src/Umbraco.Web.UI.Docs/api/
|
||||
/src/Umbraco.Web.UI.Docs/package-lock.json
|
||||
|
||||
# csharp-docs
|
||||
/build/csharp-docs/api/
|
||||
/build/csharp-docs/_site/
|
||||
|
||||
# Build
|
||||
/build.out/
|
||||
/build.tmp/
|
||||
@@ -64,8 +68,6 @@ preserve.belle
|
||||
/build/docs.zip
|
||||
/build/ui-docs.zip
|
||||
/build/csharp-docs.zip
|
||||
/build/ApiDocs/
|
||||
/src/ApiDocs/api/
|
||||
/src/Umbraco.Cms.StaticAssets/wwwroot/umbraco/
|
||||
|
||||
# Environment specific data
|
||||
@@ -102,4 +104,5 @@ cypress.env.json
|
||||
/tests/Umbraco.Tests.UnitTests/[Uu]mbraco/[Dd]ata/TEMP/
|
||||
|
||||
# Ignore auto-generated schema
|
||||
/src/Umbraco.Web.UI/[Uu]mbraco/config/appsettings-schema.json
|
||||
/src/Umbraco.Web.UI/appsettings-schema.json
|
||||
/src/Umbraco.Cms/appsettings-schema.json
|
||||
|
||||
@@ -4,4 +4,15 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.406" PrivateAssets="all" IsImplicitlyDefined="true" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Nerdbank.GitVersioning" Condition="!Exists('packages.config')">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<Version>3.5.103</Version>
|
||||
</PackageReference>
|
||||
|
||||
<PackageReference Include="Umbraco.GitVersioning.Extensions" Version="0.1.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata minClientVersion="4.1.0">
|
||||
<id>Umbraco.Cms</id>
|
||||
<version>10.0.0</version>
|
||||
<title>Umbraco Cms</title>
|
||||
<authors>Umbraco HQ</authors>
|
||||
<owners>Umbraco HQ</owners>
|
||||
<license type="expression">MIT</license>
|
||||
<projectUrl>https://umbraco.com/</projectUrl>
|
||||
<iconUrl>https://umbraco.com/dist/nuget/logo-small.png</iconUrl>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<description>Installs Umbraco Cms in your Visual Studio ASP.NET Core project</description>
|
||||
<summary>Installs Umbraco Cms in your Visual Studio ASP.NET Core project</summary>
|
||||
<language>en-US</language>
|
||||
<tags>umbraco</tags>
|
||||
<repository type="git" url="https://github.com/umbraco/umbraco-cms" />
|
||||
<dependencies>
|
||||
<group targetFramework="net6.0">
|
||||
<dependency id="Umbraco.Cms.Web.Website" version="[$version$]" />
|
||||
<dependency id="Umbraco.Cms.Web.BackOffice" version="[$version$]" />
|
||||
<dependency id="Umbraco.Cms.StaticAssets" version="[$version$]" />
|
||||
<dependency id="Umbraco.Cms.Persistence.SqlServer" version="[$version$]" />
|
||||
<dependency id="Umbraco.Cms.Persistence.Sqlite" version="[$version$]" />
|
||||
</group>
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="buildTransitive\Umbraco.Cms.props" target="buildTransitive" />
|
||||
</files>
|
||||
</package>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,95 +0,0 @@
|
||||
|
||||
# this script should be dot-sourced into the build.ps1 scripts
|
||||
# right after the parameters declaration
|
||||
# ie
|
||||
# . "$PSScriptRoot\build-bootstrap.ps1"
|
||||
|
||||
# THIS FILE IS DISTRIBUTED AS PART OF UMBRACO.BUILD
|
||||
# DO NOT MODIFY IT - ALWAYS USED THE COMMON VERSION
|
||||
|
||||
# ################################################################
|
||||
# BOOTSTRAP
|
||||
# ################################################################
|
||||
|
||||
# reset errors
|
||||
$error.Clear()
|
||||
|
||||
# ensure we have temp folder for downloads
|
||||
$scriptRoot = "$PSScriptRoot"
|
||||
$scriptTemp = "$scriptRoot\temp"
|
||||
if (-not (test-path $scriptTemp)) { mkdir $scriptTemp > $null }
|
||||
|
||||
# get NuGet
|
||||
$cache = 4
|
||||
$nuget = "$scriptTemp\nuget.exe"
|
||||
# ensure the correct NuGet-source is used. This one is used by Umbraco
|
||||
$nugetsourceUmbraco = "https://www.myget.org/F/umbracoprereleases/api/v3/index.json"
|
||||
if (-not $local)
|
||||
{
|
||||
$source = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
|
||||
if ((test-path $nuget) -and ((ls $nuget).CreationTime -lt [DateTime]::Now.AddDays(-$cache)))
|
||||
{
|
||||
Remove-Item $nuget -force -errorAction SilentlyContinue > $null
|
||||
}
|
||||
if (-not (test-path $nuget))
|
||||
{
|
||||
Write-Host "Download NuGet..."
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
Invoke-WebRequest $source -OutFile $nuget
|
||||
if (-not $?) { throw "Failed to download NuGet." }
|
||||
}
|
||||
}
|
||||
elseif (-not (test-path $nuget))
|
||||
{
|
||||
throw "Failed to locate NuGet.exe."
|
||||
}
|
||||
|
||||
# NuGet notes
|
||||
# As soon as we use -ConfigFile, NuGet uses that file, and only that file, and does not
|
||||
# merge configuration from system level. See comments in NuGet.Client solution, class
|
||||
# NuGet.Configuration.Settings, method LoadDefaultSettings.
|
||||
# For NuGet to merge configurations, it needs to "find" the file in the current directory,
|
||||
# or above. Which means we cannot really use -ConfigFile but instead have to have Umbraco's
|
||||
# NuGet.config file at root, and always run NuGet.exe while at root or in a directory below
|
||||
# root.
|
||||
|
||||
$solutionRoot = "$scriptRoot\.."
|
||||
$testPwd = [System.IO.Path]::GetFullPath($pwd.Path) + "\"
|
||||
$testRoot = [System.IO.Path]::GetFullPath($solutionRoot) + "\"
|
||||
if (-not $testPwd.ToLower().StartsWith($testRoot.ToLower()))
|
||||
{
|
||||
throw "Cannot run outside of the solution's root."
|
||||
}
|
||||
|
||||
# get the build system
|
||||
if (-not $local)
|
||||
{
|
||||
$params = "-OutputDirectory", $scriptTemp, "-Verbosity", "quiet", "-PreRelease", "-Source", $nugetsourceUmbraco
|
||||
&$nuget install Umbraco.Build @params
|
||||
if (-not $?) { throw "Failed to download Umbraco.Build." }
|
||||
}
|
||||
|
||||
# ensure we have the build system
|
||||
$ubuildPath = ls "$scriptTemp\Umbraco.Build.*" | sort -property CreationTime -descending | select -first 1
|
||||
if (-not $ubuildPath)
|
||||
{
|
||||
throw "Failed to locate the build system."
|
||||
}
|
||||
|
||||
# boot the build system
|
||||
# this creates $global:ubuild
|
||||
return &"$ubuildPath\ps\Boot.ps1"
|
||||
|
||||
# at that point the build.ps1 script must boot the build system
|
||||
# eg
|
||||
# $ubuild.Boot($ubuildPath.FullName, [System.IO.Path]::GetFullPath("$scriptRoot\.."),
|
||||
# @{ Local = $local; With7Zip = $false; WithNode = $false },
|
||||
# @{ continue = $continue })
|
||||
# if (-not $?) { throw "Failed to boot the build system." }
|
||||
#
|
||||
# and it's good practice to report
|
||||
# eg
|
||||
# Write-Host "Umbraco.Whatever Build"
|
||||
# Write-Host "Umbraco.Build v$($ubuild.BuildVersion)"
|
||||
|
||||
# eof
|
||||
491
build/build.ps1
491
build/build.ps1
@@ -1,491 +0,0 @@
|
||||
|
||||
param (
|
||||
# get, don't execute
|
||||
[Parameter(Mandatory=$false)]
|
||||
[Alias("g")]
|
||||
[switch] $get = $false,
|
||||
|
||||
# run local, don't download, assume everything is ready
|
||||
[Parameter(Mandatory=$false)]
|
||||
[Alias("l")]
|
||||
[Alias("loc")]
|
||||
[switch] $local = $false,
|
||||
|
||||
# enable docfx
|
||||
[Parameter(Mandatory=$false)]
|
||||
[Alias("doc")]
|
||||
[switch] $docfx = $false,
|
||||
|
||||
# keep the build directories, don't clear them
|
||||
[Parameter(Mandatory=$false)]
|
||||
[Alias("c")]
|
||||
[Alias("cont")]
|
||||
[switch] $continue = $false,
|
||||
|
||||
# execute a command
|
||||
[Parameter(Mandatory=$false, ValueFromRemainingArguments=$true)]
|
||||
[String[]]
|
||||
$command
|
||||
)
|
||||
|
||||
# ################################################################
|
||||
# BOOTSTRAP
|
||||
# ################################################################
|
||||
|
||||
# create and boot the buildsystem
|
||||
$ubuild = &"$PSScriptRoot\build-bootstrap.ps1"
|
||||
if (-not $?) { return }
|
||||
$ubuild.Boot($PSScriptRoot,
|
||||
@{ Local = $local; WithDocFx = $docfx },
|
||||
@{ Continue = $continue })
|
||||
if ($ubuild.OnError()) { return }
|
||||
|
||||
Write-Host "Umbraco CMS Build"
|
||||
Write-Host "Umbraco.Build v$($ubuild.BuildVersion)"
|
||||
|
||||
# ################################################################
|
||||
# TASKS
|
||||
# ################################################################
|
||||
|
||||
$ubuild.DefineMethod("SetMoreUmbracoVersion",
|
||||
{
|
||||
param ( $semver )
|
||||
|
||||
$port = "" + $semver.Major + $semver.Minor + ("" + $semver.Patch).PadLeft(2, '0')
|
||||
Write-Host "Update port in launchSettings.json to $port"
|
||||
$filePath = "$($this.SolutionRoot)\src\Umbraco.Web.UI\Properties\launchSettings.json"
|
||||
$this.ReplaceFileText($filePath, `
|
||||
"http://localhost:(\d+)?", `
|
||||
"http://localhost:$port")
|
||||
})
|
||||
|
||||
$ubuild.DefineMethod("SandboxNode",
|
||||
{
|
||||
$global:node_path = $env:path
|
||||
$nodePath = $this.BuildEnv.NodePath
|
||||
$gitExe = (Get-Command git).Source
|
||||
if (-not $gitExe) { $gitExe = (Get-Command git).Path }
|
||||
$gitPath = [System.IO.Path]::GetDirectoryName($gitExe)
|
||||
$env:path = "$nodePath;$gitPath"
|
||||
|
||||
$global:node_nodepath = $this.ClearEnvVar("NODEPATH")
|
||||
$global:node_npmcache = $this.ClearEnvVar("NPM_CONFIG_CACHE")
|
||||
$global:node_npmprefix = $this.ClearEnvVar("NPM_CONFIG_PREFIX")
|
||||
|
||||
# https://github.com/gruntjs/grunt-contrib-connect/issues/235
|
||||
$this.SetEnvVar("NODE_NO_HTTP2", "1")
|
||||
})
|
||||
|
||||
$ubuild.DefineMethod("RestoreNode",
|
||||
{
|
||||
$env:path = $node_path
|
||||
|
||||
$this.SetEnvVar("NODEPATH", $node_nodepath)
|
||||
$this.SetEnvVar("NPM_CONFIG_CACHE", $node_npmcache)
|
||||
$this.SetEnvVar("NPM_CONFIG_PREFIX", $node_npmprefix)
|
||||
|
||||
$this.ClearEnvVar("NODE_NO_HTTP2")
|
||||
})
|
||||
|
||||
$ubuild.DefineMethod("CompileBelle",
|
||||
{
|
||||
$src = "$($this.SolutionRoot)\src"
|
||||
$log = "$($this.BuildTemp)\belle.log"
|
||||
|
||||
|
||||
Write-Host "Compile Belle"
|
||||
Write-Host "Logging to $log"
|
||||
|
||||
# get a temp clean node env (will restore)
|
||||
$this.SandboxNode()
|
||||
|
||||
# stupid PS is going to gather all "warnings" in $error
|
||||
# so we have to take care of it else they'll bubble and kill the build
|
||||
if ($error.Count -gt 0) { return }
|
||||
|
||||
try {
|
||||
Push-Location "$($this.SolutionRoot)\src\Umbraco.Web.UI.Client"
|
||||
Write-Output "" > $log
|
||||
|
||||
Write-Output "### node version is:" > $log
|
||||
node -v >> $log 2>&1
|
||||
if (-not $?) { throw "Failed to report node version." }
|
||||
|
||||
Write-Output "### npm version is:" >> $log 2>&1
|
||||
npm -v >> $log 2>&1
|
||||
if (-not $?) { throw "Failed to report npm version." }
|
||||
|
||||
Write-Output "### clean npm cache" >> $log 2>&1
|
||||
npm cache clean --force >> $log 2>&1
|
||||
$error.Clear() # that one can fail 'cos security bug - ignore
|
||||
|
||||
Write-Output "### npm ci" >> $log 2>&1
|
||||
npm ci >> $log 2>&1
|
||||
Write-Output ">> $? $($error.Count)" >> $log 2>&1
|
||||
# Don't really care about the messages from npm ci making us think there are errors
|
||||
$error.Clear()
|
||||
|
||||
Write-Output "### gulp build for version $($this.Version.Release)" >> $log 2>&1
|
||||
npm run build --buildversion=$this.Version.Release >> $log 2>&1
|
||||
|
||||
# We can ignore this warning, we need to update to node 12 at some point - https://github.com/jsdom/jsdom/issues/2939
|
||||
$indexes = [System.Collections.ArrayList]::new()
|
||||
$index = 0;
|
||||
$error | ForEach-Object {
|
||||
# Find which of the errors is the ExperimentalWarning
|
||||
if($_.ToString().Contains("ExperimentalWarning: The fs.promises API is experimental")) {
|
||||
[void]$indexes.Add($index)
|
||||
}
|
||||
$index++
|
||||
}
|
||||
$indexes | ForEach-Object {
|
||||
# Loop through the list of indexes and remove the errors that we expect and feel confident we can ignore
|
||||
$error.Remove($error[$_])
|
||||
}
|
||||
|
||||
if (-not $?) { throw "Failed to build" } # that one is expected to work
|
||||
} finally {
|
||||
Pop-Location
|
||||
|
||||
# FIXME: should we filter the log to find errors?
|
||||
#get-content .\build.tmp\belle.log | %{ if ($_ -match "build") { write $_}}
|
||||
|
||||
# restore
|
||||
$this.RestoreNode()
|
||||
}
|
||||
|
||||
# setting node_modules folder to hidden
|
||||
# used to prevent VS13 from crashing on it while loading the websites project
|
||||
# also makes sure aspnet compiler does not try to handle rogue files and chokes
|
||||
# in VSO with Microsoft.VisualC.CppCodeProvider -related errors
|
||||
# use get-item -force 'cos it might be hidden already
|
||||
Write-Host "Set hidden attribute on node_modules"
|
||||
$dir = Get-Item -force "$src\Umbraco.Web.UI.Client\node_modules"
|
||||
$dir.Attributes = $dir.Attributes -bor ([System.IO.FileAttributes]::Hidden)
|
||||
})
|
||||
|
||||
$ubuild.DefineMethod("CompileUmbraco",
|
||||
{
|
||||
$buildConfiguration = "Release"
|
||||
|
||||
$src = "$($this.SolutionRoot)\src"
|
||||
$log = "$($this.BuildTemp)\build.umbraco.log"
|
||||
|
||||
Write-Host "Compile Umbraco"
|
||||
Write-Host "Logging to $log"
|
||||
|
||||
& dotnet build "$src\Umbraco.Web.UI\Umbraco.Web.UI.csproj" `
|
||||
--configuration $buildConfiguration `
|
||||
--output "$($this.BuildTemp)\bin\\" `
|
||||
> $log
|
||||
|
||||
# get files into WebApp\bin
|
||||
& dotnet publish "$src\Umbraco.Web.UI\Umbraco.Web.UI.csproj" `
|
||||
--configuration Release --output "$($this.BuildTemp)\WebApp\bin\\" `
|
||||
> $log
|
||||
|
||||
# remove extra files
|
||||
$webAppBin = "$($this.BuildTemp)\WebApp\bin"
|
||||
$excludeDirs = @("$($webAppBin)\refs","$($webAppBin)\runtimes","$($webAppBin)\umbraco","$($webAppBin)\wwwroot")
|
||||
$excludeFiles = @("$($webAppBin)\appsettings.*","$($webAppBin)\*.deps.json","$($webAppBin)\*.exe","$($webAppBin)\*.config","$($webAppBin)\*.runtimeconfig.json")
|
||||
$this.RemoveDirectory($excludeDirs)
|
||||
$this.RemoveFile($excludeFiles)
|
||||
|
||||
# copy rest of the files into WebApp
|
||||
$excludeUmbracoDirs = @("$($this.BuildTemp)\WebApp\umbraco\lib","$($this.BuildTemp)\WebApp\umbraco\Data","$($this.BuildTemp)\WebApp\umbraco\Logs")
|
||||
$this.RemoveDirectory($excludeUmbracoDirs)
|
||||
$this.CopyFiles("$($this.SolutionRoot)\src\Umbraco.Web.UI\Views", "*", "$($this.BuildTemp)\WebApp\Views")
|
||||
Copy-Item "$($this.SolutionRoot)\src\Umbraco.Web.UI\appsettings.json" "$($this.BuildTemp)\WebApp"
|
||||
|
||||
if (-not $?) { throw "Failed to compile Umbraco.Web.UI." }
|
||||
|
||||
# /p:UmbracoBuild tells the csproj that we are building from PS, not VS
|
||||
})
|
||||
|
||||
$ubuild.DefineMethod("CompileJsonSchema",
|
||||
{
|
||||
Write-Host "Generating JSON Schema for AppSettings"
|
||||
Write-Host "Logging to $($this.BuildTemp)\json.schema.log"
|
||||
|
||||
## NOTE: Need to specify the outputfile to point to the build temp folder
|
||||
&dotnet run --project "$($this.SolutionRoot)\src\JsonSchema\JsonSchema.csproj" `
|
||||
-c Release > "$($this.BuildTemp)\json.schema.log" `
|
||||
-- `
|
||||
--outputFile "$($this.BuildTemp)\WebApp\umbraco\config\appsettings-schema.json"
|
||||
})
|
||||
|
||||
$ubuild.DefineMethod("PrepareTests",
|
||||
{
|
||||
Write-Host "Prepare Tests"
|
||||
|
||||
# FIXME: - idea is to avoid rebuilding everything for tests
|
||||
# but because of our weird assembly versioning (with .* stuff)
|
||||
# everything gets rebuilt all the time...
|
||||
#Copy-Files "$tmp\bin" "." "$tmp\tests"
|
||||
|
||||
# data
|
||||
Write-Host "Copy data files"
|
||||
if (-not (Test-Path -Path "$($this.BuildTemp)\tests\Packaging" ))
|
||||
{
|
||||
Write-Host "Create packaging directory"
|
||||
mkdir "$($this.BuildTemp)\tests\Packaging" > $null
|
||||
}
|
||||
#$this.CopyFiles("$($this.SolutionRoot)\src\Umbraco.Tests\Packaging\Packages", "*", "$($this.BuildTemp)\tests\Packaging\Packages")
|
||||
|
||||
# required for package install tests
|
||||
if (-not (Test-Path -Path "$($this.BuildTemp)\tests\bin" ))
|
||||
{
|
||||
Write-Host "Create bin directory"
|
||||
mkdir "$($this.BuildTemp)\tests\bin" > $null
|
||||
}
|
||||
})
|
||||
|
||||
$ubuild.DefineMethod("CompileTests",
|
||||
{
|
||||
$buildConfiguration = "Release"
|
||||
$log = "$($this.BuildTemp)\msbuild.tests.log"
|
||||
|
||||
Write-Host "Compile Tests"
|
||||
Write-Host "Logging to $log"
|
||||
|
||||
# beware of the weird double \\ at the end of paths
|
||||
# see http://edgylogic.com/blog/powershell-and-external-commands-done-right/
|
||||
&dotnet msbuild "$($this.SolutionRoot)\tests\Umbraco.Tests\Umbraco.Tests.csproj" `
|
||||
-target:Build `
|
||||
-property:WarningLevel=0 `
|
||||
-property:Configuration=$buildConfiguration `
|
||||
-property:Platform=AnyCPU `
|
||||
-property:UseWPP_CopyWebApplication=True `
|
||||
-property:PipelineDependsOnBuild=False `
|
||||
-property:OutDir="$($this.BuildTemp)\tests\\" `
|
||||
-property:Verbosity=minimal `
|
||||
-property:UmbracoBuild=True `
|
||||
> $log
|
||||
|
||||
if (-not $?) { throw "Failed to compile tests." }
|
||||
|
||||
# /p:UmbracoBuild tells the csproj that we are building from PS
|
||||
})
|
||||
|
||||
$ubuild.DefineMethod("PreparePackages",
|
||||
{
|
||||
Write-Host "Prepare Packages"
|
||||
|
||||
$src = "$($this.SolutionRoot)\src"
|
||||
$tmp = "$($this.BuildTemp)"
|
||||
|
||||
# cleanup build
|
||||
Write-Host "Clean build"
|
||||
$this.RemoveFile("$tmp\bin\*.dll.config")
|
||||
$this.RemoveFile("$tmp\WebApp\bin\*.dll.config")
|
||||
|
||||
# cleanup presentation
|
||||
Write-Host "Cleanup presentation"
|
||||
$this.RemoveDirectory("$tmp\WebApp\umbraco.presentation")
|
||||
|
||||
# create directories
|
||||
Write-Host "Create directories"
|
||||
mkdir "$tmp\WebApp\App_Data" > $null
|
||||
#mkdir "$tmp\WebApp\Media" > $null
|
||||
#mkdir "$tmp\WebApp\Views" > $null
|
||||
|
||||
# copy various files
|
||||
Write-Host "Copy xml documentation"
|
||||
Copy-Item -force "$tmp\bin\*.xml" "$tmp\WebApp\bin"
|
||||
|
||||
# offset the modified timestamps on all umbraco dlls, as WebResources
|
||||
# break if date is in the future, which, due to timezone offsets can happen.
|
||||
Write-Host "Offset dlls timestamps"
|
||||
Get-ChildItem -r "$tmp\*.dll" | ForEach-Object {
|
||||
$_.CreationTime = $_.CreationTime.AddHours(-11)
|
||||
$_.LastWriteTime = $_.LastWriteTime.AddHours(-11)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
$ubuild.DefineMethod("PrepareBuild",
|
||||
{
|
||||
Write-host "Set environment"
|
||||
$env:UMBRACO_VERSION=$this.Version.Semver.ToString()
|
||||
$env:UMBRACO_RELEASE=$this.Version.Release
|
||||
$env:UMBRACO_COMMENT=$this.Version.Comment
|
||||
$env:UMBRACO_BUILD=$this.Version.Build
|
||||
$env:UMBRACO_TMP="$($this.SolutionRoot)\build.tmp"
|
||||
|
||||
if ($args -and $args[0] -eq "vso")
|
||||
{
|
||||
Write-host "Set VSO environment"
|
||||
# set environment variable for VSO
|
||||
# https://github.com/Microsoft/vsts-tasks/issues/375
|
||||
# https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
|
||||
Write-Host ("##vso[task.setvariable variable=UMBRACO_VERSION;]$($this.Version.Semver.ToString())")
|
||||
Write-Host ("##vso[task.setvariable variable=UMBRACO_RELEASE;]$($this.Version.Release)")
|
||||
Write-Host ("##vso[task.setvariable variable=UMBRACO_COMMENT;]$($this.Version.Comment)")
|
||||
Write-Host ("##vso[task.setvariable variable=UMBRACO_BUILD;]$($this.Version.Build)")
|
||||
|
||||
Write-Host ("##vso[task.setvariable variable=UMBRACO_TMP;]$($this.SolutionRoot)\build.tmp")
|
||||
}
|
||||
})
|
||||
|
||||
$nugetsourceUmbraco = "https://api.nuget.org/v3/index.json"
|
||||
|
||||
$ubuild.DefineMethod("RestoreNuGet",
|
||||
{
|
||||
Write-Host "Restore NuGet"
|
||||
Write-Host "Logging to $($this.BuildTemp)\nuget.restore.log"
|
||||
$params = "-Source", $nugetsourceUmbraco
|
||||
&$this.BuildEnv.NuGet restore "$($this.SolutionRoot)\umbraco.sln" > "$($this.BuildTemp)\nuget.restore.log" @params
|
||||
if (-not $?) { throw "Failed to restore NuGet packages." }
|
||||
})
|
||||
|
||||
$ubuild.DefineMethod("PackageNuGet",
|
||||
{
|
||||
$nuspecs = "$($this.SolutionRoot)\build\NuSpecs"
|
||||
$templates = "$($this.SolutionRoot)\templates"
|
||||
|
||||
Write-Host "Create NuGet packages"
|
||||
|
||||
&dotnet pack "$($this.SolutionRoot)\umbraco.sln" `
|
||||
--output "$($this.BuildOutput)" `
|
||||
--verbosity detailed `
|
||||
-c Release `
|
||||
-p:PackageVersion="$($this.Version.Semver.ToString())" > "$($this.BuildTemp)\pack.umbraco.log"
|
||||
|
||||
&$this.BuildEnv.NuGet Pack "$nuspecs\UmbracoCms.nuspec" `
|
||||
-Properties BuildTmp="$($this.BuildTemp)" `
|
||||
-Version "$($this.Version.Semver.ToString())" `
|
||||
-Verbosity detailed -outputDirectory "$($this.BuildOutput)" > "$($this.BuildTemp)\nupack.cms.log"
|
||||
if (-not $?) { throw "Failed to pack NuGet UmbracoCms." }
|
||||
|
||||
&$this.BuildEnv.NuGet Pack "$templates\Umbraco.Templates.nuspec" `
|
||||
-Properties BuildTmp="$($this.BuildTemp)" `
|
||||
-Version "$($this.Version.Semver.ToString())" `
|
||||
-NoDefaultExcludes `
|
||||
-Verbosity detailed -outputDirectory "$($this.BuildOutput)" > "$($this.BuildTemp)\nupack.templates.log"
|
||||
if (-not $?) { throw "Failed to pack NuGet Umbraco.Templates." }
|
||||
|
||||
# run hook
|
||||
if ($this.HasMethod("PostPackageNuGet"))
|
||||
{
|
||||
Write-Host "Run PostPackageNuGet hook"
|
||||
$this.PostPackageNuGet();
|
||||
if (-not $?) { throw "Failed to run hook." }
|
||||
}
|
||||
})
|
||||
|
||||
$ubuild.DefineMethod("VerifyNuGet",
|
||||
{
|
||||
$this.VerifyNuGetConsistency(
|
||||
("UmbracoCms"),
|
||||
("Umbraco.Core", "Umbraco.Infrastructure", "Umbraco.Web.UI", "Umbraco.Examine.Lucene", "Umbraco.PublishedCache.NuCache", "Umbraco.Web.Common", "Umbraco.Web.Website", "Umbraco.Web.BackOffice", "Umbraco.Cms.Persistence.Sqlite", "Umbraco.Cms.Persistence.SqlServer"))
|
||||
if ($this.OnError()) { return }
|
||||
})
|
||||
|
||||
$ubuild.DefineMethod("PrepareCSharpDocs",
|
||||
{
|
||||
Write-Host "Prepare C# Documentation"
|
||||
|
||||
$src = "$($this.SolutionRoot)\src"
|
||||
$tmp = $this.BuildTemp
|
||||
$out = $this.BuildOutput
|
||||
$DocFxJson = Join-Path -Path $src "\ApiDocs\docfx.json"
|
||||
$DocFxSiteOutput = Join-Path -Path $tmp "\_site\*.*"
|
||||
|
||||
# run DocFx
|
||||
$DocFx = $this.BuildEnv.DocFx
|
||||
|
||||
& $DocFx metadata $DocFxJson
|
||||
& $DocFx build $DocFxJson
|
||||
|
||||
# zip it
|
||||
& $this.BuildEnv.Zip a -tzip -r "$out\csharp-docs.zip" $DocFxSiteOutput
|
||||
})
|
||||
|
||||
$ubuild.DefineMethod("PrepareAngularDocs",
|
||||
{
|
||||
Write-Host "Prepare Angular Documentation"
|
||||
|
||||
$src = "$($this.SolutionRoot)\src"
|
||||
$out = $this.BuildOutput
|
||||
|
||||
# Check if the solution has been built
|
||||
if (!(Test-Path "$src\Umbraco.Web.UI.Client\node_modules")) {throw "Umbraco needs to be built before generating the Angular Docs"}
|
||||
|
||||
"Moving to Umbraco.Web.UI.Docs folder"
|
||||
cd $src\Umbraco.Web.UI.Docs
|
||||
|
||||
"Generating the docs and waiting before executing the next commands"
|
||||
& npm ci
|
||||
& npx gulp docs
|
||||
|
||||
Pop-Location
|
||||
|
||||
# change baseUrl
|
||||
$BaseUrl = "https://apidocs.umbraco.com/v9/ui/"
|
||||
$IndexPath = "./api/index.html"
|
||||
(Get-Content $IndexPath).replace('origin + location.href.substr(origin.length).replace(rUrl, indexFile)', "`'" + $BaseUrl + "`'") | Set-Content $IndexPath
|
||||
|
||||
# zip it
|
||||
& $this.BuildEnv.Zip a -tzip -r "$out\ui-docs.zip" "$src\Umbraco.Web.UI.Docs\api\*.*"
|
||||
})
|
||||
|
||||
$ubuild.DefineMethod("Build",
|
||||
{
|
||||
$error.Clear()
|
||||
|
||||
$this.PrepareBuild()
|
||||
if ($this.OnError()) { return }
|
||||
$this.RestoreNuGet()
|
||||
if ($this.OnError()) { return }
|
||||
$this.CompileBelle()
|
||||
if ($this.OnError()) { return }
|
||||
$this.CompileUmbraco()
|
||||
if ($this.OnError()) { return }
|
||||
$this.CompileJsonSchema()
|
||||
if ($this.OnError()) { return }
|
||||
$this.PrepareTests()
|
||||
if ($this.OnError()) { return }
|
||||
$this.CompileTests()
|
||||
if ($this.OnError()) { return }
|
||||
# not running tests
|
||||
$this.PreparePackages()
|
||||
if ($this.OnError()) { return }
|
||||
$this.VerifyNuGet()
|
||||
if ($this.OnError()) { return }
|
||||
$this.PackageNuGet()
|
||||
if ($this.OnError()) { return }
|
||||
$this.PostPackageHook()
|
||||
if ($this.OnError()) { return }
|
||||
|
||||
Write-Host "Done"
|
||||
})
|
||||
|
||||
$ubuild.DefineMethod("PostPackageHook",
|
||||
{
|
||||
# run hook
|
||||
if ($this.HasMethod("PostPackage"))
|
||||
{
|
||||
Write-Host "Run PostPackage hook"
|
||||
$this.PostPackage();
|
||||
if (-not $?) { throw "Failed to run hook." }
|
||||
}
|
||||
})
|
||||
|
||||
# ################################################################
|
||||
# RUN
|
||||
# ################################################################
|
||||
|
||||
# configure
|
||||
$ubuild.ReleaseBranches = @( "master" )
|
||||
|
||||
# run
|
||||
if (-not $get)
|
||||
{
|
||||
if ($command.Length -eq 0)
|
||||
{
|
||||
$command = @( "Build" )
|
||||
}
|
||||
$ubuild.RunMethod($command);
|
||||
if ($ubuild.OnError()) { return }
|
||||
}
|
||||
if ($get) { return $ubuild }
|
||||
@@ -3,18 +3,17 @@
|
||||
{
|
||||
"src": [
|
||||
{
|
||||
"src": "../",
|
||||
"src": "../../src",
|
||||
"files": [
|
||||
"**/*.csproj",
|
||||
"**/Umbraco.Infrastructure/**/*.cs"
|
||||
"**/*.csproj"
|
||||
],
|
||||
"exclude": [
|
||||
"**/obj/**",
|
||||
"**/bin/**",
|
||||
"**/Umbraco.Web.csproj",
|
||||
"**/Umbraco.Infrastructure.csproj",
|
||||
"**/Umbraco.Web.UI.csproj",
|
||||
"**/**.Test**/*.csproj"
|
||||
"**/Umbraco.Cms.StaticAssets.csproj",
|
||||
"**/JsonSchema.csproj"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -7,7 +7,7 @@ namespace JsonSchema
|
||||
{
|
||||
internal class Options
|
||||
{
|
||||
[Option('o', "outputFile", Required = false, HelpText = "Set path of the output file.", Default = "../../../../Umbraco.Web.UI/umbraco/config/appsettings-schema.json")]
|
||||
[Option('o', "outputFile", Required = false, HelpText = "Set path of the output file.", Default = "../../../../Umbraco.Web.UI/appsettings-schema.json")]
|
||||
public string OutputFile { get; set; } = null!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,8 +37,6 @@
|
||||
<Message Text="Skip Belle because $(BellePath) exists." Importance="High" Condition="Exists('$(BellePath)')" />
|
||||
<Message Text="Build Belle because UmbracoBuild is empty (this is Visual Studio), and $(BellePath) does not exist." Importance="High" Condition="!Exists('$(BellePath)') and '$(UmbracoBuild)' == ''" />
|
||||
<CallTarget Targets="BelleBuild" Condition="!Exists('$(BellePath)') and '$(UmbracoBuild)' == ''" />
|
||||
<Message Text="Skip JsonSchema generation because $(JsonSchemaPath) exists." Importance="High" Condition="Exists('$(JsonSchemaPath)')" />
|
||||
<Message Text="Generate the appsettings json schema." Importance="High" Condition="!Exists('$(JsonSchemaPath)') and '$(UmbracoBuild)' == ''" />
|
||||
</Target>
|
||||
|
||||
|
||||
@@ -57,8 +55,6 @@
|
||||
<BelleLib Include="$(BellePath)" />
|
||||
</ItemGroup>
|
||||
<RemoveDir Directories="@(BelleLib)" Condition="Exists('$(BellePath)') and !Exists('$(SolutionDir)preserve.belle')" />
|
||||
<Message Text="Remove $(JsonSchemaPath)." Importance="High" Condition="Exists('$(JsonSchemaPath)') and !Exists('$(SolutionDir)preserve.jsonschema')" />
|
||||
<Delete Files="$(JsonSchemaPath)" Condition="Exists('$(JsonSchemaPath)') and !Exists('$(SolutionDir)preserve.jsonschema')" />
|
||||
</Target>
|
||||
|
||||
|
||||
|
||||
45
src/Umbraco.Cms/Umbraco.Cms.csproj
Normal file
45
src/Umbraco.Cms/Umbraco.Cms.csproj
Normal file
@@ -0,0 +1,45 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||
<PackageId>Umbraco.Cms</PackageId>
|
||||
<Title>Umbraco.Cms</Title>
|
||||
<Description>Installs Umbraco CMS in your ASP.NET Core project</Description>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Umbraco.Cms.Persistence.Sqlite\Umbraco.Cms.Persistence.Sqlite.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Cms.Persistence.SqlServer\Umbraco.Cms.Persistence.SqlServer.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Cms.StaticAssets\Umbraco.Cms.StaticAssets.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Web.BackOffice\Umbraco.Web.BackOffice.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Web.Website\Umbraco.Web.Website.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<JsonSchemaPath>$(ProjectDir)appsettings-schema.json</JsonSchemaPath>
|
||||
<JsonSchemaProjectPath>$(ProjectDir)../JsonSchema/</JsonSchemaProjectPath>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="buildTransitive\**" PackagePath="buildTransitive" />
|
||||
<Content Include="$(JsonSchemaPath)" PackagePath="."/>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="CheckPreConditions" BeforeTargets="Build">
|
||||
<Message Text="JsonSchemaPath: $(JsonSchemaPath)" Importance="high" />
|
||||
|
||||
<Message Text="Skip JsonSchema generation because $(JsonSchemaPath) exists." Condition="Exists('$(JsonSchemaPath)')" />
|
||||
<Message Text="Generate the appsettings json schema." Importance="high" Condition="!Exists('$(JsonSchemaPath)')" />
|
||||
<CallTarget Targets="JsonSchemaBuild" Condition="!Exists('$(JsonSchemaPath)')" />
|
||||
</Target>
|
||||
|
||||
<Target Name="JsonSchemaBuild">
|
||||
<Exec WorkingDirectory="$(JsonSchemaProjectPath)" Command="dotnet run -c Release -o "../Umbraco.Cms/appsettings-schema.json"" />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="buildTransitive\**" PackagePath="buildTransitive" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
16
src/Umbraco.Cms/buildTransitive/Umbraco.Cms.targets
Normal file
16
src/Umbraco.Cms/buildTransitive/Umbraco.Cms.targets
Normal file
@@ -0,0 +1,16 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<SchemaFilePath>$(MSBuildThisFileDirectory)..\appsettings-schema.json</SchemaFilePath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="CopyUmbracoSchema" BeforeTargets="Build">
|
||||
<ItemGroup>
|
||||
<SchemaFile Include="$(SchemaFilePath)"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Message Text="Copying Umbraco json schema file" Importance="high"/>
|
||||
<Copy SourceFiles="@(SchemaFile)"
|
||||
DestinationFolder="$(MSBuildProjectDirectory)"
|
||||
SkipUnchangedFiles="true" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -13,6 +13,7 @@ using Umbraco.Cms.Core.PropertyEditors;
|
||||
using Umbraco.Cms.Core.PropertyEditors.Validators;
|
||||
using Umbraco.Cms.Core.Routing;
|
||||
using Umbraco.Cms.Core.Sections;
|
||||
using Umbraco.Cms.Core.Snippets;
|
||||
using Umbraco.Cms.Core.Strings;
|
||||
using Umbraco.Cms.Core.Tour;
|
||||
using Umbraco.Cms.Core.Trees;
|
||||
@@ -90,6 +91,8 @@ namespace Umbraco.Cms.Core.DependencyInjection
|
||||
.Add<RedirectUrlDashboard>()
|
||||
.Add<SettingsDashboard>()
|
||||
.Add(builder.TypeLoader.GetTypes<IDashboard>());
|
||||
builder.PartialViewSnippets();
|
||||
builder.PartialViewMacroSnippets();
|
||||
builder.DataValueReferenceFactories();
|
||||
builder.PropertyValueConverters().Append(builder.TypeLoader.GetTypes<IPropertyValueConverter>());
|
||||
builder.UrlSegmentProviders().Append<DefaultUrlSegmentProvider>();
|
||||
@@ -200,6 +203,20 @@ namespace Umbraco.Cms.Core.DependencyInjection
|
||||
public static DashboardCollectionBuilder Dashboards(this IUmbracoBuilder builder)
|
||||
=> builder.WithCollectionBuilder<DashboardCollectionBuilder>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the partial view snippets collection builder.
|
||||
/// </summary>
|
||||
/// <param name="builder">The builder.</param>
|
||||
public static PartialViewSnippetCollectionBuilder? PartialViewSnippets(this IUmbracoBuilder builder)
|
||||
=> builder.WithCollectionBuilder<PartialViewSnippetCollectionBuilder>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the partial view macro snippets collection builder.
|
||||
/// </summary>
|
||||
/// <param name="builder">The builder.</param>
|
||||
public static PartialViewMacroSnippetCollectionBuilder? PartialViewMacroSnippets(this IUmbracoBuilder builder)
|
||||
=> builder.WithCollectionBuilder<PartialViewMacroSnippetCollectionBuilder>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the cache refreshers collection builder.
|
||||
/// </summary>
|
||||
|
||||
@@ -35,6 +35,7 @@ using Umbraco.Cms.Core.Runtime;
|
||||
using Umbraco.Cms.Core.Scoping;
|
||||
using Umbraco.Cms.Core.Security;
|
||||
using Umbraco.Cms.Core.Services;
|
||||
using Umbraco.Cms.Core.Snippets;
|
||||
using Umbraco.Cms.Core.Sync;
|
||||
using Umbraco.Cms.Core.Telemetry;
|
||||
using Umbraco.Cms.Core.Templates;
|
||||
|
||||
@@ -2181,18 +2181,19 @@ Mange hilsner fra Umbraco robotten
|
||||
være muligt. Indholdet vil blive vist som ikke understøttet indhold.
|
||||
</key>
|
||||
<key alias="blockConfigurationOverlayTitle"><![CDATA[Konfiguration af '%0%']]></key>
|
||||
<key alias="elementTypeDoesNotExist">Kan ikke redigeres fordi elementtypen ikke eksisterer.</key>
|
||||
<key alias="thumbnail">Billede</key>
|
||||
<key alias="addThumbnail">Tilføj billede</key>
|
||||
<key alias="tabCreateEmpty">Opret ny</key>
|
||||
<key alias="tabClipboard">Udklipsholder</key>
|
||||
<key alias="tabBlockSettings">Indstillinger</key>
|
||||
<key alias="headlineAdvanced">Avanceret</key>
|
||||
<key alias="forceHideContentEditor">Skjuld indholds editoren</key>
|
||||
<key alias="forceHideContentEditor">Skjul indholdseditoren</key>
|
||||
<key alias="blockHasChanges">Du har lavet ændringer til dette indhold. Er du sikker på at du vil kassere dem?</key>
|
||||
<key alias="confirmCancelBlockCreationHeadline">Annuller oprettelse?</key>
|
||||
<key alias="confirmCancelBlockCreationMessage"><![CDATA[Er du sikker på at du vil annullere oprettelsen.]]></key>
|
||||
<key alias="elementTypeDoesNotExistHeadline">Error!</key>
|
||||
<key alias="elementTypeDoesNotExistDescription">The ElementType of this block does not exist anymore</key>
|
||||
<key alias="elementTypeDoesNotExistHeadline">Fejl!</key>
|
||||
<key alias="elementTypeDoesNotExistDescription">Elementtypen for denne blok eksisterer ikke længere</key>
|
||||
<key alias="addBlock">Tilføj indhold</key>
|
||||
<key alias="addThis">Tilføj %0%</key>
|
||||
<key alias="propertyEditorNotSupported">Feltet %0% bruger editor %1% som ikke er supporteret for blokke.</key>
|
||||
|
||||
@@ -2714,6 +2714,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
|
||||
will no longer be available and will be shown as unsupported content.
|
||||
</key>
|
||||
<key alias="blockConfigurationOverlayTitle"><![CDATA[Configuration of '%0%']]></key>
|
||||
<key alias="elementTypeDoesNotExist">Cannot be edited cause ElementType does not exist.</key>
|
||||
<key alias="thumbnail">Thumbnail</key>
|
||||
<key alias="addThumbnail">Add thumbnail</key>
|
||||
<key alias="tabCreateEmpty">Create empty</key>
|
||||
|
||||
@@ -2802,6 +2802,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
|
||||
will no longer be available and will be shown as unsupported content.
|
||||
</key>
|
||||
<key alias="blockConfigurationOverlayTitle"><![CDATA[Configuration of '%0%']]></key>
|
||||
<key alias="elementTypeDoesNotExist">Cannot be edited cause ElementType does not exist.</key>
|
||||
<key alias="thumbnail">Thumbnail</key>
|
||||
<key alias="addThumbnail">Add thumbnail</key>
|
||||
<key alias="tabCreateEmpty">Create empty</key>
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Umbraco.Cms.Core.Models;
|
||||
|
||||
namespace Umbraco.Cms.Core.Services
|
||||
@@ -10,6 +7,7 @@ namespace Umbraco.Cms.Core.Services
|
||||
/// </summary>
|
||||
public interface IFileService : IService
|
||||
{
|
||||
[Obsolete("Please use SnippetCollection.GetPartialViewSnippetNames() or SnippetCollection.GetPartialViewMacroSnippetNames() instead. Scheduled for removal in V12.")]
|
||||
IEnumerable<string> GetPartialViewSnippetNames(params string[] filterNames);
|
||||
void CreatePartialViewFolder(string folderPath);
|
||||
void CreatePartialViewMacroFolder(string folderPath);
|
||||
@@ -295,6 +293,7 @@ namespace Umbraco.Cms.Core.Services
|
||||
/// </summary>
|
||||
/// <param name="snippetName">The name of the snippet</param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("Please use SnippetCollection.GetPartialViewMacroSnippetContent instead. Scheduled for removal in V12.")]
|
||||
string GetPartialViewMacroSnippetContent(string snippetName);
|
||||
|
||||
/// <summary>
|
||||
@@ -302,6 +301,7 @@ namespace Umbraco.Cms.Core.Services
|
||||
/// </summary>
|
||||
/// <param name="snippetName">The name of the snippet</param>
|
||||
/// <returns>The content of the partial view.</returns>
|
||||
[Obsolete("Please use SnippetCollection.GetPartialViewSnippetContent instead. Scheduled for removal in V12.")]
|
||||
string GetPartialViewSnippetContent(string snippetName);
|
||||
}
|
||||
}
|
||||
|
||||
18
src/Umbraco.Core/Snippets/ISnippet.cs
Normal file
18
src/Umbraco.Core/Snippets/ISnippet.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace Umbraco.Cms.Core.Snippets
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines a partial view macro snippet.
|
||||
/// </summary>
|
||||
public interface ISnippet
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the name of the snippet.
|
||||
/// </summary>
|
||||
string Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the content of the snippet.
|
||||
/// </summary>
|
||||
string Content { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using Umbraco.Cms.Core.Composing;
|
||||
using Umbraco.Extensions;
|
||||
|
||||
namespace Umbraco.Cms.Core.Snippets
|
||||
{
|
||||
/// <summary>
|
||||
/// The collection of partial view macro snippets.
|
||||
/// </summary>
|
||||
public class PartialViewMacroSnippetCollection : BuilderCollectionBase<ISnippet>
|
||||
{
|
||||
public PartialViewMacroSnippetCollection(Func<IEnumerable<ISnippet>> items) : base(items)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the partial view macro snippet names.
|
||||
/// </summary>
|
||||
/// <returns>The names of all partial view macro snippets.</returns>
|
||||
public IEnumerable<string> GetNames()
|
||||
{
|
||||
var snippetNames = this.Select(x => Path.GetFileNameWithoutExtension(x.Name)).ToArray();
|
||||
|
||||
// Ensure the ones that are called 'Empty' are at the top
|
||||
var empty = snippetNames.Where(x => Path.GetFileName(x)?.InvariantStartsWith("Empty") ?? false)
|
||||
.OrderBy(x => x?.Length).ToArray();
|
||||
|
||||
return empty.Union(snippetNames.Except(empty)).WhereNotNull();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the content of a partial view macro snippet as a string.
|
||||
/// </summary>
|
||||
/// <param name="snippetName">The name of the snippet.</param>
|
||||
/// <returns>The content of the partial view macro.</returns>
|
||||
public string GetContentFromName(string snippetName)
|
||||
{
|
||||
if (snippetName.IsNullOrWhiteSpace())
|
||||
{
|
||||
throw new ArgumentNullException(nameof(snippetName));
|
||||
}
|
||||
|
||||
string partialViewMacroHeader = "@inherits Umbraco.Cms.Web.Common.Macros.PartialViewMacroPage";
|
||||
|
||||
var snippet = this.Where(x => x.Name.Equals(snippetName + ".cshtml")).FirstOrDefault();
|
||||
|
||||
// Try and get the snippet path
|
||||
if (snippet is null)
|
||||
{
|
||||
throw new InvalidOperationException("Could not load snippet with name " + snippetName);
|
||||
}
|
||||
|
||||
// Strip the @inherits if it's there
|
||||
var snippetContent = StripPartialViewHeader(snippet.Content);
|
||||
|
||||
var content = $"{partialViewMacroHeader}{Environment.NewLine}{snippetContent}";
|
||||
return content;
|
||||
}
|
||||
|
||||
private string StripPartialViewHeader(string contents)
|
||||
{
|
||||
var headerMatch = new Regex("^@inherits\\s+?.*$", RegexOptions.Multiline);
|
||||
return headerMatch.Replace(contents, string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.FileProviders;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Umbraco.Cms.Core.Composing;
|
||||
using Umbraco.Cms.Core.Extensions;
|
||||
|
||||
namespace Umbraco.Cms.Core.Snippets
|
||||
{
|
||||
/// <summary>
|
||||
/// The partial view macro snippet collection builder.
|
||||
/// </summary>
|
||||
public class PartialViewMacroSnippetCollectionBuilder : LazyCollectionBuilderBase<PartialViewMacroSnippetCollectionBuilder, PartialViewMacroSnippetCollection, ISnippet>
|
||||
{
|
||||
protected override PartialViewMacroSnippetCollectionBuilder This => this;
|
||||
|
||||
protected override IEnumerable<ISnippet> CreateItems(IServiceProvider factory)
|
||||
{
|
||||
var hostEnvironment = factory.GetRequiredService<IHostEnvironment>();
|
||||
|
||||
var embeddedSnippets = new List<ISnippet>(base.CreateItems(factory));
|
||||
var snippetProvider = new EmbeddedFileProvider(typeof(IAssemblyProvider).Assembly, "Umbraco.Cms.Core.EmbeddedResources.Snippets");
|
||||
var embeddedFiles = snippetProvider.GetDirectoryContents(string.Empty)
|
||||
.Where(x => !x.IsDirectory && x.Name.EndsWith(".cshtml"));
|
||||
|
||||
foreach (var file in embeddedFiles)
|
||||
{
|
||||
using var stream = new StreamReader(file.CreateReadStream());
|
||||
embeddedSnippets.Add(new Snippet(file.Name, stream.ReadToEnd().Trim()));
|
||||
}
|
||||
|
||||
var customSnippetsDir = new DirectoryInfo(hostEnvironment.MapPathContentRoot($"{Constants.SystemDirectories.Umbraco}/PartialViewMacros/Templates"));
|
||||
if (!customSnippetsDir.Exists)
|
||||
{
|
||||
return embeddedSnippets;
|
||||
}
|
||||
|
||||
var customSnippets = customSnippetsDir.GetFiles().Select(f => new Snippet(f.Name, File.ReadAllText(f.FullName)));
|
||||
var allSnippets = Merge(embeddedSnippets, customSnippets);
|
||||
|
||||
return allSnippets;
|
||||
}
|
||||
|
||||
private IEnumerable<ISnippet> Merge(IEnumerable<ISnippet> embeddedSnippets, IEnumerable<ISnippet> customSnippets)
|
||||
{
|
||||
var allSnippets = embeddedSnippets.Concat(customSnippets);
|
||||
|
||||
var duplicates = allSnippets.GroupBy(s => s.Name)
|
||||
.Where(gr => gr.Count() > 1) // Finds the snippets with the same name
|
||||
.Select(s => s.First()); // Takes the first element from a grouping, which is the embeded snippet with that same name,
|
||||
// since the physical snippet files are placed after the embedded ones in the all snippets colleciton
|
||||
|
||||
// Remove any embedded snippets if a physical file with the same name can be found
|
||||
return allSnippets.Except(duplicates);
|
||||
}
|
||||
}
|
||||
}
|
||||
70
src/Umbraco.Core/Snippets/PartialViewSnippetCollection.cs
Normal file
70
src/Umbraco.Core/Snippets/PartialViewSnippetCollection.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using Umbraco.Cms.Core.Composing;
|
||||
using Umbraco.Extensions;
|
||||
|
||||
namespace Umbraco.Cms.Core.Snippets
|
||||
{
|
||||
/// <summary>
|
||||
/// The collection of partial view snippets.
|
||||
/// </summary>
|
||||
public class PartialViewSnippetCollection : BuilderCollectionBase<ISnippet>
|
||||
{
|
||||
public PartialViewSnippetCollection(Func<IEnumerable<ISnippet>> items) : base(items)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the partial view snippet names.
|
||||
/// </summary>
|
||||
/// <returns>The names of all partial view snippets.</returns>
|
||||
public IEnumerable<string> GetNames()
|
||||
{
|
||||
var snippetNames = this.Select(x => Path.GetFileNameWithoutExtension(x.Name)).ToArray();
|
||||
|
||||
// Ensure the ones that are called 'Empty' are at the top
|
||||
var empty = snippetNames.Where(x => Path.GetFileName(x)?.InvariantStartsWith("Empty") ?? false)
|
||||
.OrderBy(x => x?.Length).ToArray();
|
||||
|
||||
return empty.Union(snippetNames.Except(empty)).WhereNotNull();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the content of a partial view snippet as a string.
|
||||
/// </summary>
|
||||
/// <param name="snippetName">The name of the snippet.</param>
|
||||
/// <returns>The content of the partial view.</returns>
|
||||
public string GetContentFromName(string snippetName)
|
||||
{
|
||||
if (snippetName.IsNullOrWhiteSpace())
|
||||
{
|
||||
throw new ArgumentNullException(nameof(snippetName));
|
||||
}
|
||||
|
||||
string partialViewHeader = "@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage";
|
||||
|
||||
var snippet = this.Where(x => x.Name.Equals(snippetName + ".cshtml")).FirstOrDefault();
|
||||
|
||||
// Try and get the snippet path
|
||||
if (snippet is null)
|
||||
{
|
||||
throw new InvalidOperationException("Could not load snippet with name " + snippetName);
|
||||
}
|
||||
|
||||
var snippetContent = CleanUpContents(snippet.Content);
|
||||
|
||||
var content = $"{partialViewHeader}{Environment.NewLine}{snippetContent}";
|
||||
return content;
|
||||
}
|
||||
|
||||
private string CleanUpContents(string content)
|
||||
{
|
||||
// Strip the @inherits if it's there
|
||||
var headerMatch = new Regex("^@inherits\\s+?.*$", RegexOptions.Multiline);
|
||||
var newContent = headerMatch.Replace(content, string.Empty);
|
||||
|
||||
return newContent
|
||||
.Replace("Model.Content.", "Model.")
|
||||
.Replace("(Model.Content)", "(Model)");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using Microsoft.Extensions.FileProviders;
|
||||
using Umbraco.Cms.Core.Composing;
|
||||
|
||||
namespace Umbraco.Cms.Core.Snippets
|
||||
{
|
||||
/// <summary>
|
||||
/// The partial view snippet collection builder.
|
||||
/// </summary>
|
||||
public class PartialViewSnippetCollectionBuilder : LazyCollectionBuilderBase<PartialViewSnippetCollectionBuilder, PartialViewSnippetCollection, ISnippet>
|
||||
{
|
||||
protected override PartialViewSnippetCollectionBuilder This => this;
|
||||
|
||||
protected override IEnumerable<ISnippet> CreateItems(IServiceProvider factory)
|
||||
{
|
||||
var embeddedSnippets = new List<ISnippet>(base.CreateItems(factory));
|
||||
|
||||
// Ignore these
|
||||
var filterNames = new List<string>
|
||||
{
|
||||
"Gallery",
|
||||
"ListChildPagesFromChangeableSource",
|
||||
"ListChildPagesOrderedByProperty",
|
||||
"ListImagesFromMediaFolder"
|
||||
};
|
||||
|
||||
var snippetProvider = new EmbeddedFileProvider(typeof(IAssemblyProvider).Assembly, "Umbraco.Cms.Core.EmbeddedResources.Snippets");
|
||||
var embeddedFiles = snippetProvider.GetDirectoryContents(string.Empty)
|
||||
.Where(x => !x.IsDirectory && x.Name.EndsWith(".cshtml"));
|
||||
|
||||
foreach (var file in embeddedFiles)
|
||||
{
|
||||
if (!filterNames.Contains(Path.GetFileNameWithoutExtension(file.Name)))
|
||||
{
|
||||
using var stream = new StreamReader(file.CreateReadStream());
|
||||
embeddedSnippets.Add(new Snippet(file.Name, stream.ReadToEnd().Trim()));
|
||||
}
|
||||
}
|
||||
|
||||
return embeddedSnippets;
|
||||
}
|
||||
}
|
||||
}
|
||||
14
src/Umbraco.Core/Snippets/Snippet.cs
Normal file
14
src/Umbraco.Core/Snippets/Snippet.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Umbraco.Cms.Core.Snippets
|
||||
{
|
||||
public class Snippet : ISnippet
|
||||
{
|
||||
public string Name { get; }
|
||||
public string Content { get; }
|
||||
|
||||
public Snippet(string name, string content)
|
||||
{
|
||||
Name = name;
|
||||
Content = content;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
@@ -50,6 +50,7 @@
|
||||
<PackageReference Include="Serilog.Sinks.Map" Version="1.0.2" />
|
||||
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.1" />
|
||||
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
|
||||
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="6.0.1" />
|
||||
<PackageReference Include="System.Text.Encodings.Web" Version="6.0.0" /> <!-- Explicit updated this nested dependency due to this https://github.com/dotnet/announcements/issues/178-->
|
||||
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="6.0.0" />
|
||||
<PackageReference Include="Examine.Core" Version="3.0.0-beta.9" />
|
||||
|
||||
@@ -31,7 +31,8 @@ namespace Umbraco.Cms.Infrastructure.PublishedCache.DataSource
|
||||
var templateId = PrimitiveSerializer.Int32.ReadFrom(stream);
|
||||
var properties = _dictionaryOfPropertyDataSerializer?.ReadFrom(stream); // TODO: We don't want to allocate empty arrays
|
||||
var cultureInfos = s_defaultCultureVariationsSerializer.ReadFrom(stream); // TODO: We don't want to allocate empty arrays
|
||||
return new ContentData(name, urlSegment, versionId, versionDate, writerId, templateId, published, properties, cultureInfos);
|
||||
var cachedTemplateId = templateId == 0 ? (int?)null : templateId;
|
||||
return new ContentData(name, urlSegment, versionId, versionDate, writerId, cachedTemplateId, published, properties, cultureInfos);
|
||||
}
|
||||
|
||||
public void WriteTo(ContentData value, Stream stream)
|
||||
|
||||
@@ -830,7 +830,7 @@ AND cmsContentNu.nodeId IS NULL
|
||||
dto.VersionId,
|
||||
dto.EditVersionDate,
|
||||
dto.EditWriterId,
|
||||
dto.EditTemplateId,
|
||||
dto.EditTemplateId == 0 ? null : dto.EditTemplateId,
|
||||
published,
|
||||
deserializedContent?.PropertyData,
|
||||
deserializedContent?.CultureData);
|
||||
@@ -859,7 +859,7 @@ AND cmsContentNu.nodeId IS NULL
|
||||
dto.VersionId,
|
||||
dto.PubVersionDate,
|
||||
dto.PubWriterId,
|
||||
dto.PubTemplateId,
|
||||
dto.PubTemplateId == 0 ? null : dto.PubTemplateId,
|
||||
published,
|
||||
deserializedContent?.PropertyData,
|
||||
deserializedContent?.CultureData);
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Umbraco.Cms.Core;
|
||||
using Umbraco.Cms.Core.Configuration.Models;
|
||||
@@ -15,6 +12,7 @@ using Umbraco.Cms.Core.Models;
|
||||
using Umbraco.Cms.Core.Models.ContentEditing;
|
||||
using Umbraco.Cms.Core.Security;
|
||||
using Umbraco.Cms.Core.Services;
|
||||
using Umbraco.Cms.Core.Snippets;
|
||||
using Umbraco.Cms.Core.Strings;
|
||||
using Umbraco.Cms.Core.Strings.Css;
|
||||
using Umbraco.Cms.Web.BackOffice.Filters;
|
||||
@@ -22,6 +20,7 @@ using Umbraco.Cms.Web.BackOffice.Trees;
|
||||
using Umbraco.Cms.Web.Common.ActionsResults;
|
||||
using Umbraco.Cms.Web.Common.Attributes;
|
||||
using Umbraco.Cms.Web.Common.Authorization;
|
||||
using Umbraco.Cms.Web.Common.DependencyInjection;
|
||||
using Umbraco.Extensions;
|
||||
using Constants = Umbraco.Cms.Core.Constants;
|
||||
using Stylesheet = Umbraco.Cms.Core.Models.Stylesheet;
|
||||
@@ -45,7 +44,10 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
|
||||
private readonly IUmbracoMapper _umbracoMapper;
|
||||
private readonly IShortStringHelper _shortStringHelper;
|
||||
private readonly GlobalSettings _globalSettings;
|
||||
private readonly PartialViewSnippetCollection _partialViewSnippetCollection;
|
||||
private readonly PartialViewMacroSnippetCollection _partialViewMacroSnippetCollection;
|
||||
|
||||
[ActivatorUtilitiesConstructor]
|
||||
public CodeFileController(
|
||||
IHostingEnvironment hostingEnvironment,
|
||||
FileSystems fileSystems,
|
||||
@@ -54,7 +56,9 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
|
||||
ILocalizedTextService localizedTextService,
|
||||
IUmbracoMapper umbracoMapper,
|
||||
IShortStringHelper shortStringHelper,
|
||||
IOptionsSnapshot<GlobalSettings> globalSettings)
|
||||
IOptionsSnapshot<GlobalSettings> globalSettings,
|
||||
PartialViewSnippetCollection partialViewSnippetCollection,
|
||||
PartialViewMacroSnippetCollection partialViewMacroSnippetCollection)
|
||||
{
|
||||
_hostingEnvironment = hostingEnvironment;
|
||||
_fileSystems = fileSystems;
|
||||
@@ -64,6 +68,31 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
|
||||
_umbracoMapper = umbracoMapper;
|
||||
_shortStringHelper = shortStringHelper;
|
||||
_globalSettings = globalSettings.Value;
|
||||
_partialViewSnippetCollection = partialViewSnippetCollection;
|
||||
_partialViewMacroSnippetCollection = partialViewMacroSnippetCollection;
|
||||
}
|
||||
|
||||
[Obsolete("Use ctor will all params. Scheduled for removal in V12.")]
|
||||
public CodeFileController(
|
||||
IHostingEnvironment hostingEnvironment,
|
||||
FileSystems fileSystems,
|
||||
IFileService fileService,
|
||||
IBackOfficeSecurityAccessor backOfficeSecurityAccessor,
|
||||
ILocalizedTextService localizedTextService,
|
||||
IUmbracoMapper umbracoMapper,
|
||||
IShortStringHelper shortStringHelper,
|
||||
IOptionsSnapshot<GlobalSettings> globalSettings) : this(
|
||||
hostingEnvironment,
|
||||
fileSystems,
|
||||
fileService,
|
||||
backOfficeSecurityAccessor,
|
||||
localizedTextService,
|
||||
umbracoMapper,
|
||||
shortStringHelper,
|
||||
globalSettings,
|
||||
StaticServiceProvider.Instance.GetRequiredService<PartialViewSnippetCollection>(),
|
||||
StaticServiceProvider.Instance.GetRequiredService<PartialViewMacroSnippetCollection>())
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -272,15 +301,10 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
|
||||
switch (type)
|
||||
{
|
||||
case Constants.Trees.PartialViews:
|
||||
snippets = _fileService.GetPartialViewSnippetNames(
|
||||
//ignore these - (this is taken from the logic in "PartialView.ascx.cs")
|
||||
"Gallery",
|
||||
"ListChildPagesFromChangeableSource",
|
||||
"ListChildPagesOrderedByProperty",
|
||||
"ListImagesFromMediaFolder");
|
||||
snippets = _partialViewSnippetCollection.GetNames();
|
||||
break;
|
||||
case Constants.Trees.PartialViewMacros:
|
||||
snippets = _fileService.GetPartialViewSnippetNames();
|
||||
snippets = _partialViewMacroSnippetCollection.GetNames();
|
||||
break;
|
||||
default:
|
||||
return NotFound();
|
||||
@@ -312,7 +336,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
|
||||
codeFileDisplay.VirtualPath = Constants.SystemDirectories.PartialViews;
|
||||
if (snippetName.IsNullOrWhiteSpace() == false)
|
||||
{
|
||||
codeFileDisplay.Content = _fileService.GetPartialViewSnippetContent(snippetName!);
|
||||
codeFileDisplay.Content = _partialViewSnippetCollection.GetContentFromName(snippetName!);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -324,7 +348,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
|
||||
codeFileDisplay.VirtualPath = Constants.SystemDirectories.MacroPartials;
|
||||
if (snippetName.IsNullOrWhiteSpace() == false)
|
||||
{
|
||||
codeFileDisplay.Content = _fileService.GetPartialViewMacroSnippetContent(snippetName!);
|
||||
codeFileDisplay.Content = _partialViewMacroSnippetCollection.GetContentFromName(snippetName!);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
|
||||
var user = _backofficeSecurityAccessor.BackOfficeSecurity?.CurrentUser;
|
||||
_cookieManager.SetCookieValue(Constants.Web.PreviewCookieName, "preview");
|
||||
|
||||
return null;
|
||||
return new EmptyResult();
|
||||
}
|
||||
|
||||
public ActionResult End(string? redir = null)
|
||||
|
||||
@@ -165,13 +165,11 @@ When building a custom infinite editor view you can use the same components as a
|
||||
|
||||
function editorService(eventsService, keyboardService, $timeout) {
|
||||
|
||||
|
||||
let editorsKeyboardShorcuts = [];
|
||||
var editors = [];
|
||||
var isEnabled = true;
|
||||
var lastElementInFocus = null;
|
||||
|
||||
|
||||
// events for backdrop
|
||||
eventsService.on("appState.backdrop", function (name, args) {
|
||||
if (args.show === true) {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
function overlayService(eventsService, backdropService, focusLockService) {
|
||||
|
||||
var currentOverlay = null;
|
||||
let currentOverlay = null;
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
|
||||
@@ -202,17 +202,13 @@ input.umb-editor-header__name-input:disabled {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.umb-editor-container.-stop-scrolling {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.umb-editor-actions{
|
||||
.umb-editor-actions {
|
||||
list-style: none;
|
||||
margin: 0; padding: 0;
|
||||
}
|
||||
|
||||
.umb-editor-actions li{
|
||||
li {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
// editor footer
|
||||
|
||||
@@ -271,7 +271,7 @@
|
||||
padding: 8px 20px;
|
||||
color: @ui-option-type;
|
||||
display: flex;
|
||||
justify-content: start;
|
||||
justify-content: flex-start;
|
||||
clear: both;
|
||||
font-weight: normal;
|
||||
line-height: 20px;
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
.umb-block-card-grid {
|
||||
/* FlexBox Fallback */
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
> * {
|
||||
flex: 1 1 240px;
|
||||
}
|
||||
|
||||
/* Grid Setup */
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||
grid-auto-rows: minmax(160px, auto);
|
||||
grid-gap: 20px;
|
||||
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div data-element="editor-container" class="umb-editor-container umb-panel-body umb-scrollable row-fluid" ng-class="{'-stop-scrolling': numberOfOverlays > 0}">
|
||||
<div data-element="editor-container" class="umb-editor-container umb-panel-body umb-scrollable row-fluid">
|
||||
|
||||
<!--This must be contained within a div else transclusion doesn't work when this is loaded dynamically :/ -->
|
||||
<div>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
var unsubscribe = [];
|
||||
|
||||
var vm = this;
|
||||
const vm = this;
|
||||
vm.openBlock = null;
|
||||
|
||||
function onInit() {
|
||||
@@ -30,11 +30,10 @@
|
||||
}
|
||||
|
||||
loadElementTypes();
|
||||
|
||||
}
|
||||
|
||||
function loadElementTypes() {
|
||||
return elementTypeResource.getAll().then(function (elementTypes) {
|
||||
return elementTypeResource.getAll().then(elementTypes => {
|
||||
vm.elementTypes = elementTypes;
|
||||
});
|
||||
}
|
||||
@@ -47,24 +46,32 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsubscribe.push(eventsService.on("editors.documentType.saved", updateUsedElementTypes));
|
||||
|
||||
vm.requestRemoveBlockByIndex = function (index) {
|
||||
localizationService.localizeMany(["general_delete", "blockEditor_confirmDeleteBlockTypeMessage", "blockEditor_confirmDeleteBlockTypeNotice"]).then(function (data) {
|
||||
vm.requestRemoveBlockByIndex = function (index, event) {
|
||||
|
||||
const labelKeys = [
|
||||
"general_delete",
|
||||
"blockEditor_confirmDeleteBlockTypeMessage",
|
||||
"blockEditor_confirmDeleteBlockTypeNotice"
|
||||
];
|
||||
|
||||
localizationService.localizeMany(labelKeys).then(data => {
|
||||
var contentElementType = vm.getElementTypeByKey($scope.model.value[index].contentElementTypeKey);
|
||||
overlayService.confirmDelete({
|
||||
title: data[0],
|
||||
content: localizationService.tokenReplace(data[1], [contentElementType ? contentElementType.name : "(Unavailable ElementType)"]),
|
||||
confirmMessage: data[2],
|
||||
close: function () {
|
||||
overlayService.close();
|
||||
},
|
||||
submit: function () {
|
||||
submit: () => {
|
||||
vm.removeBlockByIndex(index);
|
||||
overlayService.close();
|
||||
}
|
||||
},
|
||||
close: overlayService.close()
|
||||
});
|
||||
});
|
||||
|
||||
event.stopPropagation();
|
||||
}
|
||||
|
||||
vm.removeBlockByIndex = function (index) {
|
||||
@@ -78,7 +85,6 @@
|
||||
placeholder: 'umb-block-card --sortable-placeholder'
|
||||
};
|
||||
|
||||
|
||||
vm.getAvailableElementTypes = function () {
|
||||
return vm.elementTypes.filter(function (type) {
|
||||
return !$scope.model.value.find(function (entry) {
|
||||
@@ -89,15 +95,13 @@
|
||||
|
||||
vm.getElementTypeByKey = function(key) {
|
||||
if (vm.elementTypes) {
|
||||
return vm.elementTypes.find(function (type) {
|
||||
return type.key === key;
|
||||
}) || null;
|
||||
return vm.elementTypes.find(type => type.key === key) || null;
|
||||
}
|
||||
};
|
||||
|
||||
vm.openAddDialog = function () {
|
||||
|
||||
localizationService.localize("blockEditor_headlineCreateBlock").then(function(localizedTitle) {
|
||||
localizationService.localize("blockEditor_headlineCreateBlock").then(localizedTitle => {
|
||||
|
||||
const contentTypePicker = {
|
||||
title: localizedTitle,
|
||||
@@ -108,10 +112,9 @@
|
||||
filter: function (node) {
|
||||
if (node.metaData.isElement === true) {
|
||||
var key = udiService.getKey(node.udi);
|
||||
|
||||
// If a Block with this ElementType as content already exists, we will emit it as a posible option.
|
||||
return $scope.model.value.find(function (entry) {
|
||||
return key === entry.contentElementTypeKey;
|
||||
});
|
||||
return $scope.model.value.find(entry => entry.contentElementTypeKey === key);
|
||||
}
|
||||
return true;
|
||||
},
|
||||
@@ -138,8 +141,8 @@
|
||||
}
|
||||
]
|
||||
};
|
||||
editorService.treePicker(contentTypePicker);
|
||||
|
||||
editorService.treePicker(contentTypePicker);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -151,9 +154,10 @@
|
||||
isElement: true,
|
||||
noTemplate: true,
|
||||
submit: function (model) {
|
||||
loadElementTypes().then( function () {
|
||||
loadElementTypes().then(() => {
|
||||
callback(model.documentTypeKey);
|
||||
});
|
||||
|
||||
editorService.close();
|
||||
},
|
||||
close: function () {
|
||||
@@ -165,41 +169,35 @@
|
||||
|
||||
vm.addBlockFromElementTypeKey = function(key) {
|
||||
|
||||
var blockType = {
|
||||
"contentElementTypeKey": key,
|
||||
"settingsElementTypeKey": null,
|
||||
"labelTemplate": "",
|
||||
"view": null,
|
||||
"stylesheet": null,
|
||||
"editorSize": "medium",
|
||||
"iconColor": null,
|
||||
"backgroundColor": null,
|
||||
"thumbnail": null
|
||||
const blockType = {
|
||||
contentElementTypeKey: key,
|
||||
settingsElementTypeKey: null,
|
||||
labelTemplate: "",
|
||||
view: null,
|
||||
stylesheet: null,
|
||||
editorSize: "medium",
|
||||
iconColor: null,
|
||||
backgroundColor: null,
|
||||
thumbnail: null
|
||||
};
|
||||
|
||||
$scope.model.value.push(blockType);
|
||||
|
||||
vm.openBlockOverlay(blockType);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
vm.openBlockOverlay = function (block) {
|
||||
|
||||
var elementType = vm.getElementTypeByKey(block.contentElementTypeKey);
|
||||
|
||||
if(elementType) {
|
||||
localizationService.localize("blockEditor_blockConfigurationOverlayTitle", [elementType.name]).then(function (data) {
|
||||
if (elementType) {
|
||||
|
||||
var clonedBlockData = Utilities.copy(block);
|
||||
let clonedBlockData = Utilities.copy(block);
|
||||
vm.openBlock = block;
|
||||
|
||||
var overlayModel = {
|
||||
const overlayModel = {
|
||||
block: clonedBlockData,
|
||||
title: data,
|
||||
|
||||
view: "views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.overlay.html",
|
||||
size: "small",
|
||||
submit: function(overlayModel) {
|
||||
@@ -213,12 +211,24 @@
|
||||
}
|
||||
};
|
||||
|
||||
localizationService.localize("blockEditor_blockConfigurationOverlayTitle", [elementType.name]).then(data => {
|
||||
overlayModel.title = data,
|
||||
|
||||
// open property settings editor
|
||||
editorService.open(overlayModel);
|
||||
|
||||
});
|
||||
} else {
|
||||
alert("Cannot be edited cause ElementType does not exist.");
|
||||
|
||||
const overlay = {
|
||||
close: () => {
|
||||
overlayService.close()
|
||||
}
|
||||
};
|
||||
|
||||
localizationService.localize("blockEditor_elementTypeDoesNotExist").then(data => {
|
||||
overlay.content = data;
|
||||
overlayService.open(overlay);
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
ng-class="{'--isOpen':vm.openBlock === block}"
|
||||
ng-click="vm.openBlockOverlay(block)">
|
||||
<div class="__actions">
|
||||
<button type="button" class="btn-reset __action umb-outline" ng-click="vm.requestRemoveBlockByIndex($index); $event.stopPropagation();">
|
||||
<button type="button" class="btn-reset __action umb-outline" ng-click="vm.requestRemoveBlockByIndex($index, $event)">
|
||||
<umb-icon icon="icon-trash" class="icon"></umb-icon>
|
||||
<localize key="general_delete" class="sr-only">Delete</localize>
|
||||
</button>
|
||||
</div>
|
||||
</umb-block-card>
|
||||
|
||||
<button id="{{model.alias}}" type="button" class="btn-reset __add-button" ng-click="vm.openAddDialog($event)">
|
||||
<button type="button" id="{{model.alias}}" class="btn-reset __add-button" ng-click="vm.openAddDialog($event)">
|
||||
<localize key="general_add">Add</localize>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
padding: 5px 15px;
|
||||
box-sizing: border-box;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.__add-button:hover {
|
||||
&:hover {
|
||||
color: @ui-action-discreet-type-hover;
|
||||
border-color: @ui-action-discreet-border-hover;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ gulp.task('docs', [], function (cb) {
|
||||
var options = {
|
||||
html5Mode: false,
|
||||
startPage: '/api',
|
||||
title: "Umbraco 9 Backoffice UI API Documentation",
|
||||
title: "Umbraco 10 Backoffice UI API Documentation",
|
||||
dest: './api',
|
||||
styles: ['./umb-docs.css'],
|
||||
image: "https://our.umbraco.com/assets/images/logo.svg"
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
<RootNamespace>Umbraco.Cms.Web.UI</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\..\build\NuSpecs\buildTransitive\Umbraco.Cms.props" />
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||
<DocumentationFile>bin/Release/Umbraco.Web.UI.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
@@ -15,22 +13,9 @@
|
||||
<CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\Umbraco.Cms\buildTransitive\Umbraco.Cms.props" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../Umbraco.PublishedCache.NuCache/Umbraco.PublishedCache.NuCache.csproj" />
|
||||
<ProjectReference Include="../Umbraco.Web.BackOffice/Umbraco.Web.BackOffice.csproj" />
|
||||
<ProjectReference Include="../Umbraco.Web.Common/Umbraco.Web.Common.csproj" />
|
||||
<ProjectReference Include="../Umbraco.Web.Website/Umbraco.Web.Website.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Cms.StaticAssets\Umbraco.Cms.StaticAssets.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.PublishedCache.NuCache\Umbraco.PublishedCache.NuCache.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Web.BackOffice\Umbraco.Web.BackOffice.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Web.Website\Umbraco.Web.Website.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Cms.Persistence.Sqlite\Umbraco.Cms.Persistence.Sqlite.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Cms.Persistence.SqlServer\Umbraco.Cms.Persistence.SqlServer.csproj" />
|
||||
<ProjectReference Include="../Umbraco.PublishedCache.NuCache/Umbraco.PublishedCache.NuCache.csproj" />
|
||||
<ProjectReference Include="../Umbraco.Web.BackOffice/Umbraco.Web.BackOffice.csproj" />
|
||||
<ProjectReference Include="../Umbraco.Web.Common/Umbraco.Web.Common.csproj" />
|
||||
<ProjectReference Include="../Umbraco.Web.Website/Umbraco.Web.Website.csproj" />
|
||||
<ProjectReference Include="..\Umbraco.Cms\Umbraco.Cms.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -56,7 +41,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<JsonSchemaPath>$(ProjectDir)umbraco/config/appsettings-schema.json</JsonSchemaPath>
|
||||
<JsonSchemaPath>$(ProjectDir)appsettings-schema.json</JsonSchemaPath>
|
||||
<JsonSchemaProjectPath>$(ProjectDir)../JsonSchema/JsonSchema.csproj</JsonSchemaProjectPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="CheckPreconditions" BeforeTargets="Build">
|
||||
@@ -73,7 +59,8 @@
|
||||
|
||||
|
||||
<Target Name="JsonSchemaBuild">
|
||||
<!-- <Exec WorkingDirectory="$(ProjectDir)/../../" Command="powershell -ExecutionPolicy RemoteSigned -Command '&dotnet run --project $pwd/src/JsonSchema/JsonSchema.csproj -c Release -- --outputFile $pwd/src/Umbraco.Web.UI/$(JsonSchemaPath)'" /> -->
|
||||
<Exec Command="dotnet run -c Release --project $(JsonSchemaProjectPath) -o $(ProjectDir)appsettings-schema.json" />
|
||||
<Exec Command="dotnet run -c Release --project $(JsonSchemaProjectPath) -o "$(ProjectDir)appsettings-schema.json"" />
|
||||
</Target>
|
||||
|
||||
<Target Name="AppsettingsBuild">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema" : "./umbraco/config/appsettings-schema.json",
|
||||
"$schema" : "./appsettings-schema.json",
|
||||
"Serilog": {
|
||||
"MinimumLevel": {
|
||||
"Default": "Information",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "./umbraco/config/appsettings-schema.json",
|
||||
"$schema": "./appsettings-schema.json",
|
||||
"ConnectionStrings": {
|
||||
"umbracoDbDSN": ""
|
||||
},
|
||||
|
||||
47
templates/Umbraco.Templates.csproj
Normal file
47
templates/Umbraco.Templates.csproj
Normal file
@@ -0,0 +1,47 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<!-- Enable multi-level merging with src -->
|
||||
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../src/'))" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<PackageType>Template</PackageType>
|
||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||
<ContentTargetFolders>.</ContentTargetFolders>
|
||||
<NoDefaultExcludes>true</NoDefaultExcludes>
|
||||
<IncludeContentInPack>true</IncludeContentInPack>
|
||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||
<ContentTargetFolders>.</ContentTargetFolders>
|
||||
<NoDefaultExcludes>true</NoDefaultExcludes>
|
||||
<IncludeSymbols>false</IncludeSymbols>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="icon.png" Visible="false" />
|
||||
<Content Include="UmbracoPackage\**" Exclude="bin;obj" />
|
||||
<Content Include="UmbracoProject\**" Exclude="bin;obj" />
|
||||
<Content Include="..\src\Umbraco.Web.UI\Program.cs">
|
||||
<Link>UmbracoProject\Program.cs</Link>
|
||||
<PackagePath>UmbracoProject</PackagePath>
|
||||
</Content>
|
||||
<Content Include="..\src\Umbraco.Web.UI\Startup.cs">
|
||||
<Link>UmbracoProject\Startup.cs</Link>
|
||||
<PackagePath>UmbracoProject</PackagePath>
|
||||
</Content>
|
||||
<Content Include="..\src\Umbraco.Web.UI\Views\Partials\blocklist\**">
|
||||
<Link>UmbracoProject\Views\Partials\blocklist\%(RecursiveDir)%(Filename)%(Extension)</Link>
|
||||
<PackagePath>UmbracoProject\Views\Partials\blocklist</PackagePath>
|
||||
</Content>
|
||||
<Content Include="..\src\Umbraco.Web.UI\Views\Partials\grid\**">
|
||||
<Link>UmbracoProject\Views\Partials\grid\%(RecursiveDir)%(Filename)%(Extension)</Link>
|
||||
<PackagePath>UmbracoProject\Views\Partials\grid</PackagePath>
|
||||
</Content>
|
||||
<Content Include="..\src\Umbraco.Web.UI\Views\_ViewImports.cshtml">
|
||||
<Link>UmbracoProject\Views\_ViewImports.cshtml</Link>
|
||||
<PackagePath>UmbracoProject\Views</PackagePath>
|
||||
</Content>
|
||||
<Content Include="..\src\Umbraco.Web.UI\wwwroot\favicon.ico">
|
||||
<Link>UmbracoProject\wwwroot\favicon.ico</Link>
|
||||
<PackagePath>UmbracoProject\wwwroot</PackagePath>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata minClientVersion="4.1.0">
|
||||
<id>Umbraco.Templates</id>
|
||||
<version>1.0.0</version>
|
||||
<authors>Umbraco HQ</authors>
|
||||
<owners>Umbraco HQ</owners>
|
||||
<license type="expression">MIT</license>
|
||||
<projectUrl>https://umbraco.com/</projectUrl>
|
||||
<icon>icon.png</icon>
|
||||
<iconUrl>https://umbraco.com/dist/nuget/logo-small.png</iconUrl>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<description>Umbraco CMS templates for .NET Core Template Engine available through the dotnet CLI's new command</description>
|
||||
<language>en-US</language>
|
||||
<tags>umbraco</tags>
|
||||
<repository type="git" url="https://github.com/umbraco/Umbraco-CMS" />
|
||||
<packageTypes>
|
||||
<packageType name="Template" />
|
||||
</packageTypes>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="icon.png" />
|
||||
<file src="UmbracoPackage\**" target="UmbracoPackage" exclude="bin;obj" />
|
||||
<file src="UmbracoProject\**" target="UmbracoProject" exclude="bin;obj" />
|
||||
<file src="..\src\Umbraco.Web.UI\Program.cs" target="UmbracoProject" />
|
||||
<file src="..\src\Umbraco.Web.UI\Startup.cs" target="UmbracoProject" />
|
||||
<file src="..\src\Umbraco.Web.UI\Views\Partials\blocklist\**" target="UmbracoProject\Views\Partials\blocklist" />
|
||||
<file src="..\src\Umbraco.Web.UI\Views\Partials\grid\**" target="UmbracoProject\Views\Partials\grid" />
|
||||
<file src="..\src\Umbraco.Web.UI\Views\_ViewImports.cshtml" target="UmbracoProject\Views\_ViewImports.cshtml" />
|
||||
<file src="..\src\Umbraco.Web.UI\wwwroot\favicon.ico" target="UmbracoProject\wwwroot" />
|
||||
</files>
|
||||
</package>
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "./umbraco/config/appsettings-schema.json",
|
||||
"$schema": "./appsettings-schema.json",
|
||||
"Serilog": {
|
||||
"MinimumLevel": {
|
||||
"Default": "Information"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "./umbraco/config/appsettings-schema.json",
|
||||
"$schema": "./appsettings-schema.json",
|
||||
"Serilog": {
|
||||
"MinimumLevel": {
|
||||
"Default": "Information",
|
||||
|
||||
@@ -34,7 +34,7 @@ context('Packages', () => {
|
||||
mediaUdis: [],
|
||||
mediaLoadChildNodes: false
|
||||
}
|
||||
const url = "https://localhost:44331/umbraco/backoffice/umbracoapi/package/PostSavePackage";
|
||||
const url = "/umbraco/backoffice/umbracoapi/package/PostSavePackage";
|
||||
cy.umbracoApiRequest(url, 'POST', newPackage);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project></Project>
|
||||
8
tests/Umbraco.Tests.AcceptanceTest/misc/nuget.config
Normal file
8
tests/Umbraco.Tests.AcceptanceTest/misc/nuget.config
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<!-- see notes in dockerfile -->
|
||||
<packageSources>
|
||||
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="local" value="./nupkg" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
34
tests/Umbraco.Tests.AcceptanceTest/misc/umbraco-linux.docker
Normal file
34
tests/Umbraco.Tests.AcceptanceTest/misc/umbraco-linux.docker
Normal file
@@ -0,0 +1,34 @@
|
||||
############################################
|
||||
## Build
|
||||
############################################
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0.300 AS build
|
||||
|
||||
WORKDIR /nupkg
|
||||
COPY nupkg .
|
||||
|
||||
WORKDIR /build
|
||||
RUN dotnet new --install /nupkg/Umbraco.Templates.*.nupkg
|
||||
RUN dotnet new umbraco --name Cypress -o . --no-restore
|
||||
RUN dotnet restore -s /nupkg -s https://api.nuget.org/v3/index.json
|
||||
RUN dotnet publish --no-restore --configuration Release -o /dist
|
||||
|
||||
############################################
|
||||
## Run
|
||||
############################################
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0.5 AS run
|
||||
|
||||
WORKDIR /cypress
|
||||
COPY --from=build dist .
|
||||
|
||||
ENV ASPNETCORE_URLS="http://0.0.0.0:5000"
|
||||
ENV Umbraco__CMS__Global__InstallMissingDatabase="true"
|
||||
ENV ConnectionStrings__umbracoDbDSN_ProviderName="Microsoft.Data.SQLite"
|
||||
ENV ConnectionStrings__umbracoDbDSN="Data Source=|DataDirectory|/Umbraco.sqlite.db;Cache=Shared;Foreign Keys=True;Pooling=True"
|
||||
ENV Umbraco__CMS__Unattended__InstallUnattended="true"
|
||||
ENV Umbraco__CMS__Unattended__UnattendedUserName="Cypress Test"
|
||||
ENV Umbraco__CMS__Unattended__UnattendedUserEmail="cypress@umbraco.com"
|
||||
ENV Umbraco__CMS__Unattended__UnattendedUserPassword="UmbracoAcceptance123!"
|
||||
|
||||
CMD dotnet Cypress.dll
|
||||
11
tests/Umbraco.Tests.Common/Extensions/StringExtensions.cs
Normal file
11
tests/Umbraco.Tests.Common/Extensions/StringExtensions.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Umbraco.Cms.Tests.Common.Extensions;
|
||||
|
||||
public static class StringExtensions
|
||||
{
|
||||
public static string StripNewLines(this string input) =>
|
||||
input.Replace("\r\n", string.Empty)
|
||||
.Replace("\n", string.Empty);
|
||||
|
||||
public static string NormalizeNewLines(this string input) =>
|
||||
input.Replace("\r\n", "\n");
|
||||
}
|
||||
@@ -7,6 +7,7 @@
|
||||
<Title>Umbraco CMS Integration Tests</Title>
|
||||
<Description>Contains helper classes for integration tests with Umbraco, including all internal integration tests.</Description>
|
||||
<IsPackable>true</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Cms.Core.Strings.Css;
|
||||
using Umbraco.Cms.Tests.Common.Extensions;
|
||||
using Umbraco.Extensions;
|
||||
|
||||
namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Core.ShortStringHelper
|
||||
@@ -175,7 +176,7 @@ world */p{font-size: 1em;}")]
|
||||
/**umb_name:Test2*/
|
||||
.test2 {
|
||||
#font-color: green;
|
||||
}"), result);
|
||||
}").NormalizeNewLines(), result.NormalizeNewLines());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -204,7 +205,7 @@ world */p{font-size: 1em;}")]
|
||||
Assert.AreEqual(".test", rules.First().Selector);
|
||||
Assert.AreEqual(
|
||||
@"font-color: red;
|
||||
margin: 1rem;", rules.First().Styles);
|
||||
margin: 1rem;".NormalizeNewLines(), rules.First().Styles.NormalizeNewLines());
|
||||
|
||||
Assert.AreEqual("Test2", rules.Last().Name);
|
||||
Assert.AreEqual(".test2", rules.Last().Selector);
|
||||
|
||||
@@ -564,12 +564,8 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.PublishedCache.NuCache
|
||||
GC.Collect();
|
||||
await d.CollectAsync();
|
||||
|
||||
// in Release mode, it works, but in Debug mode, the weak reference is still alive
|
||||
// and for some reason we need to do this to ensure it is collected
|
||||
#if DEBUG
|
||||
GC.Collect();
|
||||
await d.CollectAsync();
|
||||
#endif
|
||||
|
||||
Assert.AreEqual(1, d.SnapCount);
|
||||
v2 = s2.Get(1);
|
||||
@@ -611,12 +607,8 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.PublishedCache.NuCache
|
||||
GC.Collect();
|
||||
await d.CollectAsync();
|
||||
|
||||
// in Release mode, it works, but in Debug mode, the weak reference is still alive
|
||||
// and for some reason we need to do this to ensure it is collected
|
||||
#if DEBUG
|
||||
GC.Collect();
|
||||
await d.CollectAsync();
|
||||
#endif
|
||||
|
||||
Assert.AreEqual(1, d.SnapCount);
|
||||
v2 = s2.Get(1);
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RootNamespace>Umbraco.Cms.Tests.UnitTests</RootNamespace>
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
|
||||
|
||||
@@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Cms.Infrastructure.Macros;
|
||||
using Umbraco.Cms.Tests.Common.Extensions;
|
||||
using Umbraco.Cms.Tests.Common.TestHelpers;
|
||||
|
||||
namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.Common.Macros
|
||||
@@ -35,8 +36,8 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.Common.Macros
|
||||
<div class=""umb-macro-holder mceNonEditable"" test1=""value1"" test2=""value2"">
|
||||
<!-- <?UMBRACO_MACRO macroAlias=""My.Map.isCool eh[boy!]"" /> -->
|
||||
<ins>Macro alias: <strong>My.Map.isCool eh[boy!]</strong></ins></div>
|
||||
<p>asdfasdf</p>".Replace(Environment.NewLine, string.Empty),
|
||||
result.Replace(Environment.NewLine, string.Empty));
|
||||
<p>asdfasdf</p>".StripNewLines(),
|
||||
result.StripNewLines());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -54,8 +55,8 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.Common.Macros
|
||||
<div class=""umb-macro-holder mceNonEditable"" test1=""value1"" test2=""value2"">
|
||||
<!-- <?UMBRACO_MACRO macroAlias=""Map"" /> -->
|
||||
<ins>Macro alias: <strong>Map</strong></ins></div>
|
||||
<p>asdfasdf</p>".Replace(Environment.NewLine, string.Empty),
|
||||
result.Replace(Environment.NewLine, string.Empty));
|
||||
<p>asdfasdf</p>".StripNewLines(),
|
||||
result.StripNewLines());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -73,8 +74,8 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.Common.Macros
|
||||
<div class=""umb-macro-holder mceNonEditable"" test1=""value1"" test2=""value2"">
|
||||
<!-- <?UMBRACO_MACRO macroAlias=""Map"" /> -->
|
||||
<ins>Macro alias: <strong>Map</strong></ins></div>
|
||||
<p>asdfasdf</p>".Replace(Environment.NewLine, string.Empty),
|
||||
result.Replace(Environment.NewLine, string.Empty));
|
||||
<p>asdfasdf</p>".StripNewLines(),
|
||||
result.StripNewLines());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -92,8 +93,8 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.Common.Macros
|
||||
<div class=""umb-macro-holder mceNonEditable"" test1=""value1"" test2=""value2"">
|
||||
<!-- <?UMBRACO_MACRO macroAlias=""Map"" test1=""value1"" test2=""value2"" /> -->
|
||||
<ins>Macro alias: <strong>Map</strong></ins></div>
|
||||
<p>asdfasdf</p>".Replace(Environment.NewLine, string.Empty),
|
||||
result.Replace(Environment.NewLine, string.Empty));
|
||||
<p>asdfasdf</p>".StripNewLines(),
|
||||
result.StripNewLines());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -111,8 +112,8 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.Common.Macros
|
||||
<div class=""umb-macro-holder mceNonEditable"" test1=""value1"" test2=""value2"">
|
||||
<!-- <?UMBRACO_MACRO test1=""value1"" test2=""value2"" macroAlias=""Map"" /> -->
|
||||
<ins>Macro alias: <strong>Map</strong></ins></div>
|
||||
<p>asdfasdf</p>".Replace(Environment.NewLine, string.Empty),
|
||||
result.Replace(Environment.NewLine, string.Empty));
|
||||
<p>asdfasdf</p>".StripNewLines(),
|
||||
result.StripNewLines());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -130,8 +131,8 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.Common.Macros
|
||||
<div class=""umb-macro-holder mceNonEditable"" test1=""value1"" test2=""value2"">
|
||||
<!-- <?UMBRACO_MACRO macroAlias=""Map"" test1=""value1"" test2=""value2"" /> -->
|
||||
<ins>Macro alias: <strong>Map</strong></ins></div>
|
||||
<p>asdfasdf</p>".Replace(Environment.NewLine, string.Empty),
|
||||
result.Replace(Environment.NewLine, string.Empty));
|
||||
<p>asdfasdf</p>".StripNewLines(),
|
||||
result.StripNewLines());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -161,8 +162,8 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.Common.Macros
|
||||
<div class=""umb-macro-holder mceNonEditable"" test1=""value1"" test2=""value2"">
|
||||
<!-- <?UMBRACO_MACRO macroAlias=""Map"" test1=""value1"" test2=""value2"" /> -->
|
||||
<ins>Macro alias: <strong>Map</strong></ins></div>
|
||||
<p>asdfasdf</p>".Replace(Environment.NewLine, string.Empty),
|
||||
result.Replace(Environment.NewLine, string.Empty));
|
||||
<p>asdfasdf</p>".StripNewLines(),
|
||||
result.StripNewLines());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -186,8 +187,8 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.Common.Macros
|
||||
<div class=""umb-macro-holder mceNonEditable"">
|
||||
<!-- <?UMBRACO_MACRO macroAlias=""login"" /> -->
|
||||
<ins>Macro alias: <strong>login</strong></ins></div>
|
||||
<p> </p>".Replace(Environment.NewLine, string.Empty),
|
||||
result.Replace(Environment.NewLine, string.Empty));
|
||||
<p> </p>".StripNewLines(),
|
||||
result.StripNewLines());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -223,8 +224,8 @@ dfdsfds"" />
|
||||
asdfsdf
|
||||
</div>
|
||||
</body>
|
||||
</html>".Replace(Environment.NewLine, string.Empty),
|
||||
result.Replace(Environment.NewLine, string.Empty));
|
||||
</html>".StripNewLines(),
|
||||
result.StripNewLines());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -242,8 +243,8 @@ asdfsdf
|
||||
<div class=""umb-macro-holder mceNonEditable"" test1=""value1"" test2=""value2"">
|
||||
<!-- <?UMBRACO_MACRO macroAlias=""Map"" test1=""value1"" test2=""value2"" /> -->
|
||||
<ins>Macro alias: <strong>Map</strong></ins></div>
|
||||
<p>asdfasdf</p>".Replace(Environment.NewLine, string.Empty),
|
||||
result.Replace(Environment.NewLine, string.Empty));
|
||||
<p>asdfasdf</p>".StripNewLines(),
|
||||
result.StripNewLines());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -261,8 +262,8 @@ asdfsdf
|
||||
<div class=""umb-macro-holder mceNonEditable"" test1=""value1"" test2=""value2"">
|
||||
<!-- <?UMBRACO_MACRO macroAlias=""Map"" test1=""value1"" test2=""value2"" /> -->
|
||||
<ins>Macro alias: <strong>Map</strong></ins></div>
|
||||
<p>asdfasdf</p>".Replace(Environment.NewLine, string.Empty),
|
||||
result.Replace(Environment.NewLine, string.Empty));
|
||||
<p>asdfasdf</p>".StripNewLines(),
|
||||
result.StripNewLines());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -318,8 +319,8 @@ asdfsdf
|
||||
asdfsdf
|
||||
</div>
|
||||
</body>
|
||||
</html>".Replace(Environment.NewLine, string.Empty),
|
||||
result.Replace(Environment.NewLine, string.Empty));
|
||||
</html>".StripNewLines(),
|
||||
result.StripNewLines());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -353,8 +354,8 @@ asdfsdf
|
||||
asdfsdf
|
||||
</div>
|
||||
</body>
|
||||
</html>".Replace(Environment.NewLine, string.Empty),
|
||||
result.Replace(Environment.NewLine, string.Empty));
|
||||
</html>".StripNewLines(),
|
||||
result.StripNewLines());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
35
umbraco.sln
35
umbraco.sln
@@ -1,6 +1,6 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29209.152
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.1.32328.378
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Web.UI", "src\Umbraco.Web.UI\Umbraco.Web.UI.csproj", "{DCDFE97C-5630-4F6F-855D-8AEEB96556A5}"
|
||||
EndProject
|
||||
@@ -26,11 +26,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{FD962632-1
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{B5BD12C1-A454-435E-8A46-FF4A364C0382}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuSpecs", "NuSpecs", "{227C3B55-80E5-4E7E-A802-BE16C5128B9D}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
build\NuSpecs\UmbracoCms.nuspec = build\NuSpecs\UmbracoCms.nuspec
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Umbraco.Web.UI.Client", "http://localhost:3961", "{3819A550-DCEC-4153-91B4-8BA9F7F0B9B4}"
|
||||
ProjectSection(WebsiteProperties) = preProject
|
||||
UseIISExpress = "true"
|
||||
@@ -124,12 +119,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Cms.Persistence.Sql
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Cms.Persistence.SqlServer", "src\Umbraco.Cms.Persistence.SqlServer\Umbraco.Cms.Persistence.SqlServer.csproj", "{93C5910D-2E36-475D-88EB-A11BA5B50F65}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco.Cms.StaticAssets", "src\Umbraco.Cms.StaticAssets\Umbraco.Cms.StaticAssets.csproj", "{D2FD54E8-3470-4A98-8B0C-A9ACB59BED48}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Cms.StaticAssets", "src\Umbraco.Cms.StaticAssets\Umbraco.Cms.StaticAssets.csproj", "{D2FD54E8-3470-4A98-8B0C-A9ACB59BED48}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "buildTransitive", "buildTransitive", "{A05481CB-A335-4BB7-9A86-1BBB3874F742}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
build\NuSpecs\buildTransitive\Umbraco.Cms.props = build\NuSpecs\buildTransitive\Umbraco.Cms.props
|
||||
EndProjectSection
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Templates", "Templates", "{6D72A60B-0542-4AA9-A493-DD4179E838A1}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Templates", "templates\Umbraco.Templates.csproj", "{05C1D0C8-C592-468F-AF8F-A299B9B3A903}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Cms", "src\Umbraco.Cms\Umbraco.Cms.csproj", "{92EAA57A-CC99-4F5D-9D9C-B865293F6000}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -241,12 +237,23 @@ Global
|
||||
{D2FD54E8-3470-4A98-8B0C-A9ACB59BED48}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D2FD54E8-3470-4A98-8B0C-A9ACB59BED48}.SkipTests|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D2FD54E8-3470-4A98-8B0C-A9ACB59BED48}.SkipTests|Any CPU.Build.0 = Debug|Any CPU
|
||||
{05C1D0C8-C592-468F-AF8F-A299B9B3A903}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{05C1D0C8-C592-468F-AF8F-A299B9B3A903}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{05C1D0C8-C592-468F-AF8F-A299B9B3A903}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{05C1D0C8-C592-468F-AF8F-A299B9B3A903}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{05C1D0C8-C592-468F-AF8F-A299B9B3A903}.SkipTests|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{05C1D0C8-C592-468F-AF8F-A299B9B3A903}.SkipTests|Any CPU.Build.0 = Debug|Any CPU
|
||||
{92EAA57A-CC99-4F5D-9D9C-B865293F6000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{92EAA57A-CC99-4F5D-9D9C-B865293F6000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{92EAA57A-CC99-4F5D-9D9C-B865293F6000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{92EAA57A-CC99-4F5D-9D9C-B865293F6000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{92EAA57A-CC99-4F5D-9D9C-B865293F6000}.SkipTests|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{92EAA57A-CC99-4F5D-9D9C-B865293F6000}.SkipTests|Any CPU.Build.0 = Debug|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{227C3B55-80E5-4E7E-A802-BE16C5128B9D} = {2849E9D4-3B4E-40A3-A309-F3CB4F0E125F}
|
||||
{9E4C8A12-FBE0-4673-8CE2-DF99D5D57817} = {B5BD12C1-A454-435E-8A46-FF4A364C0382}
|
||||
{53594E5B-64A2-4545-8367-E3627D266AE8} = {FD962632-184C-4005-A5F3-E705D92FC645}
|
||||
{3A33ADC9-C6C0-4DB1-A613-A9AF0210DF3D} = {B5BD12C1-A454-435E-8A46-FF4A364C0382}
|
||||
@@ -255,7 +262,7 @@ Global
|
||||
{D6319409-777A-4BD0-93ED-B2DFD805B32C} = {B5BD12C1-A454-435E-8A46-FF4A364C0382}
|
||||
{A499779C-1B3B-48A8-B551-458E582E6E96} = {B5BD12C1-A454-435E-8A46-FF4A364C0382}
|
||||
{9102ABDF-E537-4E46-B525-C9ED4833EED0} = {B5BD12C1-A454-435E-8A46-FF4A364C0382}
|
||||
{A05481CB-A335-4BB7-9A86-1BBB3874F742} = {227C3B55-80E5-4E7E-A802-BE16C5128B9D}
|
||||
{05C1D0C8-C592-468F-AF8F-A299B9B3A903} = {6D72A60B-0542-4AA9-A493-DD4179E838A1}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {7A0F2E34-D2AF-4DAB-86A0-7D7764B3D0EC}
|
||||
|
||||
21
version.json
Normal file
21
version.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
|
||||
"version": "10.0.0-rc2",
|
||||
"assemblyVersion": {
|
||||
"precision": "Build" // optional. Use when you want a more precise assembly version than the default major.minor.
|
||||
},
|
||||
"gitCommitIdShortFixedLength": 7,
|
||||
"publicReleaseRefSpec": [
|
||||
"^refs/heads/master$",
|
||||
"^refs/heads/main$",
|
||||
"^refs/heads/release/\\d+\\.\\d+\\.\\d+"
|
||||
],
|
||||
"cloudBuild": {
|
||||
"buildNumber": {
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
"nugetPackageVersion": {
|
||||
"semVer": 2
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user