Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit 67ba627

Browse files
Merge branch 'rel/2.0.0-preview2' into dev
2 parents 32d9bde + a3bcc0d commit 67ba627

File tree

9 files changed

+25
-11
lines changed

9 files changed

+25
-11
lines changed

src/Microsoft.AspNetCore.NodeServices/HostingModels/OutOfProcessNodeInstance.cs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -381,12 +381,6 @@ private void ConnectToInputOutputStreams()
381381
{
382382
OutputLogger.LogWarning(evt.Data);
383383
}
384-
else if (!initializationIsCompleted)
385-
{
386-
_connectionIsReadySource.SetException(
387-
new InvalidOperationException("The Node.js process failed to initialize: " + evt.Data));
388-
initializationIsCompleted = true;
389-
}
390384
else
391385
{
392386
OnErrorDataReceived(UnencodeNewlines(evt.Data));
@@ -400,10 +394,11 @@ private void ConnectToInputOutputStreams()
400394

401395
private static bool IsDebuggerMessage(string message)
402396
{
403-
return message.StartsWith("Debugger attached", StringComparison.OrdinalIgnoreCase) ||
404-
message.StartsWith("Debugger listening ", StringComparison.OrdinalIgnoreCase) ||
405-
message.StartsWith("To start debugging", StringComparison.OrdinalIgnoreCase) ||
406-
message.Equals("Warning: This is an experimental feature and could change at any time.", StringComparison.OrdinalIgnoreCase) ||
397+
return message.StartsWith("Debugger attached", StringComparison.Ordinal) ||
398+
message.StartsWith("Debugger listening ", StringComparison.Ordinal) ||
399+
message.StartsWith("To start debugging", StringComparison.Ordinal) ||
400+
message.Equals("Warning: This is an experimental feature and could change at any time.", StringComparison.Ordinal) ||
401+
message.Equals("For help see https://nodejs.org/en/docs/inspector", StringComparison.Ordinal) ||
407402
message.Contains("chrome-devtools:");
408403
}
409404

src/Microsoft.AspNetCore.SpaServices/Webpack/ConditionalProxyMiddleware.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,15 @@ private async Task<bool> PerformProxyRequest(HttpContext context)
9898

9999
using (var responseStream = await responseMessage.Content.ReadAsStreamAsync())
100100
{
101-
await responseStream.CopyToAsync(context.Response.Body, DefaultHttpBufferSize, context.RequestAborted);
101+
try
102+
{
103+
await responseStream.CopyToAsync(context.Response.Body, DefaultHttpBufferSize, context.RequestAborted);
104+
}
105+
catch (OperationCanceledException)
106+
{
107+
// The CopyToAsync task will be canceled if the client disconnects (e.g., user
108+
// closes or refreshes the browser tab). Don't treat this as an error.
109+
}
102110
}
103111

104112
return true;

templates/AngularSpa/AngularSpa.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
55
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
66
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
7+
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
78
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;</PackageTargetFallback>
89
<IsPackable>false</IsPackable>
910
</PropertyGroup>

templates/AureliaSpa/AureliaSpa.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
55
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
66
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
7+
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
78
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;</PackageTargetFallback>
89
<IsPackable>false</IsPackable>
910
</PropertyGroup>

templates/KnockoutSpa/KnockoutSpa.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
55
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
66
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
7+
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
78
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;</PackageTargetFallback>
89
<IsPackable>false</IsPackable>
910
</PropertyGroup>

templates/ReactReduxSpa/ReactReduxSpa.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
55
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
66
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
7+
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
78
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;</PackageTargetFallback>
89
<IsPackable>false</IsPackable>
910
</PropertyGroup>

templates/ReactSpa/ReactSpa.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
55
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
66
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
7+
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
78
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;</PackageTargetFallback>
89
<IsPackable>false</IsPackable>
910
</PropertyGroup>

templates/VueSpa/VueSpa.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
55
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
66
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
7+
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
78
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;</PackageTargetFallback>
89
<IsPackable>false</IsPackable>
910
</PropertyGroup>

templates/package-builder/src/build/build.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,10 @@ function buildDotNetNewNuGetPackage(packageId: string) {
203203
replaces: 'netcoreapp2.0',
204204
defaultValue: 'netcoreapp2.0'
205205
},
206+
HostIdentifier: {
207+
type: 'bind',
208+
binding: 'HostIdentifier'
209+
},
206210
skipRestore: {
207211
type: 'parameter',
208212
datatype: 'bool',
@@ -236,6 +240,7 @@ function buildDotNetNewNuGetPackage(packageId: string) {
236240
// For the preview2 release, just display manual instructions instead.
237241
// This is only applicable on the command line, because VS will restore
238242
// NPM packages automatically by default.
243+
condition: '(HostIdentifier == "dotnetcli" || HostIdentifier == "dotnetcli-preview")',
239244
actionId: 'AC1156F7-BB77-4DB8-B28F-24EEBCCA1E5C',
240245
description: '\n\n-------------------------------------------------------------------\nIMPORTANT: Before running this project on the command line,\n you must restore NPM packages by running "npm install"\n-------------------------------------------------------------------\n',
241246
manualInstructions: [{ text: 'Run "npm install"' }]

0 commit comments

Comments
 (0)