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
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* zudojs-cli — Which development servers `zudojs dev` starts.
|
|
3
|
+
*
|
|
4
|
+
* Servers are started through the project's package manager (`pnpm run
|
|
5
|
+
* dev`, `npm run dev`, …) rather than by spawning `tsx` or `ng` directly:
|
|
6
|
+
* those binaries are devDependencies of the generated project and are not
|
|
7
|
+
* on the user's PATH, so the direct spawn failed with ENOENT for everyone
|
|
8
|
+
* who had not installed them globally. Running the script also means the
|
|
9
|
+
* project's own `dev` script is what runs — `tsx watch src` used to be
|
|
10
|
+
* hard-coded here, which watched `src/index.ts`, a file that only exports
|
|
11
|
+
* `createApp` and never starts the server.
|
|
12
|
+
*/
|
|
13
|
+
import { existsSync } from "node:fs";
|
|
14
|
+
import { basename, join, relative } from "node:path";
|
|
15
|
+
import { getRunScriptCommand } from "../../installers/dependency.installer.js";
|
|
16
|
+
/**
|
|
17
|
+
* Computes the servers `zudojs dev` starts for a project layout.
|
|
18
|
+
*
|
|
19
|
+
* Exported so the selection can be tested without spawning anything.
|
|
20
|
+
*/
|
|
21
|
+
export function planDevServers(layout, options = {}) {
|
|
22
|
+
const servers = [];
|
|
23
|
+
const env = options.port !== undefined
|
|
24
|
+
? { ...process.env, PORT: String(options.port) }
|
|
25
|
+
: undefined;
|
|
26
|
+
if (!options.frontendOnly) {
|
|
27
|
+
for (const dir of layout.backendDirs) {
|
|
28
|
+
if (!existsSync(join(dir, "package.json")))
|
|
29
|
+
continue;
|
|
30
|
+
const [file, ...args] = getRunScriptCommand(layout.packageManager, "dev");
|
|
31
|
+
servers.push({
|
|
32
|
+
label: labelFor(layout.root, dir, "backend"),
|
|
33
|
+
cwd: dir,
|
|
34
|
+
file,
|
|
35
|
+
args,
|
|
36
|
+
...(env ? { env } : {}),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (!options.backendOnly && layout.frontendDir !== undefined) {
|
|
41
|
+
const spec = frontendServer(layout, layout.frontendDir);
|
|
42
|
+
if (spec)
|
|
43
|
+
servers.push(spec);
|
|
44
|
+
}
|
|
45
|
+
return servers;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Why {@link planDevServers} found nothing to start. `--frontend-only` in a
|
|
49
|
+
* backend project used to warn and exit 0, which a script or CI step read
|
|
50
|
+
* as "the dev server is up".
|
|
51
|
+
*/
|
|
52
|
+
export function describeNothingToStart(layout, options) {
|
|
53
|
+
if (options.frontendOnly && layout.frontendDir === undefined) {
|
|
54
|
+
return `This ${layout.projectType} project has no frontend app, so --frontend-only has nothing to start. Run "zudojs dev" for the backend.`;
|
|
55
|
+
}
|
|
56
|
+
if (options.backendOnly && layout.backendDirs.length === 0) {
|
|
57
|
+
return `This ${layout.projectType} project has no backend app, so --backend-only has nothing to start. Run "zudojs dev" for the frontend.`;
|
|
58
|
+
}
|
|
59
|
+
if (options.frontendOnly) {
|
|
60
|
+
return "The frontend app has no package.json (or its framework has no dev server), so there is nothing to start.";
|
|
61
|
+
}
|
|
62
|
+
return "No development servers to start: no app in this project has a package.json with a dev script.";
|
|
63
|
+
}
|
|
64
|
+
function labelFor(root, dir, fallback) {
|
|
65
|
+
const rel = relative(root, dir);
|
|
66
|
+
return rel === "" ? fallback : basename(dir);
|
|
67
|
+
}
|
|
68
|
+
function frontendServer(layout, dir) {
|
|
69
|
+
const framework = layout.frontendFramework ?? "react";
|
|
70
|
+
if (framework === "none")
|
|
71
|
+
return null;
|
|
72
|
+
if (framework === "flutter") {
|
|
73
|
+
if (!existsSync(join(dir, "pubspec.yaml")))
|
|
74
|
+
return null;
|
|
75
|
+
return { label: "web", cwd: dir, file: "flutter", args: ["run", "--debug"] };
|
|
76
|
+
}
|
|
77
|
+
if (!existsSync(join(dir, "package.json")))
|
|
78
|
+
return null;
|
|
79
|
+
// Angular's package.json has `start: ng serve`; React Native's has `start`.
|
|
80
|
+
const script = framework === "angular" || framework === "react-native" ? "start" : "dev";
|
|
81
|
+
const [file, ...args] = getRunScriptCommand(layout.packageManager, script);
|
|
82
|
+
return { label: labelFor(layout.root, dir, "frontend"), cwd: dir, file, args };
|
|
83
|
+
}
|
|
@@ -2,36 +2,10 @@
|
|
|
2
2
|
* zudojs-cli — Dev Command
|
|
3
3
|
*
|
|
4
4
|
* The `zudojs dev` command. Starts the development servers of the project
|
|
5
|
-
* in the current directory.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* dev`, `npm run dev`, …) rather than by spawning `tsx` or `ng` directly:
|
|
9
|
-
* those binaries are devDependencies of the generated project and are not
|
|
10
|
-
* on the user's PATH, so the direct spawn failed with ENOENT for everyone
|
|
11
|
-
* who had not installed them globally. Running the script also means the
|
|
12
|
-
* project's own `dev` script is what runs — `tsx watch src` used to be
|
|
13
|
-
* hard-coded here, which watched `src/index.ts`, a file that only exports
|
|
14
|
-
* `createApp` and never starts the server.
|
|
5
|
+
* in the current directory (see `dev/dev.plan.ts` for how they are chosen).
|
|
6
|
+
* A selection that leaves nothing to start (`--frontend-only` in a backend
|
|
7
|
+
* project, for instance) is an error, not a warning followed by exit 0.
|
|
15
8
|
*/
|
|
16
9
|
import type { CLIContext } from "../cliType/cliType.type.js";
|
|
17
|
-
|
|
18
|
-
/** One development server to start. */
|
|
19
|
-
export interface DevServerSpec {
|
|
20
|
-
readonly label: string;
|
|
21
|
-
readonly cwd: string;
|
|
22
|
-
readonly file: string;
|
|
23
|
-
readonly args: readonly string[];
|
|
24
|
-
readonly env?: NodeJS.ProcessEnv;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Computes the servers `zudojs dev` starts for a project layout.
|
|
28
|
-
*
|
|
29
|
-
* Exported so the selection can be tested without spawning anything.
|
|
30
|
-
*/
|
|
31
|
-
export declare function planDevServers(layout: ProjectLayout, options?: {
|
|
32
|
-
readonly frontendOnly?: boolean;
|
|
33
|
-
readonly backendOnly?: boolean;
|
|
34
|
-
readonly port?: number;
|
|
35
|
-
}): DevServerSpec[];
|
|
10
|
+
export { planDevServers, type DevServerSpec } from "./dev/index.js";
|
|
36
11
|
export declare function runDevCommand(context: CLIContext): Promise<void>;
|
|
37
|
-
//# sourceMappingURL=dev.command.d.ts.map
|
|
@@ -2,84 +2,15 @@
|
|
|
2
2
|
* zudojs-cli — Dev Command
|
|
3
3
|
*
|
|
4
4
|
* The `zudojs dev` command. Starts the development servers of the project
|
|
5
|
-
* in the current directory.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* dev`, `npm run dev`, …) rather than by spawning `tsx` or `ng` directly:
|
|
9
|
-
* those binaries are devDependencies of the generated project and are not
|
|
10
|
-
* on the user's PATH, so the direct spawn failed with ENOENT for everyone
|
|
11
|
-
* who had not installed them globally. Running the script also means the
|
|
12
|
-
* project's own `dev` script is what runs — `tsx watch src` used to be
|
|
13
|
-
* hard-coded here, which watched `src/index.ts`, a file that only exports
|
|
14
|
-
* `createApp` and never starts the server.
|
|
5
|
+
* in the current directory (see `dev/dev.plan.ts` for how they are chosen).
|
|
6
|
+
* A selection that leaves nothing to start (`--frontend-only` in a backend
|
|
7
|
+
* project, for instance) is an error, not a warning followed by exit 0.
|
|
15
8
|
*/
|
|
16
|
-
import { existsSync } from "node:fs";
|
|
17
|
-
import { basename, join, relative } from "node:path";
|
|
18
9
|
import { runStreaming } from "../utils/utils.exec.js";
|
|
19
10
|
import { CLIValidationError, CLIGenerationError } from "../errors/index.js";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
* Computes the servers `zudojs dev` starts for a project layout.
|
|
24
|
-
*
|
|
25
|
-
* Exported so the selection can be tested without spawning anything.
|
|
26
|
-
*/
|
|
27
|
-
export function planDevServers(layout, options = {}) {
|
|
28
|
-
const servers = [];
|
|
29
|
-
const env = options.port !== undefined
|
|
30
|
-
? { ...process.env, PORT: String(options.port) }
|
|
31
|
-
: undefined;
|
|
32
|
-
if (!options.frontendOnly) {
|
|
33
|
-
for (const dir of layout.backendDirs) {
|
|
34
|
-
if (!existsSync(join(dir, "package.json")))
|
|
35
|
-
continue;
|
|
36
|
-
const [file, ...args] = getRunScriptCommand(layout.packageManager, "dev");
|
|
37
|
-
servers.push({
|
|
38
|
-
label: labelFor(layout.root, dir, "backend"),
|
|
39
|
-
cwd: dir,
|
|
40
|
-
file,
|
|
41
|
-
args,
|
|
42
|
-
...(env ? { env } : {}),
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
if (!options.backendOnly && layout.frontendDir !== undefined) {
|
|
47
|
-
const spec = frontendServer(layout, layout.frontendDir);
|
|
48
|
-
if (spec)
|
|
49
|
-
servers.push(spec);
|
|
50
|
-
}
|
|
51
|
-
return servers;
|
|
52
|
-
}
|
|
53
|
-
function labelFor(root, dir, fallback) {
|
|
54
|
-
const rel = relative(root, dir);
|
|
55
|
-
return rel === "" ? fallback : basename(dir);
|
|
56
|
-
}
|
|
57
|
-
function frontendServer(layout, dir) {
|
|
58
|
-
const framework = layout.frontendFramework ?? "react";
|
|
59
|
-
if (framework === "none")
|
|
60
|
-
return null;
|
|
61
|
-
if (framework === "flutter") {
|
|
62
|
-
if (!existsSync(join(dir, "pubspec.yaml")))
|
|
63
|
-
return null;
|
|
64
|
-
return {
|
|
65
|
-
label: "web",
|
|
66
|
-
cwd: dir,
|
|
67
|
-
file: "flutter",
|
|
68
|
-
args: ["run", "--debug"],
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
if (!existsSync(join(dir, "package.json")))
|
|
72
|
-
return null;
|
|
73
|
-
// Angular's package.json has `start: ng serve`; React Native's has `start`.
|
|
74
|
-
const script = framework === "angular" || framework === "react-native" ? "start" : "dev";
|
|
75
|
-
const [file, ...args] = getRunScriptCommand(layout.packageManager, script);
|
|
76
|
-
return {
|
|
77
|
-
label: labelFor(layout.root, dir, "frontend"),
|
|
78
|
-
cwd: dir,
|
|
79
|
-
file,
|
|
80
|
-
args,
|
|
81
|
-
};
|
|
82
|
-
}
|
|
11
|
+
import { resolveProjectLayout } from "../resolvers/layout/projectLayout.core.js";
|
|
12
|
+
import { describeNothingToStart, planDevServers } from "./dev/index.js";
|
|
13
|
+
export { planDevServers } from "./dev/index.js";
|
|
83
14
|
export async function runDevCommand(context) {
|
|
84
15
|
const frontendOnly = context.values["frontend-only"] === true;
|
|
85
16
|
const backendOnly = context.values["backend-only"] === true;
|
|
@@ -98,14 +29,14 @@ export async function runDevCommand(context) {
|
|
|
98
29
|
if (layout.frontendFramework) {
|
|
99
30
|
context.logger.info(`Frontend: ${layout.frontendFramework}`);
|
|
100
31
|
}
|
|
101
|
-
const
|
|
32
|
+
const selection = {
|
|
102
33
|
frontendOnly,
|
|
103
34
|
backendOnly,
|
|
104
35
|
...(port !== undefined ? { port } : {}),
|
|
105
|
-
}
|
|
36
|
+
};
|
|
37
|
+
const servers = planDevServers(layout, selection);
|
|
106
38
|
if (servers.length === 0) {
|
|
107
|
-
|
|
108
|
-
return;
|
|
39
|
+
throw new CLIValidationError(describeNothingToStart(layout, selection));
|
|
109
40
|
}
|
|
110
41
|
for (const server of servers) {
|
|
111
42
|
context.logger.info(`Starting ${server.label}: ${server.file} ${server.args.join(" ")}`);
|
|
@@ -128,4 +59,3 @@ export async function runDevCommand(context) {
|
|
|
128
59
|
throw new CLIGenerationError("Development server failed to start.", error);
|
|
129
60
|
}
|
|
130
61
|
}
|
|
131
|
-
//# sourceMappingURL=dev.command.js.map
|
|
@@ -32,4 +32,3 @@ export declare function runDoctorChecks(cwd: string): DoctorCheck[];
|
|
|
32
32
|
*/
|
|
33
33
|
export declare function runEnvironmentChecks(cwd: string): Promise<DoctorCheck[]>;
|
|
34
34
|
export declare function runDoctorCommand(context: CLIContext): Promise<void>;
|
|
35
|
-
//# sourceMappingURL=doctor.command.d.ts.map
|
|
@@ -9,7 +9,7 @@ import { join } from "node:path";
|
|
|
9
9
|
import { generateModule } from "../generators/module/module.generator.js";
|
|
10
10
|
import { generateCommand } from "../generators/command/command.generator.js";
|
|
11
11
|
import { generateQuery } from "../generators/query/query.generator.js";
|
|
12
|
-
import { generateMiddleware } from "../generators/middleware/middleware.generator.js";
|
|
12
|
+
import { generateMiddleware, } from "../generators/middleware/middleware.generator.js";
|
|
13
13
|
import { generateEvent } from "../generators/event/event.generator.js";
|
|
14
14
|
import { generateJob } from "../generators/job/job.generator.js";
|
|
15
15
|
import { generateModel } from "../generators/model/model.generator.js";
|
|
@@ -18,7 +18,7 @@ import { generateValidator } from "../generators/validator/validator.generator.j
|
|
|
18
18
|
import { CLIGenerationError, CLINotInProjectError, CLIValidationError, } from "../errors/index.js";
|
|
19
19
|
import { assertGeneratableName, assertSafePathSegment, } from "../utils/utils.name.js";
|
|
20
20
|
import { SCHEMATIC_NAMES } from "../constants/index.js";
|
|
21
|
-
import { resolveProjectLayout } from "../resolvers/layout/projectLayout.core.js";
|
|
21
|
+
import { detectPackageManager, resolveProjectLayout, } from "../resolvers/layout/projectLayout.core.js";
|
|
22
22
|
import { findProjectRoot } from "../resolvers/project.resolver.js";
|
|
23
23
|
import { describeError } from "./commandError.helper.js";
|
|
24
24
|
import { captureWrites, findWriteConflicts } from "../utils/utils.writeGuard.js";
|
|
@@ -96,10 +96,15 @@ export async function runGenerateCommand(context) {
|
|
|
96
96
|
const moduleName = context.values.module;
|
|
97
97
|
const dryRun = context.values["dry-run"] === true;
|
|
98
98
|
const force = context.values.force === true;
|
|
99
|
-
if (!schematic
|
|
100
|
-
!SCHEMATIC_NAMES.includes(schematic)) {
|
|
99
|
+
if (!schematic) {
|
|
101
100
|
throw new CLIValidationError(`Schematic name is required. Available: ${SCHEMATIC_NAMES.join(", ")}`);
|
|
102
101
|
}
|
|
102
|
+
// An unknown schematic used to be reported as a missing one ("Schematic
|
|
103
|
+
// name is required."), which sent the user looking for a typo in the
|
|
104
|
+
// wrong place.
|
|
105
|
+
if (!SCHEMATIC_NAMES.includes(schematic)) {
|
|
106
|
+
throw new CLIValidationError(`Unknown schematic "${schematic}". Available: ${SCHEMATIC_NAMES.join(", ")}`);
|
|
107
|
+
}
|
|
103
108
|
if (!name) {
|
|
104
109
|
throw new CLIValidationError("Resource name is required.");
|
|
105
110
|
}
|
|
@@ -156,20 +161,26 @@ export async function runGenerateCommand(context) {
|
|
|
156
161
|
` - Or add a module to an existing app: zudojs generate module ${name} --service <existing-service>`);
|
|
157
162
|
}
|
|
158
163
|
/**
|
|
159
|
-
* A modular monolith has modules, not services, so
|
|
160
|
-
* `generate
|
|
164
|
+
* A modular monolith has modules, not top-level services, so a bare
|
|
165
|
+
* `generate service <name>` means `generate module <name>` there.
|
|
161
166
|
*
|
|
162
167
|
* This used to log the mapping and then run the service schematic anyway,
|
|
163
168
|
* which wrote four inert files into a new top-level directory that the
|
|
164
169
|
* runtime never loads. Rewriting the schematic here — rather than at the
|
|
165
170
|
* dispatch switch — keeps the base-path resolution, the overwrite guard and
|
|
166
171
|
* the result message all describing the same thing.
|
|
172
|
+
*
|
|
173
|
+
* With `--module <existing>` the user is asking for a service layer inside
|
|
174
|
+
* that module, so the service schematic runs there; the mapping used to
|
|
175
|
+
* apply regardless and created a new module named after the service.
|
|
167
176
|
*/
|
|
168
|
-
const effectiveSchematic = architecture === "modular-monolith" &&
|
|
177
|
+
const effectiveSchematic = architecture === "modular-monolith" &&
|
|
178
|
+
schematic === "service" &&
|
|
179
|
+
moduleName === undefined
|
|
169
180
|
? "module"
|
|
170
181
|
: schematic;
|
|
171
182
|
if (effectiveSchematic !== schematic) {
|
|
172
|
-
context.logger.info('Mapping "service" → "module" for modular-monolith architecture.');
|
|
183
|
+
context.logger.info('Mapping "service" → "module" for modular-monolith architecture (pass --module <name> to add a service inside a module).');
|
|
173
184
|
}
|
|
174
185
|
if (isResourceSchematic(effectiveSchematic)) {
|
|
175
186
|
await runResourceSchematic(context, {
|
|
@@ -178,6 +189,7 @@ export async function runGenerateCommand(context) {
|
|
|
178
189
|
cwd,
|
|
179
190
|
backendRoot: backendPrefix(cwd).replace(/\/$/, ""),
|
|
180
191
|
architecture: architecture ?? undefined,
|
|
192
|
+
packageManager: layout?.packageManager ?? detectPackageManager(cwd),
|
|
181
193
|
service,
|
|
182
194
|
moduleName,
|
|
183
195
|
dryRun,
|
|
@@ -209,6 +221,15 @@ export async function runGenerateCommand(context) {
|
|
|
209
221
|
.map((step) => ` ${step}`)
|
|
210
222
|
.join("\n")}`);
|
|
211
223
|
},
|
|
224
|
+
onMiddlewareRegistered: (registration) => {
|
|
225
|
+
if (registration.registered) {
|
|
226
|
+
context.logger.info(`Registered in the middleware pipeline of ${registration.serverFile}.`);
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
context.logger.warn(`Could not register the middleware automatically (the zudojs:server-imports or zudojs:server-middleware markers are missing). Add:\n${registration.manualSteps
|
|
230
|
+
.map((step) => ` ${step}`)
|
|
231
|
+
.join("\n")}`);
|
|
232
|
+
},
|
|
212
233
|
}, cwd);
|
|
213
234
|
if (dryRun) {
|
|
214
235
|
context.logger.info(`Dry run: ${fileCount(result.length)} would be generated (nothing written):`);
|
|
@@ -249,7 +270,7 @@ async function runSchematic(schematic, name, options, cwd) {
|
|
|
249
270
|
case "query":
|
|
250
271
|
return await generateQuery({ name, ...(cqrsService ? { service: cqrsService } : {}), basePath, dryRun }, cwd);
|
|
251
272
|
case "middleware":
|
|
252
|
-
return await generateMiddleware({ name, basePath, dryRun }, cwd);
|
|
273
|
+
return await generateMiddleware({ name, basePath, dryRun, onRegistered: options.onMiddlewareRegistered }, cwd);
|
|
253
274
|
case "event":
|
|
254
275
|
return await generateEvent({ name, basePath, dryRun }, cwd);
|
|
255
276
|
case "job":
|
|
@@ -269,4 +290,3 @@ async function runSchematic(schematic, name, options, cwd) {
|
|
|
269
290
|
throw new CLIGenerationError(`Failed to generate ${schematic} "${name}": ${describeError(error)}`, error);
|
|
270
291
|
}
|
|
271
292
|
}
|
|
272
|
-
//# sourceMappingURL=generate.command.js.map
|
|
@@ -158,4 +158,3 @@ export const FEATURE_NAMES = Object.freeze(FEATURE_CHOICES.map((choice) => choic
|
|
|
158
158
|
export const DEFAULT_ARCHITECTURE = "monolith";
|
|
159
159
|
export const DEFAULT_PACKAGE_MANAGER = "pnpm";
|
|
160
160
|
export const DEFAULT_DATABASE = "postgresql";
|
|
161
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -6,43 +6,42 @@
|
|
|
6
6
|
* Do not edit by hand; run `node scripts/generateZudojsVersions.mjs`.
|
|
7
7
|
*/
|
|
8
8
|
export const ZUDOJS_PACKAGE_VERSIONS = Object.freeze({
|
|
9
|
-
"@zudojs/adapters": "1.
|
|
10
|
-
"@zudojs/api": "1.2.
|
|
11
|
-
"@zudojs/auth": "1.
|
|
12
|
-
"@zudojs/auth-oauth": "1.2.
|
|
13
|
-
"@zudojs/cache": "1.2.
|
|
14
|
-
"@zudojs/config": "1.3.
|
|
15
|
-
"@zudojs/constants": "1.
|
|
16
|
-
"@zudojs/container": "1.
|
|
17
|
-
"@zudojs/core": "1.
|
|
18
|
-
"@zudojs/cqrs": "1.
|
|
19
|
-
"@zudojs/crypto": "1.
|
|
20
|
-
"@zudojs/database": "1.
|
|
21
|
-
"@zudojs/docs": "1.0
|
|
22
|
-
"@zudojs/errors": "1.
|
|
23
|
-
"@zudojs/events": "1.
|
|
24
|
-
"@zudojs/feature-flags": "1.
|
|
25
|
-
"@zudojs/http": "1.
|
|
26
|
-
"@zudojs/lifecycle": "1.
|
|
27
|
-
"@zudojs/logger": "1.
|
|
28
|
-
"@zudojs/messaging": "1.2.
|
|
29
|
-
"@zudojs/middleware": "1.1.
|
|
30
|
-
"@zudojs/observability": "1.
|
|
31
|
-
"@zudojs/openapi": "1.
|
|
32
|
-
"@zudojs/permissions": "1.
|
|
33
|
-
"@zudojs/plugins": "1.
|
|
34
|
-
"@zudojs/queue": "1.
|
|
35
|
-
"@zudojs/rpc": "1.
|
|
36
|
-
"@zudojs/runtime": "1.
|
|
37
|
-
"@zudojs/scheduler": "1.
|
|
38
|
-
"@zudojs/schema": "1.
|
|
39
|
-
"@zudojs/security": "1.3.
|
|
40
|
-
"@zudojs/serialization": "1.
|
|
41
|
-
"@zudojs/storage": "1.
|
|
42
|
-
"@zudojs/tenancy": "1.
|
|
43
|
-
"@zudojs/testing": "1.
|
|
44
|
-
"@zudojs/transactions": "1.
|
|
45
|
-
"@zudojs/types": "1.
|
|
46
|
-
"@zudojs/validation": "1.
|
|
9
|
+
"@zudojs/adapters": "1.3.0",
|
|
10
|
+
"@zudojs/api": "1.2.4",
|
|
11
|
+
"@zudojs/auth": "1.4.0",
|
|
12
|
+
"@zudojs/auth-oauth": "1.2.6",
|
|
13
|
+
"@zudojs/cache": "1.2.4",
|
|
14
|
+
"@zudojs/config": "1.3.4",
|
|
15
|
+
"@zudojs/constants": "1.2.0",
|
|
16
|
+
"@zudojs/container": "1.3.0",
|
|
17
|
+
"@zudojs/core": "1.3.0",
|
|
18
|
+
"@zudojs/cqrs": "1.3.0",
|
|
19
|
+
"@zudojs/crypto": "1.4.0",
|
|
20
|
+
"@zudojs/database": "1.5.0",
|
|
21
|
+
"@zudojs/docs": "1.1.0",
|
|
22
|
+
"@zudojs/errors": "1.4.0",
|
|
23
|
+
"@zudojs/events": "1.4.0",
|
|
24
|
+
"@zudojs/feature-flags": "1.5.0",
|
|
25
|
+
"@zudojs/http": "1.5.0",
|
|
26
|
+
"@zudojs/lifecycle": "1.3.0",
|
|
27
|
+
"@zudojs/logger": "1.5.0",
|
|
28
|
+
"@zudojs/messaging": "1.2.4",
|
|
29
|
+
"@zudojs/middleware": "1.1.3",
|
|
30
|
+
"@zudojs/observability": "1.3.0",
|
|
31
|
+
"@zudojs/openapi": "1.6.0",
|
|
32
|
+
"@zudojs/permissions": "1.5.0",
|
|
33
|
+
"@zudojs/plugins": "1.4.0",
|
|
34
|
+
"@zudojs/queue": "1.6.0",
|
|
35
|
+
"@zudojs/rpc": "1.5.0",
|
|
36
|
+
"@zudojs/runtime": "1.4.0",
|
|
37
|
+
"@zudojs/scheduler": "1.3.0",
|
|
38
|
+
"@zudojs/schema": "1.3.0",
|
|
39
|
+
"@zudojs/security": "1.3.4",
|
|
40
|
+
"@zudojs/serialization": "1.3.0",
|
|
41
|
+
"@zudojs/storage": "1.3.0",
|
|
42
|
+
"@zudojs/tenancy": "1.4.0",
|
|
43
|
+
"@zudojs/testing": "1.3.0",
|
|
44
|
+
"@zudojs/transactions": "1.3.0",
|
|
45
|
+
"@zudojs/types": "1.3.0",
|
|
46
|
+
"@zudojs/validation": "1.2.0",
|
|
47
47
|
});
|
|
48
|
-
//# sourceMappingURL=zudojsVersions.generated.js.map
|
|
@@ -18,4 +18,3 @@ export declare const ZUDOJS_FALLBACK_VERSION_RANGE: "^1.0.0";
|
|
|
18
18
|
export declare function zudojsVersionRange(name: string): string;
|
|
19
19
|
/** `{ name: range }` for a list of `@zudojs/*` packages, deduplicated. */
|
|
20
20
|
export declare function zudojsDependencies(names: readonly string[]): Record<string, string>;
|
|
21
|
-
//# sourceMappingURL=zudojsVersions.helper.d.ts.map
|
package/dist/src/errors/index.js
CHANGED
|
@@ -21,4 +21,3 @@ export declare function renderCommandFile(n: CqrsSchematicNames): string;
|
|
|
21
21
|
export declare function renderCommandHandlerFile(n: CqrsSchematicNames): string;
|
|
22
22
|
/** `index.ts`: the command folder's barrel. */
|
|
23
23
|
export declare function renderCommandBarrel(n: CqrsSchematicNames): string;
|
|
24
|
-
//# sourceMappingURL=command.template.d.ts.map
|
|
@@ -28,4 +28,3 @@ export interface FrontendPipelineResult {
|
|
|
28
28
|
* a pre-written file left the project with no Vite app at all.
|
|
29
29
|
*/
|
|
30
30
|
export declare function runFrontendPipeline(adapter: FrontendAdapter, context: FrontendGenerationContext, packageManagerRegistry: PackageManagerRegistry, dependencyResolver: DependencyResolver, postScaffoldFiles?: Readonly<Record<string, string>>): Promise<FrontendPipelineResult>;
|
|
31
|
-
//# sourceMappingURL=frontendPipeline.d.ts.map
|