Skip to content

Commit c527bdd

Browse files
committed
Merge main
2 parents cd47a92 + b66d0f8 commit c527bdd

File tree

124 files changed

+8090
-6560
lines changed

Some content is hidden

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

124 files changed

+8090
-6560
lines changed

.eslintrc.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
},
66
"extends": ["airbnb-base", "plugin:prettier/recommended"],
77
"rules": {
8+
"default-param-last": "off",
89
"prettier/prettier": "error",
10+
"prefer-regex-literals": "off",
911
"linebreak-style": 0,
1012
"eol-last": 2,
1113
"quotes": [2, "single", { "avoidEscape": true }],
@@ -17,6 +19,7 @@
1719
"no-unused-vars": [2, { "vars": "local", "args": "none" }],
1820
"no-multi-str": 2,
1921
"no-irregular-whitespace": 2,
22+
"no-restricted-exports": "off",
2023
"comma-dangle": "off",
2124
"max-len": "off",
2225
"func-names": "off",
@@ -28,7 +31,9 @@
2831
"no-console": "off",
2932
"no-multi-assign": "off",
3033
"no-param-reassign": "off",
31-
"no-shadow": "off"
34+
"no-shadow": "off",
35+
"no-promise-executor-return": "off",
36+
"import/extensions": [0, { "pattern": { "{c,m,}js": "always" } }]
3237
},
3338
"overrides": [
3439
{

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ updates:
1818
- 14.6.0
1919
- dependency-name: generator-jhipster
2020
versions:
21-
- 7.0.0
21+
- 7.6.0
2222
- dependency-name: yeoman-environment
2323
versions:
2424
- 3.0.0

.github/workflows/build-docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build_docker_image:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
-
1111
name: Build docker image
1212
run: docker build -t jhipster/jhipster-dotnetcore:test-build ./docker/

.github/workflows/generator.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ jobs:
1111
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
1212
strategy:
1313
matrix:
14-
node_version: [14.17.0]
14+
node_version: [16.14.0]
1515

1616
steps:
17-
- uses: actions/checkout@v2
18-
- name: Use Node.js ${{ matrix.node-version }}
19-
uses: actions/setup-node@v1
17+
- uses: actions/checkout@v3
18+
- uses: actions/setup-node@v3
2019
with:
21-
node-version: ${{ matrix.node-version }}
20+
node-version: ${{ matrix.node_version }}
21+
- name: 'install required npm version'
22+
run: npm install -g npm@$(node -e "console.log(require('./generators/generator-dotnetcore-constants').NPM_VERSION);")
2223
- run: git --no-pager log -n 10 --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue) <%an>%Creset' --abbrev-commit
2324
shell: bash
2425
- run: npm ci

.github/workflows/test-integration-jwt.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
node_version: [14.17.0]
12+
node_version: [16.14.0]
1313
os: [ubuntu-latest]
1414
app-type:
1515
- jwt-with-angular-app
@@ -51,17 +51,19 @@ jobs:
5151
JHI_ARG: ${{ matrix.arg }}
5252

5353
steps:
54-
- uses: actions/checkout@v2
55-
- uses: actions/setup-node@v1
54+
- uses: actions/checkout@v3
55+
- uses: actions/setup-node@v3
5656
with:
57-
node-version: ${{ matrix.node-version }}
57+
node-version: ${{ matrix.node_version }}
58+
- name: 'install required npm version'
59+
run: npm install -g npm@$(node -e "console.log(require('./generators/generator-dotnetcore-constants').NPM_VERSION);")
5860
- uses: joschi/setup-jdk@v2
5961
with:
6062
java-version: '11' # The OpenJDK version to make available on the path
6163
architecture: 'x64' # defaults to 'x64'
6264
- uses: actions/setup-dotnet@v1
6365
with:
64-
dotnet-version: '5.0.100'
66+
dotnet-version: '6.0.x'
6567
- name: git history
6668
run: git --no-pager log -n 10 --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue) <%an>%Creset' --abbrev-commit
6769
- name: PREPARE jhipster env

