Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
13ec2ff
Upgrade to JHipster 8 (#1358)
mshima Oct 7, 2023
a636a9a
force node 18.17.1 (#1386)
mshima Oct 7, 2023
d4d966a
fix cli with jhipster-dotnetcore folder (#1385)
mshima Oct 7, 2023
2d4f888
fix dotnet command (#1384)
nicolas63 Oct 7, 2023
b8b3290
fix dockerfile (#1387)
nicolas63 Oct 7, 2023
b64526c
Update documentation for jhipster v8 (#1388)
nicolas63 Oct 7, 2023
a4615f0
Fix node version
nicolas63 Oct 8, 2023
28e6b69
Update dependabot.yml
nicolas63 Dec 21, 2024
89579ab
Update dependabot.yml
nicolas63 Dec 21, 2024
50d19d6
Rename Directory.Packages.props.ejs to Directory.Packages.props
nicolas63 Dec 21, 2024
53307b0
Update fakecsproj.csproj
nicolas63 Dec 21, 2024
ea63249
Update dependabot.yml
nicolas63 Dec 21, 2024
84e07d9
Update dependabot.yml
nicolas63 Dec 21, 2024
535eafa
Delete .github/workflows directory
nicolas63 Dec 21, 2024
6d4c449
Add
nicolas63 Dec 21, 2024
3207b0e
Update dependabot.yml
nicolas63 Dec 21, 2024
7ce014b
Update dependabot.yml
nicolas63 Dec 21, 2024
56a9600
add
nicolas63 Dec 21, 2024
4d56cf9
add
nicolas63 Dec 21, 2024
7b37ce5
ad
nicolas63 Dec 21, 2024
ab04199
sdq
nicolas63 Dec 21, 2024
2f299b6
qs
nicolas63 Dec 21, 2024
0fe6795
zs
nicolas63 Dec 21, 2024
4c1f16b
sds
nicolas63 Dec 21, 2024
5c1f50b
dssq
nicolas63 Dec 21, 2024
c2be2e5
dsqs
nicolas63 Dec 21, 2024
d92a278
sqs
nicolas63 Dec 21, 2024
90a6875
ds
nicolas63 Dec 21, 2024
eadb934
ssd
nicolas63 Dec 21, 2024
4497ed5
dqdq
nicolas63 Dec 21, 2024
c56eaeb
sd
nicolas63 Dec 21, 2024
97c3a68
sqd
nicolas63 Dec 21, 2024
d72403c
Bump the nuget-dependencies group across 1 directory with 4 updates
dependabot[bot] Dec 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 8 additions & 17 deletions generators/client/files-vue.js → .blueprint/cli/commands.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -17,20 +17,11 @@
* limitations under the License.
*/

const constants = require('../generator-dotnetcore-constants.cjs');

/* Constants use throughout */
const SERVER_SRC_DIR = constants.SERVER_SRC_DIR;


function updateHomeTitle() {
this.replaceContent(`${SERVER_SRC_DIR}${this.mainClientAppDir}/app/core/home/home.vue`, 'Java', '.Net Core', false);
}

function writeFiles() {
updateHomeTitle.call(this);
}

module.exports = {
writeFiles,
const defaultCommands = {
'generate-sample': {
desc: 'Generate a test sample',
blueprint: '@jhipster/jhipster-dev',
},
};

export default defaultCommands;
42 changes: 42 additions & 0 deletions .blueprint/generate-sample/command.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* Copyright 2013-2023 the original author or authors from the JHipster project.
*
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { GENERATOR_APP } from 'generator-jhipster/generators';
/**
* @type {import('generator-jhipster').JHipsterCommandDefinition}
*/
const command = {
arguments: {
sampleName: {
type: String,
},
},
options: {
withEntities: {
type: Boolean,
scope: 'generator',
},
configOnly: {
type: Boolean,
scope: 'generator',
},
},
import: [GENERATOR_APP],
};

export default command;
109 changes: 109 additions & 0 deletions .blueprint/generate-sample/generator.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
import { readdir, stat } from 'node:fs/promises';
import BaseGenerator from 'generator-jhipster/generators/base';
import command from './command.mjs';
import { statSync } from 'node:fs';

export default class extends BaseGenerator {
sampleName;
jdlSample;
withEntities;
configOnly;

get [BaseGenerator.INITIALIZING]() {
return this.asInitializingTaskGroup({
async initializeOptions() {
this.parseJHipsterCommand(command);
},
});
}

get [BaseGenerator.PROMPTING]() {
return this.asPromptingTaskGroup({
async askForSample() {
if (!this.sampleName) {
const answers = await this.prompt({
type: 'list',
name: 'sampleName',
message: 'which sample do you want to generate?',
choices: async () => readdir(this.templatePath('samples')),
});
this.sampleName = answers.sampleName;
}
},
});
}

get [BaseGenerator.WRITING]() {
return this.asWritingTaskGroup({
async copySample() {
let isDir = false;
let jdlFile = false;
try {
const pathStat = await stat(this.templatePath(`samples/${this.sampleName}`));
isDir = pathStat.isDirectory();
jdlFile = pathStat.isFile();
} catch (error) {
try {
this.sampleName += '.jdl';
jdlFile = (await stat(this.templatePath(`samples/${this.sampleName}`))).isFile();
} catch {
throw error;
}
}

if (jdlFile) {
this.jdlSample = this.sampleName;
this.copyTemplate(`samples/${this.sampleName}`, this.sampleName, { noGlob: true });
} else if (isDir) {
this.copyTemplate(`samples/${this.sampleName}/.yo-rc.json`, '.yo-rc.json', { noGlob: true });
} else {
throw new Error(`Sample ${this.sampleName} was not identified`);
}
},
async jdlEntities() {
if (this.withEntities) {
if (this.sampleName.includes('-mongo-')) {
this.jdlSample = 'app_mongo.jdl';
} else if (this.sampleName.includes('-react-')) {
this.jdlSample = 'app-react.jdl';
} else {
this.jdlSample = 'app.jdl';
}
this.copyTemplate(`samples/jdl-default/${this.jdlSample}`, this.jdlSample, { noGlob: true });
}
},
});
}

get [BaseGenerator.END]() {
return this.asEndTaskGroup({
async generateSample() {
if (this.jdlSample && !this.configOnly) {
await this.composeWithJHipster('jdl', {
generatorArgs: [this.jdlSample],
generatorOptions: {
jsonOnly: true,
},
});
}
},
async generateApp() {
if (this.configOnly) {
return;
}

await this.composeWithJHipster('app', {
generatorOptions: {
skipJhipsterDependencies: true,
insight: false,
skipChecks: true,
skipInstall: true,
},
});
},
async jhipsterInfo() {
await this.composeWithJHipster('info');
},
});
}
}
2 changes: 2 additions & 0 deletions .blueprint/generate-sample/index.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default } from './generator.mjs';
export { default as command } from './command.mjs';
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,9 @@
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [
{
"name": "generator-jhipster-dotnetcore",
"version": "3.9.1"
}
],
"blueprints": [
{
"name": "generator-jhipster-dotnetcore",
"version": "2.0.0"
"name": "generator-jhipster-dotnetcore"
}
]
},
Expand Down
117 changes: 117 additions & 0 deletions .blueprint/generate-sample/templates/samples/jdl-default/app-react.jdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
entity Region {
regionName String
}

entity Country {
countryName String
}

// an ignored comment
/** not an ignored comment */
entity Location {
streetAddress String,
postalCode String,
city String,
stateProvince String
}

entity Department {
departmentName String required
}

/**
* PieceOfWork entity.
* @author The JHipster team.
*/
entity PieceOfWork {
title String,
description String
}

/**
* The Employee entity.
*/
entity Employee {
/**
* The firstname attribute.
*/
firstName String,
lastName String,
email String,
phoneNumber String,
hireDate Instant,
salary Long,
commissionPct Long
}

entity Job {
jobTitle String,
minSalary Long,
maxSalary Long
}

entity JobHistory {
startDate Instant,
endDate Instant,
language Language
}

enum Language {
FRENCH, ENGLISH, SPANISH
}



relationship OneToOne {
Country{region} to Region
}

relationship OneToOne {
Location{country} to Country
}

relationship OneToOne {
Department{location} to Location
}

// defining multiple OneToMany relationships with comments
relationship OneToMany {
Employee to Job{employee},
/**
* A relationship
*/
Department to
/**
* Another side of the same relationship
*/
Employee{department}
}

relationship ManyToOne {
Employee{manager} to Employee
}

// defining multiple oneToOne relationships
relationship OneToOne {
JobHistory{job} to Job,
JobHistory{department} to Department,
JobHistory{employee} to Employee
}

relationship ManyToMany {
Job{chore(title)} to PieceOfWork{job}
}

// Set pagination options
// .Net does not generates link header for pagination.
// paginate JobHistory, Employee with infinite-scroll
// paginate Job with pagination

// Use Data Transfert Objects (DTO)
dto * with mapstruct

// Set service options to all except few
service all with serviceImpl except Employee, Job

// Set an angular suffix
// angularSuffix * with mySuffix
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,9 @@
"entitySuffix": "",
"dtoSuffix": "DTO",
"testFrameworks": ["cypress"],
"otherModules": [
{
"name": "generator-jhipster-dotnetcore",
"version": "3.9.1"
}
],
"blueprints": [
{
"name": "generator-jhipster-dotnetcore",
"version": "2.0.0"
"name": "generator-jhipster-dotnetcore"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
"packageName": "JhipsterSampleApplication",
"authenticationType": "jwt",
"serverPort": "5000",
"databaseType": "postgres",
"databaseType": "sqllite",
"prodDatabaseType": "mysql",
"cqrsEnabled": true,
"enableTranslation": false,
"namespace": "JhipsterSampleApplication",
"jhipsterVersion": "7.9.3",
Expand All @@ -19,16 +20,9 @@
"entitySuffix": "",
"dtoSuffix": "DTO",
"testFrameworks": ["cypress"],
"otherModules": [
{
"name": "generator-jhipster-dotnetcore",
"version": "3.9.1"
}
],
"blueprints": [
{
"name": "generator-jhipster-dotnetcore",
"version": "2.0.0"
"name": "generator-jhipster-dotnetcore"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,9 @@
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [
{
"name": "generator-jhipster-dotnetcore",
"version": "3.9.1"
}
],
"blueprints": [
{
"name": "generator-jhipster-dotnetcore",
"version": "2.0.0"
"name": "generator-jhipster-dotnetcore"
}
]
},
Expand Down
Loading