generator-begcode
Version:
Spring Boot + Angular/React/Vue in one handy generator
19 lines (18 loc) • 1.16 kB
JavaScript
import { defaults } from 'lodash-es';
import { applicationOptions, deploymentOptions } from '../../../jdl/index.js';
import { loadDerivedPlatformConfig, loadPlatformConfig, loadDerivedServerAndPlatformProperties } from '../../server/support/index.js';
const { OptionNames } = applicationOptions;
const { Options: DeploymentOptions } = deploymentOptions;
const { JWT_SECRET_KEY } = OptionNames;
export function loadDeploymentConfig({ config = defaults({}, this.jhipsterConfig, DeploymentOptions.defaults(this.jhipsterConfig.deploymentType)), deployment = this, } = {}) {
deployment.appsFolders = config.appsFolders;
deployment.directoryPath = config.directoryPath;
deployment.clusteredDbApps = config.clusteredDbApps;
deployment.dockerRepositoryName = config.dockerRepositoryName;
deployment.dockerPushCommand = config.dockerPushCommand;
deployment.adminPassword = config.adminPassword;
deployment.jwtSecretKey = config[JWT_SECRET_KEY];
loadPlatformConfig({ config, application: deployment });
loadDerivedPlatformConfig({ application: deployment });
loadDerivedServerAndPlatformProperties({ application: deployment });
}