.github/workflows/test-integration-microservice.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
node_version: [14.17.0]
12+
node_version: [16.14.0]
1313
os: [ubuntu-latest]
1414
app-type:
1515
- microservice-app
@@ -24,13 +24,15 @@ jobs:
2424
JHI_ARG: ${{ matrix.arg }}
2525

2626
steps:
27-
- uses: actions/checkout@v2
28-
- uses: actions/setup-node@v1
27+
- uses: actions/checkout@v3
28+
- uses: actions/setup-node@v3
2929
with:
30-
node-version: ${{ matrix.node-version }}
30+
node-version: ${{ matrix.node_version }}
31+
- name: 'install required npm version'
32+
run: npm install -g npm@$(node -e "console.log(require('./generators/generator-dotnetcore-constants').NPM_VERSION);")
3133
- uses: actions/setup-dotnet@v1
3234
with:
33-
dotnet-version: '5.0.100'
35+
dotnet-version: '6.0.x'
3436
- name: git history
3537
run: git --no-pager log -n 10 --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue) <%an>%Creset' --abbrev-commit
3638
- name: PREPARE jhipster env

.github/workflows/test-integration-oauth.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
node_version: [14.17.0]
12+
node_version: [16.14.0]
1313
os: [ubuntu-latest]
1414
app-type:
1515
- oauth-with-angular-app
@@ -48,13 +48,15 @@ jobs:
4848
JHI_ARG: ${{ matrix.arg }}
4949

5050
steps:
51-
- uses: actions/checkout@v2
52-
- uses: actions/setup-node@v1
51+
- uses: actions/checkout@v3
52+
- uses: actions/setup-node@v3
5353
with:
54-
node-version: ${{ matrix.node-version }}
54+
node-version: ${{ matrix.node_version }}
55+
- name: 'install required npm version'
56+
run: npm install -g npm@$(node -e "console.log(require('./generators/generator-dotnetcore-constants').NPM_VERSION);")
5557
- uses: actions/setup-dotnet@v1
5658
with:
57-
dotnet-version: '5.0.100'
59+
dotnet-version: '6.0.x'
5860
- name: git history
5961
run: git --no-pager log -n 10 --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue) <%an>%Creset' --abbrev-commit
6062
- name: PREPARE jhipster env

.sonarcloud.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# --- properties for sonar cloud ---
22
sonar.projectKey=jhipster_jhipster-dotnetcore
3-
sonar.projectVersion=3.1.1
3+
sonar.projectVersion=3.6.0
44
sonar.organization=jhipster
55
sonar.host.url=https://sonarcloud.io
66
sonar.sources=generators

docs/Features/fronts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Blazor can run your client-side C# code directly in the browser, using WebAssemb
139139

140140
### Prerequisites
141141

