fastapi-voyager 0.4.4__py3-none-any.whl → 0.4.5__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.
- fastapi_voyager/module.py +20 -0
- fastapi_voyager/version.py +1 -1
- {fastapi_voyager-0.4.4.dist-info → fastapi_voyager-0.4.5.dist-info}/METADATA +1 -1
- {fastapi_voyager-0.4.4.dist-info → fastapi_voyager-0.4.5.dist-info}/RECORD +7 -7
- {fastapi_voyager-0.4.4.dist-info → fastapi_voyager-0.4.5.dist-info}/WHEEL +0 -0
- {fastapi_voyager-0.4.4.dist-info → fastapi_voyager-0.4.5.dist-info}/entry_points.txt +0 -0
- {fastapi_voyager-0.4.4.dist-info → fastapi_voyager-0.4.5.dist-info}/licenses/LICENSE +0 -0
fastapi_voyager/module.py
CHANGED
|
@@ -41,4 +41,24 @@ def build_module_tree(schema_nodes: list[SchemaNode]) -> list[ModuleNode]:
|
|
|
41
41
|
result = list(top_modules.values())
|
|
42
42
|
if root_level_nodes:
|
|
43
43
|
result.append(ModuleNode(name="__root__", fullname="__root__", schema_nodes=root_level_nodes, modules=[]))
|
|
44
|
+
|
|
45
|
+
# Collapse pass: if a module has exactly one child module and no schema_nodes,
|
|
46
|
+
# merge it upward (A + B -> A.B). Repeat until fixed point.
|
|
47
|
+
def collapse(node: ModuleNode):
|
|
48
|
+
# Collapse chains at current node
|
|
49
|
+
while len(node.modules) == 1 and len(node.schema_nodes) == 0:
|
|
50
|
+
child = node.modules[0]
|
|
51
|
+
# Merge child's identity into current node
|
|
52
|
+
node.name = f"{node.name}.{child.name}"
|
|
53
|
+
# Prefer child's fullname which already reflects full path
|
|
54
|
+
node.fullname = child.fullname
|
|
55
|
+
node.schema_nodes = child.schema_nodes
|
|
56
|
+
node.modules = child.modules
|
|
57
|
+
# Recurse into children
|
|
58
|
+
for m in node.modules:
|
|
59
|
+
collapse(m)
|
|
60
|
+
|
|
61
|
+
for top in result:
|
|
62
|
+
collapse(top)
|
|
63
|
+
|
|
44
64
|
return result
|
fastapi_voyager/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__all__ = ["__version__"]
|
|
2
|
-
__version__ = "0.4.
|
|
2
|
+
__version__ = "0.4.5"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastapi-voyager
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.5
|
|
4
4
|
Summary: Visualize FastAPI application's routing tree and dependencies
|
|
5
5
|
Project-URL: Homepage, https://github.com/allmonday/fastapi-voyager
|
|
6
6
|
Project-URL: Source, https://github.com/allmonday/fastapi-voyager
|
|
@@ -2,11 +2,11 @@ fastapi_voyager/__init__.py,sha256=E5WTV_sYs2LK8I6jzA7AuvFU5a8_vjnDseC3DMha0iQ,1
|
|
|
2
2
|
fastapi_voyager/cli.py,sha256=FuXllJtlsm33FX6VmDdAFWzzQ5TIraUizBDgvBj3vmY,10489
|
|
3
3
|
fastapi_voyager/filter.py,sha256=uZrVVMhHG5E7j1wdsiB02RAyoDdF1q8A4J04oCboYAU,4644
|
|
4
4
|
fastapi_voyager/graph.py,sha256=0lTU2XiIer35IPXoQBuh2KajvXUGeea3-vuHyPnketA,14734
|
|
5
|
-
fastapi_voyager/module.py,sha256=
|
|
5
|
+
fastapi_voyager/module.py,sha256=NyhSpjevhYtIJdlJxpksGAzfbOV5bHZ7PWbVT4x8LIU,2664
|
|
6
6
|
fastapi_voyager/server.py,sha256=UFj6c0Yx4Rmy56eFXv65n1VdmJeiBX43KsDm6D65U28,2943
|
|
7
7
|
fastapi_voyager/type.py,sha256=xkvfUL5vmfaerkaoowdSlTRsD11NP5NG1rMOXYPBJO0,1265
|
|
8
8
|
fastapi_voyager/type_helper.py,sha256=j7AiFXsfl4kaxshYtofbsqo08dIXiHvJ190soIzUdLk,8380
|
|
9
|
-
fastapi_voyager/version.py,sha256
|
|
9
|
+
fastapi_voyager/version.py,sha256=LLMiqcKNNqxWTkirwEvOSRsPX9JD6wKMiTXX3MN-uCA,48
|
|
10
10
|
fastapi_voyager/web/graph-ui.js,sha256=eEjDnJVMvk35LdRoxcqX_fZxLFS9_bUrGAZL6K2O5C0,4176
|
|
11
11
|
fastapi_voyager/web/graphviz.svg.css,sha256=zDCjjpT0Idufu5YOiZI76PL70-avP3vTyzGPh9M85Do,1563
|
|
12
12
|
fastapi_voyager/web/graphviz.svg.js,sha256=lvAdbjHc-lMSk4GQp-iqYA2PCFX4RKnW7dFaoe0LUHs,16005
|
|
@@ -24,8 +24,8 @@ fastapi_voyager/web/icon/favicon-16x16.png,sha256=JC07jEzfIYxBIoQn_FHXvyHuxESdhW
|
|
|
24
24
|
fastapi_voyager/web/icon/favicon-32x32.png,sha256=C7v1h58cfWOsiLp9yOIZtlx-dLasBcq3NqpHVGRmpt4,1859
|
|
25
25
|
fastapi_voyager/web/icon/favicon.ico,sha256=tZolYIXkkBcFiYl1A8ksaXN2VjGamzcSdes838dLvNc,15406
|
|
26
26
|
fastapi_voyager/web/icon/site.webmanifest,sha256=ep4Hzh9zhmiZF2At3Fp1dQrYQuYF_3ZPZxc1KcGBvwQ,263
|
|
27
|
-
fastapi_voyager-0.4.
|
|
28
|
-
fastapi_voyager-0.4.
|
|
29
|
-
fastapi_voyager-0.4.
|
|
30
|
-
fastapi_voyager-0.4.
|
|
31
|
-
fastapi_voyager-0.4.
|
|
27
|
+
fastapi_voyager-0.4.5.dist-info/METADATA,sha256=aSM2jqwKxrbrr05LTzBLMGQ5wpSQC5EqyDxJFKKygZA,6508
|
|
28
|
+
fastapi_voyager-0.4.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
29
|
+
fastapi_voyager-0.4.5.dist-info/entry_points.txt,sha256=pEIKoUnIDXEtdMBq8EmXm70m16vELIu1VPz9-TBUFWM,53
|
|
30
|
+
fastapi_voyager-0.4.5.dist-info/licenses/LICENSE,sha256=lNVRR3y_bFVoFKuK2JM8N4sFaj3m-7j29kvL3olFi5Y,1067
|
|
31
|
+
fastapi_voyager-0.4.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|