{
  "definitions": [
    {
      "callable": true,
      "callees": [
        {
          "file": "configuration/strings/deployment.strings.ts",
          "name": "tlsTimeout",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-configuration-strings-deployment-strings-ts",
            "json": "https://banes-lab.com/json/source/deploy/configuration/strings/deployment.strings.ts",
            "label": "configuration/strings/deployment.strings.ts",
            "markdown": "https://banes-lab.com/source/deploy/configuration/strings/deployment.strings.ts.md",
            "ref": "anatomy:file-deploy-configuration-strings-deployment-strings-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 28,
      "name": "servedKey",
      "signature": "const servedKey = async function servedKey(site: string): Promise<ServedKey> {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 17,
      "name": "BODY_METHOD",
      "signature": "const BODY_METHOD = \"GET\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 18,
      "name": "HEAD_METHOD",
      "signature": "const HEAD_METHOD = \"HEAD\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 19,
      "name": "TYPE_HEADER",
      "signature": "const TYPE_HEADER = \"content-type\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 20,
      "name": "DIGEST",
      "signature": "const DIGEST = \"sha256\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 21,
      "name": "HEX",
      "signature": "const HEX = \"hex\";"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 23,
      "name": "keyDigestOf",
      "signature": "const keyDigestOf = function keyDigestOf(raw: Buffer): string {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 24,
      "name": "spki",
      "signature": "const spki = new X509Certificate(raw).publicKey.export({ format: \"der\", type: \"spki\" });"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 30,
      "name": "call",
      "signature": "const call = request(site, { method: HEAD_METHOD, timeout: PROBE_TIMEOUT_MS }, (response) => {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 31,
      "name": "{ socket }",
      "signature": "const { socket } = response;"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 47,
      "name": "readDane",
      "signature": "export const readDane = async function readDane(site: string): Promise<DaneKeys> {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 48,
      "name": "served",
      "signature": "const served = await servedKey(site);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 49,
      "name": "name",
      "signature": "const name = TLSA_PORT_MARK + String(served.port) + TLSA_PROTOCOL + new URL(site).hostname;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 50,
      "name": "published",
      "signature": "const published = (await resolveTlsa(name))"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 61,
      "name": "fetchProbe",
      "signature": "export const fetchProbe = async function fetchProbe(url: string, method: string): Promise<ProbeResponse> {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 62,
      "name": "response",
      "signature": "const response = await fetch(url, { method, redirect: \"manual\", signal: AbortSignal.timeout(PROBE_TIMEOUT_MS) });"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 63,
      "name": "body",
      "signature": "const body = method === BODY_METHOD ? await response.text() : \"\";"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-adapters-site-adapter-ts",
  "language": "typescript",
  "layer": "infrastructure",
  "name": "site.adapter.ts",
  "path": "core/adapters/site.adapter.ts",
  "ref": "anatomy:file-deploy-core-adapters-site-adapter-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/deploy#folder-deploy-core-adapters",
          "json": "https://banes-lab.com/json/anatomy/deploy/folder-deploy-core-adapters",
          "label": "core/adapters",
          "markdown": "https://banes-lab.com/anatomy/deploy/folder-deploy-core-adapters.md",
          "ref": "chapter:/anatomy/deploy#folder-deploy-core-adapters"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/deploy#file-deploy-configuration-strings-deployment-strings-ts",
          "json": "https://banes-lab.com/json/source/deploy/configuration/strings/deployment.strings.ts",
          "label": "configuration/strings/deployment.strings.ts",
          "markdown": "https://banes-lab.com/source/deploy/configuration/strings/deployment.strings.ts.md",
          "ref": "anatomy:file-deploy-configuration-strings-deployment-strings-ts"
        }
      ],
      "relation": "uses"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology#architecture-timeout-pattern",
          "json": "https://banes-lab.com/json/records/architecture/timeout-pattern",
          "label": "Timeout Pattern",
          "markdown": "https://banes-lab.com/records/architecture/timeout-pattern.md",
          "ref": "architecture:timeout-pattern"
        }
      ],
      "relation": "evidence-for"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/deploy#folder-deploy-configuration-strings",
          "json": "https://banes-lab.com/json/anatomy/deploy/folder-deploy-configuration-strings",
          "label": "configuration/strings",
          "markdown": "https://banes-lab.com/anatomy/deploy/folder-deploy-configuration-strings.md",
          "ref": "chapter:/anatomy/deploy#folder-deploy-configuration-strings"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "adapter",
    "subject": "site",
    "variant": null
  },
  "stats": {
    "bytes": 2681,
    "callable": 4,
    "definitions": 17,
    "edges": 1,
    "exported": 7,
    "files": 1,
    "findings": {},
    "flows": {
      "entry": 1,
      "isolated": 16
    },
    "lines": {
      "blank": 5,
      "code": 60,
      "total": 65
    }
  },
  "summary": "60 lines of code and 17 definitions.",
  "text": "https://banes-lab.com/source/deploy/core/adapters/site.adapter.ts.txt",
  "tree": "deploy",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-adapters-webhook-adapter-ts",
      "json": "https://banes-lab.com/json/source/deploy/core/adapters/webhook.adapter.ts",
      "label": "core/adapters/webhook.adapter.ts",
      "markdown": "https://banes-lab.com/source/deploy/core/adapters/webhook.adapter.ts.md",
      "ref": "anatomy:file-deploy-core-adapters-webhook-adapter-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-adapters-shell-adapter-ts",
      "json": "https://banes-lab.com/json/source/deploy/core/adapters/shell.adapter.ts",
      "label": "core/adapters/shell.adapter.ts",
      "markdown": "https://banes-lab.com/source/deploy/core/adapters/shell.adapter.ts.md",
      "ref": "anatomy:file-deploy-core-adapters-shell-adapter-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/deploy/core/adapters",
    "label": "core/adapters",
    "markdown": "https://banes-lab.com/api/source/deploy/core/adapters.md",
    "ref": "api:source/deploy/core/adapters"
  }
}