142-
- [dotnet5.0](https://dotnet.microsoft.com/download/dotnet/5.0)
142+
- [dotnet 6.0](https://dotnet.microsoft.com/download/dotnet/6.0)
143143

144144
### Generate your application
145145

docs/Features/heroku.md

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,58 @@
1-
# Heroku Deploy
2-
This sub-generator initializes a Heroku [.Net 5](https://docs.microsoft.com/pt-br/dotnet/core/dotnet-five) app that is ready to push to Heroku.
1+
# Deploying to Heroku
2+
3+
This sub-generator allows the deployment of your JHipster .Net application to Heroku cloud.
4+
5+
The Heroku sub-generator will always use free tiers/options. Nevertheless installing addons needs a properly verified Heroku account.
6+
7+
Therefore to avoid any unexpected build failures, we would recommend verifying your Heroku account before starting this sub-generator.
38

49
## Pre-requisites
10+
511
Before running the sub-generator, you must install the [Heroku CLI](https://cli.heroku.com/).
6-
You must also create a Heroku account and run:
12+
13+
Make sure that you are logged into Heroku.
714
```bash
815
heroku login
916
```
17+
1018
[Git](https://git-scm.com/) is also required to deploy to Heroku.
1119

20+
Also make sure you have a working [Docker](https://docs.docker.com) installation (eg. `docker ps`) if deploying to Heroku Container Registry.
21+
1222
## Deploying to Heroku
13-
To deploy your .Net 5 application to Heroku, run this command:
23+
24+
To deploy your application to Heroku, run the following command:
1425

1526
```bash
1627
jhipster heroku
17-
git push heroku main
1828
```
1929

20-
This will initialize a new Heroku app and git push your application to Heroku.
21-
Free tier dynos and database addons are used by the generator. A verified Heroku account might be needed to add some of the resources.
30+
## Databases
31+
32+
- Mysql ✔
33+
- Postgres ✔
34+
- MSSQL ✔ (requires a manual step described below)
2235

23-
This Heroku sub-generator is similar to its Java counterpart. Access the documentation at (https://www.jhipster.tech/heroku/). It might provide helpful insight. But keep in mind that there are some differences between both implementations of the Heroku sub-generator.
36+
Currently MySql and PostgreSQL database addons are free and automatically added by this sub-generator when deploying to Heroku. Even though those resouces are free, an accound with verified credit card is required to add them.
2437

25-
## Databases
38+
Heroku's [MSSQL addon](https://elements.heroku.com/addons/mssql) is not free of cost and to avoid unexpected costs It will not be provisioned automatically when deploying to Heroku.
39+
40+
Please visit [the MSSQL addon page](https://elements.heroku.com/addons/mssql), review the pricing and add the MSSQL addon to your account with the following command:
41+
```bash
42+
heroku addons:create mssql:REPLACE_PLAN_NAME --as DATABASE --app REPLACE_YOUR_APP_NAME
43+
```
2644

27-
Currently MySql and PostgreSQL are supported and automatically added by the sub-generator when deploying to Heroku. [JawsDB MySQL addon](https://elements.heroku.com/addons/jawsdb) and [Heroku Postgres addon](https://elements.heroku.com/addons/heroku-postgresql) are added to the Heroku app using the free tier.
45+
## Oauth2
2846

29-
Since the [MSSQL addon](https://elements.heroku.com/addons/mssql) is not free it requires manual provisioning. This sub-generator provides instructions on how to manually install the MSSQL addon.
47+
For applications that use Oauth2 the following manual steps are required:
3048

31-
Heroku creates an environment variable named `DATABASE_URL` when using database addons. It contains the following structure: `dbType://user:password@server-url:db-port/db-name`. If `DATABASE_URL` is present the database credentials are parsed at `DatabaseConfiguration.cs` to create a properly formed connection string. And it takes precedence over existing connection strings.
49+
1. Deploy the application to Heroku using `jhipster heroku`.
50+
2. Access your (Heroku Dashboard)[https://dashboard.heroku.com/] and select the app you have just created.
51+
3. Under `Installed add-ons` okta should be already installed.
52+
4. Click on `okta` to open the addon's Dashboard.
53+
5. To configure it follow the documentation (here)[https://jhipsternet.readthedocs.io/en/latest/Features/security.html#okta]
3254

33-
**Notes:**
34-
The [heroku/nodejs buildpack](https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-nodejs) is also added to the Heroku app. It is a pre-requisite to build Angular/React client applications.
3555

36-
A `package.json` is automatically added to the root folder as It's required by the heroku/nodejs buildpack, otherwise the application deploy will fail.
56+
## Limitations
3757

38-
[Jincod's Heroku .NET Core buildpack](https://github.com/jincod/dotnetcore-buildpack) is used to deploy this .Net 5 application to Heroku.
58+
Only monolithic deploys are supported at the moment.

0 commit comments

Comments
 (0)