Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/EntityDb.MongoDb.Provisioner/Commands/CommandBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ protected static void AddEntityNameArgumentTo(Command command)
{
var entityName = entityNameResult.GetValueOrDefault<string>() ?? string.Empty;

return EntityNameRegex.IsMatch(entityName)
? null
: "The entity name must begin with an letter, and can only contain letters.";
if (!EntityNameRegex.IsMatch(entityName))
{
entityNameResult.ErrorMessage = "The entity name must begin with an letter, and can only contain letters.";
}
});

command.AddArgument(entityNameArgument);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using MongoDB.Driver;
using System;
using System.CommandLine;
using System.CommandLine.Invocation;
using System.CommandLine.NamingConventionBinder;
using System.Threading.Tasks;

namespace EntityDb.MongoDb.Provisioner.Commands;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using EntityDb.MongoDb.Provisioner.Extensions;
using MongoDB.Driver;
using System.CommandLine;
using System.CommandLine.Invocation;
using System.CommandLine.NamingConventionBinder;
using System.Threading.Tasks;

namespace EntityDb.MongoDb.Provisioner.Commands;
Expand Down
2 changes: 1 addition & 1 deletion src/EntityDb.MongoDb.Provisioner/Commands/CreateRole.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using EntityDb.MongoDb.Documents;
using EntityDb.MongoDb.Provisioner.MongoDbAtlas.Models;
using System.CommandLine;
using System.CommandLine.Invocation;
using System.CommandLine.NamingConventionBinder;
using System.Threading.Tasks;

namespace EntityDb.MongoDb.Provisioner.Commands;
Expand Down
2 changes: 1 addition & 1 deletion src/EntityDb.MongoDb.Provisioner/Commands/CreateUser.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using EntityDb.MongoDb.Provisioner.MongoDbAtlas.Models;
using System.CommandLine;
using System.CommandLine.Invocation;
using System.CommandLine.NamingConventionBinder;
using System.Threading.Tasks;

namespace EntityDb.MongoDb.Provisioner.Commands;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.21216.1"/>
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1"/>
<PackageReference Include="System.CommandLine.NamingConventionBinder" Version="2.0.0-beta4.22272.1"/>
</ItemGroup>

