Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion generators/base-application/internal/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export function createUserManagementEntity(
hidden: true,
id: false,
// Set id type fallback since it's not id anymore and will not be calculated.
fieldType: ({ fieldType }) => fieldType ?? getDatabaseTypeData(application.databaseType!).defaultPrimaryKeyType,
fieldType: ({ fieldType }) => fieldType ?? getDatabaseTypeData(application.databaseType).defaultPrimaryKeyType,
},
{ fieldName: 'firstName', hideListView: true },
{ fieldName: 'lastName', hideListView: true },
Expand Down
2 changes: 1 addition & 1 deletion generators/base-core/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ You can ignore this error by passing '--skip-checks' to jhipster command.`);
case 'context': {
storage = {
getPath: (path: string) => get(this.context, path),
setPath: (path: string, value: any) => set(this.context!, path, value),
setPath: (path: string, value: any) => set(this.context, path, value),
};
break;
}
Expand Down
2 changes: 1 addition & 1 deletion generators/client/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export default class ClientGenerator extends ClientApplicationGenerator {
if (!application.clientFrameworkBuiltIn) {
return;
}
const packageJsonStorage = this.createStorage(this.destinationPath(application.clientRootDir!, 'package.json'));
const packageJsonStorage = this.createStorage(this.destinationPath(application.clientRootDir, 'package.json'));
const scriptsStorage = packageJsonStorage.createStorage('scripts');

const devDependencies = packageJsonStorage.createStorage('devDependencies');
Expand Down
2 changes: 1 addition & 1 deletion generators/cypress/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export default class CypressGenerator extends BaseApplicationGenerator<CypressEn
get postWriting() {
return this.asPostWritingTaskGroup({
packageJson({ application }) {
const clientPackageJson = this.createStorage(this.destinationPath(application.clientRootDir!, 'package.json'));
const clientPackageJson = this.createStorage(this.destinationPath(application.clientRootDir, 'package.json'));
clientPackageJson.merge({
devDependencies: {
cypress: application.nodeDependencies.cypress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default class CodeQualityGenerator extends JavaSimpleApplicationGenerator
blocks: [
{ templates: ['checkstyle.xml'] },
{
condition: () => application.buildToolGradle!,
condition: () => application.buildToolGradle,
templates: [`${GRADLE_BUILD_SRC_MAIN_DIR}/jhipster.code-quality-conventions.gradle`],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default class GraalvmGenerator extends JavaApplicationGenerator {
'native-package-dev': './mvnw package -B -ntp -Pnative,dev,webapp -DskipTests',
'native-start': './target/native-executable --spring.profiles.active=e2e,secret-samples,prod',
};
Object.assign(packageJsonScripts!, {
Object.assign(packageJsonScripts, {
'native-e2e': 'concurrently -k -s first -n application,e2e -c red,blue npm:native-start npm:e2e:headless',
...scripts,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default class JibGenerator extends JavaSimpleApplicationGenerator {
blocks: [
{ path: `${dockerServicesDir}jib/`, templates: ['entrypoint.sh'] },
{
condition: () => application.buildToolGradle!,
condition: () => application.buildToolGradle,
templates: [`${GRADLE_BUILD_SRC_MAIN_DIR}/jhipster.docker-conventions.gradle`],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default class OpenapiGeneratorGenerator extends JavaApplicationGenerator
return this.asWritingTaskGroup({
async cleanup({ application, control }) {
await control.cleanupFiles({
'8.6.1': [[application.buildToolGradle!, 'gradle/swagger.gradle']],
'8.6.1': [[application.buildToolGradle, 'gradle/swagger.gradle']],
});
},
async writing({ application }) {
Expand Down
2 changes: 1 addition & 1 deletion generators/javascript-simple-application/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default class JavascriptGenerator extends JavascriptSimpleApplicationGene
mergePackageJson({ application, source }) {
const { packageJsonNodeEngine, dasherizedBaseName, projectDescription, packageJsonScripts, clientPackageJsonScripts } = application;

this.packageJson.merge({ scripts: packageJsonScripts! });
this.packageJson.merge({ scripts: packageJsonScripts });

this.packageJson.defaults({
name: dasherizedBaseName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import type { JHipsterCommandDefinition } from '../../../../lib/command/index.ts';
import gitCommand from '../../../git/command.ts';

const { monorepository } = gitCommand.configs!;
const { monorepository } = gitCommand.configs;

const command = {
configs: {
Expand Down
2 changes: 1 addition & 1 deletion generators/languages/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export default class LanguagesGenerator extends BaseApplicationGenerator<
if (this.options.skipPriorities?.includes?.(PRIORITY_NAMES.POST_WRITING)) return;

for (const addLanguageCallback of application.addLanguageCallbacks) {
addLanguageCallback(application.languagesToGenerateDefinition!, application.languagesDefinition);
addLanguageCallback(application.languagesToGenerateDefinition, application.languagesDefinition);
}
},
});
Expand Down
2 changes: 1 addition & 1 deletion generators/liquibase/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ export default class LiquibaseGenerator<
// eslint-disable-next-line no-template-curly-in-string
version: '${liquibase.version}',
additionalContent: mavenPlugin({
backendTypeSpringBoot: application.backendTypeSpringBoot!,
backendTypeSpringBoot: application.backendTypeSpringBoot,
hibernateNamingPhysicalStrategy: application.hibernateNamingPhysicalStrategy,
hibernateNamingImplicitStrategy: application.hibernateNamingImplicitStrategy,
packageName: application.packageName!,
Expand Down
6 changes: 3 additions & 3 deletions generators/server/generators/bootstrap/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ export default class ServerBootstrapGenerator extends BaseApplicationGenerator<S
if (entity.primaryKey) {
entity.resetFakerSeed!(`${application.baseName}post-prepare-server`);
entity.primaryKey.javaSampleValues ??= [
getPrimaryKeyValue(entity.primaryKey, application.databaseType!, 1),
getPrimaryKeyValue(entity.primaryKey, application.databaseType!, 2),
getPrimaryKeyValue(entity.primaryKey, application.databaseType!, entity.faker!.number.int({ min: 10, max: 100 })),
getPrimaryKeyValue(entity.primaryKey, application.databaseType, 1),
getPrimaryKeyValue(entity.primaryKey, application.databaseType, 2),
getPrimaryKeyValue(entity.primaryKey, application.databaseType, entity.faker!.number.int({ min: 10, max: 100 })),
];
}
}
Expand Down
4 changes: 2 additions & 2 deletions generators/spring-boot/generators/cache/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ export default class SpringCacheGenerator extends SpringBootApplicationGenerator
}
}
await control.cleanupFiles({
'8.9.1': [[application.cacheProviderInfinispan!, `${application.javaPackageSrcDir}config/CacheFactoryConfiguration.java`]],
'8.9.1': [[application.cacheProviderInfinispan, `${application.javaPackageSrcDir}config/CacheFactoryConfiguration.java`]],
'9.0.0-alpha.0': [`${GRADLE_BUILD_SRC_MAIN_DIR}/jhipster.spring-cache-conventions.gradle`],
'9.0.0-beta.1': [
[
application.cacheProviderRedis!,
application.cacheProviderRedis,
`${application.javaPackageSrcDir}config/RedisTestContainersSpringContextCustomizerFactory.java`,
`${application.javaPackageSrcDir}config/EmbeddedRedis.java`,
`${application.srcTestResources}META-INF/spring.factories`,
Expand Down
2 changes: 1 addition & 1 deletion generators/vue/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ const ${entityAngularName}Update = () => import('@/entities/${entityFolderName}/
'8.6.1': ['.eslintrc.json', '.eslintignore'],
'8.7.4': [
[
application.microfrontend!,
application.microfrontend,
`${application.srcMainWebapp}microfrontends/entities-menu-test.vue`,
`${application.srcMainWebapp}microfrontends/entities-menu-component-test.ts`,
`${application.srcMainWebapp}microfrontends/entities-router-test.ts`,
Expand Down
Loading