shokupan 0.11.0 → 0.12.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 (48) hide show
  1. package/README.md +46 -1815
  2. package/dist/{analyzer-CnKnQ5KV.js → analyzer-BkNQHWj4.js} +2 -2
  3. package/dist/{analyzer-CnKnQ5KV.js.map → analyzer-BkNQHWj4.js.map} +1 -1
  4. package/dist/{analyzer-BAhvpNY_.cjs → analyzer-DM-OlRq8.cjs} +2 -2
  5. package/dist/{analyzer-BAhvpNY_.cjs.map → analyzer-DM-OlRq8.cjs.map} +1 -1
  6. package/dist/{analyzer.impl-CfpMu4-g.cjs → analyzer.impl-CVJ8zfGQ.cjs} +11 -3
  7. package/dist/analyzer.impl-CVJ8zfGQ.cjs.map +1 -0
  8. package/dist/{analyzer.impl-DCiqlXI5.js → analyzer.impl-CsA1bS_s.js} +11 -3
  9. package/dist/analyzer.impl-CsA1bS_s.js.map +1 -0
  10. package/dist/cli.cjs +1 -1
  11. package/dist/cli.js +1 -1
  12. package/dist/context.d.ts +40 -8
  13. package/dist/index.cjs +1011 -300
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.js +1011 -300
  16. package/dist/index.js.map +1 -1
  17. package/dist/plugins/application/api-explorer/static/theme.css +4 -0
  18. package/dist/plugins/application/auth.d.ts +5 -0
  19. package/dist/plugins/application/dashboard/fetch-interceptor.d.ts +12 -0
  20. package/dist/plugins/application/dashboard/plugin.d.ts +9 -0
  21. package/dist/plugins/application/dashboard/static/requests.js +537 -251
  22. package/dist/plugins/application/dashboard/static/tabulator.css +23 -3
  23. package/dist/plugins/application/dashboard/static/theme.css +4 -0
  24. package/dist/plugins/application/mcp-server/plugin.d.ts +39 -0
  25. package/dist/plugins/application/openapi/analyzer.impl.d.ts +4 -0
  26. package/dist/plugins/middleware/compression.d.ts +12 -2
  27. package/dist/plugins/middleware/rate-limit.d.ts +5 -0
  28. package/dist/router.d.ts +6 -5
  29. package/dist/server.d.ts +22 -0
  30. package/dist/shokupan.d.ts +24 -1
  31. package/dist/util/adapter/bun.d.ts +8 -0
  32. package/dist/util/adapter/index.d.ts +4 -0
  33. package/dist/util/adapter/interface.d.ts +12 -0
  34. package/dist/util/adapter/node.d.ts +8 -0
  35. package/dist/util/adapter/wintercg.d.ts +5 -0
  36. package/dist/util/body-parser.d.ts +30 -0
  37. package/dist/util/decorators.d.ts +20 -3
  38. package/dist/util/di.d.ts +3 -8
  39. package/dist/util/metadata.d.ts +18 -0
  40. package/dist/util/request.d.ts +1 -0
  41. package/dist/util/symbol.d.ts +1 -0
  42. package/dist/util/types.d.ts +132 -3
  43. package/package.json +3 -1
  44. package/dist/analyzer.impl-CfpMu4-g.cjs.map +0 -1
  45. package/dist/analyzer.impl-DCiqlXI5.js.map +0 -1
  46. package/dist/plugins/application/dashboard/static/failures.js +0 -85
  47. package/dist/plugins/application/http-server.d.ts +0 -13
  48. package/dist/util/adapter/adapters.d.ts +0 -19
@@ -24,6 +24,7 @@
24
24
 
25
25
  --text-primary: #F0F0F0;
26
26
  --text-secondary: var(--palette-dark-accent);
27
+ --text-flavor: #ffcc80;
27
28
  --text-muted: rgba(214, 211, 209, 0.5);
28
29
 
29
30
  --primary: var(--palette-dark-primary);
@@ -34,12 +35,15 @@
34
35
  --card-border: rgba(214, 211, 209, 0.2);
35
36
 
36
37
  --table-header-border-color: rgba(214, 211, 209, 0.2);
38
+ --table-row-hover-color: #382818;
39
+ --table-row-selected-color: #48331e;
37
40
 
38
41
  --link-color: var(--palette-dark-primary);
39
42
  --link-hover: #FFCBA0;
40
43
 
41
44
  --button-bg: var(--palette-dark-primary);
42
45
  --button-text: #1A1614;
46
+
43
47
  }
44
48
 
45
49
  * {
@@ -65,6 +65,11 @@ export interface AuthConfig {
65
65
  * JWT expiration
66
66
  */
67
67
  jwtExpiration?: string;
68
+ /**
69
+ * JWT algorithm
70
+ * @default 'HS256'
71
+ */
72
+ jwtAlgorithm?: string;
68
73
  /**
69
74
  * Cookie options
70
75
  */
@@ -79,12 +79,24 @@ export type OutboundRequestCallback = (log: OutboundRequestLog) => void;
79
79
  * the original `fetch`. Proceed with caution.
80
80
  */
81
81
  export declare class FetchInterceptor {
82
+ private static originalFetch;
83
+ private static originalHttpRequest;
84
+ private static originalHttpsRequest;
82
85
  private originalFetch;
83
86
  private originalHttpRequest;
84
87
  private originalHttpsRequest;
85
88
  private callbacks;
86
89
  private isPatched;
87
90
  constructor();
91
+ /**
92
+ * Statically restore the original network methods.
93
+ * Useful for cleaning up in tests.
94
+ */
95
+ /**
96
+ * Statically restore the original network methods.
97
+ * Useful for cleaning up in tests.
98
+ */
99
+ static restore(): void;
88
100
  /**
89
101
  * Patches the global `fetch` function to intercept requests.
90
102
  * If already patched, this method does nothing.
@@ -26,6 +26,10 @@ export interface RequestLog {
26
26
  export interface DashboardConfig {
27
27
  getRequestHeaders?: () => HeadersInit;
28
28
  path?: string;
29
+ /**
30
+ * Glob patterns to ignore in the request list
31
+ */
32
+ ignorePaths?: string[];
29
33
  /**
30
34
  * Retention time in milliseconds
31
35
  */
@@ -53,6 +57,11 @@ export interface DashboardConfig {
53
57
  * @default 10_000
54
58
  */
55
59
  updateInterval?: number;
60
+ /**
61
+ * Maximum number of request logs to keep in memory.
62
+ * @default 1000
63
+ */
64
+ maxLogEntries?: number;
56
65
  }
57
66
  export declare class Dashboard implements ShokupanPlugin {
58
67
  private readonly dashboardConfig;