<ItemGroup>
Expand Down
25 changes: 10 additions & 15 deletions src/EntityDb.MongoDb.Provisioner/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@
"net6.0": {
"System.CommandLine": {
"type": "Direct",
"requested": "[2.0.0-beta1.21216.1, )",
"resolved": "2.0.0-beta1.21216.1",
"contentHash": "Nbv/tW8sbOKN5T+4SSVBMdk4ADSIpJpY4UHMsj3VkcNtOckIT4iyzagjF+W5FEh2YBRvmvVQijOTIZbUJ1+1aA==",
"requested": "[2.0.0-beta4.22272.1, )",
"resolved": "2.0.0-beta4.22272.1",
"contentHash": "1uqED/q2H0kKoLJ4+hI2iPSBSEdTuhfCYADeJrAqERmiGQ2NNacYKRNEQ+gFbU4glgVyK8rxI+ZOe1onEtr/Pg=="
},
"System.CommandLine.NamingConventionBinder": {
"type": "Direct",
"requested": "[2.0.0-beta4.22272.1, )",
"resolved": "2.0.0-beta4.22272.1",
"contentHash": "ux2eUA/syF+JtlpMDc/Lsd6PBIBuwjH3AvHnestoh5uD0WKT5b+wkQxDWVCqp9qgVjMBTLNhX19ZYFtenunt9A==",
"dependencies": {
"Microsoft.CSharp": "4.4.1",
"system.memory": "4.5.4"
"System.CommandLine": "2.0.0-beta4.22272.1"
}
},
"DnsClient": {
Expand All @@ -20,11 +25,6 @@
"Microsoft.Win32.Registry": "5.0.0"
}
},
"Microsoft.CSharp": {
"type": "Transitive",
"resolved": "4.4.1",
"contentHash": "A5hI3gk6WpcBI0QGZY6/d5CCaYUxJgi7iENn1uYEng+Olo8RfI5ReGVkjXjeu3VR3srLvVYREATXa2M0X7FYJA=="
},
"Microsoft.NETCore.Platforms": {
"type": "Transitive",
"resolved": "5.0.0",
Expand Down Expand Up @@ -84,11 +84,6 @@
"resolved": "4.5.1",
"contentHash": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg=="
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.4",
"contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw=="
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "5.0.0",
Expand Down
15 changes: 10 additions & 5 deletions test/EntityDb.Common.Tests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -711,11 +711,15 @@
},
"System.CommandLine": {
"type": "Transitive",
"resolved": "2.0.0-beta1.21216.1",
"contentHash": "Nbv/tW8sbOKN5T+4SSVBMdk4ADSIpJpY4UHMsj3VkcNtOckIT4iyzagjF+W5FEh2YBRvmvVQijOTIZbUJ1+1aA==",
"resolved": "2.0.0-beta4.22272.1",
"contentHash": "1uqED/q2H0kKoLJ4+hI2iPSBSEdTuhfCYADeJrAqERmiGQ2NNacYKRNEQ+gFbU4glgVyK8rxI+ZOe1onEtr/Pg=="
},
"System.CommandLine.NamingConventionBinder": {
"type": "Transitive",
"resolved": "2.0.0-beta4.22272.1",
"contentHash": "ux2eUA/syF+JtlpMDc/Lsd6PBIBuwjH3AvHnestoh5uD0WKT5b+wkQxDWVCqp9qgVjMBTLNhX19ZYFtenunt9A==",
"dependencies": {
"Microsoft.CSharp": "4.4.1",
"system.memory": "4.5.4"
"System.CommandLine": "2.0.0-beta4.22272.1"
}
},
"System.ComponentModel.Composition": {
Expand Down Expand Up @@ -1795,7 +1799,8 @@
"type": "Project",
"dependencies": {
"EntityDb.MongoDb": "1.0.0",
"System.CommandLine": "2.0.0-beta1.21216.1"
"System.CommandLine": "2.0.0-beta4.22272.1",
"System.CommandLine.NamingConventionBinder": "2.0.0-beta4.22272.1"
}
},
"entitydb.redis": {
Expand Down
15 changes: 10 additions & 5 deletions test/EntityDb.MongoDb.Tests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -711,11 +711,15 @@
},
"System.CommandLine": {
"type": "Transitive",
"resolved": "2.0.0-beta1.21216.1",
"contentHash": "Nbv/tW8sbOKN5T+4SSVBMdk4ADSIpJpY4UHMsj3VkcNtOckIT4iyzagjF+W5FEh2YBRvmvVQijOTIZbUJ1+1aA==",
"resolved": "2.0.0-beta4.22272.1",
"contentHash": "1uqED/q2H0kKoLJ4+hI2iPSBSEdTuhfCYADeJrAqERmiGQ2NNacYKRNEQ+gFbU4glgVyK8rxI+ZOe1onEtr/Pg=="
},
"System.CommandLine.NamingConventionBinder": {
"type": "Transitive",
"resolved": "2.0.0-beta4.22272.1",
"contentHash": "ux2eUA/syF+JtlpMDc/Lsd6PBIBuwjH3AvHnestoh5uD0WKT5b+wkQxDWVCqp9qgVjMBTLNhX19ZYFtenunt9A==",
"dependencies": {
"Microsoft.CSharp": "4.4.1",
"system.memory": "4.5.4"
"System.CommandLine": "2.0.0-beta4.22272.1"
}
},
"System.ComponentModel.Composition": {
Expand Down Expand Up @@ -1811,7 +1815,8 @@
"type": "Project",
"dependencies": {
"EntityDb.MongoDb": "1.0.0",
"System.CommandLine": "2.0.0-beta1.21216.1"
"System.CommandLine": "2.0.0-beta4.22272.1",
"System.CommandLine.NamingConventionBinder": "2.0.0-beta4.22272.1"
}
},
"entitydb.redis": {
Expand Down
15 changes: 10 additions & 5 deletions test/EntityDb.Mvc.Tests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -711,11 +711,15 @@
},
"System.CommandLine": {
"type": "Transitive",
"resolved": "2.0.0-beta1.21216.1",
"contentHash": "Nbv/tW8sbOKN5T+4SSVBMdk4ADSIpJpY4UHMsj3VkcNtOckIT4iyzagjF+W5FEh2YBRvmvVQijOTIZbUJ1+1aA==",
"resolved": "2.0.0-beta4.22272.1",
"contentHash": "1uqED/q2H0kKoLJ4+hI2iPSBSEdTuhfCYADeJrAqERmiGQ2NNacYKRNEQ+gFbU4glgVyK8rxI+ZOe1onEtr/Pg=="
},
"System.CommandLine.NamingConventionBinder": {
"type": "Transitive",
"resolved": "2.0.0-beta4.22272.1",
"contentHash": "ux2eUA/syF+JtlpMDc/Lsd6PBIBuwjH3AvHnestoh5uD0WKT5b+wkQxDWVCqp9qgVjMBTLNhX19ZYFtenunt9A==",
"dependencies": {
"Microsoft.CSharp": "4.4.1",
"system.memory": "4.5.4"
"System.CommandLine": "2.0.0-beta4.22272.1"
}
},
"System.ComponentModel.Composition": {
Expand Down Expand Up @@ -1811,7 +1815,8 @@
"type": "Project",
"dependencies": {
"EntityDb.MongoDb": "1.0.0",
"System.CommandLine": "2.0.0-beta1.21216.1"
"System.CommandLine": "2.0.0-beta4.22272.1",
"System.CommandLine.NamingConventionBinder": "2.0.0-beta4.22272.1"
}
},
"entitydb.mvc": {
Expand Down
15 changes: 10 additions & 5 deletions test/EntityDb.Redis.Tests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -711,11 +711,15 @@
},
"System.CommandLine": {
"type": "Transitive",
"resolved": "2.0.0-beta1.21216.1",
"contentHash": "Nbv/tW8sbOKN5T+4SSVBMdk4ADSIpJpY4UHMsj3VkcNtOckIT4iyzagjF+W5FEh2YBRvmvVQijOTIZbUJ1+1aA==",
"resolved": "2.0.0-beta4.22272.1",
"contentHash": "1uqED/q2H0kKoLJ4+hI2iPSBSEdTuhfCYADeJrAqERmiGQ2NNacYKRNEQ+gFbU4glgVyK8rxI+ZOe1onEtr/Pg=="
},
"System.CommandLine.NamingConventionBinder": {
"type": "Transitive",
"resolved": "2.0.0-beta4.22272.1",
"contentHash": "ux2eUA/syF+JtlpMDc/Lsd6PBIBuwjH3AvHnestoh5uD0WKT5b+wkQxDWVCqp9qgVjMBTLNhX19ZYFtenunt9A==",
"dependencies": {
"Microsoft.CSharp": "4.4.1",
"system.memory": "4.5.4"
"System.CommandLine": "2.0.0-beta4.22272.1"
}
},
"System.ComponentModel.Composition": {
Expand Down Expand Up @@ -1811,7 +1815,8 @@
"type": "Project",
"dependencies": {
"EntityDb.MongoDb": "1.0.0",
"System.CommandLine": "2.0.0-beta1.21216.1"
"System.CommandLine": "2.0.0-beta4.22272.1",
"System.CommandLine.NamingConventionBinder": "2.0.0-beta4.22272.1"
}
},
"entitydb.redis": {
Expand Down