feat(cli): make fern docs md generate local-only - #17515
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Docs Generation Benchmark ResultsComparing PR branch against median of 5 nightly run(s) on
Docs generation runs |
SDK Generation Benchmark ResultsComparing PR branch against median of 5 nightly run(s) on Full benchmark table (click to expand)
main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via |
Description
Removes remote (server-side) library documentation generation from the CLI.
fern docs md generatenow always runs the library parser Docker images locally — no authentication, no FDR requests.Compatibility decision for
--local: the flag is kept as an accepted no-op so existing invocations (fern docs md generate --local) keep working, but it ishidden: true,default: true, and markeddeprecatedin yargs, so it no longer appears in--helpand its value is ignored:docs.ymlinputs are unchanged:pathinputs resolve relative to the docs directory, andgitinputs (includingref/subpathfrom #17510) are cloned locally viacloneRepositoryAtRef/resolveRepositorySubpath.Changes Made
library-docs-generator/orchestrate.ts: deleted the remote pipeline (LibraryDocsClient,createLibraryDocsClient,generateIrRemotely,startGeneration,pollForCompletion,downloadIr, poll constants) and theorgId/tokenValue/localoptions;runLibraryDocsGeneration({ libraries, library?, docsDirectoryPath, context, wrapStep? })is now local-onlycli(v1):generateLibraryDocsno longer prompts for login or threads a token; the command routes straight to local orchestration;--localdeprecated as abovecli-v2:docs md generateno longer callsgetTokenOrPrompt()/verifyOrgAccess()configuration: updated theParsedLibraryInputConfigurationdoc comment to local-only semanticspackages/cli/cli/changes/unreleased/Testing
orchestrate.test.tsrewritten local-only: default invocation (nolocalflag) runsrunLocalParser, gitref/subpathare forwarded (packagePath/sourceUrl/branch), and a rejectingglobalThis.fetchspy proves no network request is madelocalGeneration.test.ts(end-to-end to disk) now calls the orchestrator withoutlocal: truetokenValue/orgIdand that v2 never callsgetTokenOrPrompt/verifyOrgAccesspnpm turbo run compile/test/depcheckfor@fern-api/cli,@fern-api/cli-v2,@fern-api/library-docs-generator— all greenpnpm lint:biome --fix,pnpm format:fix,pnpm check:fixcleanLink to Devin session: https://app.devin.ai/sessions/ecb844f08d7249be8ff1527fad00acd9
Requested by: @Ryan-Amirthan