Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
Phase 1 — Macros: defmacro + quasiquote syntax (`, ,, ,@) in parser,
evaluator, HTML renderer, and JS mirror. Macro type, expansion, and
round-trip serialization.
Phase 2 — Expanded primitives: app-url, url-for, asset-url, config,
format-date, parse-int (pure); service, request-arg, request-path,
nav-tree, get-children (I/O); jinja-global, relations-from (pure).
Updated _io_service to accept (service "registry-name" "method" :kwargs)
with auto kebab→snake conversion. DTO-to-dict now expands datetime fields
into year/month/day convenience keys. Tuple returns converted to lists.
Phase 3 — Declarative handlers: HandlerDef type, defhandler special form,
handler registry (service → name → HandlerDef), async evaluator+renderer
(async_eval.py) that awaits I/O primitives inline within control flow.
Handler loading from .sx files, execute_handler, blueprint factory.
Phase 4 — Convert all fragment routes: 13 Python fragment handlers across
8 services replaced with declarative .sx handler files. All routes.py
simplified to uniform sx dispatch pattern. Two Jinja HTML handlers
(events/container-cards, events/account-page) kept as Python.
New files: shared/sx/async_eval.py, shared/sx/handlers.py,
shared/sx/tests/test_handlers.py, plus 13 handler .sx files under
{service}/sx/handlers/. MarketService.product_by_slug() added.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
25 lines
658 B
Python
25 lines
658 B
Python
from __future__ import annotations
|
|
import path_setup # noqa: F401
|
|
import sx.sx_components as sx_components # noqa: F401 # ensure Hypercorn --reload watches this file
|
|
|
|
from shared.infrastructure.factory import create_base_app
|
|
|
|
from bp import register_actions, register_data, register_fragments
|
|
from services import register_domain_services
|
|
|
|
|
|
def create_app() -> "Quart":
|
|
app = create_base_app(
|
|
"relations",
|
|
domain_services_fn=register_domain_services,
|
|
)
|
|
|
|
app.register_blueprint(register_actions())
|
|
app.register_blueprint(register_data())
|
|
app.register_blueprint(register_fragments())
|
|
|
|
return app
|
|
|
|
|
|
app = create_app()
|