Skip to content

Commit

Permalink
update generator-jhipster to 8.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jhipster-bot committed Dec 23, 2024
1 parent 615564e commit d6ad5a6
Show file tree
Hide file tree
Showing 9 changed files with 1,625 additions and 954 deletions.
27 changes: 24 additions & 3 deletions .blueprint/generate-sample/command.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
* limitations under the License.
*/
import { GENERATOR_APP } from 'generator-jhipster/generators';
import { getGithubSamplesGroups } from 'generator-jhipster/testing';
import { getGithubSamplesGroup, getGithubSamplesGroups } from 'generator-jhipster/testing';

const DEFAULT_SAMPLES_GROUP = 'samples';

/**
* @type {import('generator-jhipster').JHipsterCommandDefinition}
Expand All @@ -34,15 +36,34 @@ const command = {
cli: {
type: String,
},
default: 'samples',
scope: 'generator',
},
samplesGroup: {
description: 'Samples group to lookup',
cli: {
type: String,
},
prompt: gen => ({
when: !gen.all && !gen.sampleName,
type: 'list',
message: 'which sample group do you want to lookup?',
choices: async () => getGithubSamplesGroups(gen.templatePath(gen.samplesFolder ?? '')),
default: DEFAULT_SAMPLES_GROUP,
}),
configure: gen => {
gen.samplesGroup = DEFAULT_SAMPLES_GROUP;
},
scope: 'generator',
},
sampleName: {
prompt: gen => ({
when: !gen.all,
type: 'list',
message: 'which sample do you want to generate?',
choices: async () => getGithubSamplesGroups(gen.templatePath(gen.samplesFolder)),
choices: async answers => {
const samples = await getGithubSamplesGroup(gen.templatePath(), answers.samplesFolder ?? gen.samplesFolder);
return Object.keys(samples.samples);
},
}),
scope: 'generator',
},
Expand Down
19 changes: 12 additions & 7 deletions .blueprint/generate-sample/generator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ import BaseGenerator from 'generator-jhipster/generators/base';
import { getGithubSamplesGroup } from 'generator-jhipster/testing';

export default class extends BaseGenerator {
/** @type {string | undefined} */
samplesFolder;
/** @type {string} */
samplesGroup;
/** @type {string} */
sampleName;
/** @type {boolean} */
all;
/** @type {string} */
samplesFolder;
/** @type {string} */
sampleType;
/** @type {string} */
sampleFile;
Expand All @@ -25,23 +27,26 @@ export default class extends BaseGenerator {
get [BaseGenerator.WRITING]() {
return this.asWritingTaskGroup({
async copySample() {
const { samplesFolder, all, sampleName } = this;
const { samplesFolder, samplesGroup, all, sampleName } = this;
const samplesPath = samplesFolder ? join(samplesFolder, samplesGroup) : samplesGroup;
if (all) {
this.copyTemplate(`${samplesFolder}/*.jdl`, '');
this.copyTemplate(`${samplesPath}/*.jdl`, '');
this.sampleType = 'jdl';
} else if (extname(sampleName) === '.jdl') {
this.copyTemplate(join(samplesFolder, sampleName), sampleName, { noGlob: true });
this.copyTemplate(join(samplesPath, sampleName), sampleName, { noGlob: true });
this.sampleType = 'jdl';
} else {
const { samples } = await getGithubSamplesGroup(this.templatePath(), samplesFolder);
const { samples } = await getGithubSamplesGroup(this.templatePath(), samplesPath);
const {
'sample-type': sampleType,
'sample-file': sampleFile = sampleName,
'sample-folder': sampleFolder = samplesFolder,
'sample-folder': sampleFolder = samplesPath,
generatorOptions,
} = samples[sampleName];

this.generatorOptions = generatorOptions;
this.sampleType = sampleType;

if (sampleType === 'jdl') {
const jdlFile = `${sampleFile}.jdl`;
this.copyTemplate(join(sampleFolder, jdlFile), jdlFile, { noGlob: true });
Expand Down
108 changes: 54 additions & 54 deletions .blueprint/github-build-matrix/__snapshots__/generator.spec.mjs.snap

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,8 @@ Desktop.ini
######################
# Code coverage
######################
/coverage/
/.nyc_output/
coverage/
.nyc_output/

# added by generate-blueprint:
generators/**/package-lock.json
2 changes: 1 addition & 1 deletion .yo-rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
}
},
"githubWorkflows": true,
"jhipsterVersion": "8.7.3",
"jhipsterVersion": "8.8.0",
"js": true,
"localBlueprint": false,
"packageJsonType": "module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ exports[`SubGenerator bootstrap-application of nodejs JHipster blueprint > run >
"cliName": undefined,
"clientBundler": "webpack",
"clientBundlerAny": true,
"clientBundlerExperimentalEsbuild": false,
"clientBundlerVite": false,
"clientBundlerWebpack": true,
"clientDistDir": "server/dist/static/",
Expand All @@ -62,7 +63,7 @@ exports[`SubGenerator bootstrap-application of nodejs JHipster blueprint > run >
"clientSrcDir": "client/src/",
"clientTestDir": "client/test/",
"clientTestFrameworks": undefined,
"clientTestFrameworksAny": true,
"clientTestFrameworksAny": false,
"clientTestFrameworksCypress": false,
"clientTheme": "none",
"clientThemeDark": false,
Expand All @@ -75,9 +76,10 @@ exports[`SubGenerator bootstrap-application of nodejs JHipster blueprint > run >
"customizeTemplatePaths": [],
"cypressTests": false,
"dasherizedBaseName": "jhipster",
"databaseMigration": undefined,
"databaseMigrationAny": undefined,
"databaseMigration": "liquibase",
"databaseMigrationAny": true,
"databaseMigrationLiquibase": true,
"databaseMigrationNo": false,
"databaseType": "sql",
"databaseTypeAny": true,
"databaseTypeCassandra": false,
Expand All @@ -88,15 +90,15 @@ exports[`SubGenerator bootstrap-application of nodejs JHipster blueprint > run >
"databaseTypeSql": true,
"dbPortValue": undefined,
"defaultEnvironment": undefined,
"defaultEnvironmentAny": undefined,
"defaultEnvironmentDev": undefined,
"defaultEnvironmentProd": undefined,
"defaultEnvironmentAny": false,
"defaultEnvironmentDev": false,
"defaultEnvironmentProd": false,
"defaultPackaging": undefined,
"defaultPackagingAny": undefined,
"defaultPackagingJar": undefined,
"defaultPackagingWar": undefined,
"defaultPackagingAny": false,
"defaultPackagingJar": false,
"defaultPackagingWar": false,
"devDatabaseName": "jhipster",
"devDatabasePassword": "password",
"devDatabasePassword": "",
"devDatabaseType": "postgresql",
"devDatabaseTypeH2Any": false,
"devDatabaseTypeH2Disk": false,
Expand All @@ -113,14 +115,14 @@ exports[`SubGenerator bootstrap-application of nodejs JHipster blueprint > run >
"devJdbcUrl": "jdbc:postgresql://localhost:5432/jhipster",
"devLiquibaseUrl": "jdbc:postgresql://localhost:5432/jhipster",
"devR2dbcUrl": undefined,
"devServerPort": undefined,
"devServerPort": 4200,
"devServerPortProxy": 9000,
"dockerContainers": {
"apache/kafka-native": "apache-kafka-native-placeholder",
"apachepulsar/pulsar": "apachepulsar-pulsar-placeholder",
"cassandra": "cassandra-placeholder",
"cassandraImage": "cassandra-image-placeholder",
"cassandraTag": "cassandra-tag-placeholder",
"confluentinc/cp-kafka": "confluentinc-cp-kafka-placeholder",
"confluentinc/cp-zookeeper": "confluentinc-cp-zookeeper-placeholder",
"consul": "consul-placeholder",
"consulConfigLoader": "consul-config-loader-placeholder",
"consulConfigLoaderImage": "consul-config-loader-image-placeholder",
Expand Down Expand Up @@ -235,9 +237,6 @@ exports[`SubGenerator bootstrap-application of nodejs JHipster blueprint > run >
"zipkin": "zipkin-placeholder",
"zipkinImage": "zipkin-image-placeholder",
"zipkinTag": "zipkin-tag-placeholder",
"zookeeper": "zookeeper-placeholder",
"zookeeperImage": "zookeeper-image-placeholder",
"zookeeperTag": "zookeeper-tag-placeholder",
},
"dockerServicesDir": "docker/",
"documentationArchiveUrl": "https://www.jhipster.tech/documentation-archive/vJHIPSTER_VERSION",
Expand Down Expand Up @@ -342,6 +341,7 @@ exports[`SubGenerator bootstrap-application of nodejs JHipster blueprint > run >
"testng": "'TESTNG-VERSION'",
},
"javaManagedProperties": {},
"javaNodeBuildPaths": [],
"javaPackageSrcDir": "src/main/java/com/mycompany/myapp/",
"javaPackageTestDir": "src/test/java/com/mycompany/myapp/",
"javaProperties": {},
Expand Down Expand Up @@ -396,16 +396,16 @@ exports[`SubGenerator bootstrap-application of nodejs JHipster blueprint > run >
"packageJsonNodeEngine": undefined,
"packageJsonScripts": {},
"packageJsonType": undefined,
"packageJsonTypeAny": undefined,
"packageJsonTypeCommonjs": undefined,
"packageJsonTypeModule": undefined,
"packageJsonTypeAny": false,
"packageJsonTypeCommonjs": false,
"packageJsonTypeModule": false,
"packageName": "com.mycompany.myapp",
"pages": [],
"prettierExtensions": "md,json,yml,html,cjs,mjs,js,ts,tsx,css,scss,java",
"prettierJava": undefined,
"prettierTabWidth": undefined,
"prodDatabaseName": "jhipster",
"prodDatabasePassword": "password",
"prodDatabasePassword": "",
"prodDatabaseType": "postgresql",
"prodDatabaseTypeAny": true,
"prodDatabaseTypeMariadb": false,
Expand All @@ -428,15 +428,16 @@ exports[`SubGenerator bootstrap-application of nodejs JHipster blueprint > run >
"searchEngineElasticsearch": false,
"searchEngineNo": true,
"serverPort": 8080,
"serviceDiscovery": "no",
"serviceDiscoveryAny": false,
"serviceDiscoveryConsul": false,
"serviceDiscoveryEureka": false,
"serviceDiscoveryNo": true,
"serviceDiscoveryType": "no",
"serviceDiscoveryTypeAny": undefined,
"serviceDiscoveryTypeConsul": undefined,
"serviceDiscoveryTypeEureka": undefined,
"serviceDiscoveryTypeNo": undefined,
"serviceDiscoveryTypeAny": false,
"serviceDiscoveryTypeConsul": false,
"serviceDiscoveryTypeEureka": false,
"serviceDiscoveryTypeNo": true,
"skipCheckLengthOfIdentifier": false,
"skipClient": undefined,
"skipCommitHook": undefined,
Expand Down
12 changes: 6 additions & 6 deletions generators/client/__snapshots__/generator.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,6 @@ exports[`SubGenerator client of nodejs JHipster blueprint > run > should succeed
"client/src/app/app.config.ts": {
"stateCleared": "modified",
},
"client/src/app/app.constants.ts": {
"stateCleared": "modified",
},
"client/src/app/app.routes.ts": {
"stateCleared": "modified",
},
Expand Down Expand Up @@ -650,6 +647,12 @@ exports[`SubGenerator client of nodejs JHipster blueprint > run > should succeed
"client/src/declarations.d.ts": {
"stateCleared": "modified",
},
"client/src/environments/environment.development.ts": {
"stateCleared": "modified",
},
"client/src/environments/environment.ts": {
"stateCleared": "modified",
},
"client/src/favicon.ico": {
"stateCleared": "modified",
},
Expand Down Expand Up @@ -698,9 +701,6 @@ exports[`SubGenerator client of nodejs JHipster blueprint > run > should succeed
"client/src/robots.txt": {
"stateCleared": "modified",
},
"client/src/swagger-ui/dist/images/throbber.gif": {
"stateCleared": "modified",
},
"client/src/swagger-ui/index.html": {
"stateCleared": "modified",
},
Expand Down
Loading

0 comments on commit d6ad5a6

Please sign in to comment.