typedoc2md/typedoc-plugin-markdown

Fails to merge when entryPoints is a file array

Closed this issue · 2 comments

What package is the bug related to?

typedoc-plugin-markdown

Describe the issue

I have a package that exports a DI injectable module only (this is later loaded into an api host). Since the package doesn't export the controllers, I've set entryPoints: ["src/controllers/*/*controller.ts"]

This will resolve all the controller definitions, but when calling generateDocs() (overrides.ts:9), it fails to render. For each file it shows the error:

loggers.js:203```

The source of the error is `page.header.ts:105`. `undefined` is returned from `this.getPackageMetaData()`. 

Looking at `getPackageMetaData` on line `markdown-themeContext.ts:121` it has:

this.packagesMetaData[packageName]


This function is called with `packageName = 'src/controller-a'` which doesn't map to the packages metadata of `@scope/my-controller-package` and hence why `undefined` is returned.

### TypeDoc configuration

versions:

"typedoc": "^0.26.5",
"typedoc-plugin-markdown": "^4.2.3",

Package config:

{
"extends": ["../../../typedoc.base.jsonc"],
"entryPoints": ["src/controllers/*/*controller.ts"],
"entryPointStrategy": "resolve"
}


Root package config:

{
  // Typedoc is used to extract our codedoc into markdown files, which are then uploaded to an Open AI assistant
  // This corpus is accessible in slack via the `@suppress ai` app user
  "entryPoints": [ "company/apis/sub-api"],
  "name": "company",
  "entryPointStrategy": "packages",
  "includeVersion": false,
  "plugin": ["typedoc-plugin-markdown"]
}


### Expected behavior

Ideally, it should render each controller class to a README.md 

Thanks. Although I couldn't fully replicate your use case the docs will no longer fail in typedoc-plugin-markdown@4.2.4.

thanks @tgreyuk i'll check it out 👍