You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(cli): add fern automations list preview subcommand
Adds a new hidden subcommand that discovers previewable generator groups
and outputs a JSON array of objects with groupName, apiName, and generator.
A generator is previewable when:
- It is a supported TypeScript/npm generator
- automation.preview is not false in generators.yml
Designed for consumption by the fern-preview GitHub Action to replace
client-side YAML parsing of generators.yml with a single CLI call.
Co-Authored-By: barry.zou <barry.zou@buildwithfern.com>
* test(cli): add unit tests for listPreviewGroups
Extracts core filtering logic from the inline command handler into a
standalone listPreviewGroups() function for testability. Adds 20 tests
covering:
- Basic detection of all 3 TypeScript generator variants
- Exclusion of non-TypeScript generators (Python, Java, Go)
- automation.preview flag filtering
- Mixed-language groups
- Multi-API workspace support with apiName
- Group name filtering
- Edge cases (empty workspaces, null config, empty groups)
Co-Authored-By: barry.zou <barry.zou@buildwithfern.com>
* refactor(cli): address PR review feedback
- Extract list generate logic into listGenerateCommands.ts (matches
list preview pattern, fixes inconsistency #2)
- Use Pick<AbstractAPIWorkspace> instead of manual WorkspaceGeneratorsInfo
interface (#3)
- Add --json flag to list preview command (#5)
- Deduplicate to one entry per (groupName, apiName) pair (Concern #2)
- Add 16 unit tests for listGenerateCommands
- Update listPreviewGroups tests for deduplication behavior (21 tests)
Co-Authored-By: barry.zou <barry.zou@buildwithfern.com>
* docs(cli): update JSDoc to reference --json flag in GHA example
Co-Authored-By: barry.zou <barry.zou@buildwithfern.com>
* feat(cli): replace fern automations list preview with fern automations preview
Consolidate discovery and execution into a single command:
- sdkPreview() now returns SdkPreviewResult instead of writing stdout
- New addAutomationsPreviewCommand discovers groups via listPreviewGroups()
and calls sdkPreview() for each, aggregating results as JSON
- Remove addAutomationsListPreviewCommand (listing-only, no longer needed)
- Output formatting moved to CLI command handler (writeSdkPreviewOutput)
Co-Authored-By: barry.zou <barry.zou@buildwithfern.com>
* fix(cli): fix biome import ordering in cli.ts
Co-Authored-By: barry.zou <barry.zou@buildwithfern.com>
* fix(cli): address review feedback for automations preview
- Add optional code field to SdkPreviewError and propagate CliError.Code
values (AuthError, ConfigError) through all error return paths
- Move AutomationsPreviewGroupResult interface to module level
- Use bracket notation argv["push-diff"] for consistency with other commands
Co-Authored-By: barry.zou <barry.zou@buildwithfern.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: barry.zou <barry.zou@buildwithfern.com>
0 commit comments