Commit c3976bc
committed
feat: add sprag types CLI command and improve error messages
New command:
- sprag types: generates .sprag/types.pyi from the build manifest
with type aliases for routes, mounts, actions, stores, and modules
Build pipeline:
- Auto-generate types.pyi during sprag build and sprag dev
- Add stores to the serializable manifest
- New _serializable_stores() helper in build.py
Scaffolding:
- Add _shared template directory support with merge_existing
- _render_template_dir() now supports merge_existing flag
- _merge_gitignore() helper for shared .gitignore templates
Error messages:
- Improved error messages across browser.py (debounce, throttle,
virtual_scroll, infinite_scroll, ref), assets.py (module, normalize),
mount.py, page.py, socket_bridge.py, stores.py
Type declarations:
- Added docstring to App dataclass
- Added docstring to Page dataclass
- Type stub hint in browser.py module docstring
Docs:
- Added sprag types to README.md CLI section
- Added full sprag types section to CLI reference docs1 parent 1b19efb commit c3976bc
40 files changed
Lines changed: 2077 additions & 22 deletions
File tree
- docs/app/content/docs/reference
- sprag
- assets
- dev
- codegen
- runtime
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
121 | 148 | | |
122 | 149 | | |
123 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
0 commit comments