-
Notifications
You must be signed in to change notification settings - Fork 911
Description
Describe the bug
Running the relational resource generator with a nested path creates an extra leading dash segment and nests files incorrectly (e.g., src/transactions/-sleeves-transactions/transactions/...) instead of the expected src/transactions/sleeves-transactions/....
Steps :
Run npm run generate:resource:relational -- transactions/SleevesTransaction.
Inspect the generated folders/files under src/transactions.
See files placed in src/transactions/-sleeves-transactions/transactions/ with duplicated transactions and a leading dash in the slug.
Expected behavior
The generator should respect the provided nested path and produce files in src/transactions/sleeves-transactions/ with correctly sluggified names (no leading dash, no duplicated folder).
OS: MacOS 26.2
NodeJS Version : 24.11.0
Database: PostgreSQL
Additional context:
The Hygen templates for relational-resource use h.inflection.transform(name, ['pluralize','underscore','dasherize']) directly on the input string, so when the input includes a path (transactions/SleevesTransaction), the slash is treated as text and produces the extra - segment.
