fastapi-voyager 0.10.3__py3-none-any.whl → 0.10.4__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.
@@ -1,2 +1,2 @@
1
1
  __all__ = ["__version__"]
2
- __version__ = "0.10.3"
2
+ __version__ = "0.10.4"
@@ -64,7 +64,7 @@
64
64
  <div id="q-app">
65
65
  <q-layout view="hHh lpR fff">
66
66
  <q-header bordered class="bg-primary text-white">
67
- <q-toolbar class="row text-grey-9 bg-white" style="width: 100%">
67
+ <q-toolbar class="row text-grey-9 bg-white" style="width: 100%; border-bottom: 2px solid #009485;">
68
68
  <div
69
69
  class="col-auto text-primary"
70
70
  style="font-size: 18px; font-weight: bold; display: flex; align-items: baseline;"
@@ -86,39 +86,21 @@
86
86
  />
87
87
  </div>
88
88
  <div class="col-auto q-ml-auto">
89
- <q-toggle
90
- v-if="state.enableBriefMode"
91
- class="q-mr-md"
92
- v-model="state.brief"
93
- label="Brief Mode"
94
- @update:model-value="(val) => toggleBrief(val)"
95
- title="skip middle classes, config module_prefix to enable it"
96
- dense
97
- />
98
- </div>
99
- <div class="col-auto">
100
- <q-toggle
101
- v-model="state.hidePrimitiveRoute"
102
- @update:model-value="(val) => toggleHidePrimitiveRoute(val)"
103
- label="Hide Primitive"
104
- title="hide routes return primitive"
105
- class="q-mr-md"
106
- dense
107
- />
108
- </div>
109
- <div class="col-auto">
110
89
  <q-btn
111
90
  outline
112
91
  @click="onReset"
113
92
  title="may be very slow"
114
- class="q-mr-md"
115
- label="Show All"
93
+ icon="border_all"
94
+ flat
95
+ class="q-mr-sm"
96
+ label="Full Graph"
116
97
  />
117
98
  </div>
118
99
  <div class="col-auto">
119
100
  <q-btn
120
101
  outline
121
102
  icon="search"
103
+ flat
122
104
  label="Search"
123
105
  class="q-mr-md"
124
106
  @click="showDialog()"
@@ -131,7 +113,7 @@
131
113
  flat
132
114
  icon="help_outline"
133
115
  aria-label="Help"
134
- class="q-mr-sm"
116
+ style="margin-right: 40px"
135
117
  >
136
118
  <q-tooltip
137
119
  anchor="bottom middle"
@@ -156,7 +138,7 @@
156
138
  </div>
157
139
  </q-tooltip>
158
140
  </q-btn>
159
- </div>
141
+ <a href="https://github.com/allmonday/fastapi-voyager" target="_blank" class="github-corner" aria-label="View source on GitHub"><svg width="52" height="52" viewBox="0 0 250 250" style="fill:#009485; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"/><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"/><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"/></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style></div>
160
142
  <!-- <q-toolbar-title class="text-primary row">
161
143
  </q-toolbar-title> -->
162
144
  </q-toolbar>
@@ -232,14 +214,13 @@
232
214
  content-class="q-pa-none"
233
215
  >
234
216
  <template #header>
235
- <div class="row items-center" style="width: 100%">
236
- <div class="row items-center">
217
+ <div class="" style="white-space: nowrap; width: 100%">
237
218
  <q-icon
219
+ style="vertical-align: top;"
238
220
  class="q-mr-sm"
239
221
  :name="state.tag == tag.name ? 'folder' : 'folder_open'"
240
222
  ></q-icon>
241
- <span>{{ tag.name }} <q-chip class="q-ml-sm" dense>{{ tag.routes.length }}</q-chip></span>
242
- </div>
223
+ <span>{{ tag.name }} <q-chip style="position:relative; top: -1px;" class="q-ml-sm" dense>{{ tag.routes.length }}</q-chip></span>
243
224
  </div>
244
225
  </template>
245
226
  <q-list separator style="overflow: auto; max-height: 60vh;">
@@ -280,15 +261,34 @@
280
261
  <template #after>
281
262
  <div style="position: relative; width: 100%; height: 100%;">
282
263
  <div id="graph" class="adjust-fit"></div>
283
- <q-toggle
284
- v-model="state.focus"
285
- v-show="schemaCodeName"
286
- @update:model-value="val => onFocusChange(val)"
287
- label="Focus"
288
- title="pick a schema and toggle focus on to display related nodes only"
289
- style="position: absolute; left: 8px; bottom: 8px; z-index: 10; background: rgba(255,255,255,0.85); border-radius: 4px; padding: 2px 8px;"
290
- size="sm"
291
- />
264
+ <div style="position: absolute; left: 8px; bottom: 8px; z-index: 10; background: rgba(255,255,255,0.85); border-radius: 4px; padding: 2px 8px;">
265
+ <div>
266
+ <q-toggle
267
+ v-model="state.focus"
268
+ v-show="schemaCodeName"
269
+ @update:model-value="val => onFocusChange(val)"
270
+ label="Focus"
271
+ title="pick a schema and toggle focus on to display related nodes only"
272
+ />
273
+ </div>
274
+ <div>
275
+ <q-toggle
276
+ v-if="state.enableBriefMode"
277
+ v-model="state.brief"
278
+ label="Brief Mode"
279
+ @update:model-value="(val) => toggleBrief(val)"
280
+ title="skip middle classes, config module_prefix to enable it"
281
+ />
282
+ </div>
283
+ <div>
284
+ <q-toggle
285
+ v-model="state.hidePrimitiveRoute"
286
+ @update:model-value="(val) => toggleHidePrimitiveRoute(val)"
287
+ label="Hide Primitive"
288
+ title="hide routes return primitive"
289
+ />
290
+ </div>
291
+ </div>
292
292
  </div>
293
293
  </template>
294
294
  </q-splitter>
@@ -88,9 +88,9 @@ const app = createApp({
88
88
 
89
89
  async function onFocusChange(val) {
90
90
  if (val) {
91
- await onGenerate(false, schemaCodeName.value)
91
+ await onGenerate(false)
92
92
  } else {
93
- await onGenerate(false, null)
93
+ await onGenerate(false)
94
94
  setTimeout(() => {
95
95
  const ele = $(`[data-name='${schemaCodeName.value}'] polygon`)
96
96
  ele.click()
@@ -98,7 +98,8 @@ const app = createApp({
98
98
  }
99
99
  }
100
100
 
101
- async function onGenerate(resetZoom = true, schema_name = null) {
101
+ async function onGenerate(resetZoom = true) {
102
+ const schema_name = state.focus ? schemaCodeName.value : null;
102
103
  state.generating = true;
103
104
  try {
104
105
  const payload = {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastapi-voyager
3
- Version: 0.10.3
3
+ Version: 0.10.4
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
@@ -32,7 +32,9 @@ Description-Content-Type: text/markdown
32
32
 
33
33
  > This repo is still in early stage, it supports pydantic v2 only
34
34
 
35
- Inspect your API interactively!
35
+ Inspect your API interactively!
36
+
37
+ [visit online demo](https://www.newsyeah.fun/voyager/) of project: [composition oriented development pattern](https://github.com/allmonday/composition-oriented-development-pattern)
36
38
 
37
39
  <p align="center"><img src="./voyager.jpg" alt="" /></p>
38
40
  <p align="center"><a target="_blank" rel="" href="https://www.youtube.com/watch?v=PGlbQq1M-n8"><img src="http://img.youtube.com/vi/PGlbQq1M-n8/0.jpg" alt="" style="max-width: 100%;"></a></p>
@@ -170,6 +172,8 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
170
172
  - [ ] optimize static resource (allow manually config url)
171
173
  - [ ] improve search dialog
172
174
  - [ ] add route/tag list
175
+ - [ ] type alias should not be kept as node instead of compiling to original type
176
+ - [ ] how to correctly handle the generic type ?
173
177
 
174
178
  ### in analysis
175
179
  - [ ] click field to highlight links
@@ -240,6 +244,9 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
240
244
  - [x] fix focus in brief-mode
241
245
  - [x] ui: adjust focus position
242
246
  - [x] refactor naming
247
+ - 0.10.4
248
+ - [x] fix: when focus is on, should ensure changes from other params not broken.
249
+
243
250
 
244
251
  #### 0.11
245
252
  - [ ] enable/disable module cluster (to save space)
@@ -248,6 +255,7 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
248
255
  - [ ] support opening route in swagger
249
256
  - config docs path
250
257
  - [ ] add tests
258
+ - [ ] fix: focus should reset zoom
251
259
 
252
260
  #### 0.12
253
261
  - [ ] integration with pydantic-resolve
@@ -6,15 +6,15 @@ fastapi_voyager/render.py,sha256=sR1oUh8d3hhDalQhUcrL-k2ZYAWbLDGpGDOB0dDaqRQ,780
6
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=Ly9dlTMt5hV5NpnQZMSH6dAdqe4rTuzydBQ4KMo8MJk,49
9
+ fastapi_voyager/version.py,sha256=72VoP-5nPbuiOf_uhKc4wtpmuLClUnAUOlkT8SDgWdU,49
10
10
  fastapi_voyager/voyager.py,sha256=r-_V0EPWwBM7N4hMlo-Si48mHVDc3zc9oGgTPCoEW_8,12377
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=I41DH6WbfPgLGi49_1WFii9cldVIU8omQX13NulzaT0,15192
14
+ fastapi_voyager/web/index.html,sha256=ItGJUnItnG_e11uXW_eKAWK5LxCAphXyB0oh8mOOCVw,16911
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=ZPOS0lsJ-Pg4p8kqz8jScvJod1CqMXx5DjPIqkmGDpY,10251
17
+ fastapi_voyager/web/vue-main.js,sha256=BPGnowdtFqba8vPMPV2eMwXihecPSr_BVsIcjS5jOXg,10272
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.3.dist-info/METADATA,sha256=wLQ_TjppZDsfoKMa6MRgCWtjSN5oHfW1EIyumk8Ya1E,9000
30
- fastapi_voyager-0.10.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
31
- fastapi_voyager-0.10.3.dist-info/entry_points.txt,sha256=pEIKoUnIDXEtdMBq8EmXm70m16vELIu1VPz9-TBUFWM,53
32
- fastapi_voyager-0.10.3.dist-info/licenses/LICENSE,sha256=lNVRR3y_bFVoFKuK2JM8N4sFaj3m-7j29kvL3olFi5Y,1067
33
- fastapi_voyager-0.10.3.dist-info/RECORD,,
29
+ fastapi_voyager-0.10.4.dist-info/METADATA,sha256=vYGgXTEEV6BSyO0iv3u5Z08NIqOaXTlWkU9nd7ZMKMs,9449
30
+ fastapi_voyager-0.10.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
31
+ fastapi_voyager-0.10.4.dist-info/entry_points.txt,sha256=pEIKoUnIDXEtdMBq8EmXm70m16vELIu1VPz9-TBUFWM,53
32
+ fastapi_voyager-0.10.4.dist-info/licenses/LICENSE,sha256=lNVRR3y_bFVoFKuK2JM8N4sFaj3m-7j29kvL3olFi5Y,1067
33
+ fastapi_voyager-0.10.4.dist-info/RECORD,,