Skip to content

Commit

Permalink
Merge pull request #5 from jhipster/master
Browse files Browse the repository at this point in the history
Update fork
  • Loading branch information
pmverma authored Jul 11, 2019
2 parents dc4b665 + 277ee35 commit 54e4b31
Show file tree
Hide file tree
Showing 437 changed files with 8,370 additions and 3,928 deletions.
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
open_collective: generator-jhipster
custom: https://www.jhipster.tech/sponsors/
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,17 @@ To provide all information we need, you should run `jhipster info` in the projec
copy/paste the result here.
The `.yo-rc.json` file generated in the root folder is mandatory for bug reports. This will help us to replicate the scenario.
You should remove any sensitive information like the rememberMe key or the jwtSecretKey key.
---
If you have a JDL please wrap it in below structure
<details>
<summary>JDL definitions</summary>
<pre>
JDL content here
</pre>
</details>
-->


##### **Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**

<!--
Expand Down
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
- docker
language: node_js
node_js:
- '10.15.3'
- '10.16.0'
addons:
apt:
sources:
Expand Down Expand Up @@ -52,6 +52,7 @@ env:
- JHI_DISABLE_WEBPACK_LOGS=true
- JHI_E2E_HEADLESS=true
- JHI_SCRIPTS=$TRAVIS_BUILD_DIR/test-integration/scripts
- NG_CLI_ANALYTICS="false"
matrix:
- JHI_APP=ngx-default JHI_PROFILE=prod JHI_PROTRACTOR=1 JHI_ENTITY=sql JHI_SONAR=1
- JHI_APP=ngx-psql-es-noi18n-mapsid JHI_PROFILE=prod JHI_PROTRACTOR=1 JHI_ENTITY=sqlfull
Expand Down
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "JHipster Mocha Tests",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"--timeout",
"999999",
"--reporter",
"spec",
"${workspaceFolder}/test"
],
"internalConsoleOptions": "openOnSessionStart"
},
{
"type": "node",
"request": "launch",
Expand Down
23 changes: 22 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Are you ready to contribute to JHipster? We'd love to have you on board, and we
- [Issues and Bugs](#issue)
- [Bug bounties](#bounties)
- [Feature Requests](#feature)
- [RFCs](#rfcs)
- [Submission Guidelines](#submit)
- [Generator development setup](#setup)
- [Coding Rules](#rules)
Expand Down Expand Up @@ -34,9 +35,29 @@ If you submitted a Pull Request that fixes a ticket with the "\$100" tag, then y
You can request a new feature by submitting a ticket to our [GitHub issues](https://github.com/jhipster/generator-jhipster/issues). If you
would like to implement a new feature then consider what kind of change it is:

- **Major Changes** that you wish to contribute to the project should be discussed first. Please open a ticket which clearly states that it is a feature request in the title and explain clearly what you want to achieve in the description, and the JHipster team will discuss with you what should be done in that ticket. You can then start working on a Pull Request.
- **Major Changes** that you wish to contribute to the project should be discussed first. Please open a ticket which clearly states that it is a feature request in the title and explain clearly what you want to achieve in the description, and the JHipster team will discuss with you what should be done in that ticket. You can then start working on a Pull Request. In order to communicate major changes proposals and receive reviews from the core team, you can also submit an RFC.
- **Small Changes** can be proposed without any discussion. Open up a ticket which clearly states that it is a feature request in the title. Explain your change in the description, and you can propose a Pull Request straight away.

## <a name="rfcs"></a> RFCs

Sometimes, major feature requests are "complex" or "substantial". In this case, Github Issues might not be the best tool to to present them because we will need a lot of going back and forth to reach a consensus.

So we ask that these feature request be put through a formal design process and have their specifications described in an "RFC" (request for comments) that will be validated by the team through a Pull Request Review.

The RFC process is intended to provide a consistent and controlled path for major features and directions of the project.

To submit an RFC follow those steps:

1. Discuss the RFC proposal with the core team through Github issues or other channels
2. Create the initial Github issue for the Feature Request if it doesn't already exist
3. Copy the `rfcs/0-jhipster-rfc-template.md` to `rfcs/${featureRequestIssueNumber}-my-feature-request-name.md`
4. Fill in the RFC, make sure to complete every required section
5. Submit the RFC as a Pull Request with the summary of the proposal in the PR description
6. Build consensus and integrate feedback from the reviewers
7. The Pull Request is either accepted (merged), rejected (closed) or postponed (given an "on hold" status)

Note: The JHipster RFC process is inspired by [Rust RFCs](https://rust-lang.github.io/rfcs/).

## <a name="submit"></a> Submission Guidelines

### [Submitting an Issue](https://opensource.guide/how-to-contribute/#opening-an-issue)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN \
apt-get install -y openjdk-11-jdk && \
update-java-alternatives -s java-1.11.0-openjdk-amd64 && \
# install node.js
wget https://nodejs.org/dist/v10.15.3/node-v10.15.3-linux-x64.tar.gz -O /tmp/node.tar.gz && \
wget https://nodejs.org/dist/v10.16.0/node-v10.16.0-linux-x64.tar.gz -O /tmp/node.tar.gz && \
tar -C /usr/local --strip-components 1 -xzf /tmp/node.tar.gz && \
# upgrade npm
npm install -g npm && \
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Support this project by becoming a sponsor! [Become a sponsor](https://opencolle
**Gold sponsors**

[![Okta][okta-image]][okta-url]
[Okta][okta-url]

[![Octo Consulting Group][octoconsulting-image]][octoconsulting-url]
[Octo Consulting Group][octoconsulting-url]

**Bronze sponsors**

Expand All @@ -43,6 +47,7 @@ Additional builds at [hipster-labs/jhipster-daily-builds](https://github.com/hip
| Type | Status |
| :------------------- | :----------------------------------------------------- |
| Docker | [![Build Status][img-docker]][azure-url] |
| Official | [![Build Status][img-official]][azure-url] |
| Angular.Maven | [![Build Status][img-angular-maven]][azure-url] |
| Angular.Maven.NoSQL | [![Build Status][img-angular-maven-nosql]][azure-url] |
| Angular.Gradle | [![Build Status][img-angular-gradle]][azure-url] |
Expand All @@ -55,13 +60,18 @@ Additional builds at [hipster-labs/jhipster-daily-builds](https://github.com/hip
| Microservices.JWT | [![Build Status][img-ms-jwt]][azure-url] |
| Microservices.OAuth2 | [![Build Status][img-ms-oauth2]][azure-url] |
| Microservices.UAA | [![Build Status][img-ms-uaa]][azure-url] |
| Monolith.OAuth2 | [![Build Status][img-monolith-oauth2]][azure-url] |
| Official OpenJDK 8 | [![Build Status][img-official-openjdk8]][azure-url] |
| Yarn | [![Build Status][img-yarn]][azure-url] |
| No Database | [![Build Status][img-nodatabase]][azure-url] |

## Analysis of the sample JHipster project

[![sonar-quality-gate][sonar-quality-gate]][sonar-url] [![sonar-coverage][sonar-coverage]][sonar-url] [![sonar-bugs][sonar-bugs]][sonar-url] [![sonar-vulnerabilities][sonar-vulnerabilities]][sonar-url]

[azure-url]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_build
[img-docker]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Docker.Image
[img-official]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Official
[img-angular-maven]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Angular.Maven
[img-angular-maven-nosql]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Angular.Maven.NoSQL
[img-angular-gradle]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Angular.Gradle
Expand All @@ -74,6 +84,10 @@ Additional builds at [hipster-labs/jhipster-daily-builds](https://github.com/hip
[img-ms-jwt]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Microservices.JWT
[img-ms-oauth2]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Microservices.OAuth2
[img-ms-uaa]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Microservices.UAA
[img-monolith-oauth2]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Monolith.OAuth2
[img-official-openjdk8]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Official.OpenJDK8
[img-yarn]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/Yarn
[img-nodatabase]: https://dev.azure.com/hipster-labs/jhipster-daily-builds/_apis/build/status/NoDatabase
[sonar-url]: https://sonarcloud.io/dashboard?id=io.github.jhipster.sample%3Ajhipster-sample-application
[sonar-quality-gate]: https://sonarcloud.io/api/project_badges/measure?project=io.github.jhipster.sample%3Ajhipster-sample-application&metric=alert_status
[sonar-coverage]: https://sonarcloud.io/api/project_badges/measure?project=io.github.jhipster.sample%3Ajhipster-sample-application&metric=coverage
Expand All @@ -93,6 +107,8 @@ Additional builds at [hipster-labs/jhipster-daily-builds](https://github.com/hip
[backers-url]: https://opencollective.com/generator-jhipster
[okta-image]: https://www.jhipster.tech/images/open-collective/okta.png
[okta-url]: https://developer.okta.com/signup?utm_source=JHipster&utm_medium=logo&utm_campaign=Gold-Sponsor
[octoconsulting-image]: https://www.jhipster.tech/images/open-collective/octoconsulting.png
[octoconsulting-url]: http://www.octoconsulting.com/
[forsyslab-image]: https://www.jhipster.tech/images/open-collective/forsyslab.jpg
[forsyslab-url]: https://forsyslab.com/
[cubaplatform-image]: https://www.jhipster.tech/images/open-collective/cubaplatform.png
Expand Down
3 changes: 2 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
JHI_DISABLE_WEBPACK_LOGS: true
JHI_E2E_HEADLESS: true
JHI_SCRIPTS: $(Build.Repository.LocalPath)/test-integration/scripts
NG_CLI_ANALYTICS: false

strategy:
matrix:
Expand Down Expand Up @@ -89,7 +90,7 @@ jobs:
#----------------------------------------------------------------------
- task: NodeTool@0
inputs:
versionSpec: '10.15.3'
versionSpec: '10.16.0'
displayName: 'TOOLS: install Node.js'
- script: |
if [[ $JHI_JDK = '11' ]]; then
Expand Down
41 changes: 29 additions & 12 deletions cli/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,37 @@
const chalk = require('chalk');
const jhipsterUtils = require('../generators/utils');

let customCommands = {};
const indexOfBlueprintArgv = process.argv.indexOf('--blueprint');
if (indexOfBlueprintArgv > -1) {
/* eslint-disable import/no-dynamic-require */
/* eslint-disable global-require */
const customCommands = loadBlueprintCommands();

const blueprint = jhipsterUtils.normalizeBlueprintName(process.argv[indexOfBlueprintArgv + 1]);
try {
customCommands = require(`${blueprint}/cli/commands`);
} catch (e) {
const msg = `No custom command found within blueprint: ${blueprint}`;
/* eslint-disable no-console */
console.info(`${chalk.green.bold('INFO!')} ${msg}`);
function loadBlueprintCommands() {
const blueprintNames = [];
const indexOfBlueprintArgv = process.argv.indexOf('--blueprint');
if (indexOfBlueprintArgv > -1) {
blueprintNames.push(process.argv[indexOfBlueprintArgv + 1]);
}
const indexOfBlueprintsArgv = process.argv.indexOf('--blueprints');
if (indexOfBlueprintsArgv > -1) {
blueprintNames.push(...process.argv[indexOfBlueprintsArgv + 1].split(','));
}
let result = {};
if (blueprintNames.length > 0) {
blueprintNames
.filter((v, i, a) => a.indexOf(v) === i)
.map(v => jhipsterUtils.normalizeBlueprintName(v))
.forEach(blueprint => {
/* eslint-disable import/no-dynamic-require */
/* eslint-disable global-require */
try {
const blueprintCommands = require(`${blueprint}/cli/commands`);
result = { ...result, ...blueprintCommands };
} catch (e) {
const msg = `No custom commands found within blueprint: ${blueprint}`;
/* eslint-disable no-console */
console.info(`${chalk.green.bold('INFO!')} ${msg}`);
}
});
}
return result;
}

const defaultCommands = {
Expand Down
6 changes: 5 additions & 1 deletion cli/import-jdl.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ const generateEntityFiles = (generator, entity, inFolder, env, shouldTriggerInst
command,
{
...options,
force: !options.interactive,
force: options.force || !options.interactive,
'skip-install': !shouldTriggerInstall
},
done
Expand Down Expand Up @@ -269,6 +269,10 @@ class JDLProcessor {
if (jhiCore.FileUtils.doesFileExist('.yo-rc.json')) {
logger.info('Found .yo-rc.json on path. This is an existing app');
const configuration = jhipsterUtils.getAllJhipsterConfig(null, true);
if (_.isUndefined(this.options.interactive)) {
logger.debug('Setting interactive true for existing apps');
this.options.interactive = true;
}
this.applicationType = configuration.applicationType;
this.baseName = configuration.baseName;
this.databaseType = configuration.databaseType || jhipsterUtils.getDBTypeFromDBValue(this.options.db);
Expand Down
10 changes: 6 additions & 4 deletions cli/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,14 @@ const initHelp = (program, cliName) => {
});

program.on('command:*', name => {
logger.error(`${chalk.yellow(name)} is not a known command. See '${chalk.white(`${cliName} --help`)}'.`);
console.error(chalk.red(`${chalk.yellow(name)} is not a known command. See '${chalk.white(`${cliName} --help`)}'.`));

const d = didYouMean(name.toString(), program.commands, '_name');
const cmd = Object.values(name).join('');
const availableCommands = program.commands.map(c => c._name);

if (d) {
logger.info(`Did you mean: ${chalk.yellow(d)}?`);
const suggestion = didYouMean(cmd, availableCommands);
if (suggestion) {
logger.info(`Did you mean ${chalk.yellow(suggestion)}?`);
}

process.exit(1);
Expand Down
Loading

0 comments on commit 54e4b31

Please sign in to comment.