Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

[automated] Merge branch 'release/2.2' => 'master' #483

Merged
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
18 changes: 9 additions & 9 deletions build/dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<PropertyGroup Label="Package Versions">
<InternalAspNetCoreSdkPackageVersion>2.2.0-preview1-20180907.3</InternalAspNetCoreSdkPackageVersion>
<MicrosoftAspNetCoreCertificatesGenerationSourcesPackageVersion>2.2.0-preview2-35143</MicrosoftAspNetCoreCertificatesGenerationSourcesPackageVersion>
<MicrosoftAspNetCoreTestingPackageVersion>2.2.0-preview2-35143</MicrosoftAspNetCoreTestingPackageVersion>
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>2.2.0-preview2-35143</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>2.2.0-preview2-35143</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
<MicrosoftExtensionsProcessSourcesPackageVersion>2.2.0-preview2-35143</MicrosoftExtensionsProcessSourcesPackageVersion>
<InternalAspNetCoreSdkPackageVersion>2.2.0-preview1-20180918.1</InternalAspNetCoreSdkPackageVersion>
<MicrosoftAspNetCoreCertificatesGenerationSourcesPackageVersion>2.2.0-preview3-35301</MicrosoftAspNetCoreCertificatesGenerationSourcesPackageVersion>
<MicrosoftAspNetCoreTestingPackageVersion>2.2.0-preview3-35301</MicrosoftAspNetCoreTestingPackageVersion>
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>2.2.0-preview3-35301</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>2.2.0-preview3-35301</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
<MicrosoftExtensionsProcessSourcesPackageVersion>2.2.0-preview3-35301</MicrosoftExtensionsProcessSourcesPackageVersion>
<MicrosoftNETCoreApp20PackageVersion>2.0.9</MicrosoftNETCoreApp20PackageVersion>
<MicrosoftNETCoreApp21PackageVersion>2.1.2</MicrosoftNETCoreApp21PackageVersion>
<MicrosoftNETCoreApp22PackageVersion>2.2.0-preview1-26618-02</MicrosoftNETCoreApp22PackageVersion>
<MicrosoftNETCoreApp21PackageVersion>2.1.3</MicrosoftNETCoreApp21PackageVersion>
<MicrosoftNETCoreApp22PackageVersion>2.2.0-preview2-26905-02</MicrosoftNETCoreApp22PackageVersion>
<MicrosoftNETTestSdkPackageVersion>15.6.1</MicrosoftNETTestSdkPackageVersion>
<MicrosoftWebApiClientPackageVersion>5.2.6</MicrosoftWebApiClientPackageVersion>
<NETStandardLibrary20PackageVersion>2.0.3</NETStandardLibrary20PackageVersion>
<NewtonsoftJsonPackageVersion>11.0.2</NewtonsoftJsonPackageVersion>
<SystemDataSqlClientPackageVersion>4.5.1</SystemDataSqlClientPackageVersion>
<SystemDataSqlClientPackageVersion>4.6.0-preview2-26905-02</SystemDataSqlClientPackageVersion>
<SystemSecurityCryptographyCngPackageVersion>4.5.0</SystemSecurityCryptographyCngPackageVersion>
<VisualStudio_NewtonsoftJsonPackageVersion>9.0.1</VisualStudio_NewtonsoftJsonPackageVersion>
<XunitPackageVersion>2.3.1</XunitPackageVersion>
Expand Down
4 changes: 2 additions & 2 deletions korebuild-lock.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version:2.2.0-preview1-20180907.3
commithash:2315030c7f3de2af0f16cf64502321937b6c4315
version:2.2.0-preview1-20180918.1
commithash:ad5e3fc53442741a0dd49bce437d2ac72f4b5800
15 changes: 13 additions & 2 deletions src/Microsoft.HttpRepl/Commands/BaseHttpCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public abstract class BaseHttpCommand : CommandWithStructuredInputBase<HttpState

protected abstract bool RequiresBody { get; }

