10000 Update to .NET 6 and Angular 13 · CodeMazeBlog/aspnetcore-jwt-auth@c9b05bd · GitHub
[go: up one dir, main page]

Skip to content

Commit c9b05bd

Browse files
Update to .NET 6 and Angular 13
1 parent 5d07831 commit c9b05bd

File tree

89 files changed

+21256
-10798
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+21256
-10798
lines changed

ng-auth/browserslist renamed to JwtAuthentication.Client/.browserslistrc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
# For additional information regarding the format and rule options, please see:
33
# https://github.com/browserslist/browserslist#queries
44

5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
58
# You can see what browsers were selected by your queries by running:
69
# npx browserslist
710

8-
> 0.5%
9-
last 2 versions
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
1016
Firefox ESR
11-
not dead
12-
not IE 9-11 # For IE 9-11 support, remove 'not'.

ng-auth/.editorconfig renamed to JwtAuthentication.Client/.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ indent_size = 2
88
insert_final_newline = true
99
trim_trailing_whitespace = true
1010

11+
[*.ts]
12+
quote_type = single
13+
1114
[*.md]
1215
max_line_length = off
1316
trim_trailing_whitespace = false
Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,42 @@
11
# See http://help.github.com/ignore-files/ for more about ignoring files.
22

3-
# compiled output
3+
# Compiled output
44
/dist
55
/tmp
66
/out-tsc
7-
# Only exists if Bazel was run
87
/bazel-out
98

10-
# dependencies
9+
# Node
1110
/node_modules
12-
13-
# profiling files
14-
chrome-profiler-events.json
15-
speed-measure-plugin.json
11+
npm-debug.log
12+
yarn-error.log
1613

1714
# IDEs and editors
18-
/.idea
15+
.idea/
1916
.project
2017
.classpath
2118
.c9/
2219
*.launch
2320
.settings/
2421
*.sublime-workspace
2522

