zudojs-cli 2.1.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -3
- package/dist/src/adapters/databases/databaseAdapter.resolver.d.ts +0 -1
- package/dist/src/adapters/databases/databaseAdapter.resolver.js +0 -1
- package/dist/src/adapters/databases/index.d.ts +0 -1
- package/dist/src/adapters/databases/index.js +0 -1
- package/dist/src/adapters/databases/mysql.adapter.d.ts +0 -1
- package/dist/src/adapters/databases/mysql.adapter.js +0 -1
- package/dist/src/adapters/databases/postgres.adapter.d.ts +0 -1
- package/dist/src/adapters/databases/postgres.adapter.js +0 -1
- package/dist/src/adapters/databases/sqlite.adapter.d.ts +0 -1
- package/dist/src/adapters/databases/sqlite.adapter.js +0 -1
- package/dist/src/adapters/frontend/angular.adapter.d.ts +0 -1
- package/dist/src/adapters/frontend/angular.adapter.js +0 -1
- package/dist/src/adapters/frontend/astro.adapter.d.ts +0 -1
- package/dist/src/adapters/frontend/astro.adapter.js +0 -1
- package/dist/src/adapters/frontend/fallback/fallback.helper.d.ts +0 -1
- package/dist/src/adapters/frontend/fallback/fallback.helper.js +0 -1
- package/dist/src/adapters/frontend/fallback/framework/angular/angular.fallback.d.ts +0 -1
- package/dist/src/adapters/frontend/fallback/framework/angular/angular.fallback.js +0 -1
- package/dist/src/adapters/frontend/fallback/framework/angular/angularWorkspace.fallback.d.ts +0 -1
- package/dist/src/adapters/frontend/fallback/framework/angular/angularWorkspace.fallback.js +0 -1
- package/dist/src/adapters/frontend/fallback/framework/angular/index.d.ts +0 -1
- package/dist/src/adapters/frontend/fallback/framework/angular/index.js +0 -1
- package/dist/src/adapters/frontend/fallback/framework/astro.fallback.d.ts +0 -1
- package/dist/src/adapters/frontend/fallback/framework/astro.fallback.js +0 -1
- package/dist/src/adapters/frontend/fallback/framework/index.d.ts +0 -1
- package/dist/src/adapters/frontend/fallback/framework/index.js +0 -1
- package/dist/src/adapters/frontend/fallback/framework/next.fallback.d.ts +0 -1
- package/dist/src/adapters/frontend/fallback/framework/next.fallback.js +0 -1
- package/dist/src/adapters/frontend/fallback/framework/nuxt.fallback.d.ts +0 -1
- package/dist/src/adapters/frontend/fallback/framework/nuxt.fallback.js +0 -1
- package/dist/src/adapters/frontend/fallback/framework/sveltekit.fallback.d.ts +0 -1
- package/dist/src/adapters/frontend/fallback/framework/sveltekit.fallback.js +0 -1
- package/dist/src/adapters/frontend/fallback/index.d.ts +0 -1
- package/dist/src/adapters/frontend/fallback/index.js +0 -1
- package/dist/src/adapters/frontend/fallback/vite/index.d.ts +0 -1
- package/dist/src/adapters/frontend/fallback/vite/index.js +0 -1
- package/dist/src/adapters/frontend/fallback/vite/react.fallback.d.ts +0 -1
- package/dist/src/adapters/frontend/fallback/vite/react.fallback.js +0 -1
- package/dist/src/adapters/frontend/fallback/vite/svelte.fallback.d.ts +0 -1
- package/dist/src/adapters/frontend/fallback/vite/svelte.fallback.js +0 -1
- package/dist/src/adapters/frontend/fallback/vite/vanilla.fallback.d.ts +0 -1
- package/dist/src/adapters/frontend/fallback/vite/vanilla.fallback.js +0 -1
- package/dist/src/adapters/frontend/fallback/vite/vue.fallback.d.ts +0 -1
- package/dist/src/adapters/frontend/fallback/vite/vue.fallback.js +0 -1
- package/dist/src/adapters/frontend/flutter.adapter.d.ts +0 -1
- package/dist/src/adapters/frontend/flutter.adapter.js +0 -1
- package/dist/src/adapters/frontend/frontendAdapter.type.d.ts +0 -1
- package/dist/src/adapters/frontend/frontendAdapter.type.js +0 -1
- package/dist/src/adapters/frontend/index.d.ts +0 -1
- package/dist/src/adapters/frontend/index.js +0 -1
- package/dist/src/adapters/frontend/next.adapter.d.ts +0 -1
- package/dist/src/adapters/frontend/next.adapter.js +0 -1
- package/dist/src/adapters/frontend/nuxt.adapter.d.ts +0 -1
- package/dist/src/adapters/frontend/nuxt.adapter.js +0 -1
- package/dist/src/adapters/frontend/react-native.adapter.d.ts +0 -1
- package/dist/src/adapters/frontend/react-native.adapter.js +0 -1
- package/dist/src/adapters/frontend/react.adapter.d.ts +0 -1
- package/dist/src/adapters/frontend/react.adapter.js +0 -1
- package/dist/src/adapters/frontend/svelte.adapter.d.ts +0 -1
- package/dist/src/adapters/frontend/svelte.adapter.js +0 -1
- package/dist/src/adapters/frontend/sveltekit.adapter.d.ts +0 -1
- package/dist/src/adapters/frontend/sveltekit.adapter.js +0 -1
- package/dist/src/adapters/frontend/vanilla.adapter.d.ts +0 -1
- package/dist/src/adapters/frontend/vanilla.adapter.js +0 -1
- package/dist/src/adapters/frontend/vue.adapter.d.ts +0 -1
- package/dist/src/adapters/frontend/vue.adapter.js +0 -1
- package/dist/src/adapters/package-managers/bun.adapter.d.ts +0 -1
- package/dist/src/adapters/package-managers/bun.adapter.js +0 -1
- package/dist/src/adapters/package-managers/index.d.ts +0 -1
- package/dist/src/adapters/package-managers/index.js +0 -1
- package/dist/src/adapters/package-managers/npm.adapter.d.ts +0 -1
- package/dist/src/adapters/package-managers/npm.adapter.js +0 -1
- package/dist/src/adapters/package-managers/packageManager.type.d.ts +0 -1
- package/dist/src/adapters/package-managers/packageManager.type.js +0 -1
- package/dist/src/adapters/package-managers/pnpm.adapter.d.ts +0 -1
- package/dist/src/adapters/package-managers/pnpm.adapter.js +0 -1
- package/dist/src/adapters/package-managers/yarn.adapter.d.ts +0 -1
- package/dist/src/adapters/package-managers/yarn.adapter.js +0 -1
- package/dist/src/bin/bin.menu.d.ts +0 -1
- package/dist/src/bin/bin.menu.js +0 -1
- package/dist/src/bin/bin.runner.d.ts +0 -1
- package/dist/src/bin/bin.runner.js +0 -1
- package/dist/src/bin/index.d.ts +0 -1
- package/dist/src/bin/index.js +0 -1
- package/dist/src/bin/zudojs.d.ts +0 -1
- package/dist/src/bin/zudojs.js +1 -2
- package/dist/src/cliApplication/cliApplication.builtins.d.ts +0 -1
- package/dist/src/cliApplication/cliApplication.builtins.js +0 -1
- package/dist/src/cliApplication/cliApplication.core.d.ts +0 -1
- package/dist/src/cliApplication/cliApplication.core.js +0 -1
- package/dist/src/cliApplication/cliApplication.help.d.ts +0 -1
- package/dist/src/cliApplication/cliApplication.help.js +0 -1
- package/dist/src/cliApplication/cliApplication.logger.d.ts +0 -1
- package/dist/src/cliApplication/cliApplication.logger.js +0 -1
- package/dist/src/cliApplication/cliApplication.writer.d.ts +0 -1
- package/dist/src/cliApplication/cliApplication.writer.js +0 -1
- package/dist/src/cliApplication/index.d.ts +0 -1
- package/dist/src/cliApplication/index.js +0 -1
- package/dist/src/cliApplication/invocation/index.d.ts +0 -1
- package/dist/src/cliApplication/invocation/index.js +0 -1
- package/dist/src/cliApplication/invocation/invocation.hint.d.ts +0 -7
- package/dist/src/cliApplication/invocation/invocation.hint.js +14 -1
- package/dist/src/cliApplication/invocation/invocation.locate.d.ts +0 -1
- package/dist/src/cliApplication/invocation/invocation.locate.js +0 -1
- package/dist/src/cliApplication/invocation/invocation.name.d.ts +0 -1
- package/dist/src/cliApplication/invocation/invocation.name.js +0 -1
- package/dist/src/cliApplication/invocation/invocation.sanitize.d.ts +0 -1
- package/dist/src/cliApplication/invocation/invocation.sanitize.js +0 -1
- package/dist/src/cliCommand/cliCommand.builder.d.ts +0 -1
- package/dist/src/cliCommand/cliCommand.builder.js +0 -1
- package/dist/src/cliCommand/cliCommand.factory.d.ts +0 -1
- package/dist/src/cliCommand/cliCommand.factory.js +0 -1
- package/dist/src/cliCommand/cliCommand.registry.d.ts +0 -1
- package/dist/src/cliCommand/cliCommand.registry.js +0 -1
- package/dist/src/cliCommand/cliCommand.validator.d.ts +0 -1
- package/dist/src/cliCommand/cliCommand.validator.js +0 -1
- package/dist/src/cliCommand/index.d.ts +0 -1
- package/dist/src/cliCommand/index.js +0 -1
- package/dist/src/cliConstant/cliConstant.value.d.ts +0 -1
- package/dist/src/cliConstant/cliConstant.value.js +0 -1
- package/dist/src/cliConstant/cliVersion.d.ts +0 -1
- package/dist/src/cliConstant/cliVersion.js +0 -1
- package/dist/src/cliConstant/index.d.ts +0 -1
- package/dist/src/cliConstant/index.js +0 -1
- package/dist/src/cliError/cliError.argument.d.ts +0 -1
- package/dist/src/cliError/cliError.argument.js +0 -1
- package/dist/src/cliError/cliError.base.d.ts +0 -1
- package/dist/src/cliError/cliError.base.js +0 -1
- package/dist/src/cliError/cliError.command.d.ts +0 -1
- package/dist/src/cliError/cliError.command.js +0 -1
- package/dist/src/cliError/cliError.execution.d.ts +0 -1
- package/dist/src/cliError/cliError.execution.js +0 -1
- package/dist/src/cliError/cliError.option.d.ts +0 -1
- package/dist/src/cliError/cliError.option.js +0 -1
- package/dist/src/cliError/index.d.ts +0 -1
- package/dist/src/cliError/index.js +0 -1
- package/dist/src/cliParser/cliParser.core.d.ts +0 -1
- package/dist/src/cliParser/cliParser.core.js +0 -1
- package/dist/src/cliParser/cliParser.helper.d.ts +0 -1
- package/dist/src/cliParser/cliParser.helper.js +0 -1
- package/dist/src/cliParser/cliParser.longOption.d.ts +0 -1
- package/dist/src/cliParser/cliParser.longOption.js +0 -1
- package/dist/src/cliParser/cliParser.shortOption.d.ts +0 -1
- package/dist/src/cliParser/cliParser.shortOption.js +0 -1
- package/dist/src/cliParser/index.d.ts +0 -1
- package/dist/src/cliParser/index.js +0 -1
- package/dist/src/cliType/cliType.type.d.ts +0 -1
- package/dist/src/cliType/cliType.type.js +0 -1
- package/dist/src/cliType/index.d.ts +0 -1
- package/dist/src/cliType/index.js +0 -1
- package/dist/src/cliVersion/cliVersion.core.d.ts +0 -1
- package/dist/src/cliVersion/cliVersion.core.js +0 -1
- package/dist/src/cliVersion/cliVersion.update.d.ts +0 -1
- package/dist/src/cliVersion/cliVersion.update.js +0 -1
- package/dist/src/cliVersion/index.d.ts +0 -1
- package/dist/src/cliVersion/index.js +0 -1
- package/dist/src/commands/add.command.d.ts +0 -1
- package/dist/src/commands/add.command.js +1 -2
- package/dist/src/commands/build.command.d.ts +0 -1
- package/dist/src/commands/build.command.js +0 -1
- package/dist/src/commands/commandError.helper.d.ts +0 -1
- package/dist/src/commands/commandError.helper.js +0 -1
- package/dist/src/commands/create.command.d.ts +0 -1
- package/dist/src/commands/create.command.js +0 -1
- package/dist/src/commands/dev/dev.plan.d.ts +39 -0
- package/dist/src/commands/dev/dev.plan.js +83 -0
- package/dist/src/commands/dev/index.d.ts +4 -0
- package/dist/src/commands/dev/index.js +4 -0
- package/dist/src/commands/dev.command.d.ts +4 -30
- package/dist/src/commands/dev.command.js +10 -80
- package/dist/src/commands/doctor.command.d.ts +0 -1
- package/dist/src/commands/doctor.command.js +0 -1
- package/dist/src/commands/generate.command.d.ts +0 -1
- package/dist/src/commands/generate.command.js +30 -10
- package/dist/src/commands/index.d.ts +0 -1
- package/dist/src/commands/index.js +0 -1
- package/dist/src/commands/info.command.d.ts +0 -1
- package/dist/src/commands/info.command.js +0 -1
- package/dist/src/constants/index.d.ts +0 -1
- package/dist/src/constants/index.js +0 -1
- package/dist/src/constants/zudojsVersions.generated.d.ts +0 -1
- package/dist/src/constants/zudojsVersions.generated.js +38 -39
- package/dist/src/constants/zudojsVersions.helper.d.ts +0 -1
- package/dist/src/constants/zudojsVersions.helper.js +0 -1
- package/dist/src/errors/index.d.ts +0 -1
- package/dist/src/errors/index.js +0 -1
- package/dist/src/generators/backend/backend.generator.d.ts +0 -1
- package/dist/src/generators/backend/backend.generator.js +0 -1
- package/dist/src/generators/backend/index.d.ts +0 -1
- package/dist/src/generators/backend/index.js +0 -1
- package/dist/src/generators/command/command.generator.d.ts +0 -1
- package/dist/src/generators/command/command.generator.js +0 -1
- package/dist/src/generators/command/command.template.d.ts +0 -1
- package/dist/src/generators/command/command.template.js +0 -1
- package/dist/src/generators/command/index.d.ts +0 -1
- package/dist/src/generators/command/index.js +0 -1
- package/dist/src/generators/event/event.generator.d.ts +0 -1
- package/dist/src/generators/event/event.generator.js +0 -1
- package/dist/src/generators/event/index.d.ts +0 -1
- package/dist/src/generators/event/index.js +0 -1
- package/dist/src/generators/frontend/frontendGenerator.core.d.ts +0 -1
- package/dist/src/generators/frontend/frontendGenerator.core.js +0 -1
- package/dist/src/generators/frontend/frontendPipeline.d.ts +0 -1
- package/dist/src/generators/frontend/frontendPipeline.js +0 -1
- package/dist/src/generators/frontend/index.d.ts +0 -1
- package/dist/src/generators/frontend/index.js +0 -1
- package/dist/src/generators/fullstack/fullstackBackend.layout.d.ts +0 -1
- package/dist/src/generators/fullstack/fullstackBackend.layout.js +0 -1
- package/dist/src/generators/fullstack/fullstackComposer.core.d.ts +0 -1
- package/dist/src/generators/fullstack/fullstackComposer.core.js +0 -1
- package/dist/src/generators/fullstack/index.d.ts +0 -1
- package/dist/src/generators/fullstack/index.js +0 -1
- package/dist/src/generators/index.d.ts +0 -1
- package/dist/src/generators/index.js +0 -1
- package/dist/src/generators/infrastructure/index.d.ts +0 -1
- package/dist/src/generators/infrastructure/index.js +0 -1
- package/dist/src/generators/infrastructure/infrastructure.generator.d.ts +0 -1
- package/dist/src/generators/infrastructure/infrastructure.generator.js +0 -1
- package/dist/src/generators/integration/index.d.ts +0 -1
- package/dist/src/generators/integration/index.js +0 -1
- package/dist/src/generators/integration/integrationGenerator.core.d.ts +0 -1
- package/dist/src/generators/integration/integrationGenerator.core.js +0 -1
- package/dist/src/generators/job/index.d.ts +0 -1
- package/dist/src/generators/job/index.js +0 -1
- package/dist/src/generators/job/job.generator.d.ts +0 -1
- package/dist/src/generators/job/job.generator.js +0 -1
- package/dist/src/generators/middleware/index.d.ts +2 -2
- package/dist/src/generators/middleware/index.js +2 -2
- package/dist/src/generators/middleware/middleware.generator.d.ts +28 -2
- package/dist/src/generators/middleware/middleware.generator.js +60 -16
- package/dist/src/generators/middleware/middleware.template.d.ts +20 -0
- package/dist/src/generators/middleware/middleware.template.js +34 -0
- package/dist/src/generators/model/index.d.ts +0 -1
- package/dist/src/generators/model/index.js +0 -1
- package/dist/src/generators/model/model.generator.d.ts +0 -1
- package/dist/src/generators/model/model.generator.js +0 -1
- package/dist/src/generators/module/index.d.ts +0 -1
- package/dist/src/generators/module/index.js +0 -1
- package/dist/src/generators/module/module.generator.d.ts +0 -1
- package/dist/src/generators/module/module.generator.js +27 -11
- package/dist/src/generators/module/module.registration.d.ts +4 -3
- package/dist/src/generators/module/module.registration.js +5 -4
- package/dist/src/generators/project/project.generator.d.ts +0 -1
- package/dist/src/generators/project/project.generator.js +0 -1
- package/dist/src/generators/query/index.d.ts +0 -1
- package/dist/src/generators/query/index.js +0 -1
- package/dist/src/generators/query/query.generator.d.ts +0 -1
- package/dist/src/generators/query/query.generator.js +0 -1
- package/dist/src/generators/query/query.template.d.ts +0 -1
- package/dist/src/generators/query/query.template.js +0 -1
- package/dist/src/generators/resource/index.d.ts +0 -1
- package/dist/src/generators/resource/index.js +0 -1
- package/dist/src/generators/resource/resource.checks.d.ts +31 -0
- package/dist/src/generators/resource/resource.checks.js +52 -0
- package/dist/src/generators/resource/resource.generator.d.ts +5 -3
- package/dist/src/generators/resource/resource.generator.js +23 -36
- package/dist/src/generators/resource/resource.layout.d.ts +0 -1
- package/dist/src/generators/resource/resource.layout.js +0 -1
- package/dist/src/generators/resource/resource.plan.d.ts +0 -1
- package/dist/src/generators/resource/resource.plan.js +0 -1
- package/dist/src/generators/resource/resource.run.d.ts +12 -2
- package/dist/src/generators/resource/resource.run.js +33 -9
- package/dist/src/generators/validator/index.d.ts +0 -1
- package/dist/src/generators/validator/index.js +0 -1
- package/dist/src/generators/validator/validator.generator.d.ts +6 -2
- package/dist/src/generators/validator/validator.generator.js +31 -10
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.js +0 -1
- package/dist/src/installers/dependency.installer.d.ts +0 -1
- package/dist/src/installers/dependency.installer.js +0 -1
- package/dist/src/installers/index.d.ts +0 -1
- package/dist/src/installers/index.js +0 -1
- package/dist/src/manifest/index.d.ts +0 -1
- package/dist/src/manifest/index.js +0 -1
- package/dist/src/manifest/manifestFile.helper.d.ts +0 -1
- package/dist/src/manifest/manifestFile.helper.js +0 -1
- package/dist/src/manifest/manifestManager.core.d.ts +0 -1
- package/dist/src/manifest/manifestManager.core.js +0 -1
- package/dist/src/prompts/backend/api-style.prompt.d.ts +0 -1
- package/dist/src/prompts/backend/api-style.prompt.js +0 -1
- package/dist/src/prompts/backend/backend-architecture.prompt.d.ts +0 -1
- package/dist/src/prompts/backend/backend-architecture.prompt.js +0 -1
- package/dist/src/prompts/backend/database.prompt.d.ts +0 -1
- package/dist/src/prompts/backend/database.prompt.js +0 -1
- package/dist/src/prompts/backend/index.d.ts +0 -1
- package/dist/src/prompts/backend/index.js +0 -1
- package/dist/src/prompts/backend/services.prompt.d.ts +0 -1
- package/dist/src/prompts/backend/services.prompt.js +0 -1
- package/dist/src/prompts/cancel.prompt.d.ts +0 -1
- package/dist/src/prompts/cancel.prompt.js +0 -1
- package/dist/src/prompts/capabilities/capabilities.prompt.d.ts +0 -1
- package/dist/src/prompts/capabilities/capabilities.prompt.js +0 -1
- package/dist/src/prompts/capabilities/index.d.ts +0 -1
- package/dist/src/prompts/capabilities/index.js +0 -1
- package/dist/src/prompts/frontend/framework.prompt.d.ts +0 -1
- package/dist/src/prompts/frontend/framework.prompt.js +0 -1
- package/dist/src/prompts/frontend/frontend-architecture.prompt.d.ts +0 -1
- package/dist/src/prompts/frontend/frontend-architecture.prompt.js +0 -1
- package/dist/src/prompts/frontend/index.d.ts +0 -1
- package/dist/src/prompts/frontend/index.js +0 -1
- package/dist/src/prompts/index.d.ts +0 -1
- package/dist/src/prompts/index.js +0 -1
- package/dist/src/prompts/menu/index.d.ts +0 -1
- package/dist/src/prompts/menu/index.js +0 -1
- package/dist/src/prompts/menu/menu.adapter.d.ts +0 -1
- package/dist/src/prompts/menu/menu.adapter.js +0 -1
- package/dist/src/prompts/menu/menu.constant.d.ts +0 -1
- package/dist/src/prompts/menu/menu.constant.js +0 -1
- package/dist/src/prompts/menu/menu.flow.d.ts +0 -1
- package/dist/src/prompts/menu/menu.flow.js +0 -1
- package/dist/src/prompts/menu/menu.select.d.ts +0 -1
- package/dist/src/prompts/menu/menu.select.js +0 -1
- package/dist/src/prompts/menu/menu.type.d.ts +0 -1
- package/dist/src/prompts/menu/menu.type.js +0 -1
- package/dist/src/prompts/project/confirmation.prompt.d.ts +0 -1
- package/dist/src/prompts/project/confirmation.prompt.js +0 -1
- package/dist/src/prompts/project/index.d.ts +0 -1
- package/dist/src/prompts/project/index.js +0 -1
- package/dist/src/prompts/project/project-name.prompt.d.ts +0 -1
- package/dist/src/prompts/project/project-name.prompt.js +0 -1
- package/dist/src/prompts/project/project-type.prompt.d.ts +0 -1
- package/dist/src/prompts/project/project-type.prompt.js +0 -1
- package/dist/src/prompts/workspace/index.d.ts +0 -1
- package/dist/src/prompts/workspace/index.js +0 -1
- package/dist/src/prompts/workspace/package-manager.prompt.d.ts +0 -1
- package/dist/src/prompts/workspace/package-manager.prompt.js +0 -1
- package/dist/src/recipes/apply/index.d.ts +0 -1
- package/dist/src/recipes/apply/index.js +0 -1
- package/dist/src/recipes/apply/recipeApply.app.d.ts +0 -1
- package/dist/src/recipes/apply/recipeApply.app.js +0 -1
- package/dist/src/recipes/apply/recipeApply.context.d.ts +0 -1
- package/dist/src/recipes/apply/recipeApply.context.js +0 -1
- package/dist/src/recipes/apply/recipeApply.files.d.ts +0 -1
- package/dist/src/recipes/apply/recipeApply.files.js +0 -1
- package/dist/src/recipes/apply/recipeApply.project.d.ts +13 -3
- package/dist/src/recipes/apply/recipeApply.project.js +56 -3
- package/dist/src/recipes/apply/recipeApply.report.d.ts +0 -1
- package/dist/src/recipes/apply/recipeApply.report.js +0 -1
- package/dist/src/recipes/catalog/database/database.files.d.ts +0 -1
- package/dist/src/recipes/catalog/database/database.files.js +0 -1
- package/dist/src/recipes/catalog/database/database.recipe.d.ts +0 -1
- package/dist/src/recipes/catalog/database/database.recipe.js +11 -2
- package/dist/src/recipes/catalog/database/index.d.ts +0 -1
- package/dist/src/recipes/catalog/database/index.js +0 -1
- package/dist/src/recipes/catalog/email.recipe.d.ts +0 -1
- package/dist/src/recipes/catalog/email.recipe.js +0 -1
- package/dist/src/recipes/catalog/index.d.ts +0 -1
- package/dist/src/recipes/catalog/index.js +0 -1
- package/dist/src/recipes/catalog/openapi.recipe.d.ts +0 -1
- package/dist/src/recipes/catalog/openapi.recipe.js +0 -1
- package/dist/src/recipes/catalog/platform/cache.recipe.d.ts +0 -1
- package/dist/src/recipes/catalog/platform/cache.recipe.js +0 -1
- package/dist/src/recipes/catalog/platform/index.d.ts +0 -1
- package/dist/src/recipes/catalog/platform/index.js +0 -1
- package/dist/src/recipes/catalog/platform/messaging.recipe.d.ts +0 -1
- package/dist/src/recipes/catalog/platform/messaging.recipe.js +0 -1
- package/dist/src/recipes/catalog/platform/observability.recipe.d.ts +0 -1
- package/dist/src/recipes/catalog/platform/observability.recipe.js +0 -1
- package/dist/src/recipes/catalog/platform/queue.recipe.d.ts +0 -1
- package/dist/src/recipes/catalog/platform/queue.recipe.js +0 -1
- package/dist/src/recipes/catalog/platform/scheduler.recipe.d.ts +0 -1
- package/dist/src/recipes/catalog/platform/scheduler.recipe.js +0 -1
- package/dist/src/recipes/catalog/redis.recipe.d.ts +0 -1
- package/dist/src/recipes/catalog/redis.recipe.js +0 -1
- package/dist/src/recipes/catalog/storage.recipe.d.ts +0 -1
- package/dist/src/recipes/catalog/storage.recipe.js +0 -1
- package/dist/src/recipes/catalog/websockets.recipe.d.ts +0 -1
- package/dist/src/recipes/catalog/websockets.recipe.js +0 -1
- package/dist/src/recipes/docker/docker.compose.d.ts +0 -1
- package/dist/src/recipes/docker/docker.compose.js +0 -1
- package/dist/src/recipes/docker/docker.recipe.d.ts +0 -1
- package/dist/src/recipes/docker/docker.recipe.js +0 -1
- package/dist/src/recipes/docker/docker.refresh.d.ts +0 -1
- package/dist/src/recipes/docker/docker.refresh.js +0 -1
- package/dist/src/recipes/docker/index.d.ts +0 -1
- package/dist/src/recipes/docker/index.js +0 -1
- package/dist/src/recipes/index.d.ts +0 -1
- package/dist/src/recipes/index.js +0 -1
- package/dist/src/recipes/recipe.registry.d.ts +0 -1
- package/dist/src/recipes/recipe.registry.js +0 -1
- package/dist/src/recipes/recipe.type.d.ts +6 -1
- package/dist/src/recipes/recipe.type.js +0 -1
- package/dist/src/registries/adapter/frontendAdapterRegistry.core.d.ts +0 -1
- package/dist/src/registries/adapter/frontendAdapterRegistry.core.js +0 -1
- package/dist/src/registries/adapter/packageManagerRegistry.core.d.ts +0 -1
- package/dist/src/registries/adapter/packageManagerRegistry.core.js +0 -1
- package/dist/src/registries/dependency/dependencyRegistry.core.d.ts +0 -1
- package/dist/src/registries/dependency/dependencyRegistry.core.js +0 -1
- package/dist/src/registries/dependency/index.d.ts +0 -1
- package/dist/src/registries/dependency/index.js +0 -1
- package/dist/src/registries/generator/generatorRegistry.core.d.ts +0 -1
- package/dist/src/registries/generator/generatorRegistry.core.js +0 -1
- package/dist/src/registries/generator/index.d.ts +0 -1
- package/dist/src/registries/generator/index.js +0 -1
- package/dist/src/registries/index.d.ts +0 -1
- package/dist/src/registries/index.js +0 -1
- package/dist/src/resolvers/architecture.resolver.d.ts +0 -1
- package/dist/src/resolvers/architecture.resolver.js +13 -3
- package/dist/src/resolvers/capability/capabilityResolver.core.d.ts +0 -1
- package/dist/src/resolvers/capability/capabilityResolver.core.js +0 -1
- package/dist/src/resolvers/capability/index.d.ts +0 -1
- package/dist/src/resolvers/capability/index.js +0 -1
- package/dist/src/resolvers/configuration/configurationResolver.core.d.ts +0 -1
- package/dist/src/resolvers/configuration/configurationResolver.core.js +0 -1
- package/dist/src/resolvers/configuration/index.d.ts +0 -1
- package/dist/src/resolvers/configuration/index.js +0 -1
- package/dist/src/resolvers/dependency/dependencyResolver.core.d.ts +0 -1
- package/dist/src/resolvers/dependency/dependencyResolver.core.js +0 -1
- package/dist/src/resolvers/dependency/dependencyVersions.constant.d.ts +0 -1
- package/dist/src/resolvers/dependency/dependencyVersions.constant.js +0 -1
- package/dist/src/resolvers/dependency/index.d.ts +0 -1
- package/dist/src/resolvers/dependency/index.js +0 -1
- package/dist/src/resolvers/index.d.ts +0 -1
- package/dist/src/resolvers/index.js +0 -1
- package/dist/src/resolvers/layout/index.d.ts +0 -1
- package/dist/src/resolvers/layout/index.js +0 -1
- package/dist/src/resolvers/layout/projectLayout.core.d.ts +0 -1
- package/dist/src/resolvers/layout/projectLayout.core.js +0 -1
- package/dist/src/resolvers/project.resolver.d.ts +0 -1
- package/dist/src/resolvers/project.resolver.js +0 -1
- package/dist/src/rollback/index.d.ts +0 -1
- package/dist/src/rollback/index.js +0 -1
- package/dist/src/rollback/rollbackManager.core.d.ts +0 -1
- package/dist/src/rollback/rollbackManager.core.js +0 -1
- package/dist/src/runners/package-manager/index.d.ts +0 -1
- package/dist/src/runners/package-manager/index.js +0 -1
- package/dist/src/runners/package-manager/packageManagerRunner.core.d.ts +0 -1
- package/dist/src/runners/package-manager/packageManagerRunner.core.js +0 -1
- package/dist/src/runners/process/index.d.ts +0 -1
- package/dist/src/runners/process/index.js +0 -1
- package/dist/src/runners/process/processRunner.core.d.ts +0 -1
- package/dist/src/runners/process/processRunner.core.js +0 -1
- package/dist/src/runners/task/index.d.ts +0 -1
- package/dist/src/runners/task/index.js +0 -1
- package/dist/src/runners/task/taskRunner.core.d.ts +0 -1
- package/dist/src/runners/task/taskRunner.core.js +0 -1
- package/dist/src/scaffolders/framework.scaffolder.d.ts +0 -1
- package/dist/src/scaffolders/framework.scaffolder.js +0 -1
- package/dist/src/scaffolders/index.d.ts +0 -1
- package/dist/src/scaffolders/index.js +0 -1
- package/dist/src/scaffolders/scaffolder.helper.d.ts +0 -1
- package/dist/src/scaffolders/scaffolder.helper.js +0 -1
- package/dist/src/templates/backendApp/backendApp.core.d.ts +0 -1
- package/dist/src/templates/backendApp/backendApp.core.js +0 -1
- package/dist/src/templates/backendApp/backendApp.modules.d.ts +0 -1
- package/dist/src/templates/backendApp/backendApp.modules.js +0 -1
- package/dist/src/templates/backendApp/backendApp.project.d.ts +19 -3
- package/dist/src/templates/backendApp/backendApp.project.js +41 -3
- package/dist/src/templates/backendApp/index.d.ts +0 -1
- package/dist/src/templates/backendApp/index.js +0 -1
- package/dist/src/templates/backendApp/parts/config.template.d.ts +0 -1
- package/dist/src/templates/backendApp/parts/config.template.js +13 -6
- package/dist/src/templates/backendApp/parts/httpUtils.template.d.ts +2 -2
- package/dist/src/templates/backendApp/parts/httpUtils.template.js +20 -6
- package/dist/src/templates/backendApp/parts/index.d.ts +0 -1
- package/dist/src/templates/backendApp/parts/index.js +0 -1
- package/dist/src/templates/backendApp/parts/integrations.template.d.ts +0 -1
- package/dist/src/templates/backendApp/parts/integrations.template.js +0 -1
- package/dist/src/templates/backendApp/parts/wiring.template.d.ts +3 -2
- package/dist/src/templates/backendApp/parts/wiring.template.js +13 -3
- package/dist/src/templates/microservice/index.d.ts +0 -1
- package/dist/src/templates/microservice/index.js +0 -1
- package/dist/src/templates/microservice/microservice.template.d.ts +0 -1
- package/dist/src/templates/microservice/microservice.template.js +6 -27
- package/dist/src/templates/modular-monolith/index.d.ts +0 -1
- package/dist/src/templates/modular-monolith/index.js +0 -1
- package/dist/src/templates/modular-monolith/modularMonolith.template.d.ts +0 -1
- package/dist/src/templates/modular-monolith/modularMonolith.template.js +3 -10
- package/dist/src/templates/monolith/index.d.ts +0 -1
- package/dist/src/templates/monolith/index.js +0 -1
- package/dist/src/templates/monolith/monolith.template.d.ts +0 -1
- package/dist/src/templates/monolith/monolith.template.js +3 -11
- package/dist/src/templates/resource/index.d.ts +0 -1
- package/dist/src/templates/resource/index.js +0 -1
- package/dist/src/templates/resource/layers/index.d.ts +4 -4
- package/dist/src/templates/resource/layers/index.js +4 -4
- package/dist/src/templates/resource/layers/resourceData.template.d.ts +8 -4
- package/dist/src/templates/resource/layers/resourceData.template.js +30 -72
- package/dist/src/templates/resource/layers/resourceHttp/index.d.ts +6 -0
- package/dist/src/templates/resource/layers/resourceHttp/index.js +6 -0
- package/dist/src/templates/resource/layers/resourceHttp/resourceController.template.d.ts +10 -0
- package/dist/src/templates/resource/layers/resourceHttp/resourceController.template.js +55 -0
- package/dist/src/templates/resource/layers/resourceHttp/resourceRoutes.template.d.ts +6 -0
- package/dist/src/templates/resource/layers/resourceHttp/resourceRoutes.template.js +77 -0
- package/dist/src/templates/resource/layers/resourceHttp/resourceTest.template.d.ts +11 -0
- package/dist/src/templates/resource/layers/resourceHttp/resourceTest.template.js +84 -0
- package/dist/src/templates/resource/layers/resourceMemory.template.d.ts +6 -0
- package/dist/src/templates/resource/layers/resourceMemory.template.js +87 -0
- package/dist/src/templates/resource/layers/resourcePrisma.template.d.ts +0 -1
- package/dist/src/templates/resource/layers/resourcePrisma.template.js +10 -9
- package/dist/src/templates/resource/layers/resourceService.template.d.ts +1 -8
- package/dist/src/templates/resource/layers/resourceService.template.js +9 -54
- package/dist/src/templates/resource/resource.files.d.ts +0 -1
- package/dist/src/templates/resource/resource.files.js +7 -6
- package/dist/src/templates/resource/resource.names.d.ts +0 -1
- package/dist/src/templates/resource/resource.names.js +0 -1
- package/dist/src/templates/resource/resource.type.d.ts +0 -1
- package/dist/src/templates/resource/resource.type.js +0 -1
- package/dist/src/templates/shared/appRuntime.template.d.ts +0 -1
- package/dist/src/templates/shared/appRuntime.template.js +6 -5
- package/dist/src/templates/shared/capability.template.d.ts +0 -1
- package/dist/src/templates/shared/capability.template.js +0 -1
- package/dist/src/templates/shared/dockerfile/dockerfile.install.d.ts +0 -1
- package/dist/src/templates/shared/dockerfile/dockerfile.install.js +0 -1
- package/dist/src/templates/shared/dockerfile/dockerfile.template.d.ts +0 -1
- package/dist/src/templates/shared/dockerfile/dockerfile.template.js +15 -5
- package/dist/src/templates/shared/dockerfile/index.d.ts +0 -1
- package/dist/src/templates/shared/dockerfile/index.js +0 -1
- package/dist/src/templates/shared/index.d.ts +1 -1
- package/dist/src/templates/shared/index.js +1 -1
- package/dist/src/templates/shared/pnpm.template.d.ts +0 -1
- package/dist/src/templates/shared/pnpm.template.js +0 -1
- package/dist/src/templates/shared/server.parts.d.ts +28 -0
- package/dist/src/templates/shared/server.parts.js +59 -0
- package/dist/src/templates/shared/server.template.d.ts +17 -16
- package/dist/src/templates/shared/server.template.js +42 -57
- package/dist/src/types/index.d.ts +0 -1
- package/dist/src/types/index.js +0 -1
- package/dist/src/types/projectConfiguration.type.d.ts +0 -1
- package/dist/src/types/projectConfiguration.type.js +0 -1
- package/dist/src/types/scaffold.type.d.ts +0 -1
- package/dist/src/types/scaffold.type.js +0 -1
- package/dist/src/utils/index.d.ts +0 -1
- package/dist/src/utils/index.js +0 -1
- package/dist/src/utils/utils.detect.d.ts +0 -1
- package/dist/src/utils/utils.detect.js +0 -1
- package/dist/src/utils/utils.exec.d.ts +0 -1
- package/dist/src/utils/utils.exec.js +0 -1
- package/dist/src/utils/utils.fileSystem.d.ts +0 -1
- package/dist/src/utils/utils.fileSystem.js +0 -1
- package/dist/src/utils/utils.name.d.ts +0 -1
- package/dist/src/utils/utils.name.js +0 -1
- package/dist/src/utils/utils.writeGuard.d.ts +0 -1
- package/dist/src/utils/utils.writeGuard.js +0 -1
- package/dist/src/validators/compatibility/compatibilityValidator.core.d.ts +0 -1
- package/dist/src/validators/compatibility/compatibilityValidator.core.js +0 -1
- package/dist/src/validators/compatibility/index.d.ts +0 -1
- package/dist/src/validators/compatibility/index.js +0 -1
- package/dist/src/validators/environment/environmentValidator.core.d.ts +0 -1
- package/dist/src/validators/environment/environmentValidator.core.js +0 -1
- package/dist/src/validators/environment/index.d.ts +0 -1
- package/dist/src/validators/environment/index.js +0 -1
- package/dist/src/validators/index.d.ts +0 -1
- package/dist/src/validators/index.js +0 -1
- package/dist/src/validators/project/index.d.ts +0 -1
- package/dist/src/validators/project/index.js +0 -1
- package/dist/src/validators/project/projectValidator.core.d.ts +0 -1
- package/dist/src/validators/project/projectValidator.core.js +0 -1
- package/dist/src/wiring/index.d.ts +0 -1
- package/dist/src/wiring/index.js +0 -1
- package/dist/src/wiring/wiring.dependencies.d.ts +0 -1
- package/dist/src/wiring/wiring.dependencies.js +0 -1
- package/dist/src/wiring/wiring.edits.d.ts +0 -1
- package/dist/src/wiring/wiring.edits.js +0 -1
- package/dist/src/wiring/wiring.markers.d.ts +7 -5
- package/dist/src/wiring/wiring.markers.js +8 -7
- package/package.json +6 -6
- package/dist/src/generators/controller/controller.generator.d.ts +0 -11
- package/dist/src/generators/controller/controller.generator.js +0 -47
- package/dist/src/generators/dto/dto.generator.d.ts +0 -12
- package/dist/src/generators/dto/dto.generator.js +0 -27
- package/dist/src/generators/dto/index.d.ts +0 -5
- package/dist/src/generators/dto/index.js +0 -5
- package/dist/src/generators/repository/repository.generator.d.ts +0 -10
- package/dist/src/generators/repository/repository.generator.js +0 -80
- package/dist/src/generators/route/index.d.ts +0 -5
- package/dist/src/generators/route/index.js +0 -5
- package/dist/src/generators/route/route.generator.d.ts +0 -12
- package/dist/src/generators/route/route.generator.js +0 -31
- package/dist/src/templates/resource/layers/resourceRoutes.template.d.ts +0 -13
- package/dist/src/templates/resource/layers/resourceRoutes.template.js +0 -129
|
@@ -42,12 +42,14 @@ export interface MarkerInsertResult {
|
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* Inserts `line` just before the end marker of `name`, indented like the
|
|
45
|
-
* marker. Idempotent: a line already present
|
|
46
|
-
* trimmed) is not added again
|
|
47
|
-
*
|
|
48
|
-
*
|
|
45
|
+
* marker. Idempotent: a line already present anywhere in the file (compared
|
|
46
|
+
* trimmed) is not added again — a registration the user moved out of the
|
|
47
|
+
* marker block is still a registration, and re-inserting it between the
|
|
48
|
+
* markers (`generate resource --force` used to) made the file fail to
|
|
49
|
+
* compile on the duplicate. Exactly one start and one end marker, in that
|
|
50
|
+
* order, are required; anything else is reported as missing markers rather
|
|
51
|
+
* than guessed at.
|
|
49
52
|
*/
|
|
50
53
|
export declare function insertBetweenMarkers(source: string, name: MarkerName, line: string): MarkerInsertResult;
|
|
51
54
|
/** The lines currently between the markers of `name`, trimmed. */
|
|
52
55
|
export declare function linesBetweenMarkers(source: string, name: MarkerName): readonly string[];
|
|
53
|
-
//# sourceMappingURL=wiring.markers.d.ts.map
|
|
@@ -40,10 +40,13 @@ export function renderMarkerBlock(name, lines, indent = "") {
|
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
42
|
* Inserts `line` just before the end marker of `name`, indented like the
|
|
43
|
-
* marker. Idempotent: a line already present
|
|
44
|
-
* trimmed) is not added again
|
|
45
|
-
*
|
|
46
|
-
*
|
|
43
|
+
* marker. Idempotent: a line already present anywhere in the file (compared
|
|
44
|
+
* trimmed) is not added again — a registration the user moved out of the
|
|
45
|
+
* marker block is still a registration, and re-inserting it between the
|
|
46
|
+
* markers (`generate resource --force` used to) made the file fail to
|
|
47
|
+
* compile on the duplicate. Exactly one start and one end marker, in that
|
|
48
|
+
* order, are required; anything else is reported as missing markers rather
|
|
49
|
+
* than guessed at.
|
|
47
50
|
*/
|
|
48
51
|
export function insertBetweenMarkers(source, name, line) {
|
|
49
52
|
const start = markerStart(name);
|
|
@@ -57,9 +60,8 @@ export function insertBetweenMarkers(source, name, line) {
|
|
|
57
60
|
source.indexOf(end, endAt + 1) !== -1) {
|
|
58
61
|
return { status: "missing-markers", source };
|
|
59
62
|
}
|
|
60
|
-
const between = source.slice(startAt + start.length, endAt);
|
|
61
63
|
const wanted = line.trim();
|
|
62
|
-
if (
|
|
64
|
+
if (source.split("\n").some((existing) => existing.trim() === wanted)) {
|
|
63
65
|
return { status: "present", source };
|
|
64
66
|
}
|
|
65
67
|
const lineStart = source.lastIndexOf("\n", endAt) + 1;
|
|
@@ -84,4 +86,3 @@ export function linesBetweenMarkers(source, name) {
|
|
|
84
86
|
.map((line) => line.trim())
|
|
85
87
|
.filter((line) => line.length > 0);
|
|
86
88
|
}
|
|
87
|
-
//# sourceMappingURL=wiring.markers.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zudojs-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Command-line interface for scaffolding, generating, and managing Zudojs framework projects.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@clack/prompts": "^1.8.1",
|
|
35
|
-
"@zudojs/config": "1.3.
|
|
36
|
-
"@zudojs/core": "1.
|
|
37
|
-
"@zudojs/errors": "1.
|
|
38
|
-
"@zudojs/logger": "1.
|
|
35
|
+
"@zudojs/config": "1.3.4",
|
|
36
|
+
"@zudojs/core": "1.3.0",
|
|
37
|
+
"@zudojs/errors": "1.4.0",
|
|
38
|
+
"@zudojs/logger": "1.5.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^26.6.2",
|
|
42
|
-
"@zudojs/constants": "1.
|
|
42
|
+
"@zudojs/constants": "1.2.0",
|
|
43
43
|
"tsx": "^4.23.15",
|
|
44
44
|
"typescript": "7.0.2",
|
|
45
45
|
"vitest": "^5.0.1"
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* zudojs-cli — Controller Generator
|
|
3
|
-
*/
|
|
4
|
-
export interface GenerateControllerOptions {
|
|
5
|
-
readonly name: string;
|
|
6
|
-
readonly service?: string;
|
|
7
|
-
readonly basePath?: string;
|
|
8
|
-
readonly dryRun?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare function generateController(options: GenerateControllerOptions, cwd: string): Promise<string[]>;
|
|
11
|
-
//# sourceMappingURL=controller.generator.d.ts.map
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* zudojs-cli — Controller Generator
|
|
3
|
-
*/
|
|
4
|
-
import { writeFileTree, mergeBarrelExport, } from "../../utils/utils.fileSystem.js";
|
|
5
|
-
import { CLIGenerationError } from "../../errors/index.js";
|
|
6
|
-
import { normalizeName, toPascalCase } from "../../utils/utils.name.js";
|
|
7
|
-
export async function generateController(options, cwd) {
|
|
8
|
-
const name = normalizeName(options.name);
|
|
9
|
-
const nameCamel = toPascalCase(options.name);
|
|
10
|
-
const basePath = options.basePath ?? "";
|
|
11
|
-
const prefix = basePath ? `${basePath}/` : "";
|
|
12
|
-
const indexPath = `${prefix}controllers/index.ts`;
|
|
13
|
-
const files = {
|
|
14
|
-
[`${prefix}controllers/${name}.controller.ts`]: `import { createLogger } from "@zudojs/logger";
|
|
15
|
-
|
|
16
|
-
export class ${nameCamel}Controller {
|
|
17
|
-
private readonly logger = createLogger({ name: "${name}-controller" });
|
|
18
|
-
|
|
19
|
-
async handle(request: Request): Promise<Response> {
|
|
20
|
-
this.logger.info("${name} request received", { method: request.method, url: request.url });
|
|
21
|
-
|
|
22
|
-
try {
|
|
23
|
-
const body = request.method !== "GET" ? await request.json() : null;
|
|
24
|
-
|
|
25
|
-
return Response.json({ ok: true, data: body ?? {} }, { status: 200 });
|
|
26
|
-
} catch (error) {
|
|
27
|
-
this.logger.error("Failed to handle ${name} request", { error });
|
|
28
|
-
return Response.json({ ok: false, error: "Internal server error" }, { status: 500 });
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
`,
|
|
33
|
-
// Merge with any existing barrel content instead of overwriting it.
|
|
34
|
-
[indexPath]: mergeBarrelExport(cwd, indexPath, `export { ${nameCamel}Controller } from "./${name}.controller.js";`),
|
|
35
|
-
};
|
|
36
|
-
if (options.dryRun) {
|
|
37
|
-
return Object.keys(files);
|
|
38
|
-
}
|
|
39
|
-
try {
|
|
40
|
-
await writeFileTree(cwd, files);
|
|
41
|
-
return Object.keys(files);
|
|
42
|
-
}
|
|
43
|
-
catch (error) {
|
|
44
|
-
throw new CLIGenerationError(`Failed to generate controller: ${name}`, error);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=controller.generator.js.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* zudojs-cli — DTO Generator
|
|
3
|
-
*
|
|
4
|
-
* Generates DTO files.
|
|
5
|
-
*/
|
|
6
|
-
export interface GenerateDtoOptions {
|
|
7
|
-
readonly name: string;
|
|
8
|
-
readonly basePath: string;
|
|
9
|
-
readonly dryRun?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare function generateDto(options: GenerateDtoOptions, cwd: string): Promise<string[]>;
|
|
12
|
-
//# sourceMappingURL=dto.generator.d.ts.map
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* zudojs-cli — DTO Generator
|
|
3
|
-
*
|
|
4
|
-
* Generates DTO files.
|
|
5
|
-
*/
|
|
6
|
-
import { writeFileTree } from "../../utils/utils.fileSystem.js";
|
|
7
|
-
import { normalizeName, toPascalCase } from "../../utils/utils.name.js";
|
|
8
|
-
export async function generateDto(options, cwd) {
|
|
9
|
-
const name = normalizeName(options.name);
|
|
10
|
-
const namePascal = toPascalCase(options.name);
|
|
11
|
-
const files = {
|
|
12
|
-
[`${options.basePath}/dtos/${name}.dto.ts`]: `/**
|
|
13
|
-
* ${name} DTO.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
export interface Create${namePascal}Dto {
|
|
17
|
-
readonly name: string;
|
|
18
|
-
}
|
|
19
|
-
`,
|
|
20
|
-
};
|
|
21
|
-
if (options.dryRun) {
|
|
22
|
-
return Object.keys(files);
|
|
23
|
-
}
|
|
24
|
-
await writeFileTree(cwd, files);
|
|
25
|
-
return Object.keys(files);
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=dto.generator.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* zudojs-cli — Repository Generator
|
|
3
|
-
*/
|
|
4
|
-
export interface GenerateRepositoryOptions {
|
|
5
|
-
readonly name: string;
|
|
6
|
-
readonly basePath?: string;
|
|
7
|
-
readonly dryRun?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare function generateRepository(options: GenerateRepositoryOptions, cwd: string): Promise<string[]>;
|
|
10
|
-
//# sourceMappingURL=repository.generator.d.ts.map
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* zudojs-cli — Repository Generator
|
|
3
|
-
*/
|
|
4
|
-
import { writeFileTree, mergeBarrelExport, } from "../../utils/utils.fileSystem.js";
|
|
5
|
-
import { CLIGenerationError } from "../../errors/index.js";
|
|
6
|
-
import { normalizeName, toPascalCase } from "../../utils/utils.name.js";
|
|
7
|
-
export async function generateRepository(options, cwd) {
|
|
8
|
-
const name = normalizeName(options.name);
|
|
9
|
-
const nameCamel = toPascalCase(options.name);
|
|
10
|
-
const basePath = options.basePath ?? "";
|
|
11
|
-
const prefix = basePath ? `${basePath}/` : "";
|
|
12
|
-
const indexPath = `${prefix}repositories/index.ts`;
|
|
13
|
-
const files = {
|
|
14
|
-
[`${prefix}repositories/${name}.repository.ts`]: `import { createLogger } from "@zudojs/logger";
|
|
15
|
-
|
|
16
|
-
export interface ${nameCamel}Entity {
|
|
17
|
-
readonly id: string;
|
|
18
|
-
readonly createdAt: string;
|
|
19
|
-
readonly updatedAt: string;
|
|
20
|
-
[key: string]: unknown;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export class ${nameCamel}Repository {
|
|
24
|
-
private readonly logger = createLogger({ name: "${name}-repository" });
|
|
25
|
-
private readonly store = new Map<string, ${nameCamel}Entity>();
|
|
26
|
-
|
|
27
|
-
async findById(id: string): Promise<${nameCamel}Entity | null> {
|
|
28
|
-
this.logger.debug("Finding ${name} by id", { id });
|
|
29
|
-
return this.store.get(id) ?? null;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async findAll(): Promise<readonly ${nameCamel}Entity[]> {
|
|
33
|
-
this.logger.debug("Finding all ${name} entities");
|
|
34
|
-
return [...this.store.values()];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
async create(data: Omit<${nameCamel}Entity, "id" | "createdAt" | "updatedAt">): Promise<${nameCamel}Entity> {
|
|
38
|
-
const now = new Date().toISOString();
|
|
39
|
-
const entity: ${nameCamel}Entity = {
|
|
40
|
-
id: crypto.randomUUID(),
|
|
41
|
-
createdAt: now,
|
|
42
|
-
updatedAt: now,
|
|
43
|
-
...data,
|
|
44
|
-
};
|
|
45
|
-
this.store.set(entity.id, entity);
|
|
46
|
-
this.logger.info("Created ${name}", { id: entity.id });
|
|
47
|
-
return entity;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
async update(id: string, changes: Partial<${nameCamel}Entity>): Promise<${nameCamel}Entity | null> {
|
|
51
|
-
const existing = this.store.get(id);
|
|
52
|
-
if (!existing) return null;
|
|
53
|
-
const updated = { ...existing, ...changes, updatedAt: new Date().toISOString() };
|
|
54
|
-
this.store.set(id, updated);
|
|
55
|
-
this.logger.info("Updated ${name}", { id });
|
|
56
|
-
return updated;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
async delete(id: string): Promise<boolean> {
|
|
60
|
-
const deleted = this.store.delete(id);
|
|
61
|
-
if (deleted) this.logger.info("Deleted ${name}", { id });
|
|
62
|
-
return deleted;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
`,
|
|
66
|
-
// Merge with any existing barrel content instead of overwriting it.
|
|
67
|
-
[indexPath]: mergeBarrelExport(cwd, indexPath, `export { ${nameCamel}Repository } from "./${name}.repository.js";`),
|
|
68
|
-
};
|
|
69
|
-
if (options.dryRun) {
|
|
70
|
-
return Object.keys(files);
|
|
71
|
-
}
|
|
72
|
-
try {
|
|
73
|
-
await writeFileTree(cwd, files);
|
|
74
|
-
return Object.keys(files);
|
|
75
|
-
}
|
|
76
|
-
catch (error) {
|
|
77
|
-
throw new CLIGenerationError(`Failed to generate repository: ${name}`, error);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=repository.generator.js.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* zudojs-cli — Route Generator
|
|
3
|
-
*
|
|
4
|
-
* Generates route files.
|
|
5
|
-
*/
|
|
6
|
-
export interface GenerateRouteOptions {
|
|
7
|
-
readonly name: string;
|
|
8
|
-
readonly basePath: string;
|
|
9
|
-
readonly dryRun?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare function generateRoute(options: GenerateRouteOptions, cwd: string): Promise<string[]>;
|
|
12
|
-
//# sourceMappingURL=route.generator.d.ts.map
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* zudojs-cli — Route Generator
|
|
3
|
-
*
|
|
4
|
-
* Generates route files.
|
|
5
|
-
*/
|
|
6
|
-
import { writeFileTree } from "../../utils/utils.fileSystem.js";
|
|
7
|
-
import { normalizeName, toCamelCase } from "../../utils/utils.name.js";
|
|
8
|
-
export async function generateRoute(options, cwd) {
|
|
9
|
-
const name = normalizeName(options.name);
|
|
10
|
-
const nameCamel = toCamelCase(options.name);
|
|
11
|
-
const files = {
|
|
12
|
-
[`${options.basePath}/routes/${name}.route.ts`]: `/**
|
|
13
|
-
* ${name} route.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
export const ${nameCamel}Route = {
|
|
17
|
-
path: "/${name}",
|
|
18
|
-
method: "GET",
|
|
19
|
-
handler: async () => {
|
|
20
|
-
return { message: "${name}" };
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
`,
|
|
24
|
-
};
|
|
25
|
-
if (options.dryRun) {
|
|
26
|
-
return Object.keys(files);
|
|
27
|
-
}
|
|
28
|
-
await writeFileTree(cwd, files);
|
|
29
|
-
return Object.keys(files);
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=route.generator.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* zudojs-cli — A resource's CRUD routes (with OpenAPI metadata) and test.
|
|
3
|
-
*/
|
|
4
|
-
import { type ResourceNames } from "../resource.names.js";
|
|
5
|
-
/** `routes/<slug>.routes.ts`: `register<Pascal>Routes(router, controller)`. */
|
|
6
|
-
export declare function renderResourceRoutes(n: ResourceNames): string;
|
|
7
|
-
/**
|
|
8
|
-
* `tests/<slug>.test.ts`: drives the routes over real HTTP with
|
|
9
|
-
* `createHttpTestClient`, backed by the in-memory repository.
|
|
10
|
-
* `baseFromTests` is the import prefix from the tests folder to the layers.
|
|
11
|
-
*/
|
|
12
|
-
export declare function renderResourceTest(n: ResourceNames, baseFromTests: string): string;
|
|
13
|
-
//# sourceMappingURL=resourceRoutes.template.d.ts.map
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* zudojs-cli — A resource's CRUD routes (with OpenAPI metadata) and test.
|
|
3
|
-
*/
|
|
4
|
-
import { withArticle } from "../resource.names.js";
|
|
5
|
-
/** `routes/<slug>.routes.ts`: `register<Pascal>Routes(router, controller)`. */
|
|
6
|
-
export function renderResourceRoutes(n) {
|
|
7
|
-
const schemas = `Create${n.entity}Schema, ${n.entity}ParamsSchema, ${n.entity}Schema, Update${n.entity}Schema`;
|
|
8
|
-
return `import type { HttpRouter } from "@zudojs/http";
|
|
9
|
-
import { schema } from "@zudojs/schema";
|
|
10
|
-
|
|
11
|
-
import type { ${n.pascal}Controller } from "../controllers/${n.slug}.controller.js";
|
|
12
|
-
import { ${schemas} } from "../dtos/${n.slug}.dto.js";
|
|
13
|
-
|
|
14
|
-
const BASE_PATH = "${n.routePath}";
|
|
15
|
-
const TAGS = ["${n.slug}"];
|
|
16
|
-
const invalid = { description: "The request failed validation" };
|
|
17
|
-
const missing = { description: "No ${n.label} has this id" };
|
|
18
|
-
|
|
19
|
-
/** Registers the ${n.slug} CRUD routes. */
|
|
20
|
-
export function register${n.pascal}Routes(
|
|
21
|
-
router: HttpRouter,
|
|
22
|
-
controller: ${n.pascal}Controller,
|
|
23
|
-
): void {
|
|
24
|
-
router.get(BASE_PATH, controller.list, {
|
|
25
|
-
openapi: {
|
|
26
|
-
summary: "List ${n.slug}",
|
|
27
|
-
tags: TAGS,
|
|
28
|
-
responses: { "200": { description: "Every ${n.label}", schema: schema.array(${n.entity}Schema) } },
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
router.get(\`\${BASE_PATH}/:id\`, controller.get, {
|
|
33
|
-
openapi: {
|
|
34
|
-
summary: "Get ${withArticle(n.label)}",
|
|
35
|
-
tags: TAGS,
|
|
36
|
-
params: ${n.entity}ParamsSchema,
|
|
37
|
-
responses: { "200": { description: "The ${n.label}", schema: ${n.entity}Schema }, "400": invalid, "404": missing },
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
router.post(BASE_PATH, controller.create, {
|
|
42
|
-
openapi: {
|
|
43
|
-
summary: "Create ${withArticle(n.label)}",
|
|
44
|
-
tags: TAGS,
|
|
45
|
-
body: Create${n.entity}Schema,
|
|
46
|
-
responses: { "201": { description: "Created", schema: ${n.entity}Schema }, "400": invalid },
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
router.patch(\`\${BASE_PATH}/:id\`, controller.update, {
|
|
51
|
-
openapi: {
|
|
52
|
-
summary: "Update ${withArticle(n.label)}",
|
|
53
|
-
tags: TAGS,
|
|
54
|
-
params: ${n.entity}ParamsSchema,
|
|
55
|
-
body: Update${n.entity}Schema,
|
|
56
|
-
responses: { "200": { description: "Updated", schema: ${n.entity}Schema }, "400": invalid, "404": missing },
|
|
57
|
-
},
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
router.delete(\`\${BASE_PATH}/:id\`, controller.remove, {
|
|
61
|
-
openapi: {
|
|
62
|
-
summary: "Delete ${withArticle(n.label)}",
|
|
63
|
-
tags: TAGS,
|
|
64
|
-
params: ${n.entity}ParamsSchema,
|
|
65
|
-
responses: { "204": { description: "Deleted" }, "400": invalid, "404": missing },
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
`;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* `tests/<slug>.test.ts`: drives the routes over real HTTP with
|
|
73
|
-
* `createHttpTestClient`, backed by the in-memory repository.
|
|
74
|
-
* `baseFromTests` is the import prefix from the tests folder to the layers.
|
|
75
|
-
*/
|
|
76
|
-
export function renderResourceTest(n, baseFromTests) {
|
|
77
|
-
const b = baseFromTests;
|
|
78
|
-
return `import { afterAll, describe, it } from "vitest";
|
|
79
|
-
import { createRouter } from "@zudojs/http";
|
|
80
|
-
import { createHttpTestClient } from "@zudojs/testing";
|
|
81
|
-
|
|
82
|
-
import { ${n.pascal}Controller } from "${b}/controllers/${n.slug}.controller.js";
|
|
83
|
-
import { InMemory${n.pascal}Repository } from "${b}/repositories/${n.slug}.repository.js";
|
|
84
|
-
import { register${n.pascal}Routes } from "${b}/routes/${n.slug}.routes.js";
|
|
85
|
-
import { ${n.pascal}Service } from "${b}/services/${n.slug}.service.js";
|
|
86
|
-
|
|
87
|
-
const router = createRouter();
|
|
88
|
-
register${n.pascal}Routes(
|
|
89
|
-
router,
|
|
90
|
-
new ${n.pascal}Controller(new ${n.pascal}Service(new InMemory${n.pascal}Repository())),
|
|
91
|
-
);
|
|
92
|
-
const client = createHttpTestClient(router);
|
|
93
|
-
afterAll(() => client.close());
|
|
94
|
-
|
|
95
|
-
describe("${n.routePath}", () => {
|
|
96
|
-
it("creates, reads, updates and deletes ${withArticle(n.label)}", async () => {
|
|
97
|
-
const created = await client
|
|
98
|
-
.post("${n.routePath}")
|
|
99
|
-
.send({ name: "Ada" })
|
|
100
|
-
.expect(201)
|
|
101
|
-
.expectJson({ name: "Ada" });
|
|
102
|
-
const { id } = created.json<{ id: string }>();
|
|
103
|
-
|
|
104
|
-
await client.get(\`${n.routePath}/\${id}\`).expect(200).expectJson({ id, name: "Ada" });
|
|
105
|
-
await client.get("${n.routePath}").expect(200);
|
|
106
|
-
await client
|
|
107
|
-
.patch(\`${n.routePath}/\${id}\`)
|
|
108
|
-
.send({ name: "Grace" })
|
|
109
|
-
.expect(200)
|
|
110
|
-
.expectJson({ name: "Grace" });
|
|
111
|
-
await client.delete(\`${n.routePath}/\${id}\`).expect(204);
|
|
112
|
-
await client.get(\`${n.routePath}/\${id}\`).expect(404);
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
it("rejects an invalid body with 400", async () => {
|
|
116
|
-
await client
|
|
117
|
-
.post("${n.routePath}")
|
|
118
|
-
.send({ name: "" })
|
|
119
|
-
.expect(400)
|
|
120
|
-
.expectJson({ error: "Validation failed" });
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
it("rejects an id that is not a UUID with 400", async () => {
|
|
124
|
-
await client.get("${n.routePath}/not-a-uuid").expect(400);
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
`;
|
|
128
|
-
}
|
|
129
|
-
//# sourceMappingURL=resourceRoutes.template.js.map
|