v11: Decouple dependencies (#12907)

* Move core dependencies and MSBuild targets from Umbraco.Cms to Umbraco.Cms.Targets

* Re-add appsettings.Tests.json

* Include appsettings-schema.json

* Use .NET 7.x in CodeQL build

* Fix duplicate Directory.Build.props import

* Decouple ImageSharp/ImageSharp.Web implementations

* Further decouple SqlServer implementation

* Add SupportedImageFileTypes to IImageDimensionExtractor

* Update descriptions

* Update project metadata

* Re-enable package validation

* Add embedded package icon

* Move ContinuousIntegrationBuild to build script

* Move shared properties to root Directory.Build.props

* Fix GetInstallState throwing exception when default provider isn't configured

* Remove redundant PackageRequireLicenseAcceptance and update version to 11.0.0-rc1

* Update build script

* Remove LangVersion preview

* Disable app-local ICU for MacOS integration test

* Disable app-local ICU for all integration tests

* Fix RuntimeState_Run test assertion

* Update projects and build script to require Node.js 16.17 (latest LTS)

* Remove app-local ICU from unit tests

* Add missing project reference

* Generate XML documentation files

* Expose management API in Web.UI project

* Update .NET 7 dependencies to RC1

* Update package-lock.json files

* Downgrade Cypress version
This commit is contained in:
Ronald Barendse
2022-09-27 14:22:34 +02:00
committed by GitHub
parent d206df0cac
commit 3873a0735c
90 changed files with 1061 additions and 1350 deletions

View File

@@ -1,13 +1,13 @@
# New Backoffice # New backoffice
> **Warning**: > **Warning**:
> This is an early WIP, and is set not to be packable since we don't want to release this yet. There will be breaking changes in these projects > This is an early WIP and is set not to be packable since we don't want to release this yet. There will be breaking changes in these projects.
This solution folder contains the projects for the new BackOffice. If you're looking to fix or improve the existing CMS, this is not the place to do it, although we do very much appreciate your efforts. This solution folder contains the projects for the new backoffice. If you're looking to fix or improve the existing CMS, this is not the place to do it, although we do very much appreciate your efforts.
### Project structure ### Project structure
Since the new backoffice API is still very much a work in progress we've created new projects for the new backoffice API: Since the new backoffice API is still very much a work in progress, we've created new projects for the new backoffice API:
* Umbrao.Cms.ManagementApi - The "presentation layer" for the management API * Umbrao.Cms.ManagementApi - The "presentation layer" for the management API
* "New" versions of existing projects, should be merged with the existing projects when the new API is released: * "New" versions of existing projects, should be merged with the existing projects when the new API is released:

3
.gitignore vendored
View File

@@ -104,5 +104,6 @@ cypress.env.json
/tests/Umbraco.Tests.UnitTests/[Uu]mbraco/[Dd]ata/TEMP/ /tests/Umbraco.Tests.UnitTests/[Uu]mbraco/[Dd]ata/TEMP/
# Ignore auto-generated schema # Ignore auto-generated schema
/src/Umbraco.Cms.Targets/appsettings-schema.json
/src/Umbraco.Web.UI/appsettings-schema.json /src/Umbraco.Web.UI/appsettings-schema.json
/src/Umbraco.Cms/appsettings-schema.json /tests/Umbraco.Tests.Integration/appsettings-schema.json

View File

@@ -1,18 +1,48 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project> <Project>
<!-- Package references and additional files which are consumed by all projects --> <PropertyGroup>
<Company>Umbraco HQ</Company>
<Authors>Umbraco</Authors>
<Copyright>Copyright © Umbraco $([System.DateTime]::Today.ToString('yyyy'))</Copyright>
<Product>Umbraco CMS</Product>
<PackageProjectUrl>https://umbraco.com/</PackageProjectUrl>
<PackageIconUrl>https://umbraco.com/dist/nuget/logo-small.png</PackageIconUrl>
<PackageIcon>icon.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageTags>umbraco</PackageTags>
<NeutralLanguage>en-US</NeutralLanguage>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<!-- SourceLink -->
<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<!-- Package Validation -->
<PropertyGroup>
<EnablePackageValidation>true</EnablePackageValidation>
<!-- TODO: Change to 11.0.0 and remove all CompatibilitySupressions.xml files when final version shipped -->
<PackageValidationBaselineVersion>10.1.0</PackageValidationBaselineVersion>
<EnableStrictModeForCompatibleFrameworksInPackage>true</EnableStrictModeForCompatibleFrameworksInPackage>
<EnableStrictModeForCompatibleTfms>true</EnableStrictModeForCompatibleTfms>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.406" PrivateAssets="all" IsImplicitlyDefined="true"/> <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.113" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.406" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="Umbraco.Code" Version="2.0.0" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="Umbraco.GitVersioning.Extensions" Version="0.1.1" PrivateAssets="all" IsImplicitlyDefined="true" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Condition="!Exists('packages.config')"> <Content Include="$(MSBuildThisFileDirectory)icon.png" Pack="true" PackagePath="" Visible="false" />
<PrivateAssets>all</PrivateAssets>
<Version>3.5.113</Version>
</PackageReference>
<PackageReference Include="Umbraco.GitVersioning.Extensions" Version="0.1.1">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -23,12 +23,15 @@ parameters:
default: false default: false
variables: variables:
nodeVersion: 16.17.0
dotnetVersion: 7.x
solution: umbraco.sln
buildConfiguration: Release buildConfiguration: Release
SA_PASSWORD: UmbracoIntegration123! UMBRACO__CMS__GLOBAL__ID: 00000000-0000-0000-0000-000000000042
UMBRACO__CMS_GLOBAL__ID: 00000000-0000-0000-0000-000000000042 DOTNET_NOLOGO: true
nodeVersion: 14.18.1 DOTNET_GENERATE_ASPNET_CERTIFICATE: false
DOTNET_NOLOGO: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_CLI_TELEMETRY_OPTOUT: true
stages: stages:
############################################### ###############################################
@@ -44,7 +47,7 @@ stages:
vmImage: 'ubuntu-latest' vmImage: 'ubuntu-latest'
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
displayName: Use node $(nodeVersion) displayName: Use Node.js $(nodeVersion)
inputs: inputs:
versionSpec: $(nodeVersion) versionSpec: $(nodeVersion)
- task: Cache@2 - task: Cache@2
@@ -65,16 +68,22 @@ stages:
targets: coreBuild targets: coreBuild
workingDirectory: src/Umbraco.Web.UI.Client workingDirectory: src/Umbraco.Web.UI.Client
- task: UseDotNet@2 - task: UseDotNet@2
displayName: Use .NET 7.x displayName: Use .NET $(dotnetVersion)
inputs: inputs:
version: 7.x version: $(dotnetVersion)
performMultiLevelLookup: true
includePreviewVersions: true includePreviewVersions: true
- task: DotNetCoreCLI@2
displayName: Run dotnet restore
inputs:
command: restore
projects: $(solution)
- task: DotNetCoreCLI@2 - task: DotNetCoreCLI@2
displayName: Run dotnet build displayName: Run dotnet build
inputs: inputs:
command: build command: build
projects: umbraco.sln projects: $(solution)
arguments: '--configuration $(buildConfiguration)' arguments: '--configuration $(buildConfiguration) --no-restore -p:ContinuousIntegrationBuild=true'
- script: | - script: |
version="$(Build.BuildNumber)" version="$(Build.BuildNumber)"
echo "varsion: $version" echo "varsion: $version"
@@ -101,7 +110,7 @@ stages:
} }
} }
dotnet pack --configuration $(buildConfiguration) umbraco.sln -o $(Build.ArtifactStagingDirectory)/nupkg dotnet pack $(solution) --configuration $(buildConfiguration) --no-build --output $(Build.ArtifactStagingDirectory)/nupkg
- script: | - script: |
sha="$(Build.SourceVersion)" sha="$(Build.SourceVersion)"
sha=${sha:0:7} sha=${sha:0:7}
@@ -178,9 +187,9 @@ stages:
vmImage: 'ubuntu-latest' vmImage: 'ubuntu-latest'
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
displayName: Use Node 10.15.0 displayName: Use Node.js 10.15.0
inputs: inputs:
versionSpec: 10.15.0 # Won't work with 14.18.1 versionSpec: 10.15.0 # Won't work with higher versions
- script: | - script: |
npm ci --no-fund --no-audit --prefer-offline npm ci --no-fund --no-audit --prefer-offline
npx gulp docs npx gulp docs
@@ -233,16 +242,17 @@ stages:
artifact: build_output artifact: build_output
path: $(Build.SourcesDirectory) path: $(Build.SourcesDirectory)
- task: UseDotNet@2 - task: UseDotNet@2
displayName: Use net7 displayName: Use .NET $(dotnetVersion)
inputs: inputs:
version: 7.x version: $(dotnetVersion)
performMultiLevelLookup: true
includePreviewVersions: true includePreviewVersions: true
- task: DotNetCoreCLI@2 - task: DotNetCoreCLI@2
displayName: Run dotnet test displayName: Run dotnet test
inputs: inputs:
command: test command: test
projects: '**/*.Tests.UnitTests.csproj' projects: '**/*.Tests.UnitTests.csproj'
arguments: '--no-build --configuration $(buildConfiguration)' arguments: '--configuration $(buildConfiguration) --no-build'
testRunTitle: Unit Tests - $(Agent.OS) testRunTitle: Unit Tests - $(Agent.OS)
- stage: Integration - stage: Integration
@@ -269,16 +279,17 @@ stages:
artifact: build_output artifact: build_output
path: $(Build.SourcesDirectory) path: $(Build.SourcesDirectory)
- task: UseDotNet@2 - task: UseDotNet@2
displayName: Use net7 displayName: Use .NET $(dotnetVersion)
inputs: inputs:
version: 7.x version: $(dotnetVersion)
performMultiLevelLookup: true
includePreviewVersions: true includePreviewVersions: true
- task: DotNetCoreCLI@2 - task: DotNetCoreCLI@2
displayName: Run dotnet test displayName: Run dotnet test
inputs: inputs:
command: test command: test
projects: '**/*.Tests.Integration.csproj' projects: '**/*.Tests.Integration.csproj'
arguments: '--no-build --configuration $(buildConfiguration)' arguments: '--configuration $(buildConfiguration) --no-build'
testRunTitle: Integration Tests SQLite - $(Agent.OS) testRunTitle: Integration Tests SQLite - $(Agent.OS)
env: env:
Tests__Database__DatabaseType: 'Sqlite' Tests__Database__DatabaseType: 'Sqlite'
@@ -301,6 +312,8 @@ stages:
connectionString: 'Server=localhost,1433;User Id=sa;Password=$(SA_PASSWORD);' connectionString: 'Server=localhost,1433;User Id=sa;Password=$(SA_PASSWORD);'
pool: pool:
vmImage: $(vmImage) vmImage: $(vmImage)
variables:
SA_PASSWORD: UmbracoIntegration123!
steps: steps:
- task: DownloadPipelineArtifact@2 - task: DownloadPipelineArtifact@2
displayName: Download build artifacts displayName: Download build artifacts
@@ -318,7 +331,7 @@ stages:
inputs: inputs:
command: test command: test
projects: '**/*.Tests.Integration.csproj' projects: '**/*.Tests.Integration.csproj'
arguments: '--no-build --configuration $(buildConfiguration)' arguments: '--configuration $(buildConfiguration) --no-build'
testRunTitle: Integration Tests SQL Server - $(Agent.OS) testRunTitle: Integration Tests SQL Server - $(Agent.OS)
env: env:
Tests__Database__DatabaseType: $(testDb) Tests__Database__DatabaseType: $(testDb)
@@ -371,7 +384,7 @@ stages:
artifact: nupkg artifact: nupkg
path: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/misc/nupkg path: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/misc/nupkg
- task: NodeTool@0 - task: NodeTool@0
displayName: Use Node $(nodeVersion) displayName: Use Node.js $(nodeVersion)
inputs: inputs:
versionSpec: $(nodeVersion) versionSpec: $(nodeVersion)
- task: Cache@2 - task: Cache@2
@@ -403,9 +416,10 @@ stages:
displayName: Create database (Windows only) displayName: Create database (Windows only)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
- task: UseDotNet@2 - task: UseDotNet@2
displayName: Use .Net 7.x displayName: Use .NET $(dotnetVersion)
inputs: inputs:
version: 7.x version: $(dotnetVersion)
performMultiLevelLookup: true
includePreviewVersions: true includePreviewVersions: true
# Linux containers smooth # Linux containers smooth
- task: PowerShell@2 - task: PowerShell@2
@@ -419,7 +433,7 @@ stages:
docker build -t $(dockerImageName):$sha -f $(dockerfile) . docker build -t $(dockerImageName):$sha -f $(dockerfile) .
mkdir -p $(Build.ArtifactStagingDirectory)/docker-images mkdir -p $(Build.ArtifactStagingDirectory)/docker-images
docker save -o $(Build.ArtifactStagingDirectory)/docker-images/$(dockerImageName).$sha.tar $(dockerImageName):$sha docker save -o $(Build.ArtifactStagingDirectory)/docker-images/$(dockerImageName).$sha.tar $(dockerImageName):$sha
docker run --name $(dockerImageName) -dp 8080:5000 -e UMBRACO__CMS_GLOBAL__ID=$(UMBRACO__CMS_GLOBAL__ID) $(dockerImageName):$sha docker run --name $(dockerImageName) -dp 8080:5000 -e UMBRACO__CMS__GLOBAL__ID=$(UMBRACO__CMS__GLOBAL__ID) $(dockerImageName):$sha
docker ps docker ps
# Windows containers take forever. # Windows containers take forever.
# --no-launch-profile stops ASPNETCORE_ENVIRONMENT=Development which breaks the users.ts tests (smtp config = invite user button) # --no-launch-profile stops ASPNETCORE_ENVIRONMENT=Development which breaks the users.ts tests (smtp config = invite user button)
@@ -434,8 +448,8 @@ stages:
dotnet new --install ./nupkg/Umbraco.Templates.*.nupkg dotnet new --install ./nupkg/Umbraco.Templates.*.nupkg
dotnet new umbraco --name Cypress -o . --no-restore dotnet new umbraco --name Cypress -o . --no-restore
dotnet restore --configfile ./nuget.config dotnet restore --configfile ./nuget.config
dotnet build --no-restore -c Release dotnet build --configuration $(buildConfiguration) --no-restore
Start-Process -FilePath "dotnet" -ArgumentList "run --no-build -c Release --no-launch-profile --urls $(CYPRESS_BASE_URL)" Start-Process -FilePath "dotnet" -ArgumentList "run --configuration $(buildConfiguration) --no-build --no-launch-profile --urls $(CYPRESS_BASE_URL)"
- task: PowerShell@2 - task: PowerShell@2
displayName: Wait for app displayName: Wait for app
inputs: inputs:
@@ -496,12 +510,12 @@ stages:
displayName: dotnet restore displayName: dotnet restore
inputs: inputs:
command: restore command: restore
projects: '**/umbraco.sln' projects: $(solution)
# TODO: Use NuGetCommand instead of DotNetCoreCLI # TODO: Use NuGetCommand instead of DotNetCoreCLI
# - task: NuGetCommand@2 # - task: NuGetCommand@2
# displayName: Restore NuGet Packages # displayName: Restore NuGet Packages
# inputs: # inputs:
# restoreSolution: 'umbraco.sln' # restoreSolution: $(solution)
# feedsToUse: config # feedsToUse: config
- stage: Deploy_NuGet - stage: Deploy_NuGet
displayName: NuGet release displayName: NuGet release
@@ -523,7 +537,7 @@ stages:
displayName: dotnet restore displayName: dotnet restore
inputs: inputs:
command: restore command: restore
projects: '**/umbraco.sln' projects: $(solution)
- stage: Upload_API_Docs - stage: Upload_API_Docs
pool: pool:

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -1,53 +0,0 @@
name: issue-first-response
on:
issues:
types: [opened]
jobs:
send-response:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Install dependencies
run: |
npm install node-fetch@2
- name: Fetch random comment 🗣️ and add it to the issue
uses: actions/github-script@v6
with:
script: |
const fetch = require('node-fetch')
const response = await fetch('https://collaboratorsv2.euwest01.umbraco.io/umbraco/api/comments/PostComment', {
method: 'post',
body: JSON.stringify({
repo: '${{ github.repository }}',
number: '${{ github.event.number }}',
actor: '${{ github.actor }}',
commentType: 'opened-issue-first-comment'
}),
headers: {
'Authorization': 'Bearer ${{ secrets.OUR_BOT_API_TOKEN }}',
'Content-Type': 'application/json'
}
});
try {
const data = await response.text();
if(response.status === 200 && data !== '') {
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: data
});
} else {
console.log("Status code did not indicate success:", response.status);
console.log("Returned data:", data);
}
} catch(error) {
console.log(error);
}

View File

@@ -1,54 +0,0 @@
<Project>
<!-- Enable multi-level merging -->
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))"/>
<PropertyGroup>
<Version>10.0.0</Version>
<AssemblyVersion>10.0.0</AssemblyVersion>
<InformationalVersion>10.0.0-rc1</InformationalVersion>
<FileVersion>10.0.0</FileVersion>
<LangVersion Condition="'$(LangVersion)' == ''">preview</LangVersion>
<NeutralLanguage>en-US</NeutralLanguage>
<Company>Umbraco CMS</Company>
<Copyright>Copyright © Umbraco 2021</Copyright>
<Authors>Umbraco HQ</Authors>
<PackageProjectUrl>https://umbraco.com/</PackageProjectUrl>
<PackageIconUrl>https://umbraco.com/dist/nuget/logo-small.png</PackageIconUrl>
<PackageLicenseUrl>https://opensource.org/licenses/MIT</PackageLicenseUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageTags>umbraco</PackageTags>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/umbraco/umbraco-cms</RepositoryUrl>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<PropertyGroup>
<!-- SourceLink: Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element)-->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!-- SourceLink: Embed source files that are not tracked by the source control manager in the PDB -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- SourceLink: Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<!-- SourceLink: Deterministic -->
<!-- https://github.com/clairernovotny/DeterministicBuilds -->
<!-- Only for Azure Pipelines CI Build -->
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<!-- Package Validation -->
<!-- TODO - Introduce when v11 is shipped-->
<!-- <PropertyGroup>-->
<!-- <EnablePackageValidation>true</EnablePackageValidation>-->
<!-- <PackageValidationBaselineVersion>11.0.0</PackageValidationBaselineVersion>-->
<!-- <EnableStrictModeForCompatibleFrameworksInPackage>true</EnableStrictModeForCompatibleFrameworksInPackage>-->
<!-- <EnableStrictModeForCompatibleTfms>true</EnableStrictModeForCompatibleTfms>-->
<!-- </PropertyGroup>-->
</Project>

View File

@@ -1,33 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <OutputType>Exe</OutputType>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<EnablePackageValidation>false</EnablePackageValidation> <EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.9.1" /> <PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="NJsonSchema" Version="10.8.0" /> <PackageReference Include="NJsonSchema" Version="10.8.0" />
<PackageReference Include="System.Xml.XPath.XmlDocument" Version="4.3.0" /> </ItemGroup>
<PackageReference Include="Umbraco.Deploy.Core" Version="10.1.0" />
<PackageReference Include="Umbraco.Forms.Core" Version="10.0.0" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" /> <ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" />
<PackageReference Include="Umbraco.Deploy.Core" Version="10.0.0" />
<PackageReference Include="Umbraco.Forms.Core" Version="10.0.0" />
</ItemGroup> </ItemGroup>
<!-- Copy Forms XML docs-->
<PropertyGroup>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
</PropertyGroup>
<Target Name="CopyPackagesXml" BeforeTargets="Build">
<ItemGroup>
<PackageReferenceFiles Include="$(NugetPackageRoot)%(PackageReference.Identity)\%(PackageReference.Version)%(PackageReference.CopyToOutputDirectory)\lib\**\*.xml" />
</ItemGroup>
<Copy SourceFiles="@(PackageReferenceFiles)" DestinationFolder="$(OutDir)" />
</Target>
</Project> </Project>

View File

@@ -7,7 +7,7 @@ namespace JsonSchema
{ {
internal class Options internal class Options
{ {
[Option('o', "outputFile", Required = false, HelpText = "Set path of the output file.", Default = "../../../../Umbraco.Web.UI/appsettings-schema.json")] [Option('o', "outputFile", Required = false, HelpText = "Set path of the output file.", Default = "appsettings-schema.json")]
public string OutputFile { get; set; } = null!; public string OutputFile { get; set; } = null!;
} }
} }

View File

@@ -8,7 +8,7 @@ using SixLabors.ImageSharp.Web.Middleware;
using SixLabors.ImageSharp.Web.Processors; using SixLabors.ImageSharp.Web.Processors;
using Umbraco.Cms.Core.Configuration.Models; using Umbraco.Cms.Core.Configuration.Models;
namespace Umbraco.Cms.Web.Common.DependencyInjection; namespace Umbraco.Cms.Imaging.ImageSharp;
/// <summary> /// <summary>
/// Configures the ImageSharp middleware options. /// Configures the ImageSharp middleware options.

View File

@@ -4,7 +4,7 @@ using SixLabors.ImageSharp.Web.Caching;
using Umbraco.Cms.Core.Configuration.Models; using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Extensions; using Umbraco.Cms.Core.Extensions;
namespace Umbraco.Cms.Web.Common.DependencyInjection; namespace Umbraco.Cms.Imaging.ImageSharp;
/// <summary> /// <summary>
/// Configures the ImageSharp physical file system cache options. /// Configures the ImageSharp physical file system cache options.

View File

@@ -8,20 +8,21 @@ using SixLabors.ImageSharp.Web;
using SixLabors.ImageSharp.Web.Commands; using SixLabors.ImageSharp.Web.Commands;
using SixLabors.ImageSharp.Web.Processors; using SixLabors.ImageSharp.Web.Processors;
namespace Umbraco.Cms.Web.Common.ImageProcessors; namespace Umbraco.Cms.Imaging.ImageSharp.ImageProcessors;
/// <summary> /// <summary>
/// Allows the cropping of images. /// Allows the cropping of images.
/// </summary> /// </summary>
/// <seealso cref="SixLabors.ImageSharp.Web.Processors.IImageWebProcessor" />
public class CropWebProcessor : IImageWebProcessor public class CropWebProcessor : IImageWebProcessor
{ {
/// <summary> /// <summary>
/// The command constant for the crop coordinates. /// The command constant for the crop coordinates.
/// </summary> /// </summary>
public const string Coordinates = "cc"; public const string Coordinates = "cc";
/// <summary> /// <summary>
/// The command constant for the resize orientation handling mode. /// The command constant for the resize orientation handling mode.
/// </summary> /// </summary>
public const string Orient = "orient"; public const string Orient = "orient";
@@ -59,10 +60,8 @@ public class CropWebProcessor : IImageWebProcessor
var right = Math.Clamp(1 - coordinates[2], 0, 1); var right = Math.Clamp(1 - coordinates[2], 0, 1);
var bottom = Math.Clamp(1 - coordinates[3], 0, 1); var bottom = Math.Clamp(1 - coordinates[3], 0, 1);
var orientation = GetExifOrientation(image, commands, parser, culture); var orientation = GetExifOrientation(image, commands, parser, culture);
Vector2 xy1 = Vector2 xy1 = ExifOrientationUtilities.Transform(new Vector2(left, top), Vector2.Zero, Vector2.One, orientation);
ExifOrientationUtilities.Transform(new Vector2(left, top), Vector2.Zero, Vector2.One, orientation); Vector2 xy2 = ExifOrientationUtilities.Transform(new Vector2(right, bottom), Vector2.Zero, Vector2.One, orientation);
Vector2 xy2 =
ExifOrientationUtilities.Transform(new Vector2(right, bottom), Vector2.Zero, Vector2.One, orientation);
// Scale points to a pixel based rectangle // Scale points to a pixel based rectangle
Size size = image.Image.Size(); Size size = image.Image.Size();

View File

@@ -0,0 +1,16 @@
using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Extensions;
namespace Umbraco.Cms.Imaging.ImageSharp;
/// <summary>
/// Adds imaging support using ImageSharp/ImageSharp.Web.
/// </summary>
/// <seealso cref="Umbraco.Cms.Core.Composing.IComposer" />
public sealed class ImageSharpComposer : IComposer
{
/// <inheritdoc />
public void Compose(IUmbracoBuilder builder)
=> builder.AddUmbracoImageSharp();
}

View File

@@ -3,26 +3,27 @@ using SixLabors.ImageSharp.Metadata.Profiles.Exif;
using Umbraco.Cms.Core.Media; using Umbraco.Cms.Core.Media;
using Size = System.Drawing.Size; using Size = System.Drawing.Size;
namespace Umbraco.Cms.Infrastructure.Media; namespace Umbraco.Cms.Imaging.ImageSharp.Media;
internal class ImageSharpDimensionExtractor : IImageDimensionExtractor public sealed class ImageSharpDimensionExtractor : IImageDimensionExtractor
{ {
private readonly Configuration _configuration; private readonly Configuration _configuration;
/// <inheritdoc />
public IEnumerable<string> SupportedImageFileTypes { get; }
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ImageSharpDimensionExtractor" /> class. /// Initializes a new instance of the <see cref="ImageSharpDimensionExtractor" /> class.
/// </summary> /// </summary>
/// <param name="configuration">The configuration.</param> /// <param name="configuration">The configuration.</param>
public ImageSharpDimensionExtractor(Configuration configuration) public ImageSharpDimensionExtractor(Configuration configuration)
=> _configuration = configuration; {
_configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
/// <summary> SupportedImageFileTypes = configuration.ImageFormats.SelectMany(f => f.FileExtensions).ToArray();
/// Gets the dimensions of an image. }
/// </summary>
/// <param name="stream">A stream containing the image bytes.</param> /// <inheritdoc />
/// <returns>
/// The dimension of the image.
/// </returns>
public Size? GetDimensions(Stream? stream) public Size? GetDimensions(Stream? stream)
{ {
Size? size = null; Size? size = null;

View File

@@ -5,25 +5,27 @@ using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Web.Processors; using SixLabors.ImageSharp.Web.Processors;
using Umbraco.Cms.Core.Media; using Umbraco.Cms.Core.Media;
using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Web.Common.ImageProcessors; using Umbraco.Cms.Imaging.ImageSharp.ImageProcessors;
using static Umbraco.Cms.Core.Models.ImageUrlGenerationOptions; using static Umbraco.Cms.Core.Models.ImageUrlGenerationOptions;
namespace Umbraco.Cms.Web.Common.Media; namespace Umbraco.Cms.Imaging.ImageSharp.Media;
/// <summary> /// <summary>
/// Exposes a method that generates an image URL based on the specified options that can be processed by ImageSharp. /// Exposes a method that generates an image URL based on the specified options that can be processed by ImageSharp.
/// </summary> /// </summary>
/// <seealso cref="IImageUrlGenerator" /> /// <seealso cref="IImageUrlGenerator" />
public class ImageSharpImageUrlGenerator : IImageUrlGenerator public sealed class ImageSharpImageUrlGenerator : IImageUrlGenerator
{ {
/// <inheritdoc />
public IEnumerable<string> SupportedImageFileTypes { get; }
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ImageSharpImageUrlGenerator" /> class. /// Initializes a new instance of the <see cref="ImageSharpImageUrlGenerator" /> class.
/// </summary> /// </summary>
/// <param name="configuration">The ImageSharp configuration.</param> /// <param name="configuration">The ImageSharp configuration.</param>
public ImageSharpImageUrlGenerator(Configuration configuration) public ImageSharpImageUrlGenerator(Configuration configuration)
: this(configuration.ImageFormats.SelectMany(f => f.FileExtensions).ToArray()) : this(configuration.ImageFormats.SelectMany(f => f.FileExtensions).ToArray())
{ { }
}
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ImageSharpImageUrlGenerator" /> class. /// Initializes a new instance of the <see cref="ImageSharpImageUrlGenerator" /> class.
@@ -35,9 +37,6 @@ public class ImageSharpImageUrlGenerator : IImageUrlGenerator
internal ImageSharpImageUrlGenerator(IEnumerable<string> supportedImageFileTypes) => internal ImageSharpImageUrlGenerator(IEnumerable<string> supportedImageFileTypes) =>
SupportedImageFileTypes = supportedImageFileTypes; SupportedImageFileTypes = supportedImageFileTypes;
/// <inheritdoc />
public IEnumerable<string> SupportedImageFileTypes { get; }
/// <inheritdoc /> /// <inheritdoc />
public string? GetImageUrl(ImageUrlGenerationOptions? options) public string? GetImageUrl(ImageUrlGenerationOptions? options)
{ {

View File

@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Title>Umbraco CMS - Imaging - ImageSharp</Title>
<Description>Adds imaging support using ImageSharp/ImageSharp.Web to Umbraco CMS.</Description>
<TargetFramework>net7.0</TargetFramework>
<!-- TODO: Enable when final version is shipped (because there's currently no previous version) -->
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
<PackageReference Include="SixLabors.ImageSharp.Web" Version="2.0.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
</ItemGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests.UnitTests</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,54 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Web.Caching;
using SixLabors.ImageSharp.Web.DependencyInjection;
using SixLabors.ImageSharp.Web.Middleware;
using SixLabors.ImageSharp.Web.Providers;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Media;
using Umbraco.Cms.Imaging.ImageSharp.ImageProcessors;
using Umbraco.Cms.Imaging.ImageSharp.Media;
using Umbraco.Cms.Web.Common.ApplicationBuilder;
using Umbraco.Extensions;
namespace Umbraco.Cms.Imaging.ImageSharp;
public static class UmbracoBuilderExtensions
{
/// <summary>
/// Adds Image Sharp with Umbraco settings
/// </summary>
public static IServiceCollection AddUmbracoImageSharp(this IUmbracoBuilder builder)
{
// Add default ImageSharp configuration and service implementations
builder.Services.AddSingleton(Configuration.Default);
builder.Services.AddUnique<IImageDimensionExtractor, ImageSharpDimensionExtractor>();
builder.Services.AddSingleton<IImageUrlGenerator, ImageSharpImageUrlGenerator>();
builder.Services.AddImageSharp()
// Replace default image provider
.ClearProviders()
.AddProvider<WebRootImageProvider>()
// Add custom processors
.AddProcessor<CropWebProcessor>();
// Configure middleware
builder.Services.AddTransient<IConfigureOptions<ImageSharpMiddlewareOptions>, ConfigureImageSharpMiddlewareOptions>();
// Configure cache options
builder.Services.AddTransient<IConfigureOptions<PhysicalFileSystemCacheOptions>, ConfigurePhysicalFileSystemCacheOptions>();
// Important we handle image manipulations before the static files, otherwise the querystring is just ignored
builder.Services.Configure<UmbracoPipelineOptions>(options =>
{
options.AddFilter(new UmbracoPipelineFilter(nameof(ImageSharpComposer))
{
PrePipeline = prePipeline => prePipeline.UseImageSharp()
});
});
return builder.Services;
}
}

View File

@@ -1,34 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Title>Umbraco CMS - Management API</Title>
<Description>Contains the presentation layer for the Umbraco CMS Management API.</Description>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup>
<PropertyGroup> <ItemGroup>
<TargetFramework>net7.0</TargetFramework> <PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.0.0" />
<ImplicitUsings>enable</ImplicitUsings> <PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.0.0" />
<Nullable>enable</Nullable> <PackageReference Include="NSwag.AspNetCore" Version="13.17.0" />
<WarningsAsErrors>nullable</WarningsAsErrors> </ItemGroup>
<RootNamespace>Umbraco.Cms.ManagementApi</RootNamespace>
<IsPackable>false</IsPackable>
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" /> <ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" />
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" /> <ProjectReference Include="..\Umbraco.New.Cms.Core\Umbraco.New.Cms.Core.csproj" />
<ProjectReference Include="..\Umbraco.New.Cms.Core\Umbraco.New.Cms.Core.csproj" /> <ProjectReference Include="..\Umbraco.New.Cms.Infrastructure\Umbraco.New.Cms.Infrastructure.csproj" />
<ProjectReference Include="..\Umbraco.New.Cms.Infrastructure\Umbraco.New.Cms.Infrastructure.csproj" /> <ProjectReference Include="..\Umbraco.New.Cms.Web.Common\Umbraco.New.Cms.Web.Common.csproj" />
<ProjectReference Include="..\Umbraco.New.Cms.Web.Common\Umbraco.New.Cms.Web.Common.csproj" /> <ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.0.0" /> <EmbeddedResource Include="OpenApi.json" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.0.0" /> </ItemGroup>
<PackageReference Include="NSwag.AspNetCore" Version="13.17.0" />
<PackageReference Include="Umbraco.Code" Version="2.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<None Remove="OpenApi.json" />
<EmbeddedResource Include="OpenApi.json" />
</ItemGroup>
</Project> </Project>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>PKV006</DiagnosticId>
<Target>net6.0</Target>
</Suppression>
</Suppressions>

View File

@@ -1,8 +1,7 @@
using Umbraco.Cms.Infrastructure.Persistence.FaultHandling.Strategies; using Umbraco.Cms.Infrastructure.Persistence.FaultHandling;
using Umbraco.Cms.Persistence.SqlServer.FaultHandling.Strategies;
namespace Umbraco.Cms.Infrastructure.Persistence.FaultHandling; namespace Umbraco.Cms.Persistence.SqlServer.FaultHandling;
// TODO: These should move to Persistence.SqlServer
/// <summary> /// <summary>
/// Provides a factory class for instantiating application-specific retry policies. /// Provides a factory class for instantiating application-specific retry policies.

View File

@@ -1,6 +1,7 @@
using Microsoft.Data.SqlClient; using Microsoft.Data.SqlClient;
using Umbraco.Cms.Infrastructure.Persistence.FaultHandling;
namespace Umbraco.Cms.Infrastructure.Persistence.FaultHandling.Strategies; namespace Umbraco.Cms.Persistence.SqlServer.FaultHandling.Strategies;
/// <summary> /// <summary>
/// Implements a strategy that detects network connectivity errors such as host not found. /// Implements a strategy that detects network connectivity errors such as host not found.

View File

@@ -1,6 +1,7 @@
using Microsoft.Data.SqlClient; using Microsoft.Data.SqlClient;
using Umbraco.Cms.Infrastructure.Persistence.FaultHandling;
namespace Umbraco.Cms.Infrastructure.Persistence.FaultHandling.Strategies; namespace Umbraco.Cms.Persistence.SqlServer.FaultHandling.Strategies;
// See https://docs.microsoft.com/en-us/azure/azure-sql/database/troubleshoot-common-connectivity-issues // See https://docs.microsoft.com/en-us/azure/azure-sql/database/troubleshoot-common-connectivity-issues
// Also we could just use the nuget package instead https://www.nuget.org/packages/EnterpriseLibrary.TransientFaultHandling/ ? // Also we could just use the nuget package instead https://www.nuget.org/packages/EnterpriseLibrary.TransientFaultHandling/ ?

View File

@@ -3,7 +3,7 @@ using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Microsoft.Data.SqlClient; using Microsoft.Data.SqlClient;
namespace Umbraco.Cms.Infrastructure.Persistence.FaultHandling; namespace Umbraco.Cms.Persistence.SqlServer.FaultHandling.Strategies;
/// <summary> /// <summary>
/// Defines the possible throttling modes in SQL Azure. /// Defines the possible throttling modes in SQL Azure.
@@ -299,7 +299,7 @@ public class ThrottlingCondition
condition._throttledResources.Add(Tuple.Create(ThrottledResourceType.DatabaseSize, (ThrottlingType)((groupCode >>= 2) & 3))); condition._throttledResources.Add(Tuple.Create(ThrottledResourceType.DatabaseSize, (ThrottlingType)((groupCode >>= 2) & 3)));
condition._throttledResources.Add(Tuple.Create(ThrottledResourceType.Internal, (ThrottlingType)((groupCode >>= 2) & 3))); condition._throttledResources.Add(Tuple.Create(ThrottledResourceType.Internal, (ThrottlingType)((groupCode >>= 2) & 3)));
condition._throttledResources.Add(Tuple.Create(ThrottledResourceType.WorkerThreads, (ThrottlingType)((groupCode >>= 2) & 3))); condition._throttledResources.Add(Tuple.Create(ThrottledResourceType.WorkerThreads, (ThrottlingType)((groupCode >>= 2) & 3)));
condition._throttledResources.Add(Tuple.Create(ThrottledResourceType.Internal, (ThrottlingType)((groupCode >> 2) & 3))); condition._throttledResources.Add(Tuple.Create(ThrottledResourceType.Internal, (ThrottlingType)(groupCode >> 2 & 3)));
return condition; return condition;
} }

View File

@@ -3,6 +3,7 @@ using Microsoft.Extensions.Options;
using NPoco; using NPoco;
using Umbraco.Cms.Core.Configuration.Models; using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Infrastructure.Persistence.FaultHandling; using Umbraco.Cms.Infrastructure.Persistence.FaultHandling;
using Umbraco.Cms.Persistence.SqlServer.FaultHandling;
using Umbraco.Extensions; using Umbraco.Extensions;
namespace Umbraco.Cms.Persistence.SqlServer.Interceptors; namespace Umbraco.Cms.Persistence.SqlServer.Interceptors;
@@ -21,12 +22,8 @@ public class SqlServerAddRetryPolicyInterceptor : SqlServerConnectionInterceptor
return conn; return conn;
} }
RetryPolicy? connectionRetryPolicy = RetryPolicy? connectionRetryPolicy = RetryPolicyFactory.GetDefaultSqlConnectionRetryPolicyByConnectionString(_connectionStrings.CurrentValue.ConnectionString);
RetryPolicyFactory.GetDefaultSqlConnectionRetryPolicyByConnectionString(_connectionStrings.CurrentValue RetryPolicy? commandRetryPolicy = RetryPolicyFactory.GetDefaultSqlCommandRetryPolicyByConnectionString(_connectionStrings.CurrentValue.ConnectionString);
.ConnectionString);
RetryPolicy? commandRetryPolicy =
RetryPolicyFactory.GetDefaultSqlCommandRetryPolicyByConnectionString(_connectionStrings.CurrentValue
.ConnectionString);
if (connectionRetryPolicy == null && commandRetryPolicy == null) if (connectionRetryPolicy == null && commandRetryPolicy == null)
{ {

View File

@@ -2,7 +2,7 @@ using System.Data;
using System.Diagnostics; using System.Diagnostics;
using Microsoft.Data.SqlClient; using Microsoft.Data.SqlClient;
namespace Umbraco.Cms.Infrastructure.Persistence; namespace Umbraco.Cms.Persistence.SqlServer;
/// <summary> /// <summary>
/// Manages LocalDB databases. /// Manages LocalDB databases.
@@ -153,7 +153,7 @@ public class LocalDb
return null; return null;
} }
return output.Split(new[] {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries); return output.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
} }
/// <summary> /// <summary>
@@ -861,7 +861,7 @@ public class LocalDb
{ {
var nop = (targetFilesPath == null || targetFilesPath == filesPath) var nop = (targetFilesPath == null || targetFilesPath == filesPath)
&& (targetDatabaseName == null || targetDatabaseName == databaseName) && (targetDatabaseName == null || targetDatabaseName == databaseName)
&& ((sourceExtension == null && targetExtension == null) || sourceExtension == targetExtension); && (sourceExtension == null && targetExtension == null || sourceExtension == targetExtension);
if (nop && delete == false) if (nop && delete == false)
{ {
return; return;
@@ -994,8 +994,8 @@ public class LocalDb
} }
using (var p = new Process using (var p = new Process
{ {
StartInfo = StartInfo =
{ {
UseShellExecute = false, UseShellExecute = false,
RedirectStandardOutput = true, RedirectStandardOutput = true,
@@ -1005,7 +1005,7 @@ public class LocalDb
CreateNoWindow = true, CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden WindowStyle = ProcessWindowStyle.Hidden
} }
}) })
{ {
p.Start(); p.Start();
output = p.StandardOutput.ReadToEnd(); output = p.StandardOutput.ReadToEnd();

View File

@@ -0,0 +1,29 @@
using Microsoft.Data.SqlClient;
using NPoco;
using NPoco.SqlServer;
using Umbraco.Extensions;
namespace Umbraco.Cms.Persistence.SqlServer;
public static class NPocoSqlServerDatabaseExtensions
{
/// <summary>
/// Configures NPoco's SqlBulkCopyHelper to use the correct SqlConnection and SqlTransaction instances from the
/// underlying RetryDbConnection and ProfiledDbTransaction
/// </summary>
/// <remarks>
/// This is required to use NPoco's own <see cref="Database.InsertBulk{T}(IEnumerable{T})" /> method because we use
/// wrapped DbConnection and DbTransaction instances.
/// NPoco's InsertBulk method only caters for efficient bulk inserting records for Sql Server, it does not cater for
/// bulk inserting of records for
/// any other database type and in which case will just insert records one at a time.
/// NPoco's InsertBulk method also deals with updating the passed in entity's PK/ID once it's inserted whereas our own
/// BulkInsertRecords methods
/// do not handle this scenario.
/// </remarks>
public static void ConfigureNPocoBulkExtensions()
{
SqlBulkCopyHelper.SqlConnectionResolver = NPocoDatabaseExtensions.GetTypedConnection<SqlConnection>;
SqlBulkCopyHelper.SqlTransactionResolver = NPocoDatabaseExtensions.GetTypedTransaction<SqlTransaction>;
}
}

View File

@@ -50,8 +50,7 @@ public class SqlServerBulkSqlInsertProvider : IBulkSqlInsertProvider
{ {
// use typed connection and transaction or SqlBulkCopy // use typed connection and transaction or SqlBulkCopy
SqlConnection tConnection = NPocoDatabaseExtensions.GetTypedConnection<SqlConnection>(database.Connection); SqlConnection tConnection = NPocoDatabaseExtensions.GetTypedConnection<SqlConnection>(database.Connection);
SqlTransaction tTransaction = SqlTransaction tTransaction = NPocoDatabaseExtensions.GetTypedTransaction<SqlTransaction>(command.Transaction);
NPocoDatabaseExtensions.GetTypedTransaction<SqlTransaction>(command.Transaction);
var tableName = pocoData.TableInfo.TableName; var tableName = pocoData.TableInfo.TableName;
if (database.SqlContext.SqlSyntax is not SqlServerSyntaxProvider syntax) if (database.SqlContext.SqlSyntax is not SqlServerSyntaxProvider syntax)
@@ -64,7 +63,6 @@ public class SqlServerBulkSqlInsertProvider : IBulkSqlInsertProvider
// 0 = no bulk copy timeout. If a timeout occurs it will be an connection/command timeout. // 0 = no bulk copy timeout. If a timeout occurs it will be an connection/command timeout.
BulkCopyTimeout = 0, BulkCopyTimeout = 0,
DestinationTableName = tableName, DestinationTableName = tableName,
// be consistent with NPoco: https://github.com/schotime/NPoco/blob/5117a55fde57547e928246c044fd40bd00b2d7d1/src/NPoco.SqlServer/SqlBulkCopyHelper.cs#L50 // be consistent with NPoco: https://github.com/schotime/NPoco/blob/5117a55fde57547e928246c044fd40bd00b2d7d1/src/NPoco.SqlServer/SqlBulkCopyHelper.cs#L50
BatchSize = 4096, BatchSize = 4096,
}) })

View File

@@ -1,12 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework> <Title>Umbraco CMS - Persistence - SQL Server</Title>
<PackageId>Umbraco.Cms.Persistence.SqlServer</PackageId>
<Title>Umbraco.Cms.Persistence.SqlServer</Title>
<Description>Adds support for SQL Server to Umbraco CMS.</Description> <Description>Adds support for SQL Server to Umbraco CMS.</Description>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="NPoco.SqlServer" Version="5.3.2" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" /> <ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" />
</ItemGroup> </ItemGroup>
@@ -19,5 +21,4 @@
<_Parameter1>Umbraco.Tests.UnitTests</_Parameter1> <_Parameter1>Umbraco.Tests.UnitTests</_Parameter1>
</AssemblyAttribute> </AssemblyAttribute>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -45,6 +45,8 @@ public static class UmbracoBuilderExtensions
DbProviderFactories.UnregisterFactory(Constants.ProviderName); DbProviderFactories.UnregisterFactory(Constants.ProviderName);
DbProviderFactories.RegisterFactory(Constants.ProviderName, SqlClientFactory.Instance); DbProviderFactories.RegisterFactory(Constants.ProviderName, SqlClientFactory.Instance);
NPocoSqlServerDatabaseExtensions.ConfigureNPocoBulkExtensions();
// Support provider name set by the configuration API for connection string environment variables // Support provider name set by the configuration API for connection string environment variables
builder.Services.ConfigureAll<ConnectionStrings>(options => builder.Services.ConfigureAll<ConnectionStrings>(options =>
{ {

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>PKV006</DiagnosticId>
<Target>net6.0</Target>
</Suppression>
</Suppressions>

View File

@@ -1,6 +1,5 @@
using System.Data; using System.Data;
using System.Data.Common; using System.Data.Common;
using Microsoft.Data.SqlClient;
using Microsoft.Data.Sqlite; using Microsoft.Data.Sqlite;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
@@ -83,7 +82,7 @@ public class SqliteDistributedLockingMechanism : IDistributedLockingMechanism
throw new ArgumentOutOfRangeException(nameof(lockType), lockType, @"Unsupported lockType"); throw new ArgumentOutOfRangeException(nameof(lockType), lockType, @"Unsupported lockType");
} }
} }
catch (SqlException ex) when (ex.Number == 1222) catch (SqliteException ex) when (ex.SqliteErrorCode == SQLitePCL.raw.SQLITE_BUSY)
{ {
if (LockType == DistributedLockType.ReadLock) if (LockType == DistributedLockType.ReadLock)
{ {

View File

@@ -1,18 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework> <Title>Umbraco CMS - Persistence - SQLite</Title>
<PackageId>Umbraco.Cms.Persistence.Sqlite</PackageId>
<Title>Umbraco.Cms.Persistence.Sqlite</Title>
<Description>Adds support for SQLite to Umbraco CMS.</Description> <Description>Adds support for SQLite to Umbraco CMS.</Description>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Data.Sqlite" Version="7.0.0-rc.1.22426.7" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" /> <ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Data.Sqlite" Version="7.0.0-rc.1.*" />
</ItemGroup>
</Project> </Project>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>PKV006</DiagnosticId>
<Target>net6.0</Target>
</Suppression>
</Suppressions>

View File

@@ -1,20 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Razor"> <Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup> <PropertyGroup>
<Title>Umbraco CMS - Static assets</Title>
<Description>Contains the static assets needed to run Umbraco CMS.</Description>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc> <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<PackageId>Umbraco.Cms.StaticAssets</PackageId>
<Description>Contains the static assets that is required to run Umbraco CMS.</Description>
<StaticWebAssetBasePath>/</StaticWebAssetBasePath> <StaticWebAssetBasePath>/</StaticWebAssetBasePath>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<None Include="buildTransitive\**\*.*">
<Pack>true</Pack>
<PackagePath>buildTransitive</PackagePath>
</None>
</ItemGroup>
<ItemGroup> <ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" /> <FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup> </ItemGroup>
@@ -25,43 +17,32 @@
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<BellePath>$(ProjectDir)wwwroot/umbraco</BellePath> <BellePath>$(ProjectDir)wwwroot\umbraco</BellePath>
</PropertyGroup> </PropertyGroup>
<Target Name="CheckPreconditions" BeforeTargets="Build"> <Target Name="BuildBellePreconditions" BeforeTargets="Build">
<Message Text="-CheckPreconditions-" Importance="high" /> <Message Text="Skip BuildBelle target because UmbracoBuild is '$(UmbracoBuild)' (this is not Visual Studio)" Importance="high" Condition="'$(UmbracoBuild)' != ''" />
<Message Text="BellePath: $(BellePath)" Importance="high" /> <Message Text="Skip BuildBelle target because '$(BellePath)' already exists" Importance="high" Condition="Exists('$(BellePath)')" />
<Message Text="Call BuildBelle target because UmbracoBuild is empty (this is Visual Studio) and '$(BellePath)' doesn't exist" Importance="high" Condition="'$(UmbracoBuild)' == '' and !Exists('$(BellePath)')" />
<!-- Build Belle, if building is Visual Studio and the build folder does not exist yet --> <CallTarget Targets="BuildBelle" Condition="'$(UmbracoBuild)' == '' and !Exists('$(BellePath)')" />
<Message Text="Skip Belle because UmbracoBuild is '$(UmbracoBuild)' (this is not Visual Studio)." Importance="High" Condition="'$(UmbracoBuild)' != ''" />
<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)' == ''" />
</Target> </Target>
<Target Name="BuildBelle">
<Target Name="BelleBuild"> <Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.Client\" Command="npm ci --no-fund --no-audit --prefer-offline" />
<Exec WorkingDirectory="$(ProjectDir)/../Umbraco.Web.UI.Client/" Command="npm ci --no-fund --no-audit --prefer-offline" /> <Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.Client\" Command="npm run build:skip-tests" />
<Exec WorkingDirectory="$(ProjectDir)/../Umbraco.Web.UI.Client/" Command="npm run build:skip-tests" />
</Target> </Target>
<!-- Clean Belle when cleaning and rebuilding, but only in Visual Studio --> <Target Name="CleanBellePreconditions" AfterTargets="Clean" Condition="'$(UmbracoBuild)' == ''">
<Target Name="CleanPreconditions" AfterTargets="Clean" Condition="'$(UmbracoBuild)' == ''"> <Message Text="Skip CleanBelle target because '$(BellePath)' doesn't exist" Importance="high" Condition="!Exists('$(BellePath)')" />
<Message Text="-CleanPreconditions-" Importance="high" /> <Message Text="Skip CleanBelle target because preserve.belle marker file exists" Importance="high" Condition="Exists('$(BellePath)') and Exists('$(SolutionDir)preserve.belle')" />
<Message Text="Nothing to clean, as $(BellePath) does not exist." Importance="High" Condition="!Exists('$(BellePath)')" /> <Message Text="Call CleanBelle target because '$(BellePath)' exists and preserve.belle marker file doesn't exist" Importance="high" Condition="Exists('$(BellePath)') and !Exists('$(SolutionDir)preserve.belle')" />
<Message Text="Not cleaning (found src/preserve.belle)." Importance="High" Condition="Exists('$(BellePath)') and Exists('$(SolutionDir)preserve.belle')" /> <CallTarget Targets="CleanBelle" Condition="Exists('$(BellePath)') and !Exists('$(SolutionDir)preserve.belle')" />
<Message Text="Remove $(BellePath)." Importance="High" Condition="Exists('$(BellePath)') and !Exists('$(SolutionDir)preserve.belle')" /> </Target>
<Target Name="CleanBelle">
<ItemGroup> <ItemGroup>
<BelleLib Include="$(BellePath)" /> <BelleLib Include="$(BellePath)" />
</ItemGroup> </ItemGroup>
<RemoveDir Directories="@(BelleLib)" Condition="Exists('$(BellePath)') and !Exists('$(SolutionDir)preserve.belle')" /> <RemoveDir Directories="@(BelleLib)" />
</Target> </Target>
<!--
The set of files to publish is generated really early and doesn't currently account for files added by targets e.g. BeforeBuild.
A fix was put in place in Web SDK to update for wwwwroot in case someone runs npm build etc in a target, we're borrowing their trick.
https://github.com/dotnet/sdk/blob/e2b2b1a4ac56c955b84d62fe71cda3b6f258b42b/src/WebSdk/Publish/Targets/ComputeTargets/Microsoft.NET.Sdk.Publish.ComputeFiles.targets
-->
</Project> </Project>

View File

@@ -0,0 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Title>Umbraco CMS</Title>
<Description>Installs Umbraco CMS with minimal dependencies in your ASP.NET Core project.</Description>
<TargetFramework>net7.0</TargetFramework>
<IncludeBuildOutput>false</IncludeBuildOutput>
<IncludeSymbols>false</IncludeSymbols>
<!-- TODO: Enable when final version is shipped (because there's currently no previous version) -->
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup>
<ItemGroup>
<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>
<ItemGroup>
<Content Include="buildTransitive\**" PackagePath="buildTransitive" />
<Content Include="$(JsonSchemaPath)" PackagePath="." />
</ItemGroup>
<!-- Generate appsettings.json schema on build (and before copying to project) -->
<PropertyGroup>
<JsonSchemaPath>$(MSBuildThisFileDirectory)appsettings-schema.json</JsonSchemaPath>
<JsonSchemaProjectPath>$(MSBuildThisFileDirectory)..\JsonSchema\</JsonSchemaProjectPath>
</PropertyGroup>
<Target Name="GenerateAppsettingsSchema" BeforeTargets="Build;CopyAppsettingsSchema" Condition="!Exists('$(JsonSchemaPath)')">
<Message Text="Generating appsettings-schema.json because it doesn't exist" Importance="high" />
<Exec WorkingDirectory="$(JsonSchemaProjectPath)" Command="dotnet run -c Release -o &quot;$(JsonSchemaPath)&quot;" />
</Target>
</Project>

View File

@@ -1,9 +1,9 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<DefaultItemExcludes>$(DefaultItemExcludes);App_Plugins/**</DefaultItemExcludes> <DefaultItemExcludes>$(DefaultItemExcludes);App_Plugins\**</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);umbraco/Data/**</DefaultItemExcludes> <DefaultItemExcludes>$(DefaultItemExcludes);umbraco\Data\**</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);umbraco/Logs/**</DefaultItemExcludes> <DefaultItemExcludes>$(DefaultItemExcludes);umbraco\Logs\**</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);wwwroot/media/**</DefaultItemExcludes> <DefaultItemExcludes>$(DefaultItemExcludes);wwwroot\media\**</DefaultItemExcludes>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Using Include="Umbraco.Cms.Core.DependencyInjection" /> <Using Include="Umbraco.Cms.Core.DependencyInjection" />

View File

@@ -3,31 +3,22 @@
<SchemaFilePath>$(MSBuildThisFileDirectory)..\appsettings-schema.json</SchemaFilePath> <SchemaFilePath>$(MSBuildThisFileDirectory)..\appsettings-schema.json</SchemaFilePath>
</PropertyGroup> </PropertyGroup>
<Target Name="CopyUmbracoSchema" BeforeTargets="Build"> <Target Name="CopyAppsettingsSchema" BeforeTargets="Build">
<ItemGroup> <ItemGroup>
<SchemaFile Include="$(SchemaFilePath)"/> <SchemaFile Include="$(SchemaFilePath)" />
</ItemGroup> </ItemGroup>
<Message Text="Copying appsettings.json schema file" Importance="high" />
<Message Text="Copying Umbraco json schema file" Importance="high"/> <Copy SourceFiles="@(SchemaFile)" DestinationFolder="$(MSBuildProjectDirectory)" SkipUnchangedFiles="true" />
<Copy SourceFiles="@(SchemaFile)"
DestinationFolder="$(MSBuildProjectDirectory)"
SkipUnchangedFiles="true" />
</Target> </Target>
<Target Name="IncludeAppPluginsContent" BeforeTargets="GetCopyToOutputDirectoryItems;GetCopyToPublishDirectoryItems;"> <Target Name="IncludeAppPluginsContent" BeforeTargets="GetCopyToOutputDirectoryItems;GetCopyToPublishDirectoryItems">
<ItemGroup> <ItemGroup>
<_AppPluginsFiles Include="App_Plugins\**" /> <_AppPluginsFiles Include="App_Plugins\**" />
<ContentWithTargetPath Include="@(_AppPluginsFiles)" Exclude="@(ContentWithTargetPath)" TargetPath="%(Identity)" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" />
<ContentWithTargetPath
Include="@(_AppPluginsFiles)"
Exclude="@(ContentWithTargetPath)"
TargetPath="%(Identity)"
CopyToOutputDirectory="PreserveNewest"
CopyToPublishDirectory="PreserveNewest"/>
</ItemGroup> </ItemGroup>
</Target> </Target>
<Target Name="IncludeUmbracoFolderContent" BeforeTargets="GetCopyToOutputDirectoryItems;GetCopyToPublishDirectoryItems;"> <Target Name="IncludeUmbracoFolderContent" BeforeTargets="GetCopyToOutputDirectoryItems;GetCopyToPublishDirectoryItems">
<ItemGroup> <ItemGroup>
<_UmbracoFolderFiles Include="umbraco\config\**" /> <_UmbracoFolderFiles Include="umbraco\config\**" />
<_UmbracoFolderFiles Include="umbraco\PartialViewMacros\**" /> <_UmbracoFolderFiles Include="umbraco\PartialViewMacros\**" />

View File

@@ -1,50 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<Title>Umbraco CMS</Title>
<Description>Installs Umbraco CMS with all default dependencies in your ASP.NET Core project.</Description>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<IncludeBuildOutput>false</IncludeBuildOutput> <IncludeBuildOutput>false</IncludeBuildOutput>
<PackageId>Umbraco.Cms</PackageId>
<Title>Umbraco.Cms</Title>
<Description>Installs Umbraco CMS in your ASP.NET Core project</Description>
<IncludeSymbols>false</IncludeSymbols> <IncludeSymbols>false</IncludeSymbols>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Umbraco.Cms.Targets\Umbraco.Cms.Targets.csproj" />
<ProjectReference Include="..\Umbraco.Cms.Imaging.ImageSharp\Umbraco.Cms.Imaging.ImageSharp.csproj" />
<ProjectReference Include="..\Umbraco.Cms.Persistence.Sqlite\Umbraco.Cms.Persistence.Sqlite.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.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>
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
<ProjectReference Include="..\Umbraco.Cms.ManagementApi\Umbraco.Cms.ManagementApi.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 &quot;../Umbraco.Cms/appsettings-schema.json&quot;" />
</Target>
<ItemGroup>
<Content Include="buildTransitive\**" PackagePath="buildTransitive" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -2,7 +2,25 @@ using System.Drawing;
namespace Umbraco.Cms.Core.Media; namespace Umbraco.Cms.Core.Media;
/// <summary>
/// Allows extracting the image dimensions from a stream.
/// </summary>
public interface IImageDimensionExtractor public interface IImageDimensionExtractor
{ {
public Size? GetDimensions(Stream? stream); /// <summary>
/// Gets the supported image file types/extensions.
/// </summary>
/// <value>
/// The supported image file types/extensions.
/// </value>
IEnumerable<string> SupportedImageFileTypes { get; }
/// <summary>
/// Gets the dimensions.
/// </summary>
/// <param name="stream">The stream.</param>
/// <returns>
/// The dimensions of the image if the stream was parsable; otherwise, <c>null</c>.
/// </returns>
public Size? GetDimensions(Stream stream);
} }

View File

@@ -0,0 +1,23 @@
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Media;
namespace Umbraco.Extensions;
public static class ImageDimensionExtractorExtensions
{
/// <summary>
/// Gets a value indicating whether the file extension corresponds to a supported image.
/// </summary>
/// <param name="imageDimensionExtractor">The image dimension extractor implementation that provides detail on which image extensions are supported.</param>
/// <param name="extension">The file extension.</param>
/// <returns>
/// A value indicating whether the file extension corresponds to an image.
/// </returns>
public static bool IsSupportedImageFormat(this IImageDimensionExtractor imageDimensionExtractor, string extension)
{
ArgumentNullException.ThrowIfNull(imageDimensionExtractor);
return string.IsNullOrWhiteSpace(extension) == false &&
imageDimensionExtractor.SupportedImageFileTypes.InvariantContains(extension.TrimStart(Constants.CharArrays.Period));
}
}

View File

@@ -6,26 +6,18 @@ namespace Umbraco.Extensions;
public static class ImageUrlGeneratorExtensions public static class ImageUrlGeneratorExtensions
{ {
/// <summary> /// <summary>
/// Gets a value indicating whether the file extension corresponds to a supported image. /// Gets a value indicating whether the file extension corresponds to a supported image.
/// </summary> /// </summary>
/// <param name="imageUrlGenerator"> /// <param name="imageUrlGenerator">The image URL generator implementation that provides detail on which image extensions are supported.</param>
/// The image URL generator implementation that provides detail on which image extensions
/// are supported.
/// </param>
/// <param name="extension">The file extension.</param> /// <param name="extension">The file extension.</param>
/// <returns> /// <returns>
/// A value indicating whether the file extension corresponds to an image. /// A value indicating whether the file extension corresponds to an image.
/// </returns> /// </returns>
/// <exception cref="System.ArgumentNullException">imageUrlGenerator</exception>
public static bool IsSupportedImageFormat(this IImageUrlGenerator imageUrlGenerator, string extension) public static bool IsSupportedImageFormat(this IImageUrlGenerator imageUrlGenerator, string extension)
{ {
if (imageUrlGenerator == null) ArgumentNullException.ThrowIfNull(imageUrlGenerator);
{
throw new ArgumentNullException(nameof(imageUrlGenerator));
}
return string.IsNullOrWhiteSpace(extension) == false && return string.IsNullOrWhiteSpace(extension) == false &&
imageUrlGenerator.SupportedImageFileTypes.InvariantContains( imageUrlGenerator.SupportedImageFileTypes.InvariantContains(extension.TrimStart(Constants.CharArrays.Period));
extension.TrimStart(Constants.CharArrays.Period));
} }
} }

View File

@@ -0,0 +1,10 @@
using System.Drawing;
namespace Umbraco.Cms.Core.Media;
public sealed class NoopImageDimensionExtractor : IImageDimensionExtractor
{
public IEnumerable<string> SupportedImageFileTypes { get; } = Enumerable.Empty<string>();
public Size? GetDimensions(Stream stream) => null;
}

View File

@@ -0,0 +1,10 @@
using Umbraco.Cms.Core.Models;
namespace Umbraco.Cms.Core.Media;
public sealed class NoopImageUrlGenerator : IImageUrlGenerator
{
public IEnumerable<string> SupportedImageFileTypes { get; } = Enumerable.Empty<string>();
public string? GetImageUrl(ImageUrlGenerationOptions options) => options?.ImageUrl;
}

View File

@@ -8,30 +8,26 @@ using Umbraco.Extensions;
namespace Umbraco.Cms.Core.Media; namespace Umbraco.Cms.Core.Media;
/// <summary> /// <summary>
/// Provides methods to manage auto-fill properties for upload fields. /// Provides methods to manage auto-fill properties for upload fields.
/// </summary> /// </summary>
public class UploadAutoFillProperties public class UploadAutoFillProperties
{ {
private readonly IImageDimensionExtractor _imageDimensionExtractor; private readonly IImageDimensionExtractor _imageDimensionExtractor;
private readonly IImageUrlGenerator _imageUrlGenerator;
private readonly ILogger<UploadAutoFillProperties> _logger; private readonly ILogger<UploadAutoFillProperties> _logger;
private readonly MediaFileManager _mediaFileManager; private readonly MediaFileManager _mediaFileManager;
public UploadAutoFillProperties( public UploadAutoFillProperties(
MediaFileManager mediaFileManager, MediaFileManager mediaFileManager,
ILogger<UploadAutoFillProperties> logger, ILogger<UploadAutoFillProperties> logger,
IImageUrlGenerator imageUrlGenerator,
IImageDimensionExtractor imageDimensionExtractor) IImageDimensionExtractor imageDimensionExtractor)
{ {
_mediaFileManager = mediaFileManager ?? throw new ArgumentNullException(nameof(mediaFileManager)); _mediaFileManager = mediaFileManager ?? throw new ArgumentNullException(nameof(mediaFileManager));
_logger = logger ?? throw new ArgumentNullException(nameof(logger)); _logger = logger ?? throw new ArgumentNullException(nameof(logger));
_imageUrlGenerator = imageUrlGenerator ?? throw new ArgumentNullException(nameof(imageUrlGenerator)); _imageDimensionExtractor = imageDimensionExtractor ?? throw new ArgumentNullException(nameof(imageDimensionExtractor));
_imageDimensionExtractor =
imageDimensionExtractor ?? throw new ArgumentNullException(nameof(imageDimensionExtractor));
} }
/// <summary> /// <summary>
/// Resets the auto-fill properties of a content item, for a specified auto-fill configuration. /// Resets the auto-fill properties of a content item, for a specified auto-fill configuration.
/// </summary> /// </summary>
/// <param name="content">The content item.</param> /// <param name="content">The content item.</param>
/// <param name="autoFillConfig">The auto-fill configuration.</param> /// <param name="autoFillConfig">The auto-fill configuration.</param>
@@ -39,39 +35,27 @@ public class UploadAutoFillProperties
/// <param name="segment">Variation segment.</param> /// <param name="segment">Variation segment.</param>
public void Reset(IContentBase content, ImagingAutoFillUploadField autoFillConfig, string? culture, string? segment) public void Reset(IContentBase content, ImagingAutoFillUploadField autoFillConfig, string? culture, string? segment)
{ {
if (content == null) ArgumentNullException.ThrowIfNull(content);
{ ArgumentNullException.ThrowIfNull(autoFillConfig);
throw new ArgumentNullException(nameof(content));
}
if (autoFillConfig == null)
{
throw new ArgumentNullException(nameof(autoFillConfig));
}
ResetProperties(content, autoFillConfig, culture, segment); ResetProperties(content, autoFillConfig, culture, segment);
} }
/// <summary> /// <summary>
/// Populates the auto-fill properties of a content item, for a specified auto-fill configuration. /// Populates the auto-fill properties of a content item, for a specified auto-fill configuration.
/// </summary> /// </summary>
/// <param name="content">The content item.</param> /// <param name="content">The content item.</param>
/// <param name="autoFillConfig">The auto-fill configuration.</param> /// <param name="autoFillConfig">The auto-fill configuration.</param>
/// <param name="filepath">The filesystem path to the uploaded file.</param> /// <param name="filepath">The filesystem path to the uploaded file.</param>
/// <remarks>The <paramref name="filepath" /> parameter is the path relative to the filesystem.</remarks>
/// <param name="culture">Variation language.</param> /// <param name="culture">Variation language.</param>
/// <param name="segment">Variation segment.</param> /// <param name="segment">Variation segment.</param>
/// <remarks>
/// The <paramref name="filepath" /> parameter is the path relative to the filesystem.
/// </remarks>
public void Populate(IContentBase content, ImagingAutoFillUploadField autoFillConfig, string filepath, string? culture, string? segment) public void Populate(IContentBase content, ImagingAutoFillUploadField autoFillConfig, string filepath, string? culture, string? segment)
{ {
if (content == null) ArgumentNullException.ThrowIfNull(content);
{ ArgumentNullException.ThrowIfNull(autoFillConfig);
throw new ArgumentNullException(nameof(content));
}
if (autoFillConfig == null)
{
throw new ArgumentNullException(nameof(autoFillConfig));
}
// no file = reset, file = auto-fill // no file = reset, file = auto-fill
if (filepath.IsNullOrWhiteSpace()) if (filepath.IsNullOrWhiteSpace())
@@ -101,25 +85,18 @@ public class UploadAutoFillProperties
} }
/// <summary> /// <summary>
/// Populates the auto-fill properties of a content item. /// Populates the auto-fill properties of a content item.
/// </summary> /// </summary>
/// <param name="content">The content item.</param> /// <param name="content">The content item.</param>
/// <param name="autoFillConfig"></param> /// <param name="autoFillConfig">The automatic fill configuration.</param>
/// <param name="filepath">The filesystem-relative filepath, or null to clear properties.</param> /// <param name="filepath">The filesystem-relative filepath, or null to clear properties.</param>
/// <param name="filestream">The stream containing the file data.</param> /// <param name="filestream">The stream containing the file data.</param>
/// <param name="culture">Variation language.</param> /// <param name="culture">Variation language.</param>
/// <param name="segment">Variation segment.</param> /// <param name="segment">Variation segment.</param>
public void Populate(IContentBase content, ImagingAutoFillUploadField autoFillConfig, string filepath, Stream filestream, string culture, string segment) public void Populate(IContentBase content, ImagingAutoFillUploadField autoFillConfig, string filepath, Stream filestream, string culture, string segment)
{ {
if (content == null) ArgumentNullException.ThrowIfNull(content);
{ ArgumentNullException.ThrowIfNull(autoFillConfig);
throw new ArgumentNullException(nameof(content));
}
if (autoFillConfig == null)
{
throw new ArgumentNullException(nameof(autoFillConfig));
}
// no file = reset, file = auto-fill // no file = reset, file = auto-fill
if (filepath.IsNullOrWhiteSpace() || filestream == null) if (filepath.IsNullOrWhiteSpace() || filestream == null)
@@ -134,50 +111,23 @@ public class UploadAutoFillProperties
private static void SetProperties(IContentBase content, ImagingAutoFillUploadField autoFillConfig, Size? size, long? length, string extension, string? culture, string? segment) private static void SetProperties(IContentBase content, ImagingAutoFillUploadField autoFillConfig, Size? size, long? length, string extension, string? culture, string? segment)
{ {
if (content == null) ArgumentNullException.ThrowIfNull(content);
{ ArgumentNullException.ThrowIfNull(autoFillConfig);
throw new ArgumentNullException(nameof(content));
}
if (autoFillConfig == null) void SetProperty(string alias, object? value) => UploadAutoFillProperties.SetProperty(content, alias, value, culture, segment);
{
throw new ArgumentNullException(nameof(autoFillConfig));
}
if (!string.IsNullOrWhiteSpace(autoFillConfig.WidthFieldAlias) && SetProperty(autoFillConfig.WidthFieldAlias, size.HasValue ? size.Value.Width.ToInvariantString() : null);
content.Properties.Contains(autoFillConfig.WidthFieldAlias)) SetProperty(autoFillConfig.HeightFieldAlias, size.HasValue ? size.Value.Height.ToInvariantString() : null);
{ SetProperty(autoFillConfig.LengthFieldAlias, length);
content.Properties[autoFillConfig.WidthFieldAlias]!.SetValue( SetProperty(autoFillConfig.ExtensionFieldAlias, extension);
size.HasValue ? size.Value.Width.ToInvariantString() : string.Empty, culture, segment);
}
if (!string.IsNullOrWhiteSpace(autoFillConfig.HeightFieldAlias) &&
content.Properties.Contains(autoFillConfig.HeightFieldAlias))
{
content.Properties[autoFillConfig.HeightFieldAlias]!.SetValue(
size.HasValue ? size.Value.Height.ToInvariantString() : string.Empty, culture, segment);
}
if (!string.IsNullOrWhiteSpace(autoFillConfig.LengthFieldAlias) &&
content.Properties.Contains(autoFillConfig.LengthFieldAlias))
{
content.Properties[autoFillConfig.LengthFieldAlias]!.SetValue(length, culture, segment);
}
if (!string.IsNullOrWhiteSpace(autoFillConfig.ExtensionFieldAlias) &&
content.Properties.Contains(autoFillConfig.ExtensionFieldAlias))
{
content.Properties[autoFillConfig.ExtensionFieldAlias]!.SetValue(extension, culture, segment);
}
} }
private void SetProperties(IContentBase content, ImagingAutoFillUploadField autoFillConfig, string filepath, Stream? filestream, string? culture, string? segment) private void SetProperties(IContentBase content, ImagingAutoFillUploadField autoFillConfig, string filepath, Stream filestream, string? culture, string? segment)
{ {
var extension = (Path.GetExtension(filepath) ?? string.Empty).TrimStart(Constants.CharArrays.Period); var extension = (Path.GetExtension(filepath) ?? string.Empty).TrimStart(Constants.CharArrays.Period);
Size? size = _imageUrlGenerator.IsSupportedImageFormat(extension) Size? size = _imageDimensionExtractor.IsSupportedImageFormat(extension)
? _imageDimensionExtractor.GetDimensions(filestream) ?? ? _imageDimensionExtractor.GetDimensions(filestream) ?? new Size(Constants.Conventions.Media.DefaultSize, Constants.Conventions.Media.DefaultSize)
(Size?)new Size(Constants.Conventions.Media.DefaultSize, Constants.Conventions.Media.DefaultSize)
: null; : null;
SetProperties(content, autoFillConfig, size, filestream?.Length, extension, culture, segment); SetProperties(content, autoFillConfig, size, filestream?.Length, extension, culture, segment);
@@ -185,34 +135,23 @@ public class UploadAutoFillProperties
private static void ResetProperties(IContentBase content, ImagingAutoFillUploadField autoFillConfig, string? culture, string? segment) private static void ResetProperties(IContentBase content, ImagingAutoFillUploadField autoFillConfig, string? culture, string? segment)
{ {
if (content == null) ArgumentNullException.ThrowIfNull(content);
{ ArgumentNullException.ThrowIfNull(autoFillConfig);
throw new ArgumentNullException(nameof(content));
}
if (autoFillConfig == null) void ResetProperty(string alias) => SetProperty(content, alias, null, culture, segment);
{
throw new ArgumentNullException(nameof(autoFillConfig));
}
if (content.Properties.Contains(autoFillConfig.WidthFieldAlias)) ResetProperty(autoFillConfig.WidthFieldAlias);
{ ResetProperty(autoFillConfig.HeightFieldAlias);
content.Properties[autoFillConfig.WidthFieldAlias]?.SetValue(string.Empty, culture, segment); ResetProperty(autoFillConfig.LengthFieldAlias);
} ResetProperty(autoFillConfig.ExtensionFieldAlias);
}
if (content.Properties.Contains(autoFillConfig.HeightFieldAlias)) private static void SetProperty(IContentBase content, string alias, object? value, string? culture, string? segment)
{
if (!string.IsNullOrEmpty(alias) &&
content.Properties.TryGetValue(alias, out var property))
{ {
content.Properties[autoFillConfig.HeightFieldAlias]?.SetValue(string.Empty, culture, segment); property.SetValue(value, culture, segment);
}
if (content.Properties.Contains(autoFillConfig.LengthFieldAlias))
{
content.Properties[autoFillConfig.LengthFieldAlias]?.SetValue(string.Empty, culture, segment);
}
if (content.Properties.Contains(autoFillConfig.ExtensionFieldAlias))
{
content.Properties[autoFillConfig.ExtensionFieldAlias]?.SetValue(string.Empty, culture, segment);
} }
} }
} }

View File

@@ -1,39 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<PackageId>Umbraco.Cms.Core</PackageId>
<Title>Umbraco CMS - Core</Title>
<Description>Contains the core assembly needed to run Umbraco CMS.</Description>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<RootNamespace>Umbraco.Cms.Core</RootNamespace> <RootNamespace>Umbraco.Cms.Core</RootNamespace>
<Product>Umbraco CMS</Product>
<PackageId>Umbraco.Cms.Core</PackageId>
<Title>Umbraco CMS Core</Title>
<Description>Contains the core assembly needed to run Umbraco Cms. This package only contains the assembly, and can be used for package development. Use the template in the Umbraco.Templates package to setup Umbraco</Description>
<Product>Umbraco CMS</Product>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DocumentationFile>bin\Release\Umbraco.Core.xml</DocumentationFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0-rc.1.*" /> <PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0-rc.1.22426.10" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.0-rc.1.*" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.0-rc.1.22427.2" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="7.0.0-rc.1.*" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="7.0.0-rc.1.22426.10" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0-rc.1.*" /> <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0-rc.1.22426.10" />
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="7.0.0-rc.1.*" /> <PackageReference Include="Microsoft.Extensions.Identity.Core" Version="7.0.0-rc.1.22427.2" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0-rc.1.*" /> <PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0-rc.1.22426.10" />
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.0-rc.1.*" /> <PackageReference Include="Microsoft.Extensions.Options" Version="7.0.0-rc.1.22426.10" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0-rc.1.*" /> <PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0-rc.1.22426.10" />
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="7.0.0-rc.1.*" /> <PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="7.0.0-rc.1.22426.10" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" /> <PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.7.0" /> <PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.7.0" />
<PackageReference Include="System.Runtime.Caching" Version="7.0.0-rc.*" /> <PackageReference Include="System.Runtime.Caching" Version="7.0.0-rc.1.22426.10" />
<PackageReference Include="Umbraco.Code" Version="2.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -60,8 +46,4 @@
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="EmbeddedResources\**\*" /> <EmbeddedResource Include="EmbeddedResources\**\*" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Persistence\Dtos" />
</ItemGroup>
</Project> </Project>

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP0008</DiagnosticId>
<Target>T:Umbraco.Cms.Infrastructure.Examine.UmbracoContentIndex</Target>
<Left>lib/net6.0/Umbraco.Examine.Lucene.dll</Left>
<Right>lib/net6.0/Umbraco.Examine.Lucene.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
</Suppressions>

View File

@@ -1,35 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<PackageId>Umbraco.Cms.Examine.Lucene</PackageId>
<Title>Umbraco CMS - Examine - Lucene</Title>
<Description>Adds Examine searching support using Lucene to Umbraco CMS.</Description>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<RootNamespace>Umbraco.Cms.Infrastructure.Examine</RootNamespace> <RootNamespace>Umbraco.Cms.Infrastructure.Examine</RootNamespace>
<Product>Umbraco CMS</Product>
<Title>Umbraco.Examine.Lucene</Title>
<!-- But we still need to have PackageId for the depdents to know the actual name of the package. -->
<PackageId>Umbraco.Cms.Examine.Lucene</PackageId>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugSymbols>true</DebugSymbols>
<DocumentationFile>bin\Release\Umbraco.Examine.Lucene.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Compile Remove="obj\**" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Remove="obj\**" />
</ItemGroup>
<ItemGroup>
<None Remove="obj\**" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Examine" Version="3.0.1" /> <PackageReference Include="Examine" Version="3.0.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Umbraco.Code" Version="2.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" /> <ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" />
<ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" /> <ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" />

View File

@@ -3,7 +3,6 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Serilog; using Serilog;
using SixLabors.ImageSharp;
using Umbraco.Cms.Core; using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Cache; using Umbraco.Cms.Core.Cache;
using Umbraco.Cms.Core.Configuration; using Umbraco.Cms.Core.Configuration;
@@ -43,7 +42,6 @@ using Umbraco.Cms.Infrastructure.HealthChecks;
using Umbraco.Cms.Infrastructure.HostedServices; using Umbraco.Cms.Infrastructure.HostedServices;
using Umbraco.Cms.Infrastructure.Install; using Umbraco.Cms.Infrastructure.Install;
using Umbraco.Cms.Infrastructure.Mail; using Umbraco.Cms.Infrastructure.Mail;
using Umbraco.Cms.Infrastructure.Media;
using Umbraco.Cms.Infrastructure.Migrations; using Umbraco.Cms.Infrastructure.Migrations;
using Umbraco.Cms.Infrastructure.Migrations.Install; using Umbraco.Cms.Infrastructure.Migrations.Install;
using Umbraco.Cms.Infrastructure.Migrations.PostMigrations; using Umbraco.Cms.Infrastructure.Migrations.PostMigrations;
@@ -208,13 +206,11 @@ public static partial class UmbracoBuilderExtensions
builder.Services.AddSingleton<IBackOfficeExamineSearcher, NoopBackOfficeExamineSearcher>(); builder.Services.AddSingleton<IBackOfficeExamineSearcher, NoopBackOfficeExamineSearcher>();
builder.Services.AddSingleton<UploadAutoFillProperties>(); builder.Services.AddSingleton<UploadAutoFillProperties>();
builder.Services.AddSingleton<IImageDimensionExtractor, NoopImageDimensionExtractor>();
builder.Services.AddSingleton<IImageUrlGenerator, NoopImageUrlGenerator>();
builder.Services.AddSingleton<ICronTabParser, NCronTabParser>(); builder.Services.AddSingleton<ICronTabParser, NCronTabParser>();
// Add default ImageSharp configuration and service implementations
builder.Services.AddSingleton(Configuration.Default);
builder.Services.AddSingleton<IImageDimensionExtractor, ImageSharpDimensionExtractor>();
builder.Services.AddTransient<INodeCountService, NodeCountService>(); builder.Services.AddTransient<INodeCountService, NodeCountService>();
builder.AddInstaller(); builder.AddInstaller();

View File

@@ -209,30 +209,29 @@ namespace Umbraco.Cms.Infrastructure.Install.InstallSteps
} }
ConnectionStrings? umbracoConnectionString = _connectionStrings.CurrentValue; ConnectionStrings? umbracoConnectionString = _connectionStrings.CurrentValue;
var isConnectionStringConfigured = umbracoConnectionString.IsConnectionStringConfigured(); var isConnectionStringConfigured = umbracoConnectionString.IsConnectionStringConfigured();
if (isConnectionStringConfigured) if (isConnectionStringConfigured)
{ {
installState = (installState | InstallState.ConnectionStringConfigured) & ~InstallState.Unknown; installState = (installState | InstallState.ConnectionStringConfigured) & ~InstallState.Unknown;
}
DbProviderFactory? factory = _dbProviderFactoryCreator.CreateFactory(umbracoConnectionString.ProviderName); DbProviderFactory? factory = _dbProviderFactoryCreator.CreateFactory(umbracoConnectionString.ProviderName);
var isConnectionAvailable = isConnectionStringConfigured && DbConnectionExtensions.IsConnectionAvailable(umbracoConnectionString.ConnectionString, factory); var isConnectionAvailable = isConnectionStringConfigured && DbConnectionExtensions.IsConnectionAvailable(umbracoConnectionString.ConnectionString, factory);
if (isConnectionAvailable) if (isConnectionAvailable)
{ {
installState = (installState | InstallState.CanConnect) & ~InstallState.Unknown; installState = (installState | InstallState.CanConnect) & ~InstallState.Unknown;
} }
var isUmbracoInstalled = isConnectionAvailable && _databaseBuilder.IsUmbracoInstalled(); var isUmbracoInstalled = isConnectionAvailable && _databaseBuilder.IsUmbracoInstalled();
if (isUmbracoInstalled) if (isUmbracoInstalled)
{ {
installState = (installState | InstallState.UmbracoInstalled) & ~InstallState.Unknown; installState = (installState | InstallState.UmbracoInstalled) & ~InstallState.Unknown;
} }
var hasSomeNonDefaultUser = isUmbracoInstalled && _databaseBuilder.HasSomeNonDefaultUser(); var hasSomeNonDefaultUser = isUmbracoInstalled && _databaseBuilder.HasSomeNonDefaultUser();
if (hasSomeNonDefaultUser) if (hasSomeNonDefaultUser)
{ {
installState = (installState | InstallState.HasNonDefaultUser) & ~InstallState.Unknown; installState = (installState | InstallState.HasNonDefaultUser) & ~InstallState.Unknown;
}
} }
return installState; return installState;

View File

@@ -1,8 +1,6 @@
using System.Data; using System.Data;
using System.Data.Common; using System.Data.Common;
using Microsoft.Data.SqlClient;
using NPoco; using NPoco;
using NPoco.SqlServer;
using Umbraco.Cms.Core; using Umbraco.Cms.Core;
using Umbraco.Cms.Infrastructure.Persistence; using Umbraco.Cms.Infrastructure.Persistence;
@@ -13,26 +11,6 @@ namespace Umbraco.Extensions;
/// </summary> /// </summary>
public static partial class NPocoDatabaseExtensions public static partial class NPocoDatabaseExtensions
{ {
/// <summary>
/// Configures NPoco's SqlBulkCopyHelper to use the correct SqlConnection and SqlTransaction instances from the
/// underlying RetryDbConnection and ProfiledDbTransaction
/// </summary>
/// <remarks>
/// This is required to use NPoco's own <see cref="Database.InsertBulk{T}(IEnumerable{T})" /> method because we use
/// wrapped DbConnection and DbTransaction instances.
/// NPoco's InsertBulk method only caters for efficient bulk inserting records for Sql Server, it does not cater for
/// bulk inserting of records for
/// any other database type and in which case will just insert records one at a time.
/// NPoco's InsertBulk method also deals with updating the passed in entity's PK/ID once it's inserted whereas our own
/// BulkInsertRecords methods
/// do not handle this scenario.
/// </remarks>
public static void ConfigureNPocoBulkExtensions()
{
SqlBulkCopyHelper.SqlConnectionResolver = dbConn => GetTypedConnection<SqlConnection>(dbConn);
SqlBulkCopyHelper.SqlTransactionResolver = dbTran => GetTypedTransaction<SqlTransaction>(dbTran);
}
/// <summary> /// <summary>
/// Determines whether a column should be part of a bulk-insert. /// Determines whether a column should be part of a bulk-insert.
/// </summary> /// </summary>

View File

@@ -1,7 +1,6 @@
using System.Data; using System.Data;
using System.Data.Common; using System.Data.Common;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Microsoft.Data.SqlClient;
using NPoco; using NPoco;
using StackExchange.Profiling.Data; using StackExchange.Profiling.Data;
using Umbraco.Cms.Infrastructure.Persistence; using Umbraco.Cms.Infrastructure.Persistence;
@@ -186,7 +185,7 @@ public static partial class NPocoDatabaseExtensions
db.Insert(poco); db.Insert(poco);
return RecordPersistenceType.Insert; return RecordPersistenceType.Insert;
} }
catch (SqlException) catch (DbException)
{ {
// assuming all db engines will throw SQLException exception // assuming all db engines will throw SQLException exception
// failed: exists (due to race cond RC1) // failed: exists (due to race cond RC1)

View File

@@ -6,12 +6,8 @@ namespace Umbraco.Cms.Infrastructure.Persistence;
internal static class NPocoDatabaseTypeExtensions internal static class NPocoDatabaseTypeExtensions
{ {
[Obsolete("Usage of this method indicates a code smell.")] [Obsolete("Usage of this method indicates a code smell.")]
public static bool IsSqlServer(this DatabaseType databaseType) => public static bool IsSqlServer(this DatabaseType databaseType)
=> databaseType is not null && databaseType.GetProviderName() == "Microsoft.Data.SqlClient";
// note that because SqlServerDatabaseType is the base class for
// all Sql Server types eg SqlServer2012DatabaseType, this will
// test *any* version of Sql Server.
databaseType is SqlServerDatabaseType;
[Obsolete("Usage of this method indicates a code smell.")] [Obsolete("Usage of this method indicates a code smell.")]
public static bool IsSqlite(this DatabaseType databaseType) public static bool IsSqlite(this DatabaseType databaseType)

View File

@@ -1,4 +1,3 @@
using Microsoft.Data.SqlClient;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using NPoco; using NPoco;
using Umbraco.Cms.Core; using Umbraco.Cms.Core;
@@ -43,25 +42,14 @@ internal class TwoFactorLoginRepository : EntityRepositoryBase<int, ITwoFactorLo
public async Task<IEnumerable<ITwoFactorLogin>> GetByUserOrMemberKeyAsync(Guid userOrMemberKey) public async Task<IEnumerable<ITwoFactorLogin>> GetByUserOrMemberKeyAsync(Guid userOrMemberKey)
{ {
try Sql<ISqlContext> sql = Sql()
{ .Select<TwoFactorLoginDto>()
Sql<ISqlContext> sql = Sql() .From<TwoFactorLoginDto>()
.Select<TwoFactorLoginDto>() .Where<TwoFactorLoginDto>(x => x.UserOrMemberKey == userOrMemberKey);
.From<TwoFactorLoginDto>() List<TwoFactorLoginDto>? dtos = await Database.FetchAsync<TwoFactorLoginDto>(sql);
.Where<TwoFactorLoginDto>(x => x.UserOrMemberKey == userOrMemberKey); return dtos.WhereNotNull().Select(Map).WhereNotNull();
List<TwoFactorLoginDto>? dtos = await Database.FetchAsync<TwoFactorLoginDto>(sql);
return dtos.WhereNotNull().Select(Map).WhereNotNull();
}
// TODO (v11): Remove this as the table should always exist when upgrading from 10.x
// SQL Server - table doesn't exist, likely upgrading from < 9.3.0.
catch (SqlException ex) when (ex.Number == 208 && ex.Message.Contains(TwoFactorLoginDto.TableName))
{
return Enumerable.Empty<ITwoFactorLogin>();
}
} }
protected override Sql<ISqlContext> GetBaseQuery(bool isCount) protected override Sql<ISqlContext> GetBaseQuery(bool isCount)
{ {
Sql<ISqlContext> sql = SqlContext.Sql(); Sql<ISqlContext> sql = SqlContext.Sql();
@@ -142,7 +130,10 @@ internal class TwoFactorLoginRepository : EntityRepositoryBase<int, ITwoFactorLo
return new TwoFactorLogin return new TwoFactorLogin
{ {
Id = dto.Id, UserOrMemberKey = dto.UserOrMemberKey, ProviderName = dto.ProviderName, Secret = dto.Secret Id = dto.Id,
UserOrMemberKey = dto.UserOrMemberKey,
ProviderName = dto.ProviderName,
Secret = dto.Secret
}; };
} }
} }

View File

@@ -76,7 +76,6 @@ public class UmbracoDatabase : Database, IUmbracoDatabase
private void Init() private void Init()
{ {
EnableSqlTrace = EnableSqlTraceDefault; EnableSqlTrace = EnableSqlTraceDefault;
NPocoDatabaseExtensions.ConfigureNPocoBulkExtensions();
if (_mapperCollection != null) if (_mapperCollection != null)
{ {

View File

@@ -1,122 +1,86 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageId>Umbraco.Cms.Infrastructure</PackageId>
<Title>Umbraco CMS - Infrastructure</Title>
<Description>Contains the infrastructure assembly needed to run Umbraco CMS.</Description>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>Umbraco.Cms.Infrastructure</RootNamespace>
</PropertyGroup>
<PropertyGroup> <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<TargetFramework>net7.0</TargetFramework> <DefineConstants>$(DefineConstants);TRACE_SCOPES</DefineConstants>
<RootNamespace>Umbraco.Cms.Infrastructure</RootNamespace> </PropertyGroup>
<PackageId>Umbraco.Cms.Infrastructure</PackageId>
<Title>Umbraco CMS Infrastructure</Title>
<Description>Contains the infrastructure assembly needed to run Umbraco Cms. This package only contains the assembly, and can be used for package development. Use the template in the Umbraco.Templates package to setup Umbraco</Description>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> <ItemGroup>
<DocumentationFile>bin\Release\Umbraco.Infrastructure.xml</DocumentationFile> <PackageReference Include="Examine.Core" Version="3.0.1" />
</PropertyGroup> <PackageReference Include="HtmlAgilityPack" Version="1.11.46" />
<PackageReference Include="IPNetwork2" Version="2.6.467" />
<PackageReference Include="MailKit" Version="3.4.1" />
<PackageReference Include="Markdown" Version="2.2.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0-rc.1.22426.10" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0-rc.1.22426.10" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0-rc.1.22426.10" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0-rc.1.22426.10" />
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="7.0.0-rc.1.22427.2" />
<PackageReference Include="MiniProfiler.Shared" Version="4.2.22" />
<PackageReference Include="ncrontab" Version="3.3.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NPoco" Version="5.3.2" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog.Enrichers.Process" Version="2.0.2" />
<PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" />
<PackageReference Include="Serilog.Expressions" Version="3.4.0" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="5.0.1" />
<PackageReference Include="Serilog.Formatting.Compact" Version="1.1.0" />
<PackageReference Include="Serilog.Formatting.Compact.Reader" Version="1.0.5" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Map" Version="1.0.2" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="6.0.1" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="7.0.0-rc.1.22426.10" />
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <ItemGroup>
<DefineConstants>TRACE_SCOPES;</DefineConstants> <ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" />
</PropertyGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="HtmlAgilityPack" Version="1.11.46" /> <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<PackageReference Include="MailKit" Version="3.4.1" /> <_Parameter1>Umbraco.Tests</_Parameter1>
<PackageReference Include="IPNetwork2" Version="2.6.467" /> </AssemblyAttribute>
<PackageReference Include="Markdown" Version="2.2.1" /> <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" /> <_Parameter1>Umbraco.Tests.Benchmarks</_Parameter1>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" /> </AssemblyAttribute>
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0-rc.1.*" /> <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0-rc.1.*" /> <_Parameter1>Umbraco.Tests.Integration</_Parameter1>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0-rc.1.*" /> </AssemblyAttribute>
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0-rc.1.*" /> <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="7.0.0-rc.1.*" /> <_Parameter1>Umbraco.Tests.Common</_Parameter1>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1"> </AssemblyAttribute>
<PrivateAssets>all</PrivateAssets> <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <_Parameter1>Umbraco.Tests.UnitTests</_Parameter1>
</PackageReference> </AssemblyAttribute>
<PackageReference Include="MiniProfiler.Shared" Version="4.2.22" /> <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<PackageReference Include="ncrontab" Version="3.3.1" /> <_Parameter1>DynamicProxyGenAssembly2</_Parameter1>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> </AssemblyAttribute>
<PackageReference Include="NPoco.SqlServer" Version="5.3.2" /> <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<PackageReference Include="Serilog" Version="2.12.0" /> <_Parameter1>Umbraco.New.Cms.Infrastructure</_Parameter1>
<PackageReference Include="Serilog.Enrichers.Process" Version="2.0.2" /> </AssemblyAttribute>
<PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" /> </ItemGroup>
<PackageReference Include="Serilog.Expressions" Version="3.4.0" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="5.0.1" />
<PackageReference Include="Serilog.Formatting.Compact" Version="1.1.0" />
<PackageReference Include="Serilog.Formatting.Compact.Reader" Version="1.0.5" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Map" Version="1.0.2" />
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
<PackageReference Include="System.Text.Encodings.Web" Version="7.0.0-rc.1.*" /> <!-- Explicit updated this nested dependency due to this https://github.com/dotnet/announcements/issues/178-->
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="7.0.0-rc.1.*" />
<PackageReference Include="Examine.Core" Version="3.0.1" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="6.0.1" />
<PackageReference Include="Umbraco.Code" Version="2.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup> <ItemGroup>
<_UnmanagedRegistrationCache Remove="obj\Umbraco.Infrastructure.csproj.UnmanagedRegistration.cache" /> <EmbeddedResource Include="WebAssets\*.js" />
</ItemGroup> <EmbeddedResource Update="WebAssets\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<ItemGroup> </EmbeddedResource>
<Compile Remove="obj\**" /> <Compile Update="WebAssets\Resources.Designer.cs">
<Compile Update="WebAssets\Resources.Designer.cs"> <DesignTime>True</DesignTime>
<DesignTime>True</DesignTime> <AutoGen>True</AutoGen>
<AutoGen>True</AutoGen> <DependentUpon>Resources.resx</DependentUpon>
<DependentUpon>Resources.resx</DependentUpon> </Compile>
</Compile> </ItemGroup>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Remove="obj\**" />
<EmbeddedResource Include="WebAssets\JsInitialize.js" />
<EmbeddedResource Include="WebAssets\Main.js" />
<EmbeddedResource Include="WebAssets\PreviewInitialize.js" />
<EmbeddedResource Include="WebAssets\ServerVariables.js" />
<EmbeddedResource Update="WebAssets\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Remove="obj\**" />
</ItemGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests.Benchmarks</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests.Integration</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests.Common</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests.UnitTests</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>DynamicProxyGenAssembly2</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.New.Cms.Infrastructure</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<ItemGroup>
<Compile Remove="obj\**" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" />
</ItemGroup>
</Project> </Project>

View File

@@ -19,7 +19,7 @@ namespace Umbraco.Cms.Infrastructure.WebAssets {
// class via a tool like ResGen or Visual Studio. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {
@@ -67,19 +67,18 @@ namespace Umbraco.Cms.Infrastructure.WebAssets {
/// &apos;lib/jquery-ui/jquery-ui.min.js&apos;, /// &apos;lib/jquery-ui/jquery-ui.min.js&apos;,
/// &apos;lib/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js&apos;, /// &apos;lib/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js&apos;,
/// ///
/// &apos;lib/angular/angular.js&apos;, /// &apos;lib/angular/angular.min.js&apos;,
/// &apos;lib/underscore/underscore-min.js&apos;, /// &apos;lib/underscore/underscore-min.js&apos;,
/// ///
/// &apos;lib/moment/moment.min.js&apos;, /// &apos;lib/moment/moment.min.js&apos;,
/// &apos;lib/flatpickr/flatpickr.js&apos;, /// &apos;lib/flatpickr/flatpickr.min.js&apos;,
/// ///
/// &apos;lib/animejs/anime.min.js&apos;, /// &apos;lib/animejs/anime.min.js&apos;,
/// ///
/// &apos;lib/angular-route/angular-route.js&apos;, /// &apos;lib/angular-route/angular-route.min.js&apos;,
/// &apos;lib/angular-cookies/angular-cookies.js&apos;, /// &apos;lib/angular-cookies/angular-cookies.min.js&apos;,
/// &apos;lib/angular-aria/angular-aria.min.js&apos;, /// &apos;lib/angular-aria/angular-aria.min.js&apos;,
/// &apos;lib/angular-touch/angular-touch.js&apos;, /// &apos;lib/angular-touch/angular-touch [rest of string was truncated]&quot;;.
/// &apos;lib/ [rest of string was truncated]&quot;;.
/// </summary> /// </summary>
internal static string JsInitialize { internal static string JsInitialize {
get { get {
@@ -111,17 +110,17 @@ namespace Umbraco.Cms.Infrastructure.WebAssets {
/// <summary> /// <summary>
/// Looks up a localized string similar to [ /// Looks up a localized string similar to [
/// &apos;lib/jquery/jquery.min.js&apos;, /// &apos;lib/jquery/jquery.min.js&apos;,
/// &apos;lib/angular/angular.js&apos;, /// &apos;lib/angular/angular.min.js&apos;,
/// &apos;lib/underscore/underscore-min.js&apos;, /// &apos;lib/underscore/underscore-min.js&apos;,
/// &apos;lib/umbraco/Extensions.js&apos;, /// &apos;lib/umbraco/Extensions.js&apos;,
/// &apos;js/utilities.js&apos;, /// &apos;js/utilities.min.js&apos;,
/// &apos;js/app.js&apos;, /// &apos;js/app.min.js&apos;,
/// &apos;js/umbraco.resources.js&apos;, /// &apos;js/umbraco.resources.min.js&apos;,
/// &apos;js/umbraco.services.js&apos;, /// &apos;js/umbraco.services.min.js&apos;,
/// &apos;js/umbraco.interceptors.js&apos;, /// &apos;js/umbraco.interceptors.min.js&apos;,
/// &apos;ServerVariables&apos;, /// &apos;ServerVariables&apos;,
/// &apos;lib/signalr/signalr.min.js&apos;, /// &apos;lib/signalr/signalr.min.js&apos;,
/// &apos;js/umbraco.preview.js&apos; /// &apos;js/umbraco.preview.min.js&apos;
///] ///]
///. ///.
/// </summary> /// </summary>
@@ -132,15 +131,15 @@ namespace Umbraco.Cms.Infrastructure.WebAssets {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to // TODO: This would be nicer as an angular module so it can be injected into stuff... that&apos;d be heaps nicer, but /// Looks up a localized string similar to // TODO: This would be nicer as an angular module so it can be injected into stuff... that&apos;d be heaps nicer, but
/// how to do that when this is not a regular JS file, it is a server side JS file and RequireJS seems to only want ///// how to do that when this is not a regular JS file, it is a server side JS file and RequireJS seems to only want
/// to force load JS files ? ///// to force load JS files ?
/// ///
/// create the namespace (NOTE: This loads before any dependencies so we don&apos;t have a namespace mgr so we just create it manually) /////create the namespace (NOTE: This loads before any dependencies so we don&apos;t have a namespace mgr so we just create it manually)
/// var Umbraco = {}; ///var Umbraco = {};
/// Umbraco.Sys = {}; ///Umbraco.Sys = {};
/// define a global static object /////define a global static object
/// Umbraco.Sys.ServerVariables = ##Variables## ;. ///Umbraco.Sys.ServerVariables = ##Variables## ;.
/// </summary> /// </summary>
internal static string ServerVariables { internal static string ServerVariables {
get { get {

View File

@@ -1,17 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Title>Umbraco CMS - Core</Title>
<Description>Contains the core assembly needed to run Umbraco CMS.</Description>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup>
<PropertyGroup> <ItemGroup>
<TargetFramework>net7.0</TargetFramework> <ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" />
<ImplicitUsings>enable</ImplicitUsings> </ItemGroup>
<Nullable>enable</Nullable>
<RootNamespace>Umbraco.New.Cms.Core</RootNamespace>
<IsPackable>false</IsPackable>
<WarningsAsErrors>nullable</WarningsAsErrors>
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" />
</ItemGroup>
</Project> </Project>

View File

@@ -1,18 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Title>Umbraco CMS - Infrastructure</Title>
<Description>Contains the infrastructure assembly needed to run Umbraco CMS.</Description>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup>
<PropertyGroup> <ItemGroup>
<TargetFramework>net7.0</TargetFramework> <ProjectReference Include="..\Umbraco.New.Cms.Core\Umbraco.New.Cms.Core.csproj" />
<ImplicitUsings>enable</ImplicitUsings> <ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" />
<Nullable>enable</Nullable> </ItemGroup>
<RootNamespace>Umbraco.New.Cms.Infrastructure</RootNamespace>
<IsPackable>false</IsPackable>
<WarningsAsErrors>nullable</WarningsAsErrors>
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" />
<ProjectReference Include="..\Umbraco.New.Cms.Core\Umbraco.New.Cms.Core.csproj" />
</ItemGroup>
</Project> </Project>

View File

@@ -1,17 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Title>Umbraco CMS - Web</Title>
<Description>Contains the web assembly needed to run Umbraco CMS.</Description>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup>
<PropertyGroup> <ItemGroup>
<TargetFramework>net7.0</TargetFramework> <ProjectReference Include="..\Umbraco.New.Cms.Infrastructure\Umbraco.New.Cms.Infrastructure.csproj" />
<ImplicitUsings>enable</ImplicitUsings> <ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
<Nullable>enable</Nullable> </ItemGroup>
<IsPackable>false</IsPackable>
<WarningsAsErrors>nullable</WarningsAsErrors>
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
<ProjectReference Include="..\Umbraco.New.Cms.Infrastructure\Umbraco.New.Cms.Infrastructure.csproj" />
</ItemGroup>
</Project> </Project>

View File

@@ -1,29 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<PackageId>Umbraco.Cms.PublishedCache.NuCache</PackageId>
<Title>Umbraco CMS - Published cache - NuCache</Title>
<Description>Contains the published cache assembly needed to run Umbraco CMS.</Description>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<RootNamespace>Umbraco.Cms.Infrastructure.PublishedCache</RootNamespace> <RootNamespace>Umbraco.Cms.Infrastructure.PublishedCache</RootNamespace>
<PackageId>Umbraco.Cms.PublishedCache.NuCache</PackageId>
<Title>Umbraco CMS Published Cache</Title>
<Description>Contains the Published Cache assembly needed to run Umbraco Cms. This package only contains the assembly, and can be used for package development. Use the template in the Umbraco.Templates package to setup Umbraco</Description>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DocumentationFile>bin\Release\Umbraco.PublishedCache.NuCache.xml</DocumentationFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="CSharpTest.Net.Collections-NetStd2" Version="14.906.1403.1084" /> <PackageReference Include="CSharpTest.Net.Collections-NetStd2" Version="14.906.1403.1084" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="MessagePack" Version="2.4.35" /> <PackageReference Include="MessagePack" Version="2.4.35" />
<PackageReference Include="K4os.Compression.LZ4" Version="1.2.16" /> <PackageReference Include="K4os.Compression.LZ4" Version="1.2.16" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Umbraco.Code" Version="2.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -48,5 +36,4 @@
<_Parameter1>DynamicProxyGenAssembly2</_Parameter1> <_Parameter1>DynamicProxyGenAssembly2</_Parameter1>
</AssemblyAttribute> </AssemblyAttribute>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -1,56 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageId>Umbraco.Cms.Web.BackOffice</PackageId>
<Title>Umbraco CMS - Web - Backoffice</Title>
<Description>Contains the backoffice assembly needed to run the backend of Umbraco CMS.</Description>
<TargetFramework>net7.0</TargetFramework>
<OutputType>Library</OutputType>
<RootNamespace>Umbraco.Cms.Web.BackOffice</RootNamespace>
</PropertyGroup>
<PropertyGroup> <ItemGroup>
<TargetFramework>net7.0</TargetFramework> <FrameworkReference Include="Microsoft.AspNetCore.App" />
<OutputType>Library</OutputType>
<RootNamespace>Umbraco.Cms.Web.BackOffice</RootNamespace>
<PackageId>Umbraco.Cms.Web.BackOffice</PackageId>
<Title>Umbraco CMS Back Office</Title>
<Description>Contains the Back Office assembly needed to run the back office of Umbraco Cms. This package only contains the assembly, and can be used for package development. Use the template in the Umbraco.Templates package to setup Umbraco</Description>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DocumentationFile>bin\Release\Umbraco.Web.BackOffice.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Serilog.AspNetCore" Version="6.0.1" />
<PackageReference Include="Umbraco.Code" Version="2.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests.UnitTests</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests.Integration</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" />
<ProjectReference Include="..\Umbraco.Examine.Lucene\Umbraco.Examine.Lucene.csproj" />
<ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" />
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
<ProjectReference Include="..\Umbraco.Cms.ManagementApi\Umbraco.Cms.ManagementApi.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="EmbeddedResources\**\*" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup> <PackageReference Include="Serilog.AspNetCore" Version="6.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" />
<ProjectReference Include="..\Umbraco.Examine.Lucene\Umbraco.Examine.Lucene.csproj" />
<ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" />
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
</ItemGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests.UnitTests</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests.Integration</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="EmbeddedResources\**\*" />
</ItemGroup>
</Project> </Project>

View File

@@ -3,7 +3,6 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using SixLabors.ImageSharp.Web.DependencyInjection;
using Umbraco.Cms.Core.Configuration.Models; using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.IO; using Umbraco.Cms.Core.IO;
using Umbraco.Cms.Core.Services; using Umbraco.Cms.Core.Services;
@@ -78,9 +77,6 @@ public class UmbracoApplicationBuilder : IUmbracoApplicationBuilder, IUmbracoEnd
{ {
UseUmbracoCoreMiddleware(); UseUmbracoCoreMiddleware();
// Important we handle image manipulations before the static files, otherwise the querystring is just ignored.
AppBuilder.UseImageSharp();
// Get media file provider and request path/URL // Get media file provider and request path/URL
MediaFileManager mediaFileManager = AppBuilder.ApplicationServices.GetRequiredService<MediaFileManager>(); MediaFileManager mediaFileManager = AppBuilder.ApplicationServices.GetRequiredService<MediaFileManager>();
if (mediaFileManager.FileSystem.TryCreateFileProvider(out IFileProvider? mediaFileProvider)) if (mediaFileManager.FileSystem.TryCreateFileProvider(out IFileProvider? mediaFileProvider))

View File

@@ -1,43 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using SixLabors.ImageSharp.Web.Caching;
using SixLabors.ImageSharp.Web.DependencyInjection;
using SixLabors.ImageSharp.Web.Middleware;
using SixLabors.ImageSharp.Web.Providers;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Media;
using Umbraco.Cms.Web.Common.DependencyInjection;
using Umbraco.Cms.Web.Common.ImageProcessors;
using Umbraco.Cms.Web.Common.Media;
namespace Umbraco.Extensions;
public static partial class UmbracoBuilderExtensions
{
/// <summary>
/// Adds Image Sharp with Umbraco settings
/// </summary>
public static IServiceCollection AddUmbracoImageSharp(this IUmbracoBuilder builder)
{
builder.Services.AddSingleton<IImageUrlGenerator, ImageSharpImageUrlGenerator>();
builder.Services.AddImageSharp()
// Replace default image provider
.ClearProviders()
.AddProvider<WebRootImageProvider>()
// Add custom processors
.AddProcessor<CropWebProcessor>();
// Configure middleware
builder.Services
.AddTransient<IConfigureOptions<ImageSharpMiddlewareOptions>, ConfigureImageSharpMiddlewareOptions>();
// Configure cache options
builder.Services
.AddTransient<IConfigureOptions<PhysicalFileSystemCacheOptions>, ConfigurePhysicalFileSystemCacheOptions>();
return builder.Services;
}
}

View File

@@ -293,7 +293,6 @@ public static partial class UmbracoBuilderExtensions
.Transient<IApplicationModelProvider, BackOfficeApplicationModelProvider>()); .Transient<IApplicationModelProvider, BackOfficeApplicationModelProvider>());
builder.Services.TryAddEnumerable(ServiceDescriptor builder.Services.TryAddEnumerable(ServiceDescriptor
.Transient<IApplicationModelProvider, VirtualPageApplicationModelProvider>()); .Transient<IApplicationModelProvider, VirtualPageApplicationModelProvider>());
builder.AddUmbracoImageSharp();
// AspNetCore specific services // AspNetCore specific services
builder.Services.AddUnique<IRequestAccessor, AspNetCoreRequestAccessor>(); builder.Services.AddUnique<IRequestAccessor, AspNetCoreRequestAccessor>();

View File

@@ -1,31 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<OutputType>Library</OutputType>
<RootNamespace>Umbraco.Cms.Web.Common</RootNamespace>
<PackageId>Umbraco.Cms.Web.Common</PackageId>
<Title>Umbraco CMS Web</Title>
<Description>Contains the Web assembly needed to run Umbraco Cms. This package only contains the assembly, and can be used for package development. Use the template in the Umbraco.Templates package to setup Umbraco</Description>
</PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<OutputType>Library</OutputType>
<RootNamespace>Umbraco.Cms.Web.Common</RootNamespace>
<PackageId>Umbraco.Cms.Web.Common</PackageId> <PackageId>Umbraco.Cms.Web.Common</PackageId>
<Title>Umbraco CMS Web</Title> <Title>Umbraco CMS - Web</Title>
<Description>Contains the Web assembly needed to run Umbraco Cms. This package only contains the assembly, and can be used for package development. Use the template in the Umbraco.Templates package to setup Umbraco</Description> <Description>Contains the web assembly needed to run Umbraco CMS.</Description>
<Nullable>enable</Nullable> <TargetFramework>net7.0</TargetFramework>
</PropertyGroup> <RootNamespace>Umbraco.Cms.Web.Common</RootNamespace>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DocumentationFile>bin\Release\Umbraco.Web.Common.xml</DocumentationFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" /> <FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="Dazinator.Extensions.FileProviders" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.0-rc.1.22427.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="7.0.0-rc.1.22427.2" />
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.2.22" />
<PackageReference Include="Serilog.AspNetCore" Version="6.0.1" />
<PackageReference Include="Smidge.InMemory" Version="4.1.1" />
<PackageReference Include="Smidge.Nuglify" Version="4.1.1" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" /> <ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" />
<ProjectReference Include="..\Umbraco.Examine.Lucene\Umbraco.Examine.Lucene.csproj" /> <ProjectReference Include="..\Umbraco.Examine.Lucene\Umbraco.Examine.Lucene.csproj" />
@@ -33,19 +28,6 @@
<ProjectReference Include="..\Umbraco.PublishedCache.NuCache\Umbraco.PublishedCache.NuCache.csproj" /> <ProjectReference Include="..\Umbraco.PublishedCache.NuCache\Umbraco.PublishedCache.NuCache.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="Dazinator.Extensions.FileProviders" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.0-rc.1.*" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="7.0.0-rc.1.*" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.2.22" />
<PackageReference Include="Serilog.AspNetCore" Version="6.0.1" />
<PackageReference Include="SixLabors.ImageSharp.Web" Version="2.0.2" />
<PackageReference Include="Smidge.InMemory" Version="4.1.1" />
<PackageReference Include="Smidge.Nuglify" Version="4.1.1" />
<PackageReference Include="Umbraco.Code" Version="2.0.0" PrivateAssets="all" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo"> <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests.UnitTests</_Parameter1> <_Parameter1>Umbraco.Tests.UnitTests</_Parameter1>

View File

@@ -81,8 +81,8 @@
"run-sequence": "2.2.1" "run-sequence": "2.2.1"
}, },
"engines": { "engines": {
"node": ">=14.0.0 <17", "node": ">=16.17",
"npm": ">=8.0.0 < 9" "npm": ">=8.15"
} }
}, },
"node_modules/@ampproject/remapping": { "node_modules/@ampproject/remapping": {

View File

@@ -13,8 +13,8 @@
"watch": "gulp watch" "watch": "gulp watch"
}, },
"engines": { "engines": {
"node": ">=14.0.0 <17", "node": ">=16.17",
"npm": ">=8.0.0 < 9" "npm": ">=8.15"
}, },
"dependencies": { "dependencies": {
"@microsoft/signalr": "6.0.9", "@microsoft/signalr": "6.0.9",

View File

@@ -5,34 +5,14 @@
<EnablePackageValidation>false</EnablePackageValidation> <EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup> </PropertyGroup>
<Import Project="..\Umbraco.Cms\buildTransitive\Umbraco.Cms.props" /> <Import Project="..\Umbraco.Cms.Targets\buildTransitive\Umbraco.Cms.Targets.props" />
<Import Project="..\Umbraco.Cms.Targets\buildTransitive\Umbraco.Cms.Targets.targets" />
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DocumentationFile>bin/Release/Umbraco.Web.UI.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
</PropertyGroup>
<Import Project="..\Umbraco.Cms\buildTransitive\Umbraco.Cms.props" />
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Umbraco.Cms\Umbraco.Cms.csproj" /> <ProjectReference Include="..\Umbraco.Cms\Umbraco.Cms.csproj" />
<ProjectReference Include="..\Umbraco.Cms.ManagementApi\Umbraco.Cms.ManagementApi.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Umbraco.Code" Version="2.0.0" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.0-rc.*" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Umbraco.Code" Version="2.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<!-- Opt-in to app-local ICU to ensure consistent globalization APIs across different platforms --> <!-- Opt-in to app-local ICU to ensure consistent globalization APIs across different platforms -->
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="68.2.0.9" /> <PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="68.2.0.9" />
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="68.2.0.9" Condition="$(RuntimeIdentifier.StartsWith('linux')) or $(RuntimeIdentifier.StartsWith('win')) or ('$(RuntimeIdentifier)' == '' and !$([MSBuild]::IsOSPlatform('osx')))" /> <RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="68.2.0.9" Condition="$(RuntimeIdentifier.StartsWith('linux')) or $(RuntimeIdentifier.StartsWith('win')) or ('$(RuntimeIdentifier)' == '' and !$([MSBuild]::IsOSPlatform('osx')))" />
@@ -49,33 +29,13 @@
<RazorCompileOnPublish>false</RazorCompileOnPublish> <RazorCompileOnPublish>false</RazorCompileOnPublish>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <Target Name="CopyAppsettingsTemplate" BeforeTargets="Build" Condition="!Exists('appsettings.json')">
<JsonSchemaPath>$(ProjectDir)appsettings-schema.json</JsonSchemaPath> <Message Text="Copying appsettings.template.json to appsettings.json because it doesn't exist" Importance="high" />
<JsonSchemaProjectPath>$(ProjectDir)../JsonSchema/JsonSchema.csproj</JsonSchemaProjectPath> <Copy SourceFiles="appsettings.template.json" DestinationFiles="appsettings.json" />
</PropertyGroup>
<Target Name="CheckPreconditions" BeforeTargets="Build">
<Message Text="-CheckPreconditions-" Importance="high" />
<Message Text="JsonSchemaPath: $(JsonSchemaPath)" Importance="high" />
<CallTarget Targets="JsonSchemaBuild" Condition="!Exists('$(JsonSchemaPath)') and '$(UmbracoBuild)' == ''" />
<CallTarget Targets="AppsettingsBuild" Condition="!Exists('appsettings.json')" />
<CallTarget Targets="AppsettingsDevBuild" Condition="!Exists('appsettings.Development.json')" />
</Target> </Target>
<Target Name="CopyAppsettingsDevelopmentTemplate" BeforeTargets="Build" Condition="!Exists('appsettings.Development.json')">
<Message Text="Copying appsettings.Development.template.json to appsettings.Development.json because it doesn't exist" Importance="high" />
<Target Name="JsonSchemaBuild"> <Copy SourceFiles="appsettings.Development.template.json" DestinationFiles="appsettings.Development.json" />
<Exec Command="dotnet run -c Release --project $(JsonSchemaProjectPath) -o &quot;$(ProjectDir)appsettings-schema.json&quot;" />
</Target> </Target>
<Target Name="AppsettingsBuild">
<Message Text="Generating appsettings.json because it doesnt exist" Importance="High" />
<Copy SourceFiles="$(Projectdir)/appsettings.template.json" DestinationFiles="$(ProjectDir)/appsettings.json" />
</Target>
<Target Name="AppsettingsDevBuild">
<Message Text="Generating appsettings.Development.json because it doesnt exist" Importance="High" />
<Copy SourceFiles="$(ProjectDir)appsettings.Development.template.json" DestinationFiles="$(ProjectDir)appsettings.Development.json" />
</Target>
</Project> </Project>

View File

@@ -1,47 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageId>Umbraco.Cms.Web.Website</PackageId>
<Title>Umbraco CMS - Web - Website</Title>
<Description>Contains the website assembly needed to run the frontend of Umbraco CMS.</Description>
<TargetFramework>net7.0</TargetFramework>
<OutputType>Library</OutputType>
<RootNamespace>Umbraco.Cms.Web.Website</RootNamespace>
</PropertyGroup>
<PropertyGroup> <ItemGroup>
<TargetFramework>net7.0</TargetFramework> <FrameworkReference Include="Microsoft.AspNetCore.App" />
<OutputType>Library</OutputType> </ItemGroup>
<RootNamespace>Umbraco.Cms.Web.Website</RootNamespace>
<PackageId>Umbraco.Cms.Web.Website</PackageId>
<Title>Umbraco CMS Website</Title>
<Description>Contains the Website assembly needed to run Umbraco Cms (Front office). This package only contains the assembly, and can be used for package development. Use the template in the Umbraco.Templates package to setup Umbraco</Description>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> <ItemGroup>
<DocumentationFile>bin\Release\Umbraco.Web.Website.xml</DocumentationFile> <ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" />
</PropertyGroup> <ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" />
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> <ItemGroup>
<DocumentationFile>bin\Release\Umbraco.Web.Website.xml</DocumentationFile> <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
</PropertyGroup> <_Parameter1>Umbraco.Tests.UnitTests</_Parameter1>
</AssemblyAttribute>
<ItemGroup> <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<FrameworkReference Include="Microsoft.AspNetCore.App" /> <_Parameter1>Umbraco.Tests.Integration</_Parameter1>
</ItemGroup> </AssemblyAttribute>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" />
<ProjectReference Include="..\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" />
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Umbraco.Code" Version="2.0.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests.UnitTests</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests.Integration</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
</Project> </Project>

View File

@@ -1,19 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<Title>Umbraco CMS - Templates</Title>
<Description>Coontains templates for Umbraco CMS.</Description>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<PackageType>Template</PackageType> <PackageType>Template</PackageType>
<IncludeBuildOutput>false</IncludeBuildOutput> <IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>.</ContentTargetFolders> <IncludeSymbols>false</IncludeSymbols>
<NoDefaultExcludes>true</NoDefaultExcludes> <NoDefaultExcludes>true</NoDefaultExcludes>
<IncludeContentInPack>true</IncludeContentInPack> <IncludeContentInPack>true</IncludeContentInPack>
<IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>.</ContentTargetFolders> <ContentTargetFolders>.</ContentTargetFolders>
<NoDefaultExcludes>true</NoDefaultExcludes>
<IncludeSymbols>false</IncludeSymbols>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Content Include="icon.png" Visible="false" />
<Content Include="UmbracoPackage\**" Exclude="bin;obj" /> <Content Include="UmbracoPackage\**" Exclude="bin;obj" />
<Content Include="UmbracoProject\**" Exclude="bin;obj" /> <Content Include="UmbracoProject\**" Exclude="bin;obj" />
<Content Include="..\src\Umbraco.Web.UI\Program.cs"> <Content Include="..\src\Umbraco.Web.UI\Program.cs">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -2,6 +2,10 @@
<!-- Enable multi-level merging --> <!-- Enable multi-level merging -->
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" /> <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<PropertyGroup>
<Nullable>annotations</Nullable>
</PropertyGroup>
<!-- Specify rule set for all test projects --> <!-- Specify rule set for all test projects -->
<PropertyGroup> <PropertyGroup>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)codeanalysis.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)codeanalysis.ruleset</CodeAnalysisRuleSet>

View File

@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<IsPackable>false</IsPackable>
<RootNamespace>Umbraco.TestData</RootNamespace>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<RootNamespace>Umbraco.TestData</RootNamespace>
<IsPackable>false</IsPackable>
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@@ -16,5 +16,4 @@
<ProjectReference Include="..\..\src\Umbraco.Web.Common\Umbraco.Web.Common.csproj" /> <ProjectReference Include="..\..\src\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
<ProjectReference Include="..\..\src\Umbraco.Web.Website\Umbraco.Web.Website.csproj" /> <ProjectReference Include="..\..\src\Umbraco.Web.Website\Umbraco.Web.Website.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -7,16 +7,20 @@
"name": "acceptancetest", "name": "acceptancetest",
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"typescript": "^3.9.2" "typescript": "^4.6.3"
}, },
"devDependencies": { "devDependencies": {
"cross-env": "^7.0.2", "cross-env": "^7.0.3",
"cy-verify-downloads": "0.0.5", "cy-verify-downloads": "0.0.5",
"cypress": "8.4.1", "cypress": "8.4.1",
"del": "^6.0.0", "del": "^6.0.0",
"ncp": "^2.0.0", "ncp": "^2.0.0",
"prompt": "^1.2.0", "prompt": "^1.2.0",
"umbraco-cypress-testhelpers": "^1.0.0-beta-73" "umbraco-cypress-testhelpers": "^1.0.0-beta-73"
},
"engines": {
"node": ">=16.17",
"npm": ">=8.15"
} }
}, },
"node_modules/@cypress/request": { "node_modules/@cypress/request": {
@@ -2164,9 +2168,9 @@
} }
}, },
"node_modules/typescript": { "node_modules/typescript": {
"version": "3.9.10", "version": "4.8.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz",
"integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==",
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
"tsserver": "bin/tsserver" "tsserver": "bin/tsserver"
@@ -2339,16 +2343,10 @@
} }
}, },
"dependencies": { "dependencies": {
"@colors/colors": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz",
"integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==",
"dev": true
},
"@cypress/request": { "@cypress/request": {
"version": "2.88.10", "version": "2.88.7",
"resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.10.tgz", "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.7.tgz",
"integrity": "sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg==", "integrity": "sha512-FTULIP2rnDJvZDT9t6B4nSfYR40ue19tVmv3wUcY05R9/FPCoMl1nAPJkzWzBCo7ltVn5ThQTbxiMoGBN7k0ig==",
"dev": true, "dev": true,
"requires": { "requires": {
"aws-sign2": "~0.7.0", "aws-sign2": "~0.7.0",
@@ -2358,7 +2356,8 @@
"extend": "~3.0.2", "extend": "~3.0.2",
"forever-agent": "~0.6.1", "forever-agent": "~0.6.1",
"form-data": "~2.3.2", "form-data": "~2.3.2",
"http-signature": "~1.3.6", "har-validator": "~5.1.3",
"http-signature": "~1.2.0",
"is-typedarray": "~1.0.0", "is-typedarray": "~1.0.0",
"isstream": "~0.1.2", "isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1", "json-stringify-safe": "~5.0.1",
@@ -2464,6 +2463,18 @@
} }
} }
}, },
"ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dev": true,
"requires": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
}
},
"ansi-colors": { "ansi-colors": {
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
@@ -2528,9 +2539,9 @@
"dev": true "dev": true
}, },
"async": { "async": {
"version": "3.2.3", "version": "3.2.2",
"resolved": "https://registry.npmjs.org/async/-/async-3.2.3.tgz", "resolved": "https://registry.npmjs.org/async/-/async-3.2.2.tgz",
"integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==", "integrity": "sha512-H0E+qZaDEfx/FY4t7iLRv1W2fFI6+pyCeTw1uN20AQPiwqwM6ojPxHxdLv4z8hi2DtnW9BOckSspLucW7pIE5g==",
"dev": true "dev": true
}, },
"asynckit": { "asynckit": {
@@ -2676,12 +2687,13 @@
} }
}, },
"cli-table3": { "cli-table3": {
"version": "0.6.2", "version": "0.6.0",
"resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.2.tgz", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.0.tgz",
"integrity": "sha512-QyavHCaIC80cMivimWu4aWHilIpiDpfm3hGmqAmXVL1UsnbLuBSMd21hTX6VY4ZSDSM73ESLeF8TOYId3rBTbw==", "integrity": "sha512-gnB85c3MGC7Nm9I/FkiasNBOKjOiO1RNuXXarQms37q4QMpWdlbBgD/VnOStA2faG1dpXMv31RFApjX1/QdgWQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@colors/colors": "1.5.0", "colors": "^1.1.2",
"object-assign": "^4.1.0",
"string-width": "^4.2.0" "string-width": "^4.2.0"
} }
}, },
@@ -2722,6 +2734,12 @@
"integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==", "integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==",
"dev": true "dev": true
}, },
"colors": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
"integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
"dev": true
},
"combined-stream": { "combined-stream": {
"version": "1.0.8", "version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@@ -2776,9 +2794,9 @@
} }
}, },
"cy-verify-downloads": { "cy-verify-downloads": {
"version": "0.1.5", "version": "0.0.5",
"resolved": "https://registry.npmjs.org/cy-verify-downloads/-/cy-verify-downloads-0.1.5.tgz", "resolved": "https://registry.npmjs.org/cy-verify-downloads/-/cy-verify-downloads-0.0.5.tgz",
"integrity": "sha512-8iviQ+LhZ9z7bUEfN5YOGqYy292tSDHVDNsz9eaGZ97dVybgx9NhkSyk//2rVXIV97JBIdx8GIeGBBD+JBB27w==", "integrity": "sha512-aRK7VvKG5rmDJK4hjZ27KM2oOOz0cMO7z/j4zX8qCc4ffXZS1XRJkofUY0w5u6MCB/wUsNMs03VuvkeR2tNPoQ==",
"dev": true "dev": true
}, },
"cycle": { "cycle": {
@@ -2788,9 +2806,9 @@
"dev": true "dev": true
}, },
"cypress": { "cypress": {
"version": "8.7.0", "version": "8.4.1",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-8.7.0.tgz", "resolved": "https://registry.npmjs.org/cypress/-/cypress-8.4.1.tgz",
"integrity": "sha512-b1bMC3VQydC6sXzBMFnSqcvwc9dTZMgcaOzT0vpSD+Gq1yFc+72JDWi55sfUK5eIeNLAtWOGy1NNb6UlhMvB+Q==", "integrity": "sha512-itJXq0Vx3sXCUrDyBi2IUrkxVu/gTTp1VhjB5tzGgkeCR8Ae+/T8WV63rsZ7fS8Tpq7LPPXiyoM/sEdOX7cR6A==",
"dev": true, "dev": true,
"requires": { "requires": {
"@cypress/request": "^2.88.6", "@cypress/request": "^2.88.6",
@@ -2827,7 +2845,6 @@
"minimist": "^1.2.5", "minimist": "^1.2.5",
"ospath": "^1.2.2", "ospath": "^1.2.2",
"pretty-bytes": "^5.6.0", "pretty-bytes": "^5.6.0",
"proxy-from-env": "1.0.0",
"ramda": "~0.27.1", "ramda": "~0.27.1",
"request-progress": "^3.0.0", "request-progress": "^3.0.0",
"supports-color": "^8.1.1", "supports-color": "^8.1.1",
@@ -3008,6 +3025,12 @@
"integrity": "sha1-HkW7vsxndLPBlfrSg1EJxtdIzD8=", "integrity": "sha1-HkW7vsxndLPBlfrSg1EJxtdIzD8=",
"dev": true "dev": true
}, },
"fast-deep-equal": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"dev": true
},
"fast-glob": { "fast-glob": {
"version": "3.2.7", "version": "3.2.7",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz",
@@ -3021,6 +3044,12 @@
"micromatch": "^4.0.4" "micromatch": "^4.0.4"
} }
}, },
"fast-json-stable-stringify": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
"dev": true
},
"fastq": { "fastq": {
"version": "1.13.0", "version": "1.13.0",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz",
@@ -3171,6 +3200,22 @@
"integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==",
"dev": true "dev": true
}, },
"har-schema": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
"dev": true
},
"har-validator": {
"version": "5.1.5",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
"integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
"dev": true,
"requires": {
"ajv": "^6.12.3",
"har-schema": "^2.0.0"
}
},
"has-flag": { "has-flag": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
@@ -3178,14 +3223,14 @@
"dev": true "dev": true
}, },
"http-signature": { "http-signature": {
"version": "1.3.6", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
"dev": true, "dev": true,
"requires": { "requires": {
"assert-plus": "^1.0.0", "assert-plus": "^1.0.0",
"jsprim": "^2.0.2", "jsprim": "^1.2.2",
"sshpk": "^1.14.1" "sshpk": "^1.7.0"
} }
}, },
"human-signals": { "human-signals": {
@@ -3317,9 +3362,15 @@
"dev": true "dev": true
}, },
"json-schema": { "json-schema": {
"version": "0.4.0", "version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
"integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
"dev": true
},
"json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"dev": true "dev": true
}, },
"json-stringify-safe": { "json-stringify-safe": {
@@ -3339,14 +3390,14 @@
} }
}, },
"jsprim": { "jsprim": {
"version": "2.0.2", "version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
"integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
"dev": true, "dev": true,
"requires": { "requires": {
"assert-plus": "1.0.0", "assert-plus": "1.0.0",
"extsprintf": "1.3.0", "extsprintf": "1.3.0",
"json-schema": "0.4.0", "json-schema": "0.2.3",
"verror": "1.10.0" "verror": "1.10.0"
} }
}, },
@@ -3453,18 +3504,18 @@
} }
}, },
"mime-db": { "mime-db": {
"version": "1.52.0", "version": "1.51.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==",
"dev": true "dev": true
}, },
"mime-types": { "mime-types": {
"version": "2.1.35", "version": "2.1.34",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==",
"dev": true, "dev": true,
"requires": { "requires": {
"mime-db": "1.52.0" "mime-db": "1.51.0"
} }
}, },
"mimic-fn": { "mimic-fn": {
@@ -3515,6 +3566,12 @@
"path-key": "^3.0.0" "path-key": "^3.0.0"
} }
}, },
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
"dev": true
},
"once": { "once": {
"version": "1.4.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -3597,24 +3654,26 @@
"dev": true "dev": true
}, },
"prompt": { "prompt": {
"version": "1.3.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/prompt/-/prompt-1.3.0.tgz", "resolved": "https://registry.npmjs.org/prompt/-/prompt-1.2.0.tgz",
"integrity": "sha512-ZkaRWtaLBZl7KKAKndKYUL8WqNT+cQHKRZnT4RYYms48jQkFw3rrBL+/N5K/KtdEveHkxs982MX2BkDKub2ZMg==", "integrity": "sha512-iGerYRpRUg5ZyC+FJ/25G5PUKuWAGRjW1uOlhX7Pi3O5YygdK6R+KEaBjRbHSkU5vfS5PZCltSPZdDtUYwRCZA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@colors/colors": "1.5.0", "async": "~0.9.0",
"async": "3.2.3", "colors": "^1.1.2",
"read": "1.0.x", "read": "1.0.x",
"revalidator": "0.1.x", "revalidator": "0.1.x",
"winston": "2.x" "winston": "2.x"
},
"dependencies": {
"async": {
"version": "0.9.2",
"resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
"integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=",
"dev": true
}
} }
}, },
"proxy-from-env": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz",
"integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=",
"dev": true
},
"psl": { "psl": {
"version": "1.8.0", "version": "1.8.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
@@ -3638,9 +3697,9 @@
"dev": true "dev": true
}, },
"qs": { "qs": {
"version": "6.5.3", "version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
"integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
"dev": true "dev": true
}, },
"querystring": { "querystring": {
@@ -3656,9 +3715,9 @@
"dev": true "dev": true
}, },
"ramda": { "ramda": {
"version": "0.27.2", "version": "0.27.1",
"resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.2.tgz", "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.1.tgz",
"integrity": "sha512-SbiLPU40JuJniHexQSAgad32hfwd+DRUdwF2PlVuI5RZD0/vahUco7R8vD86J/tcEKKF9vZrUVwgtmGCqlCKyA==", "integrity": "sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw==",
"dev": true "dev": true
}, },
"read": { "read": {
@@ -3779,9 +3838,9 @@
} }
}, },
"sshpk": { "sshpk": {
"version": "1.17.0", "version": "1.16.1",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
"integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
"dev": true, "dev": true,
"requires": { "requires": {
"asn1": "~0.2.3", "asn1": "~0.2.3",
@@ -3904,9 +3963,9 @@
"dev": true "dev": true
}, },
"typescript": { "typescript": {
"version": "4.6.3", "version": "4.8.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz",
"integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==" "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig=="
}, },
"umbraco-cypress-testhelpers": { "umbraco-cypress-testhelpers": {
"version": "1.0.0-beta-73", "version": "1.0.0-beta-73",
@@ -3930,6 +3989,15 @@
"integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==",
"dev": true "dev": true
}, },
"uri-js": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
"integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
"dev": true,
"requires": {
"punycode": "^2.1.0"
}
},
"url": { "url": {
"version": "0.11.0", "version": "0.11.0",
"resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",

View File

@@ -8,13 +8,13 @@
"ui": "npx cypress open" "ui": "npx cypress open"
}, },
"engines": { "engines": {
"node": ">=14.0.0 <17", "node": ">=16.17",
"npm": ">=8.0.0 < 9" "npm": ">=8.15"
}, },
"devDependencies": { "devDependencies": {
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"cypress": "8.7.0", "cypress": "8.4.1",
"cy-verify-downloads": "0.1.5", "cy-verify-downloads": "0.0.5",
"del": "^6.0.0", "del": "^6.0.0",
"ncp": "^2.0.0", "ncp": "^2.0.0",
"prompt": "^1.2.0", "prompt": "^1.2.0",

View File

@@ -4,15 +4,15 @@
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<None Remove="CtorInvokeBenchmarks.cs.bak" /> <PackageReference Include="BenchmarkDotNet" Version="0.13.2" />
<None Remove="ReflectionUtilities-Unused.cs.bak" /> <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0-rc.1.22426.10" />
</ItemGroup> <PackageReference Include="Moq" Version="4.18.2" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<ItemGroup> <PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
<None Include="app.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -20,19 +20,4 @@
<ProjectReference Include="..\..\src\Umbraco.Core\Umbraco.Core.csproj" /> <ProjectReference Include="..\..\src\Umbraco.Core\Umbraco.Core.csproj" />
<ProjectReference Include="..\..\src\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" /> <ProjectReference Include="..\..\src\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet">
<Version>0.13.2</Version>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging.Debug">
<Version>7.0.0-rc.1.*</Version>
</PackageReference>
<PackageReference Include="Moq">
<Version>4.18.1</Version>
</PackageReference>
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
</ItemGroup>
</Project> </Project>

View File

@@ -1,20 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework> <PackageId>Umbraco.Cms.Tests</PackageId>
<RootNamespace>Umbraco.Cms.Tests.Common</RootNamespace> <Title>Umbraco CMS - Test tools</Title>
<PackageId>Umbraco.Cms.Tests</PackageId> <Description>Contains commonly used tools to write tests for Umbraco CMS, such as various builders for content etc.</Description>
<Title>Umbraco CMS Test Tools</Title> <TargetFramework>net7.0</TargetFramework>
<Description>Contains commonly used tools to write tests for Umbraco CMS, such as various builders for content etc.</Description> <RootNamespace>Umbraco.Cms.Tests.Common</RootNamespace>
<IsPackable>true</IsPackable>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AutoFixture.AutoMoq" Version="4.17.0" /> <PackageReference Include="AutoFixture.AutoMoq" Version="4.17.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="MiniProfiler.AspNetCore" Version="4.2.22" /> <PackageReference Include="MiniProfiler.AspNetCore" Version="4.2.22" />
<PackageReference Include="Moq" Version="4.18.2" /> <PackageReference Include="Moq" Version="4.18.2" />
<PackageReference Include="AutoFixture.NUnit3" Version="4.17.0" /> <PackageReference Include="AutoFixture.NUnit3" Version="4.17.0" />

View File

@@ -1,6 +1,4 @@
using System;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Net.Http;
using System.Reflection; using System.Reflection;
using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
@@ -16,11 +14,9 @@ using Moq;
using NUnit.Framework; using NUnit.Framework;
using Umbraco.Cms.Core.Cache; using Umbraco.Cms.Core.Cache;
using Umbraco.Cms.Core.Composing; using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Services; using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Web; using Umbraco.Cms.Core.Web;
using Umbraco.Cms.ManagementApi; using Umbraco.Cms.ManagementApi;
using Umbraco.Cms.ManagementApi.Configuration;
using Umbraco.Cms.ManagementApi.Controllers.Install; using Umbraco.Cms.ManagementApi.Controllers.Install;
using Umbraco.Cms.Persistence.Sqlite; using Umbraco.Cms.Persistence.Sqlite;
using Umbraco.Cms.Persistence.SqlServer; using Umbraco.Cms.Persistence.SqlServer;
@@ -30,7 +26,6 @@ using Umbraco.Cms.Tests.Integration.Testing;
using Umbraco.Cms.Web.BackOffice.Controllers; using Umbraco.Cms.Web.BackOffice.Controllers;
using Umbraco.Cms.Web.Common.Controllers; using Umbraco.Cms.Web.Common.Controllers;
using Umbraco.Cms.Web.Website.Controllers; using Umbraco.Cms.Web.Website.Controllers;
using Umbraco.Extensions;
namespace Umbraco.Cms.Tests.Integration.TestServerTest namespace Umbraco.Cms.Tests.Integration.TestServerTest
{ {

View File

@@ -9,6 +9,7 @@ using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Umbraco.Cms.Infrastructure.Persistence; using Umbraco.Cms.Infrastructure.Persistence;
using Umbraco.Cms.Persistence.SqlServer;
namespace Umbraco.Cms.Tests.Integration.Testing; namespace Umbraco.Cms.Tests.Integration.Testing;

View File

@@ -9,6 +9,7 @@ using System.Threading.Tasks;
using Microsoft.Data.SqlClient; using Microsoft.Data.SqlClient;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Umbraco.Cms.Infrastructure.Persistence; using Umbraco.Cms.Infrastructure.Persistence;
using Umbraco.Cms.Persistence.SqlServer;
// ReSharper disable ConvertToUsingDeclaration // ReSharper disable ConvertToUsingDeclaration
namespace Umbraco.Cms.Tests.Integration.Testing; namespace Umbraco.Cms.Tests.Integration.Testing;

View File

@@ -3,7 +3,7 @@
using System; using System;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Umbraco.Cms.Infrastructure.Persistence; using Umbraco.Cms.Persistence.SqlServer;
namespace Umbraco.Cms.Tests.Integration.Testing; namespace Umbraco.Cms.Tests.Integration.Testing;

View File

@@ -1,12 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Examine; using Examine;
using Examine.Lucene; using Examine.Lucene;
using Examine.Lucene.Directories; using Examine.Lucene.Directories;
using Lucene.Net.Analysis; using Lucene.Net.Analysis;
using Lucene.Net.Analysis.Standard; using Lucene.Net.Analysis.Standard;
using Lucene.Net.Store;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Moq; using Moq;
@@ -22,6 +18,7 @@ using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Strings; using Umbraco.Cms.Core.Strings;
using Umbraco.Cms.Infrastructure.Examine; using Umbraco.Cms.Infrastructure.Examine;
using Umbraco.Cms.Infrastructure.Persistence; using Umbraco.Cms.Infrastructure.Persistence;
using Directory = Lucene.Net.Store.Directory;
namespace Umbraco.Cms.Tests.Integration.Umbraco.Examine.Lucene.UmbracoExamine; namespace Umbraco.Cms.Tests.Integration.Umbraco.Examine.Lucene.UmbracoExamine;

View File

@@ -1,11 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Examine; using Examine;
using Examine.Lucene; using Examine.Lucene;
using Examine.Lucene.Directories; using Examine.Lucene.Directories;
using Examine.Lucene.Providers; using Examine.Lucene.Providers;
using Lucene.Net.Store;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Moq; using Moq;
using NUnit.Framework; using NUnit.Framework;
@@ -14,6 +10,7 @@ using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Cms.Infrastructure; using Umbraco.Cms.Infrastructure;
using Umbraco.Cms.Infrastructure.Examine; using Umbraco.Cms.Infrastructure.Examine;
using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Common.Testing;
using Directory = Lucene.Net.Store.Directory;
namespace Umbraco.Cms.Tests.Integration.Umbraco.Examine.Lucene.UmbracoExamine; namespace Umbraco.Cms.Tests.Integration.Umbraco.Examine.Lucene.UmbracoExamine;

View File

@@ -1,122 +1,52 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>Umbraco.Cms.Tests.Integration</RootNamespace>
<PackageId>Umbraco.Cms.Tests.Integration</PackageId> <PackageId>Umbraco.Cms.Tests.Integration</PackageId>
<Title>Umbraco CMS Integration Tests</Title> <Title>Umbraco CMS - Integration tests</Title>
<Description>Contains helper classes for integration tests with Umbraco, including all internal integration tests.</Description> <Description>Contains helper classes for integration tests with Umbraco CMS, including all internal integration tests.</Description>
<IsPackable>true</IsPackable> <TargetFramework>net7.0</TargetFramework>
<IsTestProject>true</IsTestProject> <IsTestProject>true</IsTestProject>
</PropertyGroup> <RootNamespace>Umbraco.Cms.Tests.Integration</RootNamespace>
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="68.2.0.9" />
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="68.2" />
</ItemGroup>
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT' ">
<DefineConstants>IS_WINDOWS</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="App_Data\**" /> <PackageReference Include="Bogus" Version="34.0.2" />
<Compile Remove="TEMP\**" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.0-rc.1.22427.2" />
<Compile Remove="Umbraco\**" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<EmbeddedResource Remove="App_Data\**" /> <PackageReference Include="Moq" Version="4.18.2" />
<EmbeddedResource Remove="TEMP\**" /> <PackageReference Include="NUnit3TestAdapter" Version="4.2.1" PrivateAssets="all" />
<EmbeddedResource Remove="Umbraco\**" /> </ItemGroup>
<None Remove="App_Data\**" />
<None Remove="TEMP\**" /> <Import Project="..\..\src\Umbraco.Cms.Targets\buildTransitive\Umbraco.Cms.Targets.props" />
<Compile Remove="Views\**" /> <Import Project="..\..\src\Umbraco.Cms.Targets\buildTransitive\Umbraco.Cms.Targets.targets" />
<EmbeddedResource Remove="Views\**" /> <ItemGroup>
<None Remove="Umbraco\**" /> <ProjectReference Include="..\..\src\Umbraco.Cms\Umbraco.Cms.csproj" />
<None Remove="Views\**" /> <ProjectReference Include="..\..\src\Umbraco.Cms.ManagementApi\Umbraco.Cms.ManagementApi.csproj" />
<None Remove="create_slicing_filter_condition.sh" /> <ProjectReference Include="..\Umbraco.Tests.Common\Umbraco.Tests.Common.csproj" />
<None Remove="Umbraco.Examine.Lucene\UmbracoExamine\TestFiles\media.xml" /> </ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Umbraco.Examine.Lucene\UmbracoExamine\TestFiles.resx"> <EmbeddedResource Update="Umbraco.Examine.Lucene\UmbracoExamine\TestFiles.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>TestFiles.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Umbraco.Infrastructure\Services\Importing\ImportResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>ImportResources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType> <SubType>Designer</SubType>
<LastGenOutput>TestFiles.Designer.cs</LastGenOutput>
</EmbeddedResource> </EmbeddedResource>
<Compile Update="Umbraco.Examine.Lucene\UmbracoExamine\TestFiles.Designer.cs"> <Compile Update="Umbraco.Examine.Lucene\UmbracoExamine\TestFiles.Designer.cs">
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>TestFiles.resx</DependentUpon> <DependentUpon>TestFiles.resx</DependentUpon>
</Compile> </Compile>
<Content Include="Umbraco.Infrastructure\Services\Importing\*.xml" />
<EmbeddedResource Update="Umbraco.Infrastructure\Services\Importing\ImportResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<SubType>Designer</SubType>
<LastGenOutput>ImportResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<Compile Update="Umbraco.Infrastructure\Services\Importing\ImportResources.Designer.cs"> <Compile Update="Umbraco.Infrastructure\Services\Importing\ImportResources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>ImportResources.resx</DependentUpon> <DependentUpon>ImportResources.resx</DependentUpon>
</Compile> </Compile>
<None Remove="Umbraco.Web.BackOffice\UrlAndDomains\package.xml" />
<EmbeddedResource Include="Umbraco.Web.BackOffice\UrlAndDomains\package.xml" /> <EmbeddedResource Include="Umbraco.Web.BackOffice\UrlAndDomains\package.xml" />
<Content Include="appsettings.Tests.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Remove="Umbraco.Infrastructure\Services\Importing\Dictionary-Package.xml" />
</ItemGroup>
<ItemGroup>
<Content Include="Umbraco.Examine.Lucene\UmbracoExamine\TestFiles\media.xml" />
<Content Include="Umbraco.Infrastructure\Services\Importing\CheckboxList-Content-Package.xml">
<SubType>Designer</SubType>
</Content>
<Content Include="Umbraco.Infrastructure\Services\Importing\CompositionsTestPackage-Random.xml" />
<Content Include="Umbraco.Infrastructure\Services\Importing\CompositionsTestPackage.xml" />
<Content Include="Umbraco.Infrastructure\Services\Importing\Dictionary-Package.xml" />
<Content Include="Umbraco.Infrastructure\Services\Importing\Fanoe-Package.xml" />
<Content Include="Umbraco.Infrastructure\Services\Importing\InheritedDocTypes-Package.xml" />
<Content Include="Umbraco.Infrastructure\Services\Importing\SingleDocType.xml" />
<Content Include="Umbraco.Infrastructure\Services\Importing\StandardMvc-Package.xml">
<SubType>Designer</SubType>
</Content>
<Content Include="Umbraco.Infrastructure\Services\Importing\TemplateOnly-Package.xml" />
<Content Include="Umbraco.Infrastructure\Services\Importing\TemplateOnly-Updated-Package.xml" />
<Content Include="Umbraco.Infrastructure\Services\Importing\uBlogsy-Package.xml" />
<Content Include="Umbraco.Infrastructure\Services\Importing\XsltSearch-Package.xml" />
<Content Include="*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.0-rc.1.*" />
<PackageReference Include="Examine.Lucene" Version="3.0.1" />
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.9" />
<PackageReference Include="Bogus" Version="34.0.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="Moq" Version="4.18.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="Moq" Version="4.18.2" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Umbraco.Cms.Persistence.Sqlite\Umbraco.Cms.Persistence.Sqlite.csproj" />
<ProjectReference Include="..\..\src\Umbraco.Cms.Persistence.SqlServer\Umbraco.Cms.Persistence.SqlServer.csproj" />
<ProjectReference Include="..\..\src\Umbraco.Core\Umbraco.Core.csproj" />
<ProjectReference Include="..\..\src\Umbraco.Infrastructure\Umbraco.Infrastructure.csproj" />
<ProjectReference Include="..\..\src\Umbraco.Cms.ManagementApi\Umbraco.Cms.ManagementApi.csproj" />
<ProjectReference Include="..\..\src\Umbraco.PublishedCache.NuCache\Umbraco.PublishedCache.NuCache.csproj" />
<ProjectReference Include="..\Umbraco.Tests.Common\Umbraco.Tests.Common.csproj" />
<ProjectReference Include="..\..\src\Umbraco.Web.BackOffice\Umbraco.Web.BackOffice.csproj" />
<ProjectReference Include="..\..\src\Umbraco.Web.Website\Umbraco.Web.Website.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="Umbraco.Examine.Lucene\UmbracoExamine\TestFiles\umbraco-sort.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
</Project> </Project>

View File

@@ -1,46 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<OutputType>Exe</OutputType>
<IsTestProject>true</IsTestProject>
<RootNamespace>Umbraco.Cms.Tests.UnitTests</RootNamespace> <RootNamespace>Umbraco.Cms.Tests.UnitTests</RootNamespace>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject> <EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="68.2.0.9" />
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="68.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Umbraco.Cms.ManagementApi\Umbraco.Cms.ManagementApi.csproj" />
<ProjectReference Include="..\..\src\Umbraco.PublishedCache.NuCache\Umbraco.PublishedCache.NuCache.csproj" />
<ProjectReference Include="..\Umbraco.Tests.Common\Umbraco.Tests.Common.csproj" />
<ProjectReference Include="..\..\src\Umbraco.Web.BackOffice\Umbraco.Web.BackOffice.csproj" />
<ProjectReference Include="..\..\src\Umbraco.Web.Website\Umbraco.Web.Website.csproj" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AngleSharp" Version="0.17.1" /> <PackageReference Include="AngleSharp" Version="0.17.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" /> <PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="System.Data.Odbc" Version="7.0.0-rc.1.*" /> <PackageReference Include="System.Data.Odbc" Version="7.0.0-rc.1.22426.10" />
<PackageReference Include="System.Data.OleDb" Version="7.0.0-rc.1.*" /> <PackageReference Include="System.Data.OleDb" Version="7.0.0-rc.1.22426.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="TestHelpers\Assets\UmbracoTraceLog.UNITTEST.20181112.json" /> <ProjectReference Include="..\Umbraco.Tests.Common\Umbraco.Tests.Common.csproj" />
<ProjectReference Include="..\..\src\Umbraco.Cms.ManagementApi\Umbraco.Cms.ManagementApi.csproj" />
<ProjectReference Include="..\..\src\Umbraco.Cms.Imaging.ImageSharp\Umbraco.Cms.Imaging.ImageSharp.csproj" />
<ProjectReference Include="..\..\src\Umbraco.PublishedCache.NuCache\Umbraco.PublishedCache.NuCache.csproj" />
<ProjectReference Include="..\..\src\Umbraco.Web.BackOffice\Umbraco.Web.BackOffice.csproj" />
<ProjectReference Include="..\..\src\Umbraco.Web.Website\Umbraco.Web.Website.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Umbraco.Core\Persistence\Repositories" />
<Folder Include="umbraco\Data\TEMP\TypesCache" />
</ItemGroup>
<ItemGroup>
<None Remove="umbraco\Data\TEMP\TypesCache\umbraco-types.DESKTOP-EU212M2.hash" />
</ItemGroup>
</Project> </Project>

View File

@@ -11,7 +11,7 @@ using SixLabors.ImageSharp.Web;
using SixLabors.ImageSharp.Web.Commands; using SixLabors.ImageSharp.Web.Commands;
using SixLabors.ImageSharp.Web.Commands.Converters; using SixLabors.ImageSharp.Web.Commands.Converters;
using SixLabors.ImageSharp.Web.Middleware; using SixLabors.ImageSharp.Web.Middleware;
using Umbraco.Cms.Web.Common.ImageProcessors; using Umbraco.Cms.Imaging.ImageSharp.ImageProcessors;
namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.Common.ImageProcessors; namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.Common.ImageProcessors;

View File

@@ -3,7 +3,7 @@
using NUnit.Framework; using NUnit.Framework;
using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Web.Common.Media; using Umbraco.Cms.Imaging.ImageSharp.Media;
namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.Common.Media; namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.Common.Media;

View File

@@ -81,8 +81,8 @@ public class InstallAreaRoutesTests
var route = endpoints.DataSources.First(); var route = endpoints.DataSources.First();
Assert.AreEqual(1, route.Endpoints.Count); Assert.AreEqual(1, route.Endpoints.Count);
var routeEndpoint = (RouteEndpoint)route.Endpoints[0]; var endpoint = (RouteEndpoint)route.Endpoints[0];
Assert.AreEqual("install/{controller?}/{action?}", routeEndpoint.RoutePattern.RawText); Assert.AreEqual("install/{controller?}/{action?}", endpoint.RoutePattern.RawText);
} }
private InstallAreaRoutes GetInstallAreaRoutes(RuntimeLevel level) => private InstallAreaRoutes GetInstallAreaRoutes(RuntimeLevel level) =>

View File

@@ -4,13 +4,12 @@ VisualStudioVersion = 17.1.32328.378
MinimumVisualStudioVersion = 10.0.40219.1 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}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Web.UI", "src\Umbraco.Web.UI\Umbraco.Web.UI.csproj", "{DCDFE97C-5630-4F6F-855D-8AEEB96556A5}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{2849E9D4-3B4E-40A3-A309-F3CB4F0E125F}"
ProjectSection(SolutionItems) = preProject
build\azure-pipelines.yml = build\azure-pipelines.yml
version.json = version.json
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{B5BD12C1-A454-435E-8A46-FF4A364C0382}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{B5BD12C1-A454-435E-8A46-FF4A364C0382}"
ProjectSection(SolutionItems) = preProject
tests\.editorconfig = tests\.editorconfig
tests\codeanalysis.ruleset = tests\codeanalysis.ruleset
tests\Directory.Build.props = tests\Directory.Build.props
EndProjectSection
EndProject EndProject
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Umbraco.Web.UI.Client", "http://localhost:3961", "{3819A550-DCEC-4153-91B4-8BA9F7F0B9B4}" Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Umbraco.Web.UI.Client", "http://localhost:3961", "{3819A550-DCEC-4153-91B4-8BA9F7F0B9B4}"
ProjectSection(WebsiteProperties) = preProject ProjectSection(WebsiteProperties) = preProject
@@ -101,24 +100,46 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NewBackoffice", "NewBackoff
.github\New BackOffice - README.md = .github\New BackOffice - README.md .github\New BackOffice - README.md = .github\New BackOffice - README.md
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco.Cms.ManagementApi", "src\Umbraco.Cms.ManagementApi\Umbraco.Cms.ManagementApi.csproj", "{0946531B-F06D-415B-A4E3-6CBFF5DB1C12}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Cms.ManagementApi", "src\Umbraco.Cms.ManagementApi\Umbraco.Cms.ManagementApi.csproj", "{0946531B-F06D-415B-A4E3-6CBFF5DB1C12}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco.New.Cms.Core", "src\Umbraco.New.Cms.Core\Umbraco.New.Cms.Core.csproj", "{CBCE0A1E-BF29-49A6-9581-EAB3587D823A}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.New.Cms.Core", "src\Umbraco.New.Cms.Core\Umbraco.New.Cms.Core.csproj", "{CBCE0A1E-BF29-49A6-9581-EAB3587D823A}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco.New.Cms.Infrastructure", "src\Umbraco.New.Cms.Infrastructure\Umbraco.New.Cms.Infrastructure.csproj", "{2D978DAF-8F48-4D59-8FEA-7EF0F40DBC2C}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.New.Cms.Infrastructure", "src\Umbraco.New.Cms.Infrastructure\Umbraco.New.Cms.Infrastructure.csproj", "{2D978DAF-8F48-4D59-8FEA-7EF0F40DBC2C}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco.New.Cms.Web.Common", "src\Umbraco.New.Cms.Web.Common\Umbraco.New.Cms.Web.Common.csproj", "{5ED13EC6-399E-49D5-9D26-86501729B08D}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.New.Cms.Web.Common", "src\Umbraco.New.Cms.Web.Common\Umbraco.New.Cms.Web.Common.csproj", "{5ED13EC6-399E-49D5-9D26-86501729B08D}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{D4C3395A-BA9D-4032-9ED3-09F1FC032CBC}" EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E5D4B5F9-6CCE-46CE-8985-9A350445F92B}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
build\csharp-docs\docfx.filter.yml = build\csharp-docs\docfx.filter.yml .artifactignore = .artifactignore
build\csharp-docs\toc.yml = build\csharp-docs\toc.yml .editorconfig = .editorconfig
build\csharp-docs\docfx.json = build\csharp-docs\docfx.json .gitattributes = .gitattributes
build\csharp-docs\index.md = build\csharp-docs\index.md .gitignore = .gitignore
.globalconfig = .globalconfig
Directory.Build.props = Directory.Build.props
icon.png = icon.png
LICENSE.md = LICENSE.md
umbraco.sln.DotSettings = umbraco.sln.DotSettings
version.json = version.json
EndProjectSection EndProjectSection
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Templating", "Templating", "{5FBDD50D-7A86-4F4D-BEB9-7967FBA4ED2C}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Cms.Targets", "src\Umbraco.Cms.Targets\Umbraco.Cms.Targets.csproj", "{B51C10FC-FD20-451E-90DD-A117133403DF}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Partials", "Partials", "{55B028A8-6294-46A4-BED5-7888ADB92368}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{20CE9C97-9314-4A19-BCF1-D12CF49B7205}"
ProjectSection(SolutionItems) = preProject
build\azure-pipelines.yml = build\azure-pipelines.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "csharp-docs", "csharp-docs", "{F2BF84D9-0A14-40AF-A0F3-B9BBBBC16A44}"
ProjectSection(SolutionItems) = preProject
build\csharp-docs\docfx.filter.yml = build\csharp-docs\docfx.filter.yml
build\csharp-docs\docfx.json = build\csharp-docs\docfx.json
build\csharp-docs\index.md = build\csharp-docs\index.md
build\csharp-docs\toc.yml = build\csharp-docs\toc.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "umbracotemplate", "umbracotemplate", "{2B47AD9F-FFF1-448A-88F1-D4F568811738}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "partials", "partials", "{25AECCB5-B187-4406-844B-91B8FF0FCB37}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
build\csharp-docs\umbracotemplate\partials\class.tmpl.partial = build\csharp-docs\umbracotemplate\partials\class.tmpl.partial build\csharp-docs\umbracotemplate\partials\class.tmpl.partial = build\csharp-docs\umbracotemplate\partials\class.tmpl.partial
build\csharp-docs\umbracotemplate\partials\footer.tmpl.partial = build\csharp-docs\umbracotemplate\partials\footer.tmpl.partial build\csharp-docs\umbracotemplate\partials\footer.tmpl.partial = build\csharp-docs\umbracotemplate\partials\footer.tmpl.partial
@@ -128,11 +149,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Partials", "Partials", "{55
build\csharp-docs\umbracotemplate\partials\rest.tmpl.partial = build\csharp-docs\umbracotemplate\partials\rest.tmpl.partial build\csharp-docs\umbracotemplate\partials\rest.tmpl.partial = build\csharp-docs\umbracotemplate\partials\rest.tmpl.partial
EndProjectSection EndProjectSection
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Styles", "Styles", "{6499F81C-CFF2-4F83-9105-83F7880879F8}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "styles", "styles", "{EA628ABD-624E-4AF3-B548-6710D4D66531}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
build\csharp-docs\umbracotemplate\styles\main.css = build\csharp-docs\umbracotemplate\styles\main.css build\csharp-docs\umbracotemplate\styles\main.css = build\csharp-docs\umbracotemplate\styles\main.css
EndProjectSection EndProjectSection
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Cms.Imaging.ImageSharp", "src\Umbraco.Cms.Imaging.ImageSharp\Umbraco.Cms.Imaging.ImageSharp.csproj", "{C280181E-597B-4AA5-82E7-D7017E928749}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@@ -279,6 +302,18 @@ Global
{5ED13EC6-399E-49D5-9D26-86501729B08D}.Release|Any CPU.Build.0 = Release|Any CPU {5ED13EC6-399E-49D5-9D26-86501729B08D}.Release|Any CPU.Build.0 = Release|Any CPU
{5ED13EC6-399E-49D5-9D26-86501729B08D}.SkipTests|Any CPU.ActiveCfg = Debug|Any CPU {5ED13EC6-399E-49D5-9D26-86501729B08D}.SkipTests|Any CPU.ActiveCfg = Debug|Any CPU
{5ED13EC6-399E-49D5-9D26-86501729B08D}.SkipTests|Any CPU.Build.0 = Debug|Any CPU {5ED13EC6-399E-49D5-9D26-86501729B08D}.SkipTests|Any CPU.Build.0 = Debug|Any CPU
{B51C10FC-FD20-451E-90DD-A117133403DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B51C10FC-FD20-451E-90DD-A117133403DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B51C10FC-FD20-451E-90DD-A117133403DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B51C10FC-FD20-451E-90DD-A117133403DF}.Release|Any CPU.Build.0 = Release|Any CPU
{B51C10FC-FD20-451E-90DD-A117133403DF}.SkipTests|Any CPU.ActiveCfg = Debug|Any CPU
{B51C10FC-FD20-451E-90DD-A117133403DF}.SkipTests|Any CPU.Build.0 = Debug|Any CPU
{C280181E-597B-4AA5-82E7-D7017E928749}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C280181E-597B-4AA5-82E7-D7017E928749}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C280181E-597B-4AA5-82E7-D7017E928749}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C280181E-597B-4AA5-82E7-D7017E928749}.Release|Any CPU.Build.0 = Release|Any CPU
{C280181E-597B-4AA5-82E7-D7017E928749}.SkipTests|Any CPU.ActiveCfg = Debug|Any CPU
{C280181E-597B-4AA5-82E7-D7017E928749}.SkipTests|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@@ -295,10 +330,11 @@ Global
{CBCE0A1E-BF29-49A6-9581-EAB3587D823A} = {995D9EFA-8BB1-4333-80AD-C525A06FD984} {CBCE0A1E-BF29-49A6-9581-EAB3587D823A} = {995D9EFA-8BB1-4333-80AD-C525A06FD984}
{2D978DAF-8F48-4D59-8FEA-7EF0F40DBC2C} = {995D9EFA-8BB1-4333-80AD-C525A06FD984} {2D978DAF-8F48-4D59-8FEA-7EF0F40DBC2C} = {995D9EFA-8BB1-4333-80AD-C525A06FD984}
{5ED13EC6-399E-49D5-9D26-86501729B08D} = {995D9EFA-8BB1-4333-80AD-C525A06FD984} {5ED13EC6-399E-49D5-9D26-86501729B08D} = {995D9EFA-8BB1-4333-80AD-C525A06FD984}
{D4C3395A-BA9D-4032-9ED3-09F1FC032CBC} = {2849E9D4-3B4E-40A3-A309-F3CB4F0E125F} {20CE9C97-9314-4A19-BCF1-D12CF49B7205} = {E5D4B5F9-6CCE-46CE-8985-9A350445F92B}
{5FBDD50D-7A86-4F4D-BEB9-7967FBA4ED2C} = {D4C3395A-BA9D-4032-9ED3-09F1FC032CBC} {F2BF84D9-0A14-40AF-A0F3-B9BBBBC16A44} = {20CE9C97-9314-4A19-BCF1-D12CF49B7205}
{55B028A8-6294-46A4-BED5-7888ADB92368} = {5FBDD50D-7A86-4F4D-BEB9-7967FBA4ED2C} {2B47AD9F-FFF1-448A-88F1-D4F568811738} = {F2BF84D9-0A14-40AF-A0F3-B9BBBBC16A44}
{6499F81C-CFF2-4F83-9105-83F7880879F8} = {5FBDD50D-7A86-4F4D-BEB9-7967FBA4ED2C} {25AECCB5-B187-4406-844B-91B8FF0FCB37} = {2B47AD9F-FFF1-448A-88F1-D4F568811738}
{EA628ABD-624E-4AF3-B548-6710D4D66531} = {2B47AD9F-FFF1-448A-88F1-D4F568811738}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7A0F2E34-D2AF-4DAB-86A0-7D7764B3D0EC} SolutionGuid = {7A0F2E34-D2AF-4DAB-86A0-7D7764B3D0EC}

View File

@@ -1,14 +1,13 @@
{ {
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "11.0.0", "version": "11.0.0-rc1",
"assemblyVersion": { "assemblyVersion": {
"precision": "Build" // optional. Use when you want a more precise assembly version than the default major.minor. "precision": "build"
}, },
"gitCommitIdShortFixedLength": 7, "gitCommitIdShortFixedLength": 7,
"publicReleaseRefSpec": [ "publicReleaseRefSpec": [
"^refs/heads/master$",
"^refs/heads/main$", "^refs/heads/main$",
"^refs/heads/release/\\d+\\.\\d+\\.\\d+" "^refs/heads/release/"
], ],
"cloudBuild": { "cloudBuild": {
"buildNumber": { "buildNumber": {