Barrel file not using custom `directories`
Open
Nobody has claimed this yet.
Type: Enhancement
- Dominant language
- TypeScript
- Stars
- 19.1k
- Forks
- 672
- Avg merge
- 10d 23h
- Merged PRs (30d)
- 1
Description
Package version
7.3.2
Describe the bug
Customizing httpControllers path in the adonisrc.ts file like this:
export default defineConfig({
directories: {
httpControllers: 'src/infrastructure/api/http/controllers',
},
...
})
prevent barrel for being correctly generated unless I also edit the directory path in the indexEntities init hook:
export default defineConfig({
...
hooks: {
init: [
indexEntities({
controllers: { source: 'src/infrastructure/api/http/controllers' },
}),
],
},
...
})
Would be really cool if indexEntities was using custom directories directly.
Reproduction repo
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the indexEntities init hook and how it reads the directories setting from adonisrc.ts. Verify the behavior with a custom httpControllers path; done means the barrel is generated from that configured path without repeating it in the hook.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100