fastapi-voyager 0.10.1__py3-none-any.whl → 0.10.2__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/server.py CHANGED
@@ -9,6 +9,7 @@ from fastapi_voyager.voyager import Voyager
9
9
  from fastapi_voyager.type import Tag, FieldInfo, CoreData, SchemaNode
10
10
  from fastapi_voyager.render import Renderer
11
11
  from fastapi_voyager.type_helper import get_source, get_vscode_link
12
+ from fastapi_voyager.version import __version__
12
13
 
13
14
 
14
15
  WEB_DIR = Path(__file__).parent / "web"
@@ -20,6 +21,7 @@ class OptionParam(BaseModel):
20
21
  schemas: list[SchemaNode]
21
22
  dot: str
22
23
  enable_brief_mode: bool
24
+ version: str
23
25
 
24
26
  class Payload(BaseModel):
25
27
  tags: Optional[list[str]] = None
@@ -54,7 +56,7 @@ def create_route(
54
56
  schemas = voyager.nodes[:]
55
57
  schemas.sort(key=lambda s: s.name)
56
58
 
57
- return OptionParam(tags=tags, schemas=schemas, dot=dot, enable_brief_mode=bool(module_prefix))
59
+ return OptionParam(tags=tags, schemas=schemas, dot=dot, enable_brief_mode=bool(module_prefix), version=__version__)
58
60
 
59
61
  @router.post("/dot", response_class=PlainTextResponse)
60
62
  def get_filtered_dot(payload: Payload) -> str:
@@ -1,2 +1,2 @@
1
1
  __all__ = ["__version__"]
2
- __version__ = "0.10.1"
2
+ __version__ = "0.10.2"
@@ -57,7 +57,7 @@
57
57
  }
58
58
 
59
59
  .adjust-fit {
60
- height: calc(100% - 54px);
60
+ height: calc(100vh - 54px);
61
61
  }
62
62
  </style>
63
63
  <body>
@@ -67,10 +67,11 @@
67
67
  <q-toolbar class="row text-grey-9 bg-white" style="width: 100%">
68
68
  <div
69
69
  class="col-auto text-primary"
70
- style="font-size: 16px; font-weight: bold"
70
+ style="font-size: 18px; font-weight: bold; display: flex; align-items: baseline;"
71
71
  >
72
72
  <q-icon class="q-mr-sm" name="satellite_alt"></q-icon>
73
73
  <span> FastAPI Voyager </span>
74
+ <span v-if="state.version" style="font-size: 12px; margin-left: 8px; font-weight: normal;">{{ state.version }}</span>
74
75
  </div>
75
76
  <div class="col-auto" style="font-size: 16px">
76
77
  <q-option-group
@@ -279,7 +280,7 @@
279
280
 
280
281
  <template #after>
281
282
  <div style="position: relative; width: 100%; height: 100%;">
282
- <div id="graph" class="fit"></div>
283
+ <div id="graph" class="adjust-fit"></div>
283
284
  <q-toggle
284
285
  v-model="state.focus"
285
286
  v-show="schemaCodeName"
@@ -31,7 +31,8 @@ const app = createApp({
31
31
  // Splitter size (left panel width in px)
32
32
  splitter: 300,
33
33
  detailDrawer: false,
34
- drawerWidth: 500, // drawer 宽度
34
+ drawerWidth: 300, // drawer 宽度
35
+ version: "", // version from backend
35
36
  });
36
37
 
37
38
  const showDetail = ref(false);
@@ -75,6 +76,7 @@ const app = createApp({
75
76
  return acc;
76
77
  }, {});
77
78
  state.enableBriefMode = data.enable_brief_mode || false;
79
+ state.version = data.version || "";
78
80
 
79
81
  // default route options placeholder
80
82
  } catch (e) {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastapi-voyager
3
- Version: 0.10.1
3
+ Version: 0.10.2
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
@@ -226,12 +226,16 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
226
226
  - [x] route list should have a max height
227
227
 
228
228
  #### 0.10
229
- - [x] refactor voyager.py tag -> route structure
230
- - [x] fix missing route (tag has only one route which return primitive value)
231
- - [x] make right panel resizable by dragging
232
- - [x] allow closing tag expansion item
233
- - [x] hide brief mode if not configured
234
- - [x] add focus button to only show related nodes under current route/tag graph in dialog
229
+ - 0.10.1
230
+ - [x] refactor voyager.py tag -> route structure
231
+ - [x] fix missing route (tag has only one route which return primitive value)
232
+ - [x] make right panel resizable by dragging
233
+ - [x] allow closing tag expansion item
234
+ - [x] hide brief mode if not configured
235
+ - [x] add focus button to only show related nodes under current route/tag graph in dialog
236
+ - 0.10.2
237
+ - [x] fix graph height
238
+ - [x] show version in title
235
239
 
236
240
  #### 0.11
237
241
  - [ ] enable/disable module cluster (to save space)
@@ -3,18 +3,18 @@ fastapi_voyager/cli.py,sha256=kQb4g6JEGZR99e5r8LyFFEeb_-uT-n_gp_sDoYG3R7k,11118
3
3
  fastapi_voyager/filter.py,sha256=2Yt37o8mhqSqleafO4YRrumh_ExYUqzXFOxQRPuTbAc,8078
4
4
  fastapi_voyager/module.py,sha256=Z2QHNmiLk6ZAJlm2nSmO875Q33TweSg8UxZSzIpU9zY,3499
5
5
  fastapi_voyager/render.py,sha256=sR1oUh8d3hhDalQhUcrL-k2ZYAWbLDGpGDOB0dDaqRQ,7804
6
- fastapi_voyager/server.py,sha256=fyAfb6GwghcYBjk-pFJzj-uikUnATd7zmbYjUDN7bC8,6243
6
+ fastapi_voyager/server.py,sha256=6kCj906N4PVpKbUI8eq7bJ4RoET1kIQgUQUf-oMFdSY,6326
7
7
  fastapi_voyager/type.py,sha256=pWYKmgb9e0W_JeD7k54Mr2lxUZV_Ir9TNpewGRwHyHQ,1629
8
8
  fastapi_voyager/type_helper.py,sha256=hjBC4E0tgBpQDlYxGg74uK07SXjsrAgictEETJfIpYM,9231
9
- fastapi_voyager/version.py,sha256=cVQTkkihEPlsOisGI50rjHoCoQDT4b7cLPCnW6yGjYQ,49
9
+ fastapi_voyager/version.py,sha256=KhkBU7axnprYVOcYbZBAgdkdrD7vU8iriPE75NCnHgI,49
10
10
  fastapi_voyager/voyager.py,sha256=DIc93SFPVwrsk1Nga74ZZyc4L0J50OAESE9j3fnEty0,12053
11
11
  fastapi_voyager/web/graph-ui.js,sha256=FmKA3eeHMEeUDNuay3f54_fv4eGHT7MT0TaGqXhyMWQ,4978
12
12
  fastapi_voyager/web/graphviz.svg.css,sha256=zDCjjpT0Idufu5YOiZI76PL70-avP3vTyzGPh9M85Do,1563
13
13
  fastapi_voyager/web/graphviz.svg.js,sha256=lvAdbjHc-lMSk4GQp-iqYA2PCFX4RKnW7dFaoe0LUHs,16005
14
- fastapi_voyager/web/index.html,sha256=CCodl9CaxjWrdQG7y9qJlSe23G7LYwK7JvIHKVPV95E,14985
14
+ fastapi_voyager/web/index.html,sha256=3cvaqXgwGdTkNSdvrw8Grn0xbhjWPvlo_A12ltjs5j0,15164
15
15
  fastapi_voyager/web/quasar.min.css,sha256=F5jQe7X2XT54VlvAaa2V3GsBFdVD-vxDZeaPLf6U9CU,203145
16
16
  fastapi_voyager/web/quasar.min.js,sha256=h0ftyPMW_CRiyzeVfQqiup0vrVt4_QWojpqmpnpn07E,502974
17
- fastapi_voyager/web/vue-main.js,sha256=lM7bxq2ivnEH-zpHF6_U8d_ebsZSg-UbSiiktss5hd8,10062
17
+ fastapi_voyager/web/vue-main.js,sha256=pEk6CKtsL-CBIWi6vdLvfa-BxYgIW2OFIvBVFNAWdjI,10149
18
18
  fastapi_voyager/web/component/render-graph.js,sha256=e8Xgh2Kl-nYU0P1gstEmAepCgFnk2J6UdxW8TlMafGs,2322
19
19
  fastapi_voyager/web/component/route-code-display.js,sha256=8NJPPjNRUC21gjpY8XYEQs4RBbhX1pCiqEhJp39ku6k,3678
20
20
  fastapi_voyager/web/component/schema-code-display.js,sha256=UgFotzvqSuhnPXNOr6w_r1fV2_savRiCdokEvferutE,6244
@@ -26,8 +26,8 @@ fastapi_voyager/web/icon/favicon-16x16.png,sha256=JC07jEzfIYxBIoQn_FHXvyHuxESdhW
26
26
  fastapi_voyager/web/icon/favicon-32x32.png,sha256=C7v1h58cfWOsiLp9yOIZtlx-dLasBcq3NqpHVGRmpt4,1859
27
27
  fastapi_voyager/web/icon/favicon.ico,sha256=tZolYIXkkBcFiYl1A8ksaXN2VjGamzcSdes838dLvNc,15406
28
28
  fastapi_voyager/web/icon/site.webmanifest,sha256=ep4Hzh9zhmiZF2At3Fp1dQrYQuYF_3ZPZxc1KcGBvwQ,263
29
- fastapi_voyager-0.10.1.dist-info/METADATA,sha256=RseoOEkS3k3BCnVZzQoGXj_kJVZNPGH7oCT2HuG9vyY,8794
30
- fastapi_voyager-0.10.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
31
- fastapi_voyager-0.10.1.dist-info/entry_points.txt,sha256=pEIKoUnIDXEtdMBq8EmXm70m16vELIu1VPz9-TBUFWM,53
32
- fastapi_voyager-0.10.1.dist-info/licenses/LICENSE,sha256=lNVRR3y_bFVoFKuK2JM8N4sFaj3m-7j29kvL3olFi5Y,1067
33
- fastapi_voyager-0.10.1.dist-info/RECORD,,
29
+ fastapi_voyager-0.10.2.dist-info/METADATA,sha256=XzmFjR4-CyMlrJUO8mVze18hbRrrAcUmT8wWEnNTrXY,8895
30
+ fastapi_voyager-0.10.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
31
+ fastapi_voyager-0.10.2.dist-info/entry_points.txt,sha256=pEIKoUnIDXEtdMBq8EmXm70m16vELIu1VPz9-TBUFWM,53
32
+ fastapi_voyager-0.10.2.dist-info/licenses/LICENSE,sha256=lNVRR3y_bFVoFKuK2JM8N4sFaj3m-7j29kvL3olFi5Y,1067
33
+ fastapi_voyager-0.10.2.dist-info/RECORD,,