yaafcli 2026.2.6.24209__py3-none-any.whl → 2026.2.6.43348__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
yaaf/loader.py CHANGED
@@ -30,7 +30,17 @@ class RouteTarget:
30
30
 
31
31
  def _load_module(path: Path, name_prefix: str) -> ModuleType:
32
32
  """Load a Python module from an explicit file path."""
33
- module_name = f"yaaf_{name_prefix}_{abs(hash(path))}"
33
+ # Convert the file path to a module path relative to the consumers directory
34
+ # This preserves the original module path for type annotation compatibility
35
+ parts = path.parts
36
+ if "consumers" in parts:
37
+ consumers_index = parts.index("consumers")
38
+ module_parts = parts[consumers_index:]
39
+ module_name = ".".join(module_parts[:-1] + (path.stem,))
40
+ else:
41
+ # Fallback to hashed name if not in consumers directory
42
+ module_name = f"yaaf_{name_prefix}_{abs(hash(path))}"
43
+
34
44
  spec = importlib.util.spec_from_file_location(module_name, path)
35
45
  if spec is None or spec.loader is None:
36
46
  raise ImportError(f"Could not load module from {path}")
@@ -188,7 +198,12 @@ def _service_alias(route_parts: list[str]) -> str:
188
198
  return segment[1:-1]
189
199
  return segment
190
200
 
201
+ def camel_case(parts: list[str]) -> str:
202
+ return "".join(
203
+ sub[:1].upper() + sub[1:] for part in parts if part for sub in part.split("_") if sub
204
+ )
205
+
191
206
  parts = [strip_dynamic(part) for part in route_parts]
192
207
  safe = [part for part in parts if part.isidentifier()]
193
- base = "".join(part[:1].upper() + part[1:] for part in safe) or "Route"
208
+ base = camel_case(safe) or "Route"
194
209
  return f"{base}Service"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yaafcli
3
- Version: 2026.2.6.24209
3
+ Version: 2026.2.6.43348
4
4
  Summary: Minimal ASGI app scaffold
5
5
  License: MIT License
6
6
 
@@ -4,13 +4,13 @@ yaaf/app.py,sha256=7YrPl2_OZ-8NUy1RvUEBAbSntcqlP_in-2TLrKmGooE,3339
4
4
  yaaf/cli.py,sha256=I8KlridkkikWwOO2BPwbqXoATP_RXZ0aHtCE26wMnao,1676
5
5
  yaaf/di.py,sha256=yoyTuL0Vc4MmGj_71M04JpLAzqBRREniZk1f2opEuEE,3039
6
6
  yaaf/gen_services.py,sha256=f7OHHhvoPtcD_09p08Lf6i_N0KkM7wlrUsDOaoCHckg,3127
7
- yaaf/loader.py,sha256=q8BV5kAeYCtX5sBRy7KYy9CfPShlJyfrv2TfjT18Zu0,7224
7
+ yaaf/loader.py,sha256=1PCZrfCZY5zSd1TmbJdWmjLXxCa3fCxq-yaGEBSZRS0,7824
8
8
  yaaf/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  yaaf/responses.py,sha256=iXZ0vDYfGO-BEUBBsobCR4JfWLRx8zhwYD9taQ8Sat4,2616
10
10
  yaaf/types.py,sha256=BAD3Wkjqi4NKxNz2bT1xggPx0jU5Sz_hOvsHXmGszig,1262
11
- yaafcli-2026.2.6.24209.dist-info/licenses/LICENSE,sha256=ESYyLizI0WWtxMeS7rGVcX3ivMezm-HOd5WdeOh-9oU,1056
12
- yaafcli-2026.2.6.24209.dist-info/METADATA,sha256=5aokNZ2yw8Dpap12wWfHuk1SWE_BuhEOVwtcIswilv0,6236
13
- yaafcli-2026.2.6.24209.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
14
- yaafcli-2026.2.6.24209.dist-info/entry_points.txt,sha256=dh9ijq3gnFIr46RFjPjGR48PHQMUxwHopj3b9JipCRQ,39
15
- yaafcli-2026.2.6.24209.dist-info/top_level.txt,sha256=6WqEmcTdZROTeK4-7HzkB5h9JMBgs51otonH6vnjcAc,5
16
- yaafcli-2026.2.6.24209.dist-info/RECORD,,
11
+ yaafcli-2026.2.6.43348.dist-info/licenses/LICENSE,sha256=ESYyLizI0WWtxMeS7rGVcX3ivMezm-HOd5WdeOh-9oU,1056
12
+ yaafcli-2026.2.6.43348.dist-info/METADATA,sha256=gVA9s5v6rjtnr1-mvSKs0LdVpNY-E8WF7uSL_a1rnO0,6236
13
+ yaafcli-2026.2.6.43348.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
14
+ yaafcli-2026.2.6.43348.dist-info/entry_points.txt,sha256=dh9ijq3gnFIr46RFjPjGR48PHQMUxwHopj3b9JipCRQ,39
15
+ yaafcli-2026.2.6.43348.dist-info/top_level.txt,sha256=6WqEmcTdZROTeK4-7HzkB5h9JMBgs51otonH6vnjcAc,5
16
+ yaafcli-2026.2.6.43348.dist-info/RECORD,,