Describe the bug.
When using the Generator API with:
entrypoint set
output = 'fs' (default)
The generate:after hook is executed twice.
This happens due to duplicate lifecycle invocation inside:
generator/apps/generator/lib/generator.js
The hook is triggered:
- Inside
handleEntrypoint()
- Again inside
executeAfterHook() (called from generate())
This causes duplicated side effects during the generation lifecycle.
Expected behavior
Lifecycle execution should be:
generate:before
generate:after
generate:after must run exactly once per generation.
Screenshots
How to Reproduce
-
Create a minimal local template with a generate:after hook that logs to console.
-
Create a minimal asyncapi.yaml file.
-
Use the Generator API with:
entrypoint set (e.g. index.js)
- default
output = 'fs'
forceWrite: true
install: false
-
Run the generation script:
OR
Manually check : generator/apps/generator/lib/generator.js file
🖥️ Device Information [optional]
- Operating System (OS):Windows (WSL)
- Browser:
- Browser Version:
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
Yes I am willing to submit a PR!
Describe the bug.
When using the Generator API with:
entrypointsetoutput = 'fs'(default)The
generate:afterhook is executed twice.This happens due to duplicate lifecycle invocation inside:
The hook is triggered:
handleEntrypoint()executeAfterHook()(called fromgenerate())This causes duplicated side effects during the generation lifecycle.
Expected behavior
Lifecycle execution should be:
generate:aftermust run exactly once per generation.Screenshots
How to Reproduce
Create a minimal local template with a
generate:afterhook that logs to console.Create a minimal
asyncapi.yamlfile.Use the Generator API with:
entrypointset (e.g.index.js)output = 'fs'forceWrite: trueinstall: falseRun the generation script:
OR
Manually check :
generator/apps/generator/lib/generator.jsfile🖥️ Device Information [optional]
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
Yes I am willing to submit a PR!