@tezx/devtools 1.0.8 → 1.0.9

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.
package/README.md CHANGED
@@ -127,7 +127,7 @@ type Options = {
127
127
 
128
128
  **Using `tezx/router`**
129
129
 
130
- ```
130
+ ```bash
131
131
  my-app/
132
132
  ├── routes/
133
133
  │ ├── _middleware.ts
@@ -0,0 +1,31 @@
1
+ import { TezX, Context, Callback } from 'tezx';
2
+
3
+ type Tab = "cookies" | "routes" | ".env" | "middlewares";
4
+ type TabType = {
5
+ doc_title: string;
6
+ label: string;
7
+ tab: Tab | string;
8
+ content: string;
9
+ }[];
10
+
11
+ declare function dumpRoutes(TezX: TezX<any>): {
12
+ endpoint: any;
13
+ pattern: any;
14
+ method: any;
15
+ appliedMiddlewares: any[];
16
+ }[];
17
+
18
+ type MiddlewareEntry = {
19
+ pattern: string;
20
+ type: "static" | "wildcard" | "optional params" | "dynamic params";
21
+ appliedMiddlewares: string[];
22
+ };
23
+ declare function dumpMiddlewares(TezX: TezX<any>): MiddlewareEntry[];
24
+
25
+ type Options = {
26
+ extraTabs?: (ctx: Context) => Promise<TabType> | TabType;
27
+ disableTabs?: Tab[];
28
+ };
29
+ declare function DevTools(app: TezX<any>, options?: Options): Callback;
30
+
31
+ export { DevTools, type Options, DevTools as default, dumpMiddlewares, dumpRoutes };