26-
# IDE - VSCode
23+
# Visual Studio Code
2724
.vscode/*
2825
!.vscode/settings.json
2926
!.vscode/tasks.json
3027
!.vscode/launch.json
3128
!.vscode/extensions.json
3229
.history/*
3330

34-
# misc
35-
/.sass-cache
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
3634
/connect.lock
3735
/coverage
3836
/libpeerconnection.log
39-
npm-debug.log
40-
yarn-error.log
4137
testem.log
4238
/typings
4339

44-
# System Files
40+
# System files
4541
.DS_Store
4642
Thumbs.db
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
3+
"recommendations": ["angular.ng-template"]
4+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
3+
"version": "0.2.0",
4+
"configurations": [
5+
{
6+
"name": "ng serve",
7+
"type": "pwa-chrome",
8+
"request": "launch",
9+
"preLaunchTask": "npm: start",
10+
"url": "http://localhost:4200/"
11+
},
12+
{
13+
"name": "ng test",
14+
"type": "chrome",
15+
"request": "launch",
16+
"preLaunchTask": "npm: test",
17+
"url": "http://localhost:9876/debug.html"
18+
}
19+
]
20+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"angular.enable-strict-mode-prompt": false
3+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
3+
"version": "2.0.0",
4+
"tasks": [
5+
{
6+
"type": "npm",
7+
"script": "start",
8+
"isBackground": true,
9+
"problemMatcher": {
10+
"owner": "typescript",
11+
"pattern": "$tsc",
12+
"background": {
13+
"activeOnStart": true,
14+
"beginsPattern": {
15+
"regexp": "(.*?)"
16+
},
17+
"endsPattern": {
18+
"regexp": "bundle generation complete"
19+
}
20+
}
21+
}
22+
},
23+
{
24+
"type": "npm",
25+
"script": "test",
26+
"isBackground": true,
27+
"problemMatcher": {
28+
"owner": "typescript",
29+
"pattern": "$tsc",
30+
"background": {
31+
"activeOnStart": true,
32+
"beginsPattern": {
33+
"regexp": "(.*?)"
34+
},
35+
"endsPattern": {
36+
"regexp": "bundle generation complete"
37+
}
38+
}
39+
}
40+
}
41+
]
42+
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# NgAuth
1+
# JwtAuthentication.Client
22

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.0.3.
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.5.
44

55
## Development server
66

@@ -12,16 +12,16 @@ Run `ng generate component component-name` to generate a new component. You can
1212

1313
## Build
1414

15-
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
15+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
1616

1717
## Running unit tests
1818

1919
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
2020

2121
## Running end-to-end tests
2222

23-
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
23+
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
2424

2525
## Further help
2626

27-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
27+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

ng-auth/angular.json renamed to JwtAuthentication.Client/angular.json

Lines changed: 37 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": 1,
44
"newProjectRoot": "projects",
55
"projects": {
6-
"ng-auth": {
6+
"JwtAuthentication.Client": {
77
"projectType": "application",
88
"schematics": {},
99
"root": "",
@@ -13,63 +13,71 @@
1313
"build": {
1414
"builder": "@angular-devkit/build-angular:browser",
1515
"options": {
16-
"outputPath": "dist/ng-auth",
16 10000 +
"outputPath": "dist/jwt-authentication.client",
1717
"index": "src/index.html",
1818
"main": "src/main.ts",
1919
"polyfills": "src/polyfills.ts",
2020
"tsConfig": "tsconfig.app.json",
21-
"aot": false,
2221
"assets": [
2322
"src/favicon.ico",
2423
"src/assets"
2524
],
2625
"styles": [
26+
"./node_modules/ngx-bootstrap/datepicker/bs-datepicker.css",
27+
"./node_modules/bootstrap/dist/css/bootstrap.min.css",
2728
"src/styles.css"
2829
],
2930
"scripts": []
3031
},
3132
"configurations": {
3233
"production": {
33-
"fileReplacements": [
34-
{
35-
"replace": "src/environments/environment.ts",
36-
"with": "src/environments/environment.prod.ts"
37-
}
38-
],
39-
"optimization": true,
40-
"outputHashing": "all",
41-
"sourceMap": false,
42-
"extractCss": true,
43-
"namedChunks": false,
44-
"aot": true,
45-
"extractLicenses": true,
46-
"vendorChunk": false,
47-
"buildOptimizer": true,
4834
"budgets": [
4935
{
5036
"type": "initial",
5137
"maximumWarning": "2mb",
5238
"maximumError": "5mb"
39+
},
40+
{
41+
"type": "anyComponentStyle",
42+
"maximumWarning": "6kb",
43+
"maximumError": "10kb"
44+
}
45+
],
46+
"fileReplacements": [
47+
{
48+
"replace": "src/environments/environment.ts",
49+
"with": "src/environments/environment.prod.ts"
5350
}
54-
]
51+
],
52+
"outputHashing": "all"
53+
},
54+
"development": {
55+
"buildOptimizer": false,
56+
"optimization": false,
57+
"vendorChunk": true,
58+
"extractLicenses": false,
59+
"sourceMap": true,
60+
"namedChunks": true
5561
}
56-
}
62+
},
63+
"defaultConfiguration": "production"
5764
},
5865
"serve": {
5966
"builder": "@angular-devkit/build-angular:dev-server",
60-
"options": {
61-
"browserTarget": "ng-auth:build"
62-
},
6367
"configurations": {
6468
"production": {
65-
"browserTarget": "ng-auth:build:production"
69+
"browserTarget": "JwtAuthentication.Client:build:production"
70+
},
71+
"development": {
72+
"browserTarget": "JwtAuthentication.Client:build:development"
6673
}
67-
}
74+
},
75+
"defaultConfiguration": "development"
6876
},
6977
"extract-i18n": {
7078
"builder": "@angular-devkit/build-angular:extract-i18n",
7179
"options": {
72-
"browserTarget": "ng-auth:build"
80+
"browserTarget": "JwtAuthentication.Client:build"
7381
}
7482
},
7583
"test": {
@@ -88,33 +96,9 @@
8896
],
8997
"scripts": []
9098
}
91-
},
92-
"lint": {
93-
"builder": "@angular-devkit/build-angular:tslint",
94-
"options": {
95-
"tsConfig": [
96-
"tsconfig.app.json",
97-
"tsconfig.spec.json",
98-
"e2e/tsconfig.json"
99-
],
100-
"exclude": [
101-
"**/node_modules/**"
102-
]
103-
}
104-
},
105-
"e2e": {
106-
"builder": "@angular-devkit/build-angular:protractor",
107-
"options": {
108-
"protractorConfig": "e2e/protractor.conf.js",
109-
"devServerTarget": "ng-auth:serve"
110-
},
111-
"configurations": {
112-
"production": {
113-
"devServerTarget": "ng-auth:serve:production"
114-
}
115-
}
11699
}
117100
}
118-
}},
119-
"defaultProject": "ng-auth"
101+
}
102+
},
103+
"defaultProject": "JwtAuthentication.Client"
120104
}

ng-auth/karma.conf.js renamed to JwtAuthentication.Client/karma.conf.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,28 @@ module.exports = function (config) {
99
require('karma-jasmine'),
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
12-
require('karma-coverage-istanbul-reporter'),
12+
require('karma-coverage'),
1313
require('@angular-devkit/build-angular/plugins/karma')
1414
],
1515
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
1622
clearContext: false // leave Jasmine Spec Runner output visible in browser
1723
},
18-
coverageIstanbulReporter: {
19-
dir: require('path').join(__dirname, './coverage/ng-auth'),
20-
reports: ['html', 'lcovonly', 'text-summary'],
21-
fixWebpackSourcePaths: true
24+
jasmineHtmlReporter: {
25+
suppressAll: true // removes the duplicated traces
26+
},
27+
coverageReporter: {
28+
dir: require('path').join(__dirname, './coverage/jwt-authentication.client'),
29+
subdir: '.',
30+
reporters: [
31+
{ type: 'html' },
32+
{ type: 'text-summary' }
33+
]
2234
},
2335
reporters: ['progress', 'kjhtml'],
2436
port: 9876,

0 commit comments

Comments
 (0)
0