Skip to content

Commit

Permalink
Merge pull request #486 from juliensadaoui/jhipster-6.10.4
Browse files Browse the repository at this point in the history
Sync with JHipster 6.10.4
  • Loading branch information
juliensadaoui authored Nov 1, 2020
2 parents 8d681b6 + c12b1dd commit 431d961
Show file tree
Hide file tree
Showing 85 changed files with 16,503 additions and 9,805 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"plugins": ["@typescript-eslint/tslint"],
"extends": ["jhipster"],
"parserOptions": {
"project": "./tsconfig.json"
"project": "./tsconfig.base.json"
},
"rules": {
"@typescript-eslint/tslint/config": [
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ local.properties

# STS-specific
/.sts4-cache/*

######################
# Intellij
# IntelliJ
######################
.idea/
*.iml
Expand Down
2 changes: 1 addition & 1 deletion .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
'{,src/**/}*.{md,json,ts,css,scss,yml}': ['prettier --write', 'git add']
'{,src/**/}*.{json,md,yml,ts,css,scss}': ['prettier --write', 'git add']
};
2 changes: 1 addition & 1 deletion .yo-rc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"generator-jhipster": {
"jhipsterVersion": "6.8.0",
"jhipsterVersion": "6.10.4",
"baseName": "JHipsterRegistry",
"packageName": "io.github.jhipster.registry",
"packageFolder": "io/github/jhipster/registry",
Expand Down
25,014 changes: 15,650 additions & 9,364 deletions package-lock.json

Large diffs are not rendered by default.

132 changes: 65 additions & 67 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,92 +7,90 @@
"node_modules"
],
"dependencies": {
"@angular/common": "9.0.4",
"@angular/compiler": "9.0.4",
"@angular/core": "9.0.4",
"@angular/forms": "9.0.4",
"@angular/localize": "9.0.4",
"@angular/platform-browser": "9.0.4",
"@angular/platform-browser-dynamic": "9.0.4",
"@angular/router": "9.0.4",
"@fortawesome/angular-fontawesome": "0.6.0",
"@fortawesome/fontawesome-svg-core": "1.2.26",
"@fortawesome/free-solid-svg-icons": "5.12.0",
"@ng-bootstrap/ng-bootstrap": "6.0.0",
"@ngx-translate/core": "11.0.1",
"@ngx-translate/http-loader": "4.0.0",
"bootstrap": "4.4.1",
"moment": "2.24.0",
"ng-jhipster": "0.12.0",
"ngx-cookie": "4.0.2",
"ngx-infinite-scroll": "8.0.1",
"@angular/common": "10.0.0",
"@angular/compiler": "10.0.0",
"@angular/core": "10.0.0",
"@angular/forms": "10.0.0",
"@angular/localize": "10.0.0",
"@angular/platform-browser": "10.0.0",
"@angular/platform-browser-dynamic": "10.0.0",
"@angular/router": "10.0.0",
"@fortawesome/angular-fontawesome": "0.6.1",
"@fortawesome/fontawesome-svg-core": "1.2.29",
"@fortawesome/free-solid-svg-icons": "5.13.1",
"@ng-bootstrap/ng-bootstrap": "6.1.0",
"@ngx-translate/core": "12.1.2",
"@ngx-translate/http-loader": "5.0.0",
"bootstrap": "4.5.0",
"moment": "2.27.0",
"ng-jhipster": "0.15.0",
"ngx-cookie-service": "3.0.4",
"ngx-infinite-scroll": "9.0.0",
"ngx-webstorage": "5.0.0",
"rxjs": "6.5.3",
"swagger-ui-dist": "3.24.3",
"tslib": "1.10.0",
"zone.js": "0.10.2"
"rxjs": "6.5.5",
"swagger-ui-dist": "3.25.1",
"tslib": "2.0.0",
"zone.js": "0.10.3"
},
"devDependencies": {
"@angular/cli": "9.0.4",
"@angular/compiler-cli": "9.0.4",
"@ngtools/webpack": "9.0.4",
"@openapitools/openapi-generator-cli": "1.0.10-4.2.3",
"@types/jest": "24.0.23",
"@types/node": "12.12.17",
"@typescript-eslint/eslint-plugin": "2.11.0",
"@typescript-eslint/eslint-plugin-tslint": "2.11.0",
"@typescript-eslint/parser": "2.11.0",
"autoprefixer": "9.7.3",
"base-href-webpack-plugin": "2.0.0",
"@angular/cli": "10.0.0",
"@angular/compiler-cli": "10.0.0",
"@ngtools/webpack": "10.0.0",
"@openapitools/openapi-generator-cli": "1.0.13-4.3.1",
"@types/jest": "26.0.3",
"@types/node": "13.13.4",
"@typescript-eslint/eslint-plugin": "2.30.0",
"@typescript-eslint/eslint-plugin-tslint": "2.30.0",
"@typescript-eslint/parser": "2.30.0",
"autoprefixer": "9.8.4",
"browser-sync": "2.26.7",
"browser-sync-webpack-plugin": "2.2.2",
"codelyzer": "5.2.0",
"copy-webpack-plugin": "5.1.1",
"css-loader": "3.3.2",
"eslint": "6.7.2",
"codelyzer": "5.2.2",
"copy-webpack-plugin": "6.0.2",
"css-loader": "3.6.0",
"eslint": "6.8.0",
"eslint-config-jhipster": "0.0.1",
"eslint-config-prettier": "6.7.0",
"eslint-loader": "3.0.3",
"file-loader": "5.0.2",
"eslint-config-prettier": "6.11.0",
"eslint-loader": "4.0.2",
"file-loader": "6.0.0",
"friendly-errors-webpack-plugin": "1.7.0",
"generator-jhipster": "6.8.0",
"html-loader": "0.5.5",
"html-webpack-plugin": "3.2.0",
"husky": "3.1.0",
"jest": "24.9.0",
"jest-date-mock": "1.0.7",
"jest-junit": "10.0.0",
"jest-preset-angular": "8.0.0",
"generator-jhipster": "6.10.4",
"html-loader": "1.1.0",
"html-webpack-plugin": "4.3.0",
"husky": "4.2.5",
"jest": "26.1.0",
"jest-date-mock": "1.0.8",
"jest-junit": "11.0.1",
"jest-preset-angular": "8.2.1",
"jest-sonar-reporter": "2.0.0",
"lint-staged": "8.2.1",
"mini-css-extract-plugin": "0.8.0",
"moment-locales-webpack-plugin": "1.1.2",
"mini-css-extract-plugin": "0.9.0",
"moment-locales-webpack-plugin": "1.2.0",
"optimize-css-assets-webpack-plugin": "5.0.3",
"postcss-loader": "3.0.0",
"prettier": "1.19.1",
"reflect-metadata": "0.1.13",
"rimraf": "3.0.0",
"sass": "1.23.7",
"sass-loader": "8.0.0",
"prettier": "2.1.2",
"rimraf": "3.0.2",
"sass": "1.26.9",
"sass-loader": "8.0.2",
"simple-progress-webpack-plugin": "1.1.2",
"style-loader": "1.0.1",
"terser-webpack-plugin": "2.3.0",
"style-loader": "1.2.1",
"terser-webpack-plugin": "3.0.6",
"thread-loader": "2.1.3",
"to-string-loader": "1.1.6",
"ts-loader": "6.2.1",
"tslint": "6.0.0",
"typescript": "3.7.5",
"webpack": "4.41.2",
"webpack-bundle-analyzer": "3.6.0",
"webpack-cli": "3.3.10",
"webpack-dev-server": "3.9.0",
"ts-loader": "7.0.5",
"tslint": "6.1.2",
"typescript": "3.9.5",
"webpack": "4.43.0",
"webpack-bundle-analyzer": "3.8.0",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0",
"webpack-merge": "4.2.2",
"webpack-notifier": "1.8.0",
"workbox-webpack-plugin": "4.3.1",
"workbox-webpack-plugin": "5.1.3",
"write-file-webpack-plugin": "4.5.1"
},
"engines": {
"node": ">=8.9.0"
"node": ">=12.16.1"
},
"scripts": {
"prettier:format": "prettier --write \"{,src/**/}*.{md,json,ts,css,scss,yml}\"",
Expand Down
50 changes: 24 additions & 26 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
<maven.version>3.3.9</maven.version>
<java.version>11</java.version>
<node.version>v12.16.1</node.version>
<npm.version>6.14.2</npm.version>
<npm.version>6.14.5</npm.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<project.testresult.directory>${project.build.directory}/test-results</project.testresult.directory>
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<argLine>-Djava.security.egd=file:/dev/./urandom -Xmx256m</argLine>
<m2e.apt.activation>jdt_apt</m2e.apt.activation>
<run.addResources>false</run.addResources>
Expand All @@ -28,16 +30,16 @@
<profile.tls />

<!-- Dependency versions -->
<jhipster-dependencies.version>3.6.0</jhipster-dependencies.version>
<jhipster-dependencies.version>3.9.0</jhipster-dependencies.version>
<!-- The spring-boot version should match the one managed by
https://mvnrepository.com/artifact/io.github.jhipster/jhipster-dependencies/${jhipster-dependencies.version} -->
<spring-boot.version>2.2.5.RELEASE</spring-boot.version>
<archunit-junit5.version>0.13.1</archunit-junit5.version>
<spring-boot.version>2.2.7.RELEASE</spring-boot.version>
<archunit-junit5.version>0.14.1</archunit-junit5.version>
<mapstruct.version>1.3.1.Final</mapstruct.version>
<!-- Plugin versions -->
<maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
<maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
<maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version>
<maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>
<maven-failsafe-plugin.version>3.0.0-M4</maven-failsafe-plugin.version>
Expand All @@ -46,12 +48,12 @@
<maven-surefire-plugin.version>3.0.0-M4</maven-surefire-plugin.version>
<maven-war-plugin.version>3.2.3</maven-war-plugin.version>
<maven-checkstyle.version>3.1.1</maven-checkstyle.version>
<checkstyle.version>8.29</checkstyle.version>
<checkstyle.version>8.32</checkstyle.version>
<spring-nohttp-checkstyle.version>0.0.4.RELEASE</spring-nohttp-checkstyle.version>
<frontend-maven-plugin.version>1.9.1</frontend-maven-plugin.version>
<frontend-maven-plugin.version>1.10.0</frontend-maven-plugin.version>
<git-commit-id-plugin.version>4.0.0</git-commit-id-plugin.version>
<jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
<jib-maven-plugin.version>2.0.0</jib-maven-plugin.version>
<jib-maven-plugin.version>2.4.0</jib-maven-plugin.version>
<lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
<properties-maven-plugin.version>1.0.0</properties-maven-plugin.version>
<sonar-maven-plugin.version>3.7.0.1746</sonar-maven-plugin.version>
Expand Down Expand Up @@ -99,11 +101,6 @@
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-afterburner</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
Expand Down Expand Up @@ -430,6 +427,7 @@
<version>${maven-war-plugin.version}</version>
<executions>
<execution>
<id>default-war</id>
<goals>
<goal>war</goal>
</goals>
Expand All @@ -439,15 +437,15 @@
<configuration>
<warSourceIncludes>WEB-INF/**,META-INF/**</warSourceIncludes>
<failOnMissingWebXml>false</failOnMissingWebXml>
<warSourceDirectory>target/classes/static/</warSourceDirectory>
<webResources>
<resource>
<directory>src/main/webapp</directory>
<includes>
<include>WEB-INF/**</include>
</includes>
</resource>
</webResources>
<warSourceDirectory>target/classes/static/</warSourceDirectory>
<webResources>
<resource>
<directory>src/main/webapp</directory>
<includes>
<include>WEB-INF/**</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -556,7 +554,7 @@
<image>adoptopenjdk:11-jre-hotspot</image>
</from>
<to>
<image>jhipsterregistry:latest</image>
<image>jhipster-registry:latest</image>
</to>
<container>
<entrypoint>
Expand Down Expand Up @@ -628,8 +626,8 @@
<version>[${maven.version},)</version>
</requireMavenVersion>
<requireJavaVersion>
<message>You are running an incompatible version of Java. JHipster supports JDK 8 to 13.</message>
<version>[1.8,14)</version>
<message>You are running an incompatible version of Java. JHipster supports JDK 8 to 14.</message>
<version>[1.8,15)</version>
</requireJavaVersion>
</rules>
</configuration>
Expand Down Expand Up @@ -929,7 +927,7 @@
</build>
<properties>
<!-- default Spring profiles -->
<spring.profiles.active>prod${profile.swagger}</spring.profiles.active>
<spring.profiles.active>prod${profile.swagger}${profile.tls}</spring.profiles.active>
</properties>
</profile>
<profile>
Expand Down
2 changes: 1 addition & 1 deletion src/main/docker/sonar.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '2'
services:
jhipsterregistry-sonar:
image: sonarqube:8.2-community
image: sonarqube:8.3.1-community
ports:
- 9001:9000
- 9092:9092
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ public AfterburnerModule afterburnerModule() {
* Module for serialization/deserialization of RFC7807 Problem.
*/
@Bean
ProblemModule problemModule() {
public ProblemModule problemModule() {
return new ProblemModule();
}

/*
* Module for serialization/deserialization of ConstraintViolationProblem.
*/
@Bean
ConstraintViolationProblemModule constraintViolationProblemModule() {
public ConstraintViolationProblemModule constraintViolationProblemModule() {
return new ConstraintViolationProblemModule();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package io.github.jhipster.registry.config;

import io.github.jhipster.config.JHipsterConstants;
import io.github.jhipster.config.JHipsterProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.http.CacheControl;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.concurrent.TimeUnit;

@Configuration
@Profile({JHipsterConstants.SPRING_PROFILE_PRODUCTION})
public class StaticResourcesWebConfiguration implements WebMvcConfigurer {

protected static final String[] RESOURCE_LOCATIONS = new String[]{"classpath:/static/app/", "classpath:/static/content/", "classpath:/static/i18n/"};
protected static final String[] RESOURCE_PATHS = new String[]{"/app/*", "/content/*", "/i18n/*"};

private final JHipsterProperties jhipsterProperties;

public StaticResourcesWebConfiguration(JHipsterProperties jHipsterProperties) {
this.jhipsterProperties = jHipsterProperties;
}

@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
ResourceHandlerRegistration resourceHandlerRegistration = appendResourceHandler(registry);
initializeResourceHandler(resourceHandlerRegistration);
}

protected ResourceHandlerRegistration appendResourceHandler(ResourceHandlerRegistry registry) {
return registry.addResourceHandler(RESOURCE_PATHS);
}

protected void initializeResourceHandler(ResourceHandlerRegistration resourceHandlerRegistration) {
resourceHandlerRegistration.addResourceLocations(RESOURCE_LOCATIONS).setCacheControl(getCacheControl());
}

protected CacheControl getCacheControl() {
return CacheControl.maxAge(getJHipsterHttpCacheProperty(), TimeUnit.DAYS).cachePublic();
}

private int getJHipsterHttpCacheProperty() {
return jhipsterProperties.getHttp().getCache().getTimeToLiveInDays();
}

}
Loading

0 comments on commit 431d961

Please sign in to comment.