Михаил Капелько 1 year ago
parent
commit
a27fd7adc4
5 changed files with 16 additions and 2 deletions
  1. +1
    -1
      Modules/MeetupIdX/MeetupId.yml
  2. +3
    -0
      Modules/MeetupIdX/src/MeetupId.Generated.swift
  3. +8
    -1
      Utilities/platform/2/generation/generateServiceSectionGeneratedActions.py
  4. +3
    -0
      Utilities/platform/2/templates/service-section-generated-action-bus-model
  5. +1
    -0
      src/App.swift

+ 1
- 1
Modules/MeetupIdX/MeetupId.yml View File

@@ -6,7 +6,7 @@ model:

service:
actions:
modelBus
busModel
pipes:
textApp: [recent, K.meetupIdTextApp]
textUI: [recent, K.meetupIdTextUI]


+ 3
- 0
Modules/MeetupIdX/src/MeetupId.Generated.swift View File

@@ -80,6 +80,9 @@ extension MeetupId {
) {
// MARK: - SectionGenerated Service Actions

ctrl.m
.sink { v in Bus.send("MeetupId", v) }
.store(in: &service.subscriptions)


// MARK: - SectionGenerated Service Pipes


+ 8
- 1
Utilities/platform/2/generation/generateServiceSectionGeneratedActions.py View File

@@ -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

+ 3
- 0
Utilities/platform/2/templates/service-section-generated-action-bus-model View File

@@ -0,0 +1,3 @@
ctrl.m
.sink { v in Bus.send("%MODULE%", v) }
.store(in: &service.subscriptions)

+ 1
- 0
src/App.swift View File

@@ -4,6 +4,7 @@ import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate
{
let meetupIS = MeetupId.Service(.init())
var window: UIWindow?

func application(


Loading…
Cancel
Save