{
  "definitions": [
    {
      "callable": true,
      "callees": [
        {
          "file": "core/pipelines/setup.pipeline.ts",
          "name": "runEffects",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-pipelines-setup-pipeline-ts",
            "json": "https://banes-lab.com/json/source/deploy/core/pipelines/setup.pipeline.ts",
            "label": "core/pipelines/setup.pipeline.ts",
            "markdown": "https://banes-lab.com/source/deploy/core/pipelines/setup.pipeline.ts.md",
            "ref": "anatomy:file-deploy-core-pipelines-setup-pipeline-ts"
          }
        },
        {
          "file": "core/steps/setup.step.ts",
          "name": "ensureServer",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-steps-setup-step-ts",
            "json": "https://banes-lab.com/json/source/deploy/core/steps/setup.step.ts",
            "label": "core/steps/setup.step.ts",
            "markdown": "https://banes-lab.com/source/deploy/core/steps/setup.step.ts.md",
            "ref": "anatomy:file-deploy-core-steps-setup-step-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "runtime/entrypoints/deployment.entrypoint.ts",
          "name": "release",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-runtime-entrypoints-deployment-entrypoint-ts",
            "json": "https://banes-lab.com/json/source/deploy/runtime/entrypoints/deployment.entrypoint.ts",
            "label": "runtime/entrypoints/deployment.entrypoint.ts",
            "markdown": "https://banes-lab.com/source/deploy/runtime/entrypoints/deployment.entrypoint.ts.md",
            "ref": "anatomy:file-deploy-runtime-entrypoints-deployment-entrypoint-ts"
          }
        },
        {
          "file": "runtime/entrypoints/nginx.entrypoint.ts",
          "name": "push",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-runtime-entrypoints-nginx-entrypoint-ts",
            "json": "https://banes-lab.com/json/source/deploy/runtime/entrypoints/nginx.entrypoint.ts",
            "label": "runtime/entrypoints/nginx.entrypoint.ts",
            "markdown": "https://banes-lab.com/source/deploy/runtime/entrypoints/nginx.entrypoint.ts.md",
            "ref": "anatomy:file-deploy-runtime-entrypoints-nginx-entrypoint-ts"
          }
        }
      ],
      "exported": true,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 175,
      "name": "prepareServer",
      "signature": "export const prepareServer = async function prepareServer("
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/converters/failure.converter.ts",
          "name": "messageOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-converters-failure-converter-ts",
            "json": "https://banes-lab.com/json/source/deploy/core/converters/failure.converter.ts",
            "label": "core/converters/failure.converter.ts",
            "markdown": "https://banes-lab.com/source/deploy/core/converters/failure.converter.ts.md",
            "ref": "anatomy:file-deploy-core-converters-failure-converter-ts"
          }
        },
        {
          "file": "core/converters/failure.converter.ts",
          "name": "messageOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-converters-failure-converter-ts",
            "json": "https://banes-lab.com/json/source/deploy/core/converters/failure.converter.ts",
            "label": "core/converters/failure.converter.ts",
            "markdown": "https://banes-lab.com/source/deploy/core/converters/failure.converter.ts.md",
            "ref": "anatomy:file-deploy-core-converters-failure-converter-ts"
          }
        },
        {
          "file": "core/pipelines/setup.pipeline.ts",
          "name": "runEffects",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-pipelines-setup-pipeline-ts",
            "json": "https://banes-lab.com/json/source/deploy/core/pipelines/setup.pipeline.ts",
            "label": "core/pipelines/setup.pipeline.ts",
            "markdown": "https://banes-lab.com/source/deploy/core/pipelines/setup.pipeline.ts.md",
            "ref": "anatomy:file-deploy-core-pipelines-setup-pipeline-ts"
          }
        },
        {
          "file": "core/pipelines/setup.pipeline.ts",
          "name": "runEffects",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-pipelines-setup-pipeline-ts",
            "json": "https://banes-lab.com/json/source/deploy/core/pipelines/setup.pipeline.ts",
            "label": "core/pipelines/setup.pipeline.ts",
            "markdown": "https://banes-lab.com/source/deploy/core/pipelines/setup.pipeline.ts.md",
            "ref": "anatomy:file-deploy-core-pipelines-setup-pipeline-ts"
          }
        },
        {
          "file": "core/pipelines/setup.pipeline.ts",
          "name": "runEffects",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-pipelines-setup-pipeline-ts",
            "json": "https://banes-lab.com/json/source/deploy/core/pipelines/setup.pipeline.ts",
            "label": "core/pipelines/setup.pipeline.ts",
            "markdown": "https://banes-lab.com/source/deploy/core/pipelines/setup.pipeline.ts.md",
            "ref": "anatomy:file-deploy-core-pipelines-setup-pipeline-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "core/steps/setup.step.ts",
          "name": "ensureServer",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-steps-setup-step-ts",
            "json": "https://banes-lab.com/json/source/deploy/core/steps/setup.step.ts",
            "label": "core/steps/setup.step.ts",
            "markdown": "https://banes-lab.com/source/deploy/core/steps/setup.step.ts.md",
            "ref": "anatomy:file-deploy-core-steps-setup-step-ts"
          }
        }
      ],
      "exported": false,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 124,
      "name": "changeServer",
      "signature": "const changeServer = async function changeServer(context: SetupContext): Promise<void> {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/pipelines/setup.pipeline.ts",
          "name": "runEffects",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-pipelines-setup-pipeline-ts",
            "json": "https://banes-lab.com/json/source/deploy/core/pipelines/setup.pipeline.ts",
            "label": "core/pipelines/setup.pipeline.ts",
            "markdown": "https://banes-lab.com/source/deploy/core/pipelines/setup.pipeline.ts.md",
            "ref": "anatomy:file-deploy-core-pipelines-setup-pipeline-ts"
          }
        },
        {
          "file": "core/steps/setup.step.ts",
          "name": "changeServer",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-steps-setup-step-ts",
            "json": "https://banes-lab.com/json/source/deploy/core/steps/setup.step.ts",
            "label": "core/steps/setup.step.ts",
            "markdown": "https://banes-lab.com/source/deploy/core/steps/setup.step.ts.md",
            "ref": "anatomy:file-deploy-core-steps-setup-step-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "core/steps/setup.step.ts",
          "name": "prepareServer",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-steps-setup-step-ts",
            "json": "https://banes-lab.com/json/source/deploy/core/steps/setup.step.ts",
            "label": "core/steps/setup.step.ts",
            "markdown": "https://banes-lab.com/source/deploy/core/steps/setup.step.ts.md",
            "ref": "anatomy:file-deploy-core-steps-setup-step-ts"
          }
        }
      ],
      "exported": true,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 153,
      "name": "ensureServer",
      "signature": "export const ensureServer = async function ensureServer("
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/steps/setup.step.ts",
          "name": "revertStanzas",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-steps-setup-step-ts",
            "json": "https://banes-lab.com/json/source/deploy/core/steps/setup.step.ts",
            "label": "core/steps/setup.step.ts",
            "markdown": "https://banes-lab.com/source/deploy/core/steps/setup.step.ts.md",
            "ref": "anatomy:file-deploy-core-steps-setup-step-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 50,
      "name": "required",
      "signature": "const required = function required<T>(value: T | null, message: string): T {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/converters/index.converter.ts",
          "name": "stanzaAt",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-converters-index-converter-ts",
            "json": "https://banes-lab.com/json/source/deploy/core/converters/index.converter.ts",
            "label": "core/converters/index.converter.ts",
            "markdown": "https://banes-lab.com/source/deploy/core/converters/index.converter.ts.md",
            "ref": "anatomy:file-deploy-core-converters-index-converter-ts"
          }
        },
        {
          "file": "core/steps/setup.step.ts",
          "name": "required",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-steps-setup-step-ts",
            "json": "https://banes-lab.com/json/source/deploy/core/steps/setup.step.ts",
            "label": "core/steps/setup.step.ts",
            "markdown": "https://banes-lab.com/source/deploy/core/steps/setup.step.ts.md",
            "ref": "anatomy:file-deploy-core-steps-setup-step-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 79,
      "name": "revertStanzas",
      "signature": "const revertStanzas = async function revertStanzas("
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/converters/index.converter.ts",
          "name": "installedOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-converters-index-converter-ts",
            "json": "https://banes-lab.com/json/source/deploy/core/converters/index.converter.ts",
            "label": "core/converters/index.converter.ts",
            "markdown": "https://banes-lab.com/source/deploy/core/converters/index.converter.ts.md",
            "ref": "anatomy:file-deploy-core-converters-index-converter-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 70,
      "name": "installedAll",
      "signature": "const installedAll = async function installedAll("
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/steps/build.step.ts",
          "name": "staleModules",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-steps-build-step-ts",
            "json": "https://banes-lab.com/json/source/deploy/core/steps/build.step.ts",
            "label": "core/steps/build.step.ts",
            "markdown": "https://banes-lab.com/source/deploy/core/steps/build.step.ts.md",
            "ref": "anatomy:file-deploy-core-steps-build-step-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 140,
      "name": "contextOf",
      "signature": "const contextOf = async function contextOf("
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 57,
      "name": "loadIndexes",
      "signature": "const loadIndexes = async function loadIndexes("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 62,
      "name": "indexes",
      "signature": "const indexes = await Promise.all("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 86,
      "name": "version",
      "signature": "const version = installed.version ?? \"\";"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 96,
      "name": "planPackages",
      "signature": "export const planPackages = async function planPackages("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 101,
      "name": "stanzas",
      "signature": "const stanzas = await loadIndexes(fetchIndex, platform.codename, platform.architecture);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 102,
      "name": "target",
      "signature": "const target = required("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 106,
      "name": "wanted",
      "signature": "const wanted = ["
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 112,
      "name": "installed",
      "signature": "const installed = await installedAll("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 116,
      "name": "install",
      "signature": "const install = wanted.filter((stanza, at) => installed[at] === undefined || !isCurrent(installed[at], stanza));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 117,
      "name": "changing",
      "signature": "const changing = installed.filter((entry) => install.some((stanza) => stanza.name === entry.name));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 118,
      "name": "kept",
      "signature": "const kept = changing.filter((entry) => entry.configured && entry.version !== null);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 119,
      "name": "revert",
      "signature": "const revert = await revertStanzas(fetchIndex, kept, platform.architecture);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 120,
      "name": "added",
      "signature": "const added = changing.filter((entry) => !entry.configured).map((entry) => entry.name);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 145,
      "name": "platform",
      "signature": "const platform: Platform = {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 149,
      "name": "plan",
      "signature": "const plan = await planPackages(shell, fetchIndex, platform);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 159,
      "name": "context",
      "signature": "const context = await contextOf(shell, journal, fetchIndex);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 160,
      "name": "current",
      "signature": "const current = context.plan.install.length === 0 && context.modules.length === 0;"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-steps-setup-step-ts",
  "language": "typescript",
  "layer": "application",
  "name": "setup.step.ts",
  "path": "core/steps/setup.step.ts",
  "ref": "anatomy:file-deploy-core-steps-setup-step-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/deploy#folder-deploy-core-steps",
          "json": "https://banes-lab.com/json/anatomy/deploy/folder-deploy-core-steps",
          "label": "core/steps",
          "markdown": "https://banes-lab.com/anatomy/deploy/folder-deploy-core-steps.md",
          "ref": "chapter:/anatomy/deploy#folder-deploy-core-steps"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-converters-failure-converter-ts",
          "json": "https://banes-lab.com/json/source/deploy/core/converters/failure.converter.ts",
          "label": "core/converters/failure.converter.ts",
          "markdown": "https://banes-lab.com/source/deploy/core/converters/failure.converter.ts.md",
          "ref": "anatomy:file-deploy-core-converters-failure-converter-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-converters-index-converter-ts",
          "json": "https://banes-lab.com/json/source/deploy/core/converters/index.converter.ts",
          "label": "core/converters/index.converter.ts",
          "markdown": "https://banes-lab.com/source/deploy/core/converters/index.converter.ts.md",
          "ref": "anatomy:file-deploy-core-converters-index-converter-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-pipelines-setup-pipeline-ts",
          "json": "https://banes-lab.com/json/source/deploy/core/pipelines/setup.pipeline.ts",
          "label": "core/pipelines/setup.pipeline.ts",
          "markdown": "https://banes-lab.com/source/deploy/core/pipelines/setup.pipeline.ts.md",
          "ref": "anatomy:file-deploy-core-pipelines-setup-pipeline-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-steps-build-step-ts",
          "json": "https://banes-lab.com/json/source/deploy/core/steps/build.step.ts",
          "label": "core/steps/build.step.ts",
          "markdown": "https://banes-lab.com/source/deploy/core/steps/build.step.ts.md",
          "ref": "anatomy:file-deploy-core-steps-build-step-ts"
        }
      ],
      "relation": "uses"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/deploy#file-deploy-runtime-entrypoints-deployment-entrypoint-ts",
          "json": "https://banes-lab.com/json/source/deploy/runtime/entrypoints/deployment.entrypoint.ts",
          "label": "runtime/entrypoints/deployment.entrypoint.ts",
          "markdown": "https://banes-lab.com/source/deploy/runtime/entrypoints/deployment.entrypoint.ts.md",
          "ref": "anatomy:file-deploy-runtime-entrypoints-deployment-entrypoint-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/deploy#file-deploy-runtime-entrypoints-nginx-entrypoint-ts",
          "json": "https://banes-lab.com/json/source/deploy/runtime/entrypoints/nginx.entrypoint.ts",
          "label": "runtime/entrypoints/nginx.entrypoint.ts",
          "markdown": "https://banes-lab.com/source/deploy/runtime/entrypoints/nginx.entrypoint.ts.md",
          "ref": "anatomy:file-deploy-runtime-entrypoints-nginx-entrypoint-ts"
        }
      ],
      "relation": "used-by"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/deploy#folder-deploy-core-converters",
          "json": "https://banes-lab.com/json/anatomy/deploy/folder-deploy-core-converters",
          "label": "core/converters",
          "markdown": "https://banes-lab.com/anatomy/deploy/folder-deploy-core-converters.md",
          "ref": "chapter:/anatomy/deploy#folder-deploy-core-converters"
        },
        {
          "href": "https://banes-lab.com/anatomy/deploy#folder-deploy-core-pipelines",
          "json": "https://banes-lab.com/json/anatomy/deploy/folder-deploy-core-pipelines",
          "label": "core/pipelines",
          "markdown": "https://banes-lab.com/anatomy/deploy/folder-deploy-core-pipelines.md",
          "ref": "chapter:/anatomy/deploy#folder-deploy-core-pipelines"
        },
        {
          "href": "https://banes-lab.com/anatomy/deploy#folder-deploy-core-steps",
          "json": "https://banes-lab.com/json/anatomy/deploy/folder-deploy-core-steps",
          "label": "core/steps",
          "markdown": "https://banes-lab.com/anatomy/deploy/folder-deploy-core-steps.md",
          "ref": "chapter:/anatomy/deploy#folder-deploy-core-steps"
        },
        {
          "href": "https://banes-lab.com/anatomy/deploy#folder-deploy-runtime-entrypoints",
          "json": "https://banes-lab.com/json/anatomy/deploy/folder-deploy-runtime-entrypoints",
          "label": "runtime/entrypoints",
          "markdown": "https://banes-lab.com/anatomy/deploy/folder-deploy-runtime-entrypoints.md",
          "ref": "chapter:/anatomy/deploy#folder-deploy-runtime-entrypoints"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "step",
    "subject": "setup",
    "variant": null
  },
  "stats": {
    "bytes": 5716,
    "callable": 9,
    "definitions": 24,
    "edges": 13,
    "exported": 14,
    "files": 1,
    "findings": {},
    "flows": {
      "relay": 3,
      "leaf": 1,
      "entry": 3,
      "isolated": 17
    },
    "lines": {
      "blank": 9,
      "code": 172,
      "total": 181
    }
  },
  "summary": "172 lines of code and 24 definitions.",
  "text": "https://banes-lab.com/source/deploy/core/steps/setup.step.ts.txt",
  "tree": "deploy",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-steps-site-step-ts",
      "json": "https://banes-lab.com/json/source/deploy/core/steps/site.step.ts",
      "label": "core/steps/site.step.ts",
      "markdown": "https://banes-lab.com/source/deploy/core/steps/site.step.ts.md",
      "ref": "anatomy:file-deploy-core-steps-site-step-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-steps-search-step-ts",
      "json": "https://banes-lab.com/json/source/deploy/core/steps/search.step.ts",
      "label": "core/steps/search.step.ts",
      "markdown": "https://banes-lab.com/source/deploy/core/steps/search.step.ts.md",
      "ref": "anatomy:file-deploy-core-steps-search-step-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/deploy/core/steps",
    "label": "core/steps",
    "markdown": "https://banes-lab.com/api/source/deploy/core/steps.md",
    "ref": "api:source/deploy/core/steps"
  }
}
