-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add yo-rc.json * start migrating * rename generator files * add index.js * new generators * add tests * move server to dotnetcore * apply prettier * rework cypress * fix generator name * migrate blazor client * start migrating xamarin * fixes to xamarin * fixes to blazor * drop files-angular * comment common * cleanup dotnet.js * add bootstrap-dotnetcore * add angular snapshot * add cypress snapshot * add common snapshot * add dotnetcore test * add common snapshot * add server generator * compose bootstrap-dotnetcore with bootstrap-application * add snapshots * implement dotnetcore generator * ci adjusts * fix git command * move samples to generate-samples * samples adjusts * ci script adjust * move entity preparation to bootstrap-dotnetcore * drop entities-client generator * drop entity-i18n generator * drop languages generator * extract logo * add pluralize dependency * bootstrap-dotnetcore improvements * adjusts * add other side relationship * update jhipster branch * bootstrap and test adjusts * update jhipster branch * mock commands at tests. * fix path * improve script check * update jhipster branch * run generate-sample with entities * drop entity-server generator * dotnetcore adjusts * adjusts * Update generator.js * adjusts * continue on client error * fixes * adjusts * add dotnetcore configs * drop app generator * import dotnetcore config in server * add namespace config fallback * drop angular generator * fix * update snapshot * improve common * fix Directory.Packages.props * more adjusts * update jhipster branch * adjusts to client generator * disable readme * update jhipster branch * update snapshots * adjusts * adjusts * migrate entities-client to blazor * migrate entity-client to xamarin * adjusts. * drop sample tests * migrate terraform test * migrate dto tests. * migrate enum test * migrate service test * disable tests. * add blazor with dto test * extract docker generator * update jhipster branch * docker adjusts * replace docker-compose with docker compose * change client root * e2e adjusts * readd gateway insertion * print docker logs * update snapshots * change clientDistDir * disable docker healthcheck * use 5000 port * drop joschi/setup-jdk * load prodDatabaseType * reorganize blazor templates * add configOnly option to generate sample * move needle implementations * convert blazor needles * migrate xamarin needles * more adjusts * skip some cypress tests * Update generator.js * Update files.json * adjusts to docker * update snapshots * mssql container adjusts * replace postgres value with postgresql * migrate dotnetcore prompts * drop client prompts.js * drop needle server gateway * cleanup * database connection adjusts * revert * workflow adjusts * cleanup * client test adjusts * add devcontainer * cleanup * devcontainer * dev container * readd healthcheck * drop mssql docker compose file * drop eslintignore customization * drop clientAppRootDir * update jhipster branch * change temporaryDir * update jhipster branch * fix template * update jhipster branch * update jhipster branch * drop angular from .yo-rc * cleanups and lint fixes * disable healthcheck * update jhipster branch * xamarin adjusts * cleanup * add npm test script to root * update jhipster branch * use npm test * fix error * update jhipster branch * update snapshot * Update files-xamarin.js * enable client errors at jwt workflow * update jhipster branch * add app-react entities sample * update snapshot * remove clientFramework from microservice sample * remove one-to-one relationships * add cypress screenshots * convert readme to jhi file * workaround pagination bug * update os and actions/checkout * update jhipster branch
- Loading branch information
Showing
626 changed files
with
17,541 additions
and
34,182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
}, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
117 changes: 117 additions & 0 deletions
117
.blueprint/generate-sample/templates/samples/jdl-default/app-react.jdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.