CodeVetter · Repo Unpack · Data flow
nrwl/nx
CLI arguments and workspace configuration are transformed into project graphs, task selections, execution options, and hashes. The daemon boundary carries graph and hashing requests, while executor boundaries carry task options and environments. Completed work becomes terminal output, copied artifacts, database records, and optional remote cache uploads. Generator changes follow a separate staged-file path, and documentation loaders transform package schemas into rendered collection entries.
- runOne reads nx.json and the project graph, parses project/target/configuration, splits Nx arguments from executor overrides, resolves matching projects, then chooses graph generation or task execution.
- Graph construction combines specified/default plugins, retrieves project configurations and source maps, retrieves workspace files and Rust references, then builds dependencies using the file map and prior cache when enabled.
- Daemon graph requests use REQUEST_PROJECT_GRAPH; the server parses messages, checks workspace identity for recognized daemon messages, applies supplied client environment, and returns serialized graph/source-map results.
- Upfront hashing excludes custom hashers and tasks reading dependency outputs, supplies a separate environment per task, and records returned hash values/details; the coordinator later hashes eligible tasks after dependencies complete.
- runExecutorInternal resolves an executor and schema, combines overrides with target configuration, invokes the implementation with graph/workspace context, and accepts a Promise or AsyncIterator result.
- postRunSteps separates terminal-output persistence from cache writes; DbCache.put calls native put, reports expanded output files, and optionally uploads them, while native put copies normalized workspace outputs and records cache_outputs metadata.
- Remote HTTP retrieval downloads a gzipped archive, extracts artifacts under cache_directory/hash, reads terminalOutput and a four-byte exit code, and returns CachedResult; successful remote outputs can be restored when native apply_remote_cache_results records the entry.
- Generators stage FileChange records in FsTree before flushChanges writes them; documentation separately parses generator/executor schemas, renders Markdown, and stores collection entries with technology slugs and package metadata.