shokupan 0.10.5 → 0.11.0

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.
Files changed (54) hide show
  1. package/dist/{analyzer-CKLGLFtx.cjs → analyzer-BAhvpNY_.cjs} +2 -7
  2. package/dist/{analyzer-CKLGLFtx.cjs.map → analyzer-BAhvpNY_.cjs.map} +1 -1
  3. package/dist/{analyzer-BqIe1p0R.js → analyzer-CnKnQ5KV.js} +3 -8
  4. package/dist/{analyzer-BqIe1p0R.js.map → analyzer-CnKnQ5KV.js.map} +1 -1
  5. package/dist/{analyzer.impl-D9Yi1Hax.cjs → analyzer.impl-CfpMu4-g.cjs} +586 -40
  6. package/dist/analyzer.impl-CfpMu4-g.cjs.map +1 -0
  7. package/dist/{analyzer.impl-CV6W1Eq7.js → analyzer.impl-DCiqlXI5.js} +586 -40
  8. package/dist/analyzer.impl-DCiqlXI5.js.map +1 -0
  9. package/dist/cli.cjs +206 -18
  10. package/dist/cli.cjs.map +1 -1
  11. package/dist/cli.js +206 -18
  12. package/dist/cli.js.map +1 -1
  13. package/dist/context.d.ts +6 -1
  14. package/dist/index.cjs +2339 -984
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.js +2336 -982
  17. package/dist/index.js.map +1 -1
  18. package/dist/plugins/application/api-explorer/static/explorer-client.mjs +375 -29
  19. package/dist/plugins/application/api-explorer/static/style.css +327 -8
  20. package/dist/plugins/application/api-explorer/static/theme.css +7 -2
  21. package/dist/plugins/application/asyncapi/generator.d.ts +4 -0
  22. package/dist/plugins/application/asyncapi/static/asyncapi-client.mjs +154 -22
  23. package/dist/plugins/application/asyncapi/static/style.css +24 -8
  24. package/dist/plugins/application/dashboard/fetch-interceptor.d.ts +107 -0
  25. package/dist/plugins/application/dashboard/metrics-collector.d.ts +38 -2
  26. package/dist/plugins/application/dashboard/plugin.d.ts +44 -1
  27. package/dist/plugins/application/dashboard/static/charts.js +127 -62
  28. package/dist/plugins/application/dashboard/static/client.js +160 -0
  29. package/dist/plugins/application/dashboard/static/graph.mjs +167 -56
  30. package/dist/plugins/application/dashboard/static/reactflow.css +20 -10
  31. package/dist/plugins/application/dashboard/static/registry.js +112 -8
  32. package/dist/plugins/application/dashboard/static/requests.js +868 -58
  33. package/dist/plugins/application/dashboard/static/styles.css +186 -14
  34. package/dist/plugins/application/dashboard/static/tabs.js +44 -9
  35. package/dist/plugins/application/dashboard/static/theme.css +7 -2
  36. package/dist/plugins/application/openapi/analyzer.impl.d.ts +61 -1
  37. package/dist/plugins/application/openapi/openapi.d.ts +3 -0
  38. package/dist/plugins/application/shared/ast-utils.d.ts +7 -0
  39. package/dist/router.d.ts +55 -16
  40. package/dist/shokupan.d.ts +7 -2
  41. package/dist/util/adapter/adapters.d.ts +19 -0
  42. package/dist/util/adapter/filesystem.d.ts +20 -0
  43. package/dist/util/controller-scanner.d.ts +4 -0
  44. package/dist/util/cpu-monitor.d.ts +2 -0
  45. package/dist/util/middleware-tracker.d.ts +10 -0
  46. package/dist/util/types.d.ts +37 -0
  47. package/package.json +5 -5
  48. package/dist/analyzer.impl-CV6W1Eq7.js.map +0 -1
  49. package/dist/analyzer.impl-D9Yi1Hax.cjs.map +0 -1
  50. package/dist/http-server-BEMPIs33.cjs +0 -85
  51. package/dist/http-server-BEMPIs33.cjs.map +0 -1
  52. package/dist/http-server-CCeagTyU.js +0 -68
  53. package/dist/http-server-CCeagTyU.js.map +0 -1
  54. package/dist/plugins/application/dashboard/static/poll.js +0 -146
@@ -49,11 +49,37 @@ body {
49
49
  display: flex;
50
50
  flex-direction: column;
51
51
  flex-shrink: 0;
52
- transition: width 0.2s;
52
+ transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
53
+ /* Smoother transition */
53
54
  position: relative;
54
55
  /* For resize handle */
55
56
  }
56
57
 