protected override CommandInputSpecification InputSpec
public override CommandInputSpecification InputSpec
{
get
{
Expand Down Expand Up @@ -469,7 +469,18 @@ private static async Task<bool> FormatJsonAsync(HttpState programState, IWritabl

protected override string GetHelpDetails(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult)
{
return $"Issues a {Verb.ToUpperInvariant()} request";
var helpText = new StringBuilder();
helpText.Append("Usage: ".Bold());
helpText.AppendLine($"{Verb.ToUpperInvariant()} [Options]");
helpText.AppendLine();
helpText.AppendLine($"Issues a {Verb.ToUpperInvariant()} request.");

if (RequiresBody)
{
helpText.AppendLine("Your default editor will be opened with a sample body if no options are provided.");
}

return helpText.ToString();
}

public override string GetHelpSummary(IShellState shellState, HttpState programState)
Expand Down
15 changes: 9 additions & 6 deletions src/Microsoft.HttpRepl/Commands/ChangeDirectoryCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.HttpRepl.Suggestions;
using Microsoft.Repl;
using Microsoft.Repl.Commanding;
using Microsoft.Repl.ConsoleHandling;
using Microsoft.Repl.Parsing;

namespace Microsoft.HttpRepl.Commands
Expand Down Expand Up @@ -60,18 +62,19 @@ protected override Task ExecuteAsync(IShellState shellState, HttpState programSt
return Task.CompletedTask;
}

protected override CommandInputSpecification InputSpec { get; } = CommandInputSpecification.Create("cd")
public override CommandInputSpecification InputSpec { get; } = CommandInputSpecification.Create("cd")
.MaximumArgCount(1)
.Finish();

protected override string GetHelpDetails(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult)
{
if (commandInput.Arguments.Count == 1 && !string.IsNullOrEmpty(commandInput.Arguments[0]?.Text))
{
return "Prints the current directory if no argument is specified, otherwise changes to the specified directory";
}
var help = new StringBuilder();
help.Append("Usage:".Bold());
help.AppendLine("cd [directory]");
help.AppendLine();
help.AppendLine("Prints the current directory if no argument is specified, otherwise changes to the specified directory");

return "Changes to the directory " + commandInput.Arguments[0].Text;
return help.ToString();
}

public override string GetHelpSummary(IShellState shellState, HttpState programState)
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.HttpRepl/Commands/ConfigCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected override async Task ExecuteAsync(IShellState shellState, HttpState pro
}
}

protected override CommandInputSpecification InputSpec { get; } = CommandInputSpecification.Create("config").Finish();
public override CommandInputSpecification InputSpec { get; } = CommandInputSpecification.Create("config").Finish();

protected override string GetHelpDetails(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult)
{
Expand Down
10 changes: 8 additions & 2 deletions src/Microsoft.HttpRepl/Commands/EchoCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Repl;
Expand Down Expand Up @@ -37,11 +38,16 @@ protected override Task ExecuteAsync(IShellState shellState, HttpState programSt
return Task.CompletedTask;
}

protected override CommandInputSpecification InputSpec { get; } = CommandInputSpecification.Create("echo").ExactArgCount(1).Finish();
public override CommandInputSpecification InputSpec { get; } = CommandInputSpecification.Create("echo").ExactArgCount(1).Finish();

protected override string GetHelpDetails(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult)
{
return "Turns request echoing on or off";
var helpText = new StringBuilder();
helpText.Append("Usage: ".Bold());
helpText.AppendLine($"echo [on|off]");
helpText.AppendLine();
helpText.AppendLine($"Turns request echoing on or off. When request echoing is on we will display a text representation of requests made by the CLI.");
return helpText.ToString();
}

public override string GetHelpSummary(IShellState shellState, HttpState programState)
Expand Down
11 changes: 9 additions & 2 deletions src/Microsoft.HttpRepl/Commands/ExitCommand.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Repl;
using Microsoft.Repl.Commanding;
using Microsoft.Repl.ConsoleHandling;
using Microsoft.Repl.Parsing;

namespace Microsoft.HttpRepl.Commands
Expand All @@ -17,11 +19,16 @@ protected override Task ExecuteAsync(IShellState shellState, object programState
return Task.CompletedTask;
}

protected override CommandInputSpecification InputSpec { get; } = CommandInputSpecification.Create("exit").ExactArgCount(0).Finish();
public override CommandInputSpecification InputSpec { get; } = CommandInputSpecification.Create("exit").ExactArgCount(0).Finish();

protected override string GetHelpDetails(IShellState shellState, object programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult)
{
return "Exits the shell";
var helpText = new StringBuilder();
helpText.Append("Usage: ".Bold());
helpText.AppendLine($"exit");
helpText.AppendLine();
helpText.AppendLine($"Exits the shell");
return helpText.ToString();
}

public override string GetHelpSummary(IShellState shellState, object programState)
Expand Down
Loading