-
Notifications
You must be signed in to change notification settings - Fork 290
Description
Which Fern component?
SDK Generator
How urgent is this?
P1 - High (Strongly needed)
What's the issue?
When the TypeScript SDK generator runs with outputSourceFiles: false (compiled CJS/ESM mode), it generates README.md, reference.md, and CONTRIBUTING.md but does not include them in the output zip. These docs are created in the generator container's temp directory (/tmp/tmp-*/) during generation, but only the cjs/ and esm/ directories are packaged into the final output.
This is inconsistent with the Python and Go generators, which include their generated docs in the output regardless of output mode.
Steps to Reproduce
- Configure
generators.ymlwith a TypeScript generator usinglocal-file-systemoutput:
groups:
local:
generators:
- name: fernapi/fern-typescript-sdk
version: 3.56.0
output:
location: local-file-system
path: ../sdks/typescript
config:
outputSourceFiles: false
-
Run:
fern generate --local --group local -
List the output directory:
ls sdks/typescript/
Expected Behavior
The output directory should contain the generated documentation files alongside the compiled output:
sdks/typescript/
├── cjs/
├── esm/
├── README.md
├── reference.md
└── CONTRIBUTING.md
This matches the behavior of the Python and Go generators, which include docs in their output regardless of configuration.
Actual Behavior
The output directory only contains compiled code, no documentation files:
sdks/typescript/
├── cjs/
├── esm/
└── (no README.md, reference.md, or CONTRIBUTING.md)
The docs are generated inside the generator container at /tmp/tmp-*/README.md, /tmp/tmp-*/reference.md, and /tmp/tmp-*/CONTRIBUTING.md They're just not included when the output zip is assembled.
Environment
┌──────────────────────────┬────────────────────────────────────────┐
│ Component │ Version │
├──────────────────────────┼────────────────────────────────────────┤
│ OS │ Windows 11 (via Docker Desktop) │
├──────────────────────────┼────────────────────────────────────────┤
│ Fern CLI │ 4.29.0 │
├──────────────────────────┼────────────────────────────────────────┤
│ TypeScript SDK Generator │ fernapi/fern-typescript-sdk:3.56.0 │
├──────────────────────────┼────────────────────────────────────────┤
│ Node.js │ 20.x │
├──────────────────────────┼────────────────────────────────────────┤
│ Docker │ 29.3.0 │
├──────────────────────────┼────────────────────────────────────────┤
│ Output mode │ local-file-system │
├──────────────────────────┼────────────────────────────────────────┤
│ Config │ outputSourceFiles: false │
└──────────────────────────┴────────────────────────────────────────┘
Fern CLI & Generator Versions
Fern CLI Version: 4.29.0
Typescript SDK generator (fernapi/fern-typescript-sdk): 3.56.0
Workaround
None
Are you interested in contributing a fix?
Yes