{
  "definitions": [
    {
      "callable": true,
      "callees": [
        {
          "file": "core/steps/backup.step.ts",
          "name": "backupDirectory",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-steps-backup-step-ts",
            "json": "https://banes-lab.com/json/source/deploy/core/steps/backup.step.ts",
            "label": "core/steps/backup.step.ts",
            "markdown": "https://banes-lab.com/source/deploy/core/steps/backup.step.ts.md",
            "ref": "anatomy:file-deploy-core-steps-backup-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"
          }
        }
      ],
      "exported": true,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 86,
      "name": "restoreSite",
      "signature": "export const restoreSite = async function restoreSite(shell: Shell, journal: Journal, name: string): Promise<void> {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/steps/backup.step.ts",
          "name": "restoreSite",
          "source": {
            "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-steps-backup-step-ts",
            "json": "https://banes-lab.com/json/source/deploy/core/steps/backup.step.ts",
            "label": "core/steps/backup.step.ts",
            "markdown": "https://banes-lab.com/source/deploy/core/steps/backup.step.ts.md",
            "ref": "anatomy:file-deploy-core-steps-backup-step-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 34,
      "name": "backupDirectory",
      "signature": "const backupDirectory = function backupDirectory(): string {"
    },
    {
      "callable": true,
      "callees": [],
      "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"
          }
        }
      ],
      "exported": true,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 73,
      "name": "pruneArchives",
      "signature": "export const pruneArchives = function pruneArchives(journal: Journal): void {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 40,
      "name": "staged",
      "signature": "const staged = function staged(name: string): string {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 44,
      "name": "archiveSite",
      "signature": "export const archiveSite = async function archiveSite(shell: Shell, journal: Journal): Promise<string> {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 46,
      "name": "name",
      "signature": "const name = BACKUP_PREFIX + stamp() + ARCHIVE_SUFFIX;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 48,
      "name": "result",
      "signature": "const result = await shell.run("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 59,
      "name": "local",
      "signature": "const local = join(backupDirectory(), name);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 60,
      "name": "download",
      "signature": "const download = createByteProgress(journal, DOWNLOAD_LABEL, ARCHIVE_UNIT);"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 69,
      "name": "isArchive",
      "signature": "const isArchive = function isArchive(name: string): boolean {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 75,
      "name": "directory",
      "signature": "const directory = backupDirectory();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 76,
      "name": "archives",
      "signature": "const archives = readdirSync(directory)"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 88,
      "name": "remote",
      "signature": "const remote = staged(name);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 91,
      "name": "upload",
      "signature": "const upload = createByteProgress(journal, REUPLOAD_LABEL, ARCHIVE_UNIT);"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/deploy#file-deploy-core-steps-backup-step-ts",
  "language": "typescript",
  "layer": "application",
  "name": "backup.step.ts",
  "path": "core/steps/backup.step.ts",
  "ref": "anatomy:file-deploy-core-steps-backup-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-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"
        }
      ],
      "relation": "used-by"
    },
    {
      "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"
        },
        {
          "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": "backup",
    "variant": null
  },
  "stats": {
    "bytes": 3413,
    "callable": 6,
    "definitions": 14,
    "edges": 1,
    "exported": 11,
    "files": 1,
    "findings": {},
    "flows": {
      "relay": 1,
      "leaf": 2,
      "isolated": 11
    },
    "lines": {
      "blank": 6,
      "code": 91,
      "total": 97
    }
  },
  "summary": "91 lines of code and 14 definitions.",
  "text": "https://banes-lab.com/source/deploy/core/steps/backup.step.ts.txt",
  "tree": "deploy",
  "siblings": {
    "next": {
      "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"
    },
    "previous": null
  },
  "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"
  }
}
