feat(config/template): Add assetbrokerUrl and legalUrl fields to module config and update website template to supply these values

This commit is contained in:
Philipp Kunz 2025-04-15 15:53:34 +00:00
parent ff2ebc076d
commit 77bb8bf22e
4 changed files with 14 additions and 2 deletions

View File

@ -1,5 +1,11 @@
# Changelog # Changelog
## 2025-04-15 - 1.15.0 - feat(config/template)
Add assetbrokerUrl and legalUrl fields to module config and update website template to supply these values
- Added assetbrokerUrl and legalUrl properties in ts/classes.gitzoneconfig.ts
- Updated ts/mod_format/format.templates.ts to pass assetbrokerUrl and legalUrl to website template
## 2025-04-15 - 1.14.1 - fix(package.json) ## 2025-04-15 - 1.14.1 - fix(package.json)
Add packageManager field to specify pnpm version for consistent package management Add packageManager field to specify pnpm version for consistent package management

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@git.zone/cli', name: '@git.zone/cli',
version: '1.14.1', version: '1.15.0',
description: 'A comprehensive CLI tool for enhancing and managing local development workflows with gitzone utilities, focusing on project setup, version control, code formatting, and template management.' description: 'A comprehensive CLI tool for enhancing and managing local development workflows with gitzone utilities, focusing on project setup, version control, code formatting, and template management.'
} }

View File

@ -16,6 +16,8 @@ export interface IGitzoneConfigData {
npmPackageName: string; npmPackageName: string;
license: string; license: string;
projectDomain: string; projectDomain: string;
assetbrokerUrl: string;
legalUrl: string;
}; };
copy: { [key: string]: string }; copy: { [key: string]: string };
npmciOptions: { npmciOptions: {

View File

@ -38,7 +38,7 @@ export const run = async (project: Project) => {
case 'website': case 'website':
const ciTemplateDocker = await templateModule.getTemplate('ci_docker'); const ciTemplateDocker = await templateModule.getTemplate('ci_docker');
await ciTemplateDocker.writeToDisk(paths.cwd); await ciTemplateDocker.writeToDisk(paths.cwd);
logger.log('info', 'Updated .gitlabci.yml!'); logger.log('info', 'Updated CI/CD config files!');
// lets care about docker // lets care about docker
const dockerTemplate = await templateModule.getTemplate('dockerfile_service'); const dockerTemplate = await templateModule.getTemplate('dockerfile_service');
@ -57,6 +57,10 @@ export const run = async (project: Project) => {
// update html // update html
if (project.gitzoneConfig.data.projectType === 'website') { if (project.gitzoneConfig.data.projectType === 'website') {
const websiteUpdateTemplate = await templateModule.getTemplate('website_update'); const websiteUpdateTemplate = await templateModule.getTemplate('website_update');
websiteUpdateTemplate.supplyVariables({
assetbrokerUrl: project.gitzoneConfig.data.module.assetbrokerUrl,
legalUrl: project.gitzoneConfig.data.module.legalUrl,
})
await websiteUpdateTemplate.writeToDisk(paths.cwd); await websiteUpdateTemplate.writeToDisk(paths.cwd);
logger.log('info', `Updated html for website!`); logger.log('info', `Updated html for website!`);
} else if (project.gitzoneConfig.data.projectType === 'service') { } else if (project.gitzoneConfig.data.projectType === 'service') {