CodeVetter · Repo Unpack · Behavior traces
microsoft/rushstack
Source inspection followed API extraction, Markdown documentation generation, and Lockfile Explorer loading and bookmark persistence across their participating files. Additional traces expose Rush graph construction, Heft startup, build-cache lookup, and pnpmfile execution. These are execution-order descriptions derived from code, not runtime observations. Conditional branches materially change warnings, filesystem writes, process reuse, and lifecycle handling.
- API extraction startup constructs ApiExtractorCommandLine, registers InitAction/RunAction, and executes the parser; RunAction.onExecuteAsync loads an explicit config or discovers one from '.', then calls Extractor.invoke.
- Inside Extractor.invoke, Collector.analyze → DocCommentEnhancer.analyze → ValidationEnhancer.analyze → buildApiPackage precedes model/report/rollup output; success ignores warnings locally but includes them in production failure.
- Markdown CLI startup executes ApiDocumenterCommandLine → MarkdownAction.onExecuteAsync → buildApiModel → MarkdownDocumenter.generateFiles; generation optionally initializes a plugin, deletes old output, writes the model page, and invokes onFinished.
- Explorer startup constructs ExplorerCommandLineParser → onExecuteAsync → init before changing cwd; it registers static/API handlers and listens, while React App invokes readLockfileAsync → fetch /api/graph → deserializeFromJson → dispatch(loadEntries).
- Bookmark persistence follows addBookmark → saveBookmarkToLocalStorage → JSON parse/update/stringify/setItem; subsequent loadEntries reads stored IDs and attaches matching graph entries, while removeBookmark removes both Redux and stored entries.
- Rush phased execution applies graph/sharding/shell/validation plugins, fires session hooks, calls createOperationsAsync, captures input snapshots, constructs OperationGraph, fires onGraphCreatedAsync, then executes; watch mode creates ProjectWatcher and waits for abort.
- Heft startup constructs its parser; executeAsync normalizes cwd, initializes InternalHeftSession, registers phase/watch actions and validated aliases, and delegates argument execution to the shared parser.
- Cache lookup rejects missing IDs or disabled caching, queries the local provider, returns immediately for a matching output receipt, and queries cloud storage only on local miss; Explorer’s package-spec path loads JSON, invokes an optional pnpmfile worker, and disposes it in finally.