Sidecar Logo

middleware/canon.ts

Created: 2025-12-15T22:45:43.243Z Modified: 2025-12-19T15:51:18.953Z

Configuration

/**
 * Sidecar Config for middleware/canon.ts
 */
module.exports = {
  title: "canon.ts",
  description: "Auto-generated draft",
  created: "2025-12-15T22:45:43.243Z",
  modified: "2025-12-19T15:51:18.953Z",
};

Route Flow Map

--- title: "Route Flow: ssutil /src/middleware/canon.ts " --- flowchart TD subgraph USE ["USE"] hono_use__["USE *"] style hono_use__ fill:#5E377B,color:#fff,stroke:#B4976A hono_use__["USE *"] style hono_use__ fill:#5E377B,color:#fff,stroke:#B4976A end subgraph GET ["GET"] hono_get__ui["GET /ui"] style hono_get__ui fill:#5E377B,color:#fff,stroke:#B4976A end subgraph POST ["POST"] initSessionRoute["POST /init-session"] style initSessionRoute fill:#5E377B,color:#fff,stroke:#B4976A refreshTokenRoute["POST /refresh-token"] style refreshTokenRoute fill:#5E377B,color:#fff,stroke:#B4976A initPrivateRoute["POST /init-private"] style initPrivateRoute fill:#5E377B,color:#fff,stroke:#B4976A end subgraph API ["API"] openapi_initSessionRoute["API initSessionRoute"] style openapi_initSessionRoute fill:#5E377B,color:#fff,stroke:#B4976A openapi_refreshTokenRoute["API refreshTokenRoute"] style openapi_refreshTokenRoute fill:#5E377B,color:#fff,stroke:#B4976A openapi_initPrivateRoute["API initPrivateRoute"] style openapi_initPrivateRoute fill:#5E377B,color:#fff,stroke:#B4976A end subgraph DOC ["DOC"] hono_doc__doc["DOC /doc"] style hono_doc__doc fill:#5E377B,color:#fff,stroke:#B4976A end canonAuthMiddleware{{"canonAuthMiddleware"}} style canonAuthMiddleware fill:#161b22,color:#fff,stroke:#c2a35d initSessionRoute --> openapi_initSessionRoute refreshTokenRoute --> openapi_refreshTokenRoute initPrivateRoute --> openapi_initPrivateRoute linkStyle default stroke:#c2a35d,stroke-width:2px,color:#fff classDef default color:#fff

AST Code Structure

--- title: "AST Structure: ssutil /src/middleware/canon.ts " --- %%{init: { 'flowchart': { 'nodeSpacing': 20, 'rankSpacing': 30 }, 'themeVariables': { 'fontSize': '11px' } } }%% graph LR n0["SF"] n2["@hono/zod-openapi"] style n2 fill:#ffffff10,stroke:#ffffff33,color:#a1a1a1 n3["ID: OpenAPIHono"] n0 --> n3 n3 --> n2 style n3 stroke-dasharray:5,stroke:#B4976A n4["ID: createRoute"] n0 --> n4 n4 --> n2 style n4 stroke-dasharray:5,stroke:#B4976A n5["ID: z"] n0 --> n5 n5 --> n2 style n5 stroke-dasharray:5,stroke:#B4976A n7["@hono/swagger-ui"] style n7 fill:#ffffff10,stroke:#ffffff33,color:#a1a1a1 n8["ID: swaggerUI"] n0 --> n8 n8 --> n7 style n8 stroke-dasharray:5,stroke:#B4976A n10["../utils/crypto.js"] style n10 fill:#ffffff10,stroke:#ffffff33,color:#a1a1a1 style n10 cursor:pointer,stroke-width:2px,stroke:#B4976A n11["ID: encryptToken"] n0 --> n11 n11 --> n10 style n11 stroke-dasharray:5,stroke:#B4976A n12["ID: inspectToken"] n0 --> n12 n12 --> n10 style n12 stroke-dasharray:5,stroke:#B4976A n14["./guard"] style n14 fill:#ffffff10,stroke:#ffffff33,color:#a1a1a1 style n14 cursor:pointer,stroke-width:2px,stroke:#B4976A n15["ID: protectAdminRoutes"] n0 --> n15 n15 --> n14 style n15 stroke-dasharray:5,stroke:#B4976A n86["FD: canonAuthMiddleware"] n0 --> n86 n128["CE: next"] n86 --> n128 n209["CE: c.json(401)"] n86 --> n209 n233["CE: c.json(401)"] n86 --> n233 n243["CE: next"] n86 --> n243 n255["CE: app.use('*')"] n0 --> n255 n269["CE: app.use('*')"] n0 --> n269 n300["CE: next"] n269 --> n300 n309["CE: createRoute(initSessionRoute)"] n0 --> n309 n364["CE: app.openapi(initSessionRoute)"] n0 --> n364 n427["CE: c.json(403)"] n364 --> n427 n468["CE: c.json"] n364 --> n468 n478["CE: createRoute(refreshTokenRoute)"] n0 --> n478 n541["CE: app.openapi(refreshTokenRoute)"] n0 --> n541 n624["CE: c.json"] n541 --> n624 n632["CE: c.json(401)"] n541 --> n632 n644["CE: createRoute(initPrivateRoute)"] n0 --> n644 n678["CE: app.openapi(initPrivateRoute)"] n0 --> n678 n721["CE: c.json"] n678 --> n721 n728["CE: app.doc('/doc')"] n0 --> n728 n759["CE: app.get('/ui')"] n0 --> n759 n764["CE: swaggerUI"] n759 --> n764 style n0 fill:#5E377B,color:#fff,stroke:#B4976A linkStyle default stroke:#c2a35d,stroke-width:1px,opacity:0.6 click n10 "../utils/crypto.html" "View Documentation" click n14 "../middleware/guard.html" "View Documentation"
CE CallExpressionFD FunctionDeclarationID ImportDeclarationSF SourceFile