{
  "definitions": [
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/adapters/viewport.adapter.ts",
          "name": "fileFor",
          "source": {
            "href": "https://banes-lab.com/anatomy/scripts#file-scripts-core-adapters-viewport-adapter-ts",
            "json": "https://banes-lab.com/json/source/scripts/core/adapters/viewport.adapter.ts",
            "label": "core/adapters/viewport.adapter.ts",
            "markdown": "https://banes-lab.com/source/scripts/core/adapters/viewport.adapter.ts.md",
            "ref": "anatomy:file-scripts-core-adapters-viewport-adapter-ts"
          }
        },
        {
          "file": "core/adapters/viewport.adapter.ts",
          "name": "fileFor",
          "source": {
            "href": "https://banes-lab.com/anatomy/scripts#file-scripts-core-adapters-viewport-adapter-ts",
            "json": "https://banes-lab.com/json/source/scripts/core/adapters/viewport.adapter.ts",
            "label": "core/adapters/viewport.adapter.ts",
            "markdown": "https://banes-lab.com/source/scripts/core/adapters/viewport.adapter.ts.md",
            "ref": "anatomy:file-scripts-core-adapters-viewport-adapter-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 21,
      "name": "isFile",
      "signature": "const isFile = function isFile(path: string): boolean {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/adapters/viewport.adapter.ts",
          "name": "isFile",
          "source": {
            "href": "https://banes-lab.com/anatomy/scripts#file-scripts-core-adapters-viewport-adapter-ts",
            "json": "https://banes-lab.com/json/source/scripts/core/adapters/viewport.adapter.ts",
            "label": "core/adapters/viewport.adapter.ts",
            "markdown": "https://banes-lab.com/source/scripts/core/adapters/viewport.adapter.ts.md",
            "ref": "anatomy:file-scripts-core-adapters-viewport-adapter-ts"
          }
        },
        {
          "file": "core/adapters/viewport.adapter.ts",
          "name": "isFile",
          "source": {
            "href": "https://banes-lab.com/anatomy/scripts#file-scripts-core-adapters-viewport-adapter-ts",
            "json": "https://banes-lab.com/json/source/scripts/core/adapters/viewport.adapter.ts",
            "label": "core/adapters/viewport.adapter.ts",
            "markdown": "https://banes-lab.com/source/scripts/core/adapters/viewport.adapter.ts.md",
            "ref": "anatomy:file-scripts-core-adapters-viewport-adapter-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 25,
      "name": "fileFor",
      "signature": "const fileFor = function fileFor(root: string, url: string): string | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 17,
      "name": "LOOPBACK",
      "signature": "const LOOPBACK = \"127.0.0.1\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 18,
      "name": "NOT_FOUND",
      "signature": "const NOT_FOUND = 404;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 19,
      "name": "OK",
      "signature": "const OK = 200;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 26,
      "name": "path",
      "signature": "const path = decodeURIComponent(new URL(url, `https://${LOOPBACK}`).pathname);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 27,
      "name": "direct",
      "signature": "const direct = normalize(join(root, path));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 34,
      "name": "page",
      "signature": "const page = path === HOME_ROUTE ? join(root, HOME_PAGE) : direct + PAGE_EXTENSION;"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 38,
      "name": "respondFrom",
      "signature": "const respondFrom = function respondFrom(root: string) {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 40,
      "name": "file",
      "signature": "const file = fileFor(root, request.url ?? HOME_ROUTE);"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 52,
      "name": "serveBuiltSite",
      "signature": "export const serveBuiltSite = async function serveBuiltSite(root: string): Promise<BuiltSite> {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 53,
      "name": "server",
      "signature": "const server = createServer(await devCertificate(), respondFrom(normalize(root)));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 54,
      "name": "bound",
      "signature": "const bound = server.listen(0, LOOPBACK);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 56,
      "name": "address",
      "signature": "const address = bound.address();"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/scripts#file-scripts-core-adapters-viewport-adapter-ts",
  "language": "typescript",
  "layer": "infrastructure",
  "name": "viewport.adapter.ts",
  "path": "core/adapters/viewport.adapter.ts",
  "ref": "anatomy:file-scripts-core-adapters-viewport-adapter-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/scripts#folder-scripts-core-adapters",
          "json": "https://banes-lab.com/json/anatomy/scripts/folder-scripts-core-adapters",
          "label": "core/adapters",
          "markdown": "https://banes-lab.com/anatomy/scripts/folder-scripts-core-adapters.md",
          "ref": "chapter:/anatomy/scripts#folder-scripts-core-adapters"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/scripts#folder-scripts-core-adapters",
          "json": "https://banes-lab.com/json/anatomy/scripts/folder-scripts-core-adapters",
          "label": "core/adapters",
          "markdown": "https://banes-lab.com/anatomy/scripts/folder-scripts-core-adapters.md",
          "ref": "chapter:/anatomy/scripts#folder-scripts-core-adapters"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "adapter",
    "subject": "viewport",
    "variant": null
  },
  "stats": {
    "bytes": 2400,
    "callable": 4,
    "definitions": 14,
    "edges": 2,
    "exported": 4,
    "files": 1,
    "findings": {},
    "flows": {
      "leaf": 1,
      "entry": 1,
      "isolated": 12
    },
    "lines": {
      "blank": 5,
      "code": 62,
      "total": 67
    }
  },
  "summary": "62 lines of code and 14 definitions.",
  "text": "https://banes-lab.com/source/scripts/core/adapters/viewport.adapter.ts.txt",
  "tree": "scripts",
  "siblings": {
    "next": null,
    "previous": {
      "href": "https://banes-lab.com/anatomy/scripts#file-scripts-core-adapters-style-adapter-ts",
      "json": "https://banes-lab.com/json/source/scripts/core/adapters/style.adapter.ts",
      "label": "core/adapters/style.adapter.ts",
      "markdown": "https://banes-lab.com/source/scripts/core/adapters/style.adapter.ts.md",
      "ref": "anatomy:file-scripts-core-adapters-style-adapter-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/scripts/core/adapters",
    "label": "core/adapters",
    "markdown": "https://banes-lab.com/api/source/scripts/core/adapters.md",
    "ref": "api:source/scripts/core/adapters"
  }
}
