Module:LuaTemplateBlueprint: Difference between revisions

// via Wikitext Extension for VSCode
Tag: Reverted
// via Wikitext Extension for VSCode
 
(6 intermediate revisions by the same user not shown)
Line 72: Line 72:
local ErrorHandling = require('Module:ErrorHandling')
local ErrorHandling = require('Module:ErrorHandling')
local ConfigRepository = require('Module:ConfigRepository')
local ConfigRepository = require('Module:ConfigRepository')
local ConfigHelpers = require('Module:ConfigHelpers')
local TemplateHelpers = require('Module:TemplateHelpers')
local TemplateHelpers = require('Module:TemplateHelpers')
local TemplateStructure = require('Module:TemplateStructure')
local TemplateStructure = require('Module:TemplateStructure')
Line 340: Line 341:


-- ========== Configuration Integration ==========
-- ========== Configuration Integration ==========
-- Standard configuration sections used by templates
p.configSections = {
    'meta',
    'categories',
    'patterns',
    'fields',
    'mappings',
    'constants',
    'semantics'
}
-- Initialize the standard configuration for a template
-- Initialize the standard configuration for a template
-- Combines base config from ConfigRepository with template overrides
-- Combines base config from ConfigRepository with template overrides
Line 362: Line 352:
     local baseConfig = ConfigRepository.getStandardConfig(templateType)
     local baseConfig = ConfigRepository.getStandardConfig(templateType)


     -- Use TemplateHelpers to deep merge configurations
     -- Use ConfigHelpers to deep merge configurations
     local config = TemplateHelpers.deepMerge(baseConfig, configOverrides)
     local config = ConfigHelpers.deepMerge(baseConfig, configOverrides)


     -- Store complete config in template
     -- Store complete config in template
Line 1,199: Line 1,189:
     end
     end
      
      
     ErrorHandling.addStatus(template._errorContext, "LuaTemplateBlueprint", "Blueprint rendering started for " .. template.type)
     ErrorHandling.addStatus(template._errorContext, "LuaTemplateBlueprint", "Now rendering " .. template.type)
      
      
     if not template.config.meta then
     if not template.config.meta then