diff --git a/src/generate/form.ts b/src/generate/form.ts index 8c1d17e..3ede542 100644 --- a/src/generate/form.ts +++ b/src/generate/form.ts @@ -328,7 +328,6 @@ const splitTarget = async ({ target.includes("\\") || target.includes("//") ) { - //pathContent = target.split("/").filter((item) => item !== ""); if (schematic === "service") schematic = "controller"; if ( schematic === "service" || @@ -450,6 +449,8 @@ const schematicFolder = (schematic: string): string | undefined => { return "entities"; case "middleware": return "providers/middlewares"; + case "module": + return "useCases"; } return undefined; diff --git a/src/generate/templates/module-default.tpl b/src/generate/templates/module-default.tpl index e512824..45df72d 100644 --- a/src/generate/templates/module-default.tpl +++ b/src/generate/templates/module-default.tpl @@ -1,3 +1,4 @@ +import { ContainerModule } from "inversify"; import { CreateModule } from "@expressots/core"; -export const {{moduleName}}Module = CreateModule([]); +export const {{moduleName}}Module: ContainerModule = CreateModule([]); diff --git a/src/generate/templates/module.tpl b/src/generate/templates/module.tpl index 627650f..9ef58e7 100644 --- a/src/generate/templates/module.tpl +++ b/src/generate/templates/module.tpl @@ -1,4 +1,5 @@ +import { ContainerModule } from "inversify"; import { CreateModule } from "@expressots/core"; import { {{className}}Controller } from "{{{path}}}"; -export const {{moduleName}}Module = CreateModule([{{className}}Controller]); +export const {{moduleName}}Module: ContainerModule = CreateModule([{{className}}Controller]);