Sidecar Logo

middleware/domain-to-id.ts

Configuration

/**
 * Sidecar Config for middleware/domain-to-id.ts
 */
module.exports = {
  title: "domain-to-id.ts",
  description: "Auto-generated draft",
};

Route Flow Map

--- title: "Route Flow: ssutil/src/middleware/domain-to-id.ts" --- flowchart TD title["Route Flow: ssutil/src/middleware/domain-to-id.ts"] style title fill:none,stroke:none,color:#B4976A,font-size:18px subgraph GET ["GET"] hono_get_userKey["GET userKey"] style hono_get_userKey fill:#5E377B,color:#fff,stroke:#B4976A end normalizeDomain{{"normalizeDomain"}} style normalizeDomain fill:#161b22,color:#fff,stroke:#c2a35d domainToBaseId{{"domainToBaseId"}} style domainToBaseId fill:#161b22,color:#fff,stroke:#c2a35d checkIdExists{{"checkIdExists"}} style checkIdExists fill:#161b22,color:#fff,stroke:#c2a35d generateUniqueDomainId{{"generateUniqueDomainId"}} style generateUniqueDomainId fill:#161b22,color:#fff,stroke:#c2a35d domainToBaseId --> normalizeDomain generateUniqueDomainId --> domainToBaseId generateUniqueDomainId --> checkIdExists linkStyle default stroke:#c2a35d,stroke-width:2px,color:#fff classDef default color:#fff

AST Code Structure

--- title: "AST Structure: ssutil/src/middleware/domain-to-id.ts" --- graph TD n0["SF"] n1["ID"] n0 --> n1 n3["UserIDToAPIKey"] n1 --> n3 n3 --> n2 style n3 stroke-dasharray:5,stroke:#B4976A n4["domaintopassword"] n1 --> n4 n4 --> n2 style n4 stroke-dasharray:5,stroke:#B4976A n5["saltpassword"] n1 --> n5 n5 --> n2 style n5 stroke-dasharray:5,stroke:#B4976A n2["./auth"] style n2 fill:#ffffff10,stroke:#ffffff33,color:#a1a1a1 n6["FD: normalizeDomain"] n0 --> n6 n13["IS"] n6 --> n13 n16["RS"] n13 --> n16 n18["RS"] n6 --> n18 n19["CE: domain.replace"] n18 --> n19 n25["FD: domainToBaseId"] n0 --> n25 n34["IS"] n25 --> n34 n37["RS"] n34 --> n37 n39["VS"] n25 --> n39 n41["VD: normalized"] n39 --> n41 n43["CE: normalizeDomain"] n41 --> n43 n46["IS"] n25 --> n46 n47["CE: normalized.toLowerCase().endsWith"] n46 --> n47 n49["CE: normalized.toLowerCase"] n47 --> n49 n56["RS"] n46 --> n56 n57["CE: normalized.slice"] n56 --> n57 n64["RS"] n25 --> n64 n65["CE: normalized.replace"] n64 --> n65 n71["FD: checkIdExists"] n0 --> n71 n85["TS"] n71 --> n85 n87["VS"] n85 --> n87 n89["VD: userKey"] n87 --> n89 n96["VS"] n85 --> n96 n98["VD: existingUser"] n96 --> n98 n101["CE: kvNamespace.get"] n98 --> n101 n106["RS"] n85 --> n106 n107["BE"] n106 --> n107 n112["VD: e"] n85 --> n112 n115["RS"] n85 --> n115 n117["FD: generateUniqueDomainId"] n0 --> n117 n151["IS"] n117 --> n151 n154["RS"] n151 --> n154 n156["VS"] n117 --> n156 n158["VD: baseId"] n156 --> n158 n160["CE: domainToBaseId"] n158 --> n160 n163["IS"] n117 --> n163 n166["RS"] n163 --> n166 n168["VS"] n117 --> n168 n170["VD: prefixedBaseId"] n168 --> n170 n180["VS"] n117 --> n180 n182["VD: finalId"] n180 --> n182 n187["IS"] n117 --> n187 n192["BE"] n187 --> n192 n197["VS"] n187 --> n197 n199["VD: candidateId"] n197 --> n199 n202["VS"] n187 --> n202 n204["VD: suffix"] n202 --> n204 n210["VS"] n187 --> n210 n212["VD: exists"] n210 --> n212 n215["CE: checkIdExists"] n212 --> n215 n219["IS"] n187 --> n219 n224["BE"] n219 --> n224 n230["BE"] n187 --> n230 n244["IS"] n187 --> n244 n245["BE"] n244 --> n245 n250["RS"] n244 --> n250 n252["IS"] n117 --> n252 n255["RS"] n252 --> n255 n257["VS"] n117 --> n257 n259["VD: api_key"] n257 --> n259 n261["CE: UserIDToAPIKey"] n259 --> n261 n264["VS"] n117 --> n264 n266["VD: password"] n264 --> n266 n268["CE: domaintopassword"] n266 --> n268 n271["VS"] n117 --> n271 n273["VD: hashedpassword"] n271 --> n273 n276["CE: saltpassword"] n273 --> n276 n279["RS"] n117 --> n279 style n0 fill:#5E377B,color:#fff,stroke:#B4976A linkStyle default stroke:#c2a35d,stroke-width:1px,opacity:0.6
BE BinaryExpressionCE CallExpressionFD FunctionDeclarationIS IfStatementID ImportDeclarationRS ReturnStatementSF SourceFileTS TryStatementVD VariableDeclarationVS VariableStatement