mirror of
https://github.com/strapi/strapi.git
synced 2025-12-04 02:51:26 +00:00
* fix(generate cli): expect the plugin server root to be 'server/src' as that is how it's generated by @strapi/sdk-plugin * fix: add an explicit return type for the 'routes' getter on the core routes factory * chore(generators): update the get-file-path test after changing it * fix(generators): use the get-file-path utility for the api generator * feat(generators): implement more exhaustive plugin generators This introduces a variety of changes which affect generators used for plugins. 1. It will add the newly created service/controller/content-type to the index file 2. It will also create a routes file for plugins when using the api generator 3. Put all the generated plugin files in 'server/src/' instead of 'server/' 4. Create custom hbs templates for plugins, allowing for the use of route factories * fix(generators): fix typescript inferrence for plugins * fix: update the CoreApi.Router type to allways have it's 'routes' property be an array * fix: feedback * fix: allow selecting a generator using arguments --------- Co-authored-by: Ben Irvin <ben.irvin@strapi.io> Co-authored-by: Hannah Paine <151527179+hanpaine@users.noreply.github.com>