Skip to content

Commit 68d3dc4

Browse files
committed
bump .NET nuget packages; bump npm packages; refactor VueCliMiddleware configuration in web api (Startup.cs)
1 parent f4cdc96 commit 68d3dc4

File tree

10 files changed

+51
-71
lines changed

10 files changed

+51
-71
lines changed

GhostUI/ClientApp/package.json

+24-24
Original file line numberDiff line numberDiff line change
@@ -15,44 +15,44 @@
1515
"@fortawesome/free-brands-svg-icons": "^5.15.3",
1616
"@fortawesome/free-solid-svg-icons": "^5.15.3",
1717
"@fortawesome/vue-fontawesome": "^2.0.2",
18-
"@microsoft/signalr": "^5.0.5",
18+
"@microsoft/signalr": "^5.0.8",
1919
"axios": "^0.21.1",
20-
"bulma": "^0.9.2",
21-
"core-js": "^3.11.0",
20+
"bulma": "^0.9.3",
21+
"core-js": "^3.15.2",
2222
"register-service-worker": "^1.7.2",
23-
"vue": "^2.6.12",
23+
"vue": "^2.6.14",
2424
"vue-class-component": "^7.2.6",
2525
"vue-property-decorator": "^9.1.2",
26-
"vue-router": "^3.5.1",
26+
"vue-router": "^3.5.2",
2727
"vue-snotify": "^3.2.1",
2828
"vue-styled-components": "^1.6.0",
2929
"vuex": "^3.6.2"
3030
},
3131
"devDependencies": {
32-
"@testing-library/jest-dom": "^5.11.10",
33-
"@types/jest": "^26.0.22",
34-
"@typescript-eslint/eslint-plugin": "^4.22.0",
35-
"@typescript-eslint/parser": "^4.22.0",
36-
"@vue/cli-plugin-babel": "^4.5.12",
37-
"@vue/cli-plugin-e2e-nightwatch": "^4.5.12",
38-
"@vue/cli-plugin-eslint": "^4.5.12",
39-
"@vue/cli-plugin-pwa": "^4.5.12",
40-
"@vue/cli-plugin-typescript": "^4.5.12",
41-
"@vue/cli-plugin-unit-jest": "^4.5.12",
42-
"@vue/cli-service": "^4.5.12",
32+
"@testing-library/jest-dom": "^5.14.1",
33+
"@types/jest": "^26.0.24",
34+
"@typescript-eslint/eslint-plugin": "^4.28.3",
35+
"@typescript-eslint/parser": "^4.28.3",
36+
"@vue/cli-plugin-babel": "^4.5.13",
37+
"@vue/cli-plugin-e2e-nightwatch": "^4.5.13",
38+
"@vue/cli-plugin-eslint": "^4.5.13",
39+
"@vue/cli-plugin-pwa": "^4.5.13",
40+
"@vue/cli-plugin-typescript": "^4.5.13",
41+
"@vue/cli-plugin-unit-jest": "^4.5.13",
42+
"@vue/cli-service": "^4.5.13",
4343
"@vue/eslint-config-prettier": "^6.0.0",
4444
"@vue/eslint-config-typescript": "^7.0.0",
45-
"@vue/test-utils": "1.1.4",
46-
"eslint": "^7.24.0",
45+
"@vue/test-utils": "1.2.1",
46+
"eslint": "^7.30.0",
4747
"eslint-plugin-prettier": "^3.4.0",
48-
"eslint-plugin-vue": "^7.9.0",
49-
"node-sass": "^5.0.0",
50-
"prettier": "^2.2.1",
48+
"eslint-plugin-vue": "^7.13.0",
49+
"prettier": "^2.3.2",
50+
"sass": "^1.35.2",
5151
"sass-loader": "^10.1.1",
52-
"ts-jest": "^26.5.5",
53-
"typescript": "^4.2.4",
52+
"ts-jest": "^27.0.3",
53+
"typescript": "^4.3.5",
5454
"vue-svg-loader": "^0.16.0",
55-
"vue-template-compiler": "^2.6.12",
55+
"vue-template-compiler": "^2.6.14",
5656
"vuex-module-decorators": "^1.0.1"
5757
}
5858
}

GhostUI/ClientApp/src/App.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
<vue-snotify />
44
<navbar />
55
<settings />
6-
<transition mode="out-in" :name="$route.meta.transitionName">
6+
<transition
7+
mode="out-in"
8+
:name="$route.meta.transitionName"
9+
>
710
<router-view />
811
</transition>
912
<app-footer />

GhostUI/ClientApp/src/plugins/vue-click-outside.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const vClickOutside = {
2222

2323
unbind: function(el) {
2424
if (el.clickOutsideEvent) {
25-
DEFAULT_EVENTS.forEach((type) => document?.removeEventListener(type, el.clickOutsideEvent));
25+
DEFAULT_EVENTS.forEach((type) => document.removeEventListener(type, el.clickOutsideEvent));
2626
}
2727
}
2828
});
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
import { AuthModule } from './auth.module';
2-
import { AuthStatusEnum, IAuthUser, IAuthState, ICredentials } from './types';
1+
export { AuthModule } from './auth.module';
2+
export { AuthStatusEnum } from './types';
33

4-
export {
5-
AuthModule,
6-
IAuthUser,
7-
IAuthState,
8-
ICredentials,
9-
AuthStatusEnum
10-
};
4+
export type { IAuthUser, IAuthState, ICredentials } from './types';
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
import { FormModule } from './form.module';
2-
import { IDropdownOption, IFormState } from './types';
1+
export { FormModule } from './form.module';
32

4-
export {
5-
FormModule,
6-
IDropdownOption,
7-
IFormState
8-
};
3+
export type { IDropdownOption, IFormState } from './types';
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
import { WeatherForecastModule } from './weather-forecasts.module';
2-
import { IWeatherForecast, IWeatherForecastsState } from './types';
1+
export { WeatherForecastModule } from './weather-forecasts.module';
32

4-
export {
5-
WeatherForecastModule,
6-
IWeatherForecast,
7-
IWeatherForecastsState
8-
};
3+
export type { IWeatherForecast, IWeatherForecastsState } from './types';
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
const isArrayWithLength = (test: any): boolean => Array.isArray(test) && !!test.length;
1+
const isArrayWithLength = (val: unknown): boolean => Array.isArray(val) && !!val.length;
22

33
export default isArrayWithLength;

GhostUI/GhostUI.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="5.0.1" />
2222
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="5.0.1" />
2323
<PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="5.0.1" />
24-
<PackageReference Include="NSwag.AspNetCore" Version="13.10.9" />
25-
<PackageReference Include="NSwag.MSBuild" Version="13.10.9">
24+
<PackageReference Include="NSwag.AspNetCore" Version="13.11.3" />
25+
<PackageReference Include="NSwag.MSBuild" Version="13.11.3">
2626
<PrivateAssets>all</PrivateAssets>
2727
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
2828
</PackageReference>

GhostUI/Startup.cs

+11-18
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ public void ConfigureServices(IServiceCollection services)
4343
// Add CORS
4444
services.AddCorsConfig(_corsPolicyName);
4545

46-
// Register RazorPages/Controllers
47-
services.AddControllers();
48-
4946
// Add Brotli/Gzip response compression (prod only)
5047
services.AddResponseCompressionConfig(Configuration);
5148

@@ -58,6 +55,9 @@ public void ConfigureServices(IServiceCollection services)
5855
// In production, the Vue files will be served from this directory
5956
services.AddSpaStaticFiles(opt => opt.RootPath = $"{_spaSourcePath}/dist");
6057

58+
// Register RazorPages/Controllers
59+
services.AddControllers();
60+
6161
// Register the Swagger services (using OpenApi 3.0)
6262
services.AddOpenApiDocument(configure => configure.Title = $"{this.GetType().Namespace} API");
6363
}
@@ -126,21 +126,14 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
126126
endpoints.MapControllers();
127127
endpoints.MapHub<UsersHub>("/hubs/users");
128128

129-
if (System.Diagnostics.Debugger.IsAttached)
130-
{
131-
endpoints.MapToVueCliProxy(
132-
"{*path}",
133-
new SpaOptions { SourcePath = _spaSourcePath },
134-
npmScript: "serve",
135-
regex: "running at",
136-
port: 3001,
137-
forceKill: true
138-
);
139-
}
140-
else
141-
{
142-
endpoints.MapFallbackToFile("index.html");
143-
}
129+
endpoints.MapToVueCliProxy(
130+
"{*path}",
131+
new SpaOptions { SourcePath = _spaSourcePath },
132+
npmScript: System.Diagnostics.Debugger.IsAttached ? "serve" : null,
133+
regex: "Compiled successfully",
134+
port: 3001,
135+
forceKill: true
136+
);
144137
});
145138
}
146139
}

GhostUI/wwwroot/docs/api-specification.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"x-generator": "NSwag v13.10.9.0 (NJsonSchema v10.4.1.0 (Newtonsoft.Json v12.0.0.0))",
2+
"x-generator": "NSwag v13.11.3.0 (NJsonSchema v10.4.4.0 (Newtonsoft.Json v12.0.0.0))",
33
"openapi": "3.0.0",
44
"info": {
55
"title": "GhostUI API",

0 commit comments

Comments
 (0)