Skip to content

docs(typescript): document guardProcessEnvAccess - #6856

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1788541534-ts-guard-process-env-access
Open

docs(typescript): document guardProcessEnvAccess#6856
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1788541534-ts-guard-process-env-access

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

The TypeScript SDK generator (3.89.0) gained an opt-in guardProcessEnvAccess config option. When enabled, the generated auth providers (API key/header, bearer, basic, OAuth) only read credential environment variables behind a typeof process !== "undefined" check. This matters for customers whose SDKs run in browsers, Cloudflare Workers, Deno, or other non-Node runtimes: today process.env?.[KEY] throws ReferenceError: process is not defined when a credential isn't passed to the client, and with the option enabled the client instead surfaces its normal "provide apiKey or set the X_API_KEY environment variable" error. Default false keeps generated output unchanged.

Implements docs for: feat(typescript): add opt-in guardProcessEnvAccess for auth provider env reads (fern-api/fern#17605)

Summary

  • fern/products/sdks/generators/typescript/configuration.mdx (TypeScript configuration reference, https://buildwithfern.com/learn/sdks/generators/typescript/configuration): new <ParamField path="guardProcessEnvAccess"> entry, placed alphabetically between generateSubpackageExports and includeContentHeadersOnFileDownloadResponse, with a short generators.yml example.

No changelog changes (already covered by the 2026-09-02 TypeScript generator changelog entry). Vale and fern check --warnings pass on the added content; the remaining Vale findings in the file are pre-existing.

Link to Devin session: https://app.devin.ai/sessions/ea4d0d848e454e0189ddb0aef1ac603d
Open in Devin Desktop: https://app.devin.ai/desktop/session/ea4d0d848e454e0189ddb0aef1ac603d?variant=devin

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants