d
This commit is contained in:
@@ -2,6 +2,7 @@ from generation.sectionGeneratedActionShouldLoad import *
|
||||
|
||||
def generateServiceSectionGeneratedActions(c):
|
||||
base = f"{c.dir}/templates/service-section-generated-action"
|
||||
fmtBusModel = c.readFile(f"{base}-bus-model")
|
||||
fmtCommon = c.readFile(base)
|
||||
fmtInstant = c.readFile(f"{base}-instant")
|
||||
fmtRelay = c.readFile(f"{base}-relay")
|
||||
@@ -21,6 +22,11 @@ def generateServiceSectionGeneratedActions(c):
|
||||
|
||||
# Шаблонные действия.
|
||||
if value == "":
|
||||
# busModel.
|
||||
if key == "busModel":
|
||||
c.serviceSectionGeneratedActions += "\n".join(fmtBusModel) + "\n"
|
||||
continue
|
||||
|
||||
# instant model.
|
||||
if key == "🚀model":
|
||||
c.serviceSectionGeneratedActions += "\n".join(fmtInstantModel) + "\n"
|
||||
@@ -66,7 +72,8 @@ def generateServiceSectionGeneratedActions(c):
|
||||
for fmt in template:
|
||||
ln = fmt \
|
||||
.replace("%SHOULD%", action) \
|
||||
.replace("%SINK%", value)
|
||||
.replace("%SINK%", value) \
|
||||
.replace("%MODULE%", c.module)
|
||||
output += ln + "\n"
|
||||
|
||||
c.serviceSectionGeneratedActions += output
|
||||
|
||||
Reference in New Issue
Block a user