58
+ /* Sidebar Resizing State */
59
+ .sidebar.resizing {
60
+ transition: none;
61
+ /* Disable transition during drag */
62
+ }
63
+
64
+ /* Sidebar Collapsed State */
65
+ .sidebar.collapsed {
66
+ width: 0 !important;
67
+ border-right: none;
68
+ overflow: visible;
69
+ /* Allow trigger to overflow */
70
+ }
71
+
72
+ .sidebar.collapsed .sidebar-header,
73
+ .sidebar.collapsed .nav-groups,
74
+ .sidebar.collapsed .resize-handle {
75
+ display: none;
76
+ }
77
+
78
+ .sidebar.collapsed .sidebar-collapse-trigger {
79
+ display: flex;
80
+ }
81
+
82
+
57
83
  /* Sidebar Header */
58
84
  .sidebar-header {
59
85
  padding: 16px;
@@ -67,7 +93,9 @@ body {
67
93
  background: transparent;
68
94
  border: 1px solid var(--border-color);
69
95
  color: var(--text-secondary);
70
- border-radius: 4px;
96
+ width: 36px;
97
+ height: 36px;
98
+ border-radius: 6px;
71
99
  cursor: pointer;
72
100
  padding: 6px 10px;
73
101
  font-size: 1rem;
@@ -101,7 +129,7 @@ body {
101
129
  background: rgba(255, 255, 255, 0.05);
102
130
  padding: 2px 6px;
103
131
  border-radius: 4px;
104
- font-family: 'JetBrains Mono', monospace;
132
+ font-family: var(--shokupan-font-mono);
105
133
  }
106
134
 
107
135
  /* Nav Tree */
@@ -189,7 +217,7 @@ body {
189
217
  min-width: 45px;
190
218
  text-align: center;
191
219
  text-transform: uppercase;
192
- font-family: 'JetBrains Mono', monospace;
220
+ font-family: var(--shokupan-font-mono);
193
221
  }
194
222
 
195
223
  .nav-label {
@@ -197,7 +225,7 @@ body {
197
225
  overflow: hidden;
198
226
  text-overflow: ellipsis;
199
227
  flex: 1;
200
- font-family: 'JetBrains Mono', monospace;
228
+ font-family: var(--shokupan-font-mono);
201
229
  }
202
230
 
203
231
  .nav-label .param-highlight {
@@ -297,7 +325,28 @@ body {
297
325
  /* Sidebar Utilities */
298
326
  .sidebar-collapse-trigger {
299
327
  display: none;
300
- /* Hide for now until implemented */
328
+ position: absolute;
329
+ left: 12px;
330
+ top: 12px;
331
+ z-index: 100;
332
+ /* Higher than sidebar content */
333
+ width: 36px;
334
+ height: 36px;
335
+ background: var(--bg-secondary);
336
+ border: 1px solid var(--border-color);
337
+ border-radius: 6px;
338
+ align-items: center;
339
+ justify-content: center;
340
+ cursor: pointer;
341
+ color: var(--text-secondary);
342
+ font-size: 1.2rem;
343
+ transition: all 0.2s;
344
+ box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
345
+ }
346
+
347
+ .sidebar-collapse-trigger:hover {
348
+ color: var(--text-primary);
349
+ background: #2a374a;
301
350
  }
302
351
 
303
352
  .resize-handle {
@@ -390,6 +439,11 @@ body {
390
439
  margin-bottom: 12px;
391
440
  }
392
441
 
442
+ /* Add spacing for the sidebar expand button */
443
+ .no-sidebar .request-header-main {
444
+ margin-left: 48px;
445
+ }
446
+
393
447
  .request-url-bar {
394
448
  flex: 1;
395
449
  display: flex;
@@ -439,7 +493,7 @@ body {
439
493
  background: transparent;
440
494
  border: none;
441
495
  color: var(--text-primary);
442
- font-family: 'JetBrains Mono', monospace;
496
+ font-family: var(--shokupan-font-mono);
443
497
  font-size: 0.9rem;
444
498
  outline: none;
445
499
  }
@@ -557,7 +611,6 @@ body {
557
611
  border-radius: 12px;
558
612
  font-size: 0.8rem;
559
613
  color: var(--text-secondary);
560
- cursor: help;
561
614
  }
562
615
 
563
616
  /* Source Viewer */
@@ -750,6 +803,12 @@ body {
750
803
  border-left: 2px solid rgba(59, 130, 246, 0.5);
751
804
  }
752
805
 
806
+ .closure-highlight-dynamic {
807
+ background: rgba(251, 191, 36, 0.15);
808
+ /* Amber - Dynamic/Warning */
809
+ border-left: 2px solid rgba(251, 191, 36, 0.8);
810
+ }
811
+
753
812
  .emit-highlight {
754
813
  background: rgba(16, 185, 129, 0.15);
755
814
  /* Green - RECV (Emit) */
@@ -786,4 +845,264 @@ body {
786
845
  background: rgba(6, 182, 212, 0.15);
787
846
  /* Cyan - Success/Static */
788
847
  border-left: 3px solid #06b6d4;
848
+ }
849
+
850
+ .property-heading {
851
+ display: flex;
852
+ align-items: center;
853
+ gap: 8px;
854
+ padding: 6px 0;
855
+ }
856
+
857
+ .property-name {
858
+ font-family: var(--shokupan-font-mono);
859
+ font-weight: 500;
860
+ color: var(--text-primary);
861
+ }
862
+
863
+ .property-detail {
864
+ color: var(--text-secondary);
865
+ font-size: 0.85rem;
866
+ }
867
+
868
+ .property-detail-value {
869
+ color: #4ec9b0;
870
+ }
871
+
872
+ .type-any {}
873
+
874
+ .type-unknown {}
875
+
876
+ /* Middleware Sidebar Section */
877
+ .middleware-section {
878
+ margin-top: 16px;
879
+ border-top: 1px solid var(--border-color);
880
+ padding-top: 16px;
881
+ }
882
+
883
+ .middleware-header {
884
+ padding: 8px 16px;
885
+ display: flex;
886
+ align-items: center;
887
+ justify-content: space-between;
888
+ margin-bottom: 8px;
889
+ }
890
+
891
+ .middleware-header h3 {
892
+ margin: 0;
893
+ font-size: 0.8rem;
894
+ color: var(--text-secondary);
895
+ font-weight: 600;
896
+ text-transform: uppercase;
897
+ letter-spacing: 0.5px;
898
+ }
899
+
900
+ .middleware-count {
901
+ background: rgba(255, 255, 255, 0.1);
902
+ padding: 2px 6px;
903
+ border-radius: 10px;
904
+ font-size: 0.7rem;
905
+ color: var(--text-secondary);
906
+ }
907
+
908
+ .middleware-list {
909
+ display: flex;
910
+ flex-direction: column;
911
+ gap: 2px;
912
+ }
913
+
914
+ .middleware-item {
915
+ padding: 6px 16px;
916
+ cursor: pointer;
917
+ display: flex;
918
+ align-items: center;
919
+ gap: 8px;
920
+ color: var(--text-secondary);
921
+ font-size: 0.85rem;
922
+ text-decoration: none;
923
+ transition: all 0.1s;
924
+ border-left: 2px solid transparent;
925
+ }
926
+
927
+ .middleware-item:hover {
928
+ background: rgba(255, 255, 255, 0.03);
929
+ color: var(--text-primary);
930
+ }
931
+
932
+ .middleware-item.active {
933
+ background: rgba(245, 158, 11, 0.1);
934
+ border-left-color: var(--primary);
935
+ color: var(--primary);
936
+ }
937
+
938
+ .middleware-name {
939
+ flex: 1;
940
+ font-family: var(--shokupan-font-mono);
941
+ }
942
+
943
+ .middleware-source-link {
944
+ opacity: 0;
945
+ padding: 4px;
946
+ color: var(--text-secondary);
947
+ text-decoration: none;
948
+ display: flex;
949
+ align-items: center;
950
+ transition: opacity 0.2s, color 0.2s;
951
+ }
952
+
953
+ .middleware-item:hover .middleware-source-link {
954
+ opacity: 1;
955
+ }
956
+
957
+ .middleware-source-link:hover {
958
+ color: var(--primary);
959
+ }
960
+
961
+ /* Middleware Detail View */
962
+ .middleware-detail-view {
963
+ padding: 24px;
964
+ }
965
+
966
+ .middleware-detail-view .middleware-header {
967
+ border-bottom: 1px solid var(--border-color);
968
+ padding-bottom: 16px;
969
+ margin-bottom: 24px;
970
+ }
971
+
972
+ .middleware-detail-view .middleware-header h1 {
973
+ margin: 0 0 8px 0;
974
+ font-size: 2rem;
975
+ color: var(--text-primary);
976
+ }
977
+
978
+ .middleware-meta {
979
+ display: flex;
980
+ gap: 12px;
981
+ align-items: center;
982
+ }
983
+
984
+ .middleware-capabilities {
985
+ display: grid;
986
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
987
+ gap: 24px;
988
+ margin-bottom: 24px;
989
+ }
990
+
991
+ .capability-section h3 {
992
+ margin: 0 0 12px 0;
993
+ font-size: 1.1rem;
994
+ color: var(--text-primary);
995
+ }
996
+
997
+ .response-list {
998
+ display: flex;
999
+ flex-direction: column;
1000
+ gap: 8px;
1001
+ }
1002
+
1003
+ .response-item {
1004
+ display: flex;
1005
+ align-items: center;
1006
+ gap: 12px;
1007
+ padding: 8px 12px;
1008
+ background: var(--bg-secondary);
1009
+ border-radius: 6px;
1010
+ }
1011
+
1012
+ .status-code {
1013
+ background: var(--bg-card);
1014
+ padding: 4px 8px;
1015
+ border-radius: 4px;
1016
+ font-weight: bold;
1017
+ font-family: var(--shokupan-font-mono);
1018
+ }
1019
+
1020
+ .header-list {
1021
+ display: flex;
1022
+ flex-wrap: wrap;
1023
+ gap: 8px;
1024
+ }
1025
+
1026
+ .header-name {
1027
+ background: var(--bg-secondary);
1028
+ padding: 4px 8px;
1029
+ border-radius: 4px;
1030
+ font-size: 0.85rem;
1031
+ font-family: var(--shokupan-font-mono);
1032
+ }
1033
+
1034
+ .usage-section {
1035
+ margin-top: 24px;
1036
+ }
1037
+
1038
+ .usage-section h3 {
1039
+ margin: 0 0 12px 0;
1040
+ font-size: 1.1rem;
1041
+ color: var(--text-primary);
1042
+ }
1043
+
1044
+ .route-list {
1045
+ display: flex;
1046
+ flex-direction: column;
1047
+ gap: 8px;
1048
+ }
1049
+
1050
+ .route-link {
1051
+ display: flex;
1052
+ align-items: center;
1053
+ gap: 12px;
1054
+ padding: 8px 12px;
1055
+ background: var(--bg-secondary);
1056
+ border-radius: 6px;
1057
+ text-decoration: none;
1058
+ color: var(--text-secondary);
1059
+ transition: all 0.1s;
1060
+ }
1061
+
1062
+ .route-link:hover {
1063
+ background: var(--bg-card);
1064
+ color: var(--text-primary);
1065
+ transform: translateX(4px);
1066
+ }
1067
+
1068
+ .route-item {
1069
+ padding: 8px 12px;
1070
+ background: var(--bg-secondary);
1071
+ border-radius: 6px;
1072
+ color: var(--text-secondary);
1073
+ }
1074
+
1075
+ /* Middleware within nav groups */
1076
+ .group-middleware {
1077
+ margin-bottom: 8px;
1078
+ padding-bottom: 8px;
1079
+ border-bottom: 1px solid rgba(255, 255, 255, 0.05);
1080
+ }
1081
+
1082
+ .middleware-nav-item {
1083
+ color: var(--method-patch) !important;
1084
+ font-style: italic;
1085
+ }
1086
+
1087
+ .middleware-nav-item:hover {
1088
+ color: var(--text-primary) !important;
1089
+ }
1090
+
1091
+ .middleware-nav-item.active {
1092
+ color: var(--primary) !important;
1093
+ }
1094
+
1095
+ .middleware-icon {
1096
+ font-size: 0.8rem;
1097
+ opacity: 0.7;
1098
+ }
1099
+
1100
+ .middleware-nav-item .middleware-badge {
1101
+ background: rgba(139, 92, 246, 0.15);
1102
+ padding: 2px 6px;
1103
+ border-radius: 10px;
1104
+ font-size: 0.65rem;
1105
+ min-width: 18px;
1106
+ text-align: center;
1107
+ color: var(--method-patch);
789
1108
  }
@@ -13,8 +13,8 @@
13
13
  --palette-dark-header: rgb(39, 27, 19);
14
14
  /* Proofing Drawer */
15
15
 
16
- /* Universal defaults (tokens) */
17
- --shokupan-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
16
+ --shokupan-font: "Vend Sans", 'Open Sans', 'Helvetica Neue', sans-serif;
17
+ --shokupan-font-mono: "Google Sans Code", monospace;
18
18
 
19
19
  /* Theme Variables - Enforced Dark Mode */
20
20
  --bg-primary: var(--palette-dark-bg);
@@ -42,6 +42,11 @@
42
42
  --button-text: #1A1614;
43
43
  }
44
44
 
45
+ * {
46
+ box-sizing: border-box;
47
+ font-optical-sizing: auto;
48
+ }
49
+
45
50
  ::-webkit-scrollbar {
46
51
  width: 8px;
47
52
  height: 8px;
@@ -1,3 +1,7 @@
1
1
  import { ShokupanRouter } from '../../../router';
2
2
  import { AsyncAPIOptions } from '../../../util/types';
3
+ /**
4
+ * Gets deduped AST routes if available.
5
+ * Duplicated from openapi.ts to avoid cross-module dependency issues.
6
+ */
3
7
  export declare function generateAsyncApi<T extends Record<string, any>>(rootRouter: ShokupanRouter<T>, options?: AsyncAPIOptions): Promise<any>;