{
  "definitions": [
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 4,
      "name": "OPERATORS",
      "signature": "const OPERATORS: ReadonlySet<string> = new Set([\"&&\", \"||\", \"|\", \";\", \"&\"]);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 5,
      "name": "RUN_ALL",
      "signature": "const RUN_ALL: ReadonlySet<string> = new Set([\"run-s\", \"run-p\", \"npm-run-all\", \"run-s.cmd\", \"run-p.cmd\"]);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 6,
      "name": "PACKAGE_RUNNERS",
      "signature": "const PACKAGE_RUNNERS: ReadonlySet<string> = new Set([\"npm\", \"pnpm\", \"yarn\", \"bun\", \"npm.cmd\", \"pnpm.cmd\", \"yarn.cmd\"]);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 7,
      "name": "FILE_RUNNERS",
      "signature": "const FILE_RUNNERS: ReadonlySet<string> = new Set([\"node\", \"tsx\", \"ts-node\", \"nodemon\", \"electron\"]);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 8,
      "name": "RUN_WORD",
      "signature": "const RUN_WORD = \"run\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 9,
      "name": "FLAG_PREFIX",
      "signature": "const FLAG_PREFIX = \"-\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 10,
      "name": "RUN_REF_OFFSET",
      "signature": "const RUN_REF_OFFSET = 2;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "class_declaration",
      "line": 12,
      "name": "ScriptGraphBuilder",
      "signature": "class ScriptGraphBuilder {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 13,
      "name": "nodes",
      "signature": "private readonly nodes = new Map<string, ScriptNode>();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 14,
      "name": "edges",
      "signature": "private readonly edges = new Map<string, ScriptEdge>();"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 16,
      "name": "build",
      "signature": "public build(scripts: Readonly<Record<string, string>>): ScriptGraph {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 29,
      "name": "addNode",
      "signature": "private addNode(id: string, label: string, kind: ScriptNodeKind): void {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 35,
      "name": "link",
      "signature": "private link(owner: string, kind: ScriptNodeKind, label: string): void {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 36,
      "name": "id",
      "signature": "const id = `${kind}:${label}`;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 38,
      "name": "key",
      "signature": "const key = `${owner} ${id}`;"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 44,
      "name": "scan",
      "signature": "private scan(owner: string, command: string): void {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 45,
      "name": "words",
      "signature": "const words = tokenizeCommand(command);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 46,
      "name": "at",
      "signature": "let at = 0;"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 52,
      "name": "scanWord",
      "signature": "private scanWord(owner: string, words: readonly string[], at: number): number {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 53,
      "name": "word",
      "signature": "const word = words[at] ?? \"\";"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 69,
      "name": "tryPackageRun",
      "signature": "private tryPackageRun(owner: string, words: readonly string[], at: number): number | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 70,
      "name": "isRun",
      "signature": "const isRun = PACKAGE_RUNNERS.has(words[at] ?? \"\") && words[at + 1] === RUN_WORD;"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 78,
      "name": "tryRunAll",
      "signature": "private tryRunAll(owner: string, words: readonly string[], at: number): number | null {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 93,
      "name": "tryFileRun",
      "signature": "private tryFileRun(owner: string, words: readonly string[], at: number): number | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 94,
      "name": "next",
      "signature": "const next = words[at + 1] ?? \"\";"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 102,
      "name": "tryTool",
      "signature": "private tryTool(owner: string, words: readonly string[], at: number): number {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 103,
      "name": "head",
      "signature": "const head = words[at] ?? \"\";"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 111,
      "name": "scriptLifecycle",
      "signature": "export const scriptLifecycle = function scriptLifecycle(scripts: Readonly<Record<string, string>>): ScriptGraph {"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/docs#file-docs-core-converters-package-converter-ts",
  "language": "typescript",
  "layer": "processing",
  "name": "package.converter.ts",
  "path": "core/converters/package.converter.ts",
  "ref": "anatomy:file-docs-core-converters-package-converter-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/docs#folder-docs-core-converters",
          "json": "https://banes-lab.com/json/anatomy/docs/folder-docs-core-converters",
          "label": "core/converters",
          "markdown": "https://banes-lab.com/anatomy/docs/folder-docs-core-converters.md",
          "ref": "chapter:/anatomy/docs#folder-docs-core-converters"
        }
      ],
      "relation": "contained-in"
    }
  ],
  "slots": {
    "concern": "converter",
    "subject": "package",
    "variant": null
  },
  "stats": {
    "bytes": 4239,
    "callable": 10,
    "definitions": 28,
    "edges": 0,
    "exported": 1,
    "files": 1,
    "findings": {},
    "flows": {
      "isolated": 28
    },
    "lines": {
      "blank": 12,
      "code": 101,
      "total": 113
    }
  },
  "summary": "101 lines of code and 28 definitions.",
  "text": "https://banes-lab.com/source/docs/core/converters/package.converter.ts.txt",
  "tree": "docs",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/docs#file-docs-core-converters-system-converter-ts",
      "json": "https://banes-lab.com/json/source/docs/core/converters/system.converter.ts",
      "label": "core/converters/system.converter.ts",
      "markdown": "https://banes-lab.com/source/docs/core/converters/system.converter.ts.md",
      "ref": "anatomy:file-docs-core-converters-system-converter-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/docs#file-docs-core-converters-markdown-converter-ts",
      "json": "https://banes-lab.com/json/source/docs/core/converters/markdown.converter.ts",
      "label": "core/converters/markdown.converter.ts",
      "markdown": "https://banes-lab.com/source/docs/core/converters/markdown.converter.ts.md",
      "ref": "anatomy:file-docs-core-converters-markdown-converter-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/docs/core/converters",
    "label": "core/converters",
    "markdown": "https://banes-lab.com/api/source/docs/core/converters.md",
    "ref": "api:source/docs/core/converters"
  }
}
