zudojs-cli 2.1.3 → 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 +19 -8
- 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 +0 -1
- package/dist/src/generators/middleware/index.js +0 -1
- package/dist/src/generators/middleware/middleware.generator.d.ts +0 -1
- package/dist/src/generators/middleware/middleware.generator.js +0 -1
- package/dist/src/generators/middleware/middleware.template.d.ts +0 -1
- package/dist/src/generators/middleware/middleware.template.js +0 -1
- 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 -23
- package/dist/src/templates/shared/server.template.js +42 -69
- 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
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
* zudojs-cli — Running a resource-family schematic for `zudojs generate`.
|
|
3
3
|
*/
|
|
4
4
|
import type { CLIContext } from "../../cliType/cliType.type.js";
|
|
5
|
+
import type { PackageManager } from "../../types/index.js";
|
|
5
6
|
import type { ResourceSchematic } from "./resource.plan.js";
|
|
7
|
+
/** Runs `file args` in `cwd`; `execCommand` unless a test injects one. */
|
|
8
|
+
export type ResourceExec = (file: string, args: readonly string[], cwd: string) => Promise<unknown>;
|
|
6
9
|
/** Inputs of {@link runResourceSchematic}. */
|
|
7
10
|
export interface ResourceSchematicRun {
|
|
8
11
|
readonly schematic: ResourceSchematic;
|
|
@@ -11,15 +14,22 @@ export interface ResourceSchematicRun {
|
|
|
11
14
|
/** `""` or `"apps/api"` (fullstack). */
|
|
12
15
|
readonly backendRoot: string;
|
|
13
16
|
readonly architecture: string | undefined;
|
|
17
|
+
/** Runs `prisma generate` after a model is added; detected from lock files when omitted. */
|
|
18
|
+
readonly packageManager?: PackageManager;
|
|
14
19
|
readonly service?: string;
|
|
15
20
|
readonly moduleName?: string;
|
|
16
21
|
readonly dryRun: boolean;
|
|
17
22
|
readonly force: boolean;
|
|
23
|
+
readonly exec?: ResourceExec;
|
|
18
24
|
}
|
|
25
|
+
/** `<pm> exec prisma generate`, spelled the way each package manager wants it. */
|
|
26
|
+
export declare function prismaGenerateCommand(packageManager: PackageManager): readonly [string, ...string[]];
|
|
19
27
|
/**
|
|
20
28
|
* Runs a resource-family schematic: writes the DTO → repository → service
|
|
21
29
|
* → controller → routes chain it needs and registers the routes and the
|
|
22
|
-
* controller between the project's markers.
|
|
30
|
+
* controller between the project's markers. When a model was appended to
|
|
31
|
+
* `prisma/schema.prisma`, runs `prisma generate` so the new Prisma-backed
|
|
32
|
+
* repository compiles at once (`prisma migrate dev` no longer regenerates
|
|
33
|
+
* the client); when that fails — nothing installed yet — it says what to run.
|
|
23
34
|
*/
|
|
24
35
|
export declare function runResourceSchematic(context: CLIContext, run: ResourceSchematicRun): Promise<void>;
|
|
25
|
-
//# sourceMappingURL=resource.run.d.ts.map
|
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* zudojs-cli — Running a resource-family schematic for `zudojs generate`.
|
|
3
3
|
*/
|
|
4
|
+
import { join } from "node:path";
|
|
4
5
|
import { describeError } from "../../commands/commandError.helper.js";
|
|
5
6
|
import { CLIGenerationError, CLIValidationError } from "../../errors/index.js";
|
|
7
|
+
import { detectPackageManager } from "../../resolvers/layout/projectLayout.core.js";
|
|
8
|
+
import { execCommand } from "../../utils/utils.exec.js";
|
|
6
9
|
import { generateResource } from "./resource.generator.js";
|
|
7
10
|
import { resolveResourceLayout } from "./resource.layout.js";
|
|
8
11
|
import { describeAddedDependencies, ensureZudojsDependencies, fileCount, } from "../../wiring/index.js";
|
|
12
|
+
/** `<pm> exec prisma generate`, spelled the way each package manager wants it. */
|
|
13
|
+
export function prismaGenerateCommand(packageManager) {
|
|
14
|
+
switch (packageManager) {
|
|
15
|
+
case "npm":
|
|
16
|
+
return ["npx", "prisma", "generate"];
|
|
17
|
+
case "yarn":
|
|
18
|
+
return ["yarn", "prisma", "generate"];
|
|
19
|
+
case "bun":
|
|
20
|
+
return ["bun", "run", "prisma", "generate"];
|
|
21
|
+
case "pnpm":
|
|
22
|
+
default:
|
|
23
|
+
return ["pnpm", "exec", "prisma", "generate"];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
9
26
|
/**
|
|
10
27
|
* Runs a resource-family schematic: writes the DTO → repository → service
|
|
11
28
|
* → controller → routes chain it needs and registers the routes and the
|
|
12
|
-
* controller between the project's markers.
|
|
29
|
+
* controller between the project's markers. When a model was appended to
|
|
30
|
+
* `prisma/schema.prisma`, runs `prisma generate` so the new Prisma-backed
|
|
31
|
+
* repository compiles at once (`prisma migrate dev` no longer regenerates
|
|
32
|
+
* the client); when that fails — nothing installed yet — it says what to run.
|
|
13
33
|
*/
|
|
14
34
|
export async function runResourceSchematic(context, run) {
|
|
15
35
|
const layout = resolveResourceLayout({
|
|
@@ -21,13 +41,7 @@ export async function runResourceSchematic(context, run) {
|
|
|
21
41
|
});
|
|
22
42
|
let result;
|
|
23
43
|
try {
|
|
24
|
-
result = await generateResource({
|
|
25
|
-
name: run.name,
|
|
26
|
-
schematic: run.schematic,
|
|
27
|
-
layout,
|
|
28
|
-
dryRun: run.dryRun,
|
|
29
|
-
force: run.force,
|
|
30
|
-
}, run.cwd);
|
|
44
|
+
result = await generateResource({ name: run.name, schematic: run.schematic, layout, dryRun: run.dryRun, force: run.force }, run.cwd);
|
|
31
45
|
}
|
|
32
46
|
catch (error) {
|
|
33
47
|
if (error instanceof CLIValidationError)
|
|
@@ -45,8 +59,18 @@ export async function runResourceSchematic(context, run) {
|
|
|
45
59
|
context.logger.warn(line);
|
|
46
60
|
}
|
|
47
61
|
}
|
|
62
|
+
if (!run.dryRun && result.prismaSchema !== undefined) {
|
|
63
|
+
const [file, ...args] = prismaGenerateCommand(run.packageManager ?? detectPackageManager(run.cwd));
|
|
64
|
+
const command = [file, ...args].join(" ");
|
|
65
|
+
try {
|
|
66
|
+
await (run.exec ?? execCommand)(file, args, join(run.cwd, layout.appRoot));
|
|
67
|
+
context.logger.info(`Ran "${command}" for the model added to ${result.prismaSchema}.`);
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
context.logger.warn(`Could not run "${command}" (${describeError(error)}). Run it after installing dependencies; until then the Prisma repository does not type-check.`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
48
73
|
if (result.manualSteps.length > 0) {
|
|
49
74
|
context.logger.warn(`Finish by hand:\n${result.manualSteps.map((step) => ` - ${step}`).join("\n")}`);
|
|
50
75
|
}
|
|
51
76
|
}
|
|
52
|
-
//# sourceMappingURL=resource.run.js.map
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* zudojs-cli — Validator Generator
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Writes `validators/<name>.validator.ts`: a @zudojs/schema object schema,
|
|
5
|
+
* its inferred type and a `validate<Name>(input)` that returns the schema's
|
|
6
|
+
* `SchemaResult` (data on success, issues on failure). It used to write
|
|
7
|
+
* `validate<Name>(input) { return true; }`, a stub that accepted everything.
|
|
5
8
|
*/
|
|
6
9
|
export interface GenerateValidatorOptions {
|
|
7
10
|
readonly name: string;
|
|
8
11
|
readonly basePath: string;
|
|
9
12
|
readonly dryRun?: boolean;
|
|
10
13
|
}
|
|
14
|
+
/** Renders the validator source for `name` (kebab-case) and its PascalCase form. */
|
|
15
|
+
export declare function renderValidatorFile(name: string, pascal: string): string;
|
|
11
16
|
export declare function generateValidator(options: GenerateValidatorOptions, cwd: string): Promise<string[]>;
|
|
12
|
-
//# sourceMappingURL=validator.generator.d.ts.map
|
|
@@ -1,22 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* zudojs-cli — Validator Generator
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Writes `validators/<name>.validator.ts`: a @zudojs/schema object schema,
|
|
5
|
+
* its inferred type and a `validate<Name>(input)` that returns the schema's
|
|
6
|
+
* `SchemaResult` (data on success, issues on failure). It used to write
|
|
7
|
+
* `validate<Name>(input) { return true; }`, a stub that accepted everything.
|
|
5
8
|
*/
|
|
6
9
|
import { writeFileTree } from "../../utils/utils.fileSystem.js";
|
|
7
10
|
import { normalizeName, toPascalCase } from "../../utils/utils.name.js";
|
|
11
|
+
/** Renders the validator source for `name` (kebab-case) and its PascalCase form. */
|
|
12
|
+
export function renderValidatorFile(name, pascal) {
|
|
13
|
+
return `import { schema, type Infer, type SchemaResult } from "@zudojs/schema";
|
|
14
|
+
|
|
15
|
+
/** Shape of a valid ${name}. Replace the fields with your own. */
|
|
16
|
+
export const ${pascal}Schema = schema.object({
|
|
17
|
+
id: schema.string().min(1),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export type ${pascal} = Infer<typeof ${pascal}Schema>;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Validates \`input\` against {@link ${pascal}Schema}. On failure the result
|
|
24
|
+
* carries the issues (path and message) instead of throwing:
|
|
25
|
+
*
|
|
26
|
+
* \`\`\`ts
|
|
27
|
+
* const result = validate${pascal}(body);
|
|
28
|
+
* if (!result.success) return validationFailed(result.issues);
|
|
29
|
+
* result.data; // a ${pascal}
|
|
30
|
+
* \`\`\`
|
|
31
|
+
*/
|
|
32
|
+
export function validate${pascal}(input: unknown): SchemaResult<${pascal}> {
|
|
33
|
+
return ${pascal}Schema.safeParse(input);
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
}
|
|
8
37
|
export async function generateValidator(options, cwd) {
|
|
9
38
|
const name = normalizeName(options.name);
|
|
10
39
|
const namePascal = toPascalCase(options.name);
|
|
11
40
|
const files = {
|
|
12
|
-
[`${options.basePath}/validators/${name}.validator.ts`]:
|
|
13
|
-
* ${name} validator.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
export function validate${namePascal}(input: unknown): boolean {
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
19
|
-
`,
|
|
41
|
+
[`${options.basePath}/validators/${name}.validator.ts`]: renderValidatorFile(name, namePascal),
|
|
20
42
|
};
|
|
21
43
|
if (options.dryRun) {
|
|
22
44
|
return Object.keys(files);
|
|
@@ -24,4 +46,3 @@ export function validate${namePascal}(input: unknown): boolean {
|
|
|
24
46
|
await writeFileTree(cwd, files);
|
|
25
47
|
return Object.keys(files);
|
|
26
48
|
}
|
|
27
|
-
//# sourceMappingURL=validator.generator.js.map
|
package/dist/src/index.d.ts
CHANGED
|
@@ -55,4 +55,3 @@ export { RollbackManager, type RollbackEntry, type RollbackFailure, type Rollbac
|
|
|
55
55
|
export { ManifestManager, parseManifest, type ManifestReadResult, type ManifestReadStatus, type ZudojsManifest, } from "./manifest/index.js";
|
|
56
56
|
export type { ProjectConfiguration, ProjectType, BackendArchitecture, FrontendFramework, FrontendArchitecture, DatabaseProvider, ApiStyle, PackageManagerType, } from "./types/projectConfiguration.type.js";
|
|
57
57
|
export type { ScaffoldOptions, ArchitectureType, PackageManager, DatabaseEngine, ProjectTemplate, GenerateOptions, } from "./types/index.js";
|
|
58
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.js
CHANGED
|
@@ -11,4 +11,3 @@ export declare function getAddCommand(packageManager: PackageManager, pkg: strin
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function getRunScriptCommand(packageManager: PackageManager, script: string): [string, ...string[]];
|
|
13
13
|
export declare function installDependencies(packageManager: PackageManager, cwd: string): Promise<void>;
|
|
14
|
-
//# sourceMappingURL=dependency.installer.d.ts.map
|
|
@@ -39,4 +39,3 @@ export declare function writeManifestFile(manifestPath: string, manifest: Zudojs
|
|
|
39
39
|
* across processes.
|
|
40
40
|
*/
|
|
41
41
|
export declare function withManifestLock<T>(manifestPath: string, operation: () => Promise<T>): Promise<T>;
|
|
42
|
-
//# sourceMappingURL=manifestFile.helper.d.ts.map
|
|
@@ -7,4 +7,3 @@ export { promptBackendArchitecture } from "./backend-architecture.prompt.js";
|
|
|
7
7
|
export { promptDatabase } from "./database.prompt.js";
|
|
8
8
|
export { promptApiStyle } from "./api-style.prompt.js";
|
|
9
9
|
export { promptServices } from "./services.prompt.js";
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -7,4 +7,3 @@ export { promptBackendArchitecture } from "./backend-architecture.prompt.js";
|
|
|
7
7
|
export { promptDatabase } from "./database.prompt.js";
|
|
8
8
|
export { promptApiStyle } from "./api-style.prompt.js";
|
|
9
9
|
export { promptServices } from "./services.prompt.js";
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -5,4 +5,3 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { FrontendFramework } from "../../types/projectConfiguration.type.js";
|
|
7
7
|
export declare function promptFramework(projectType: string, overrides?: FrontendFramework | "none"): Promise<FrontendFramework | "none">;
|
|
8
|
-
//# sourceMappingURL=framework.prompt.d.ts.map
|
|
@@ -12,4 +12,3 @@ export { promptFramework } from "./frontend/framework.prompt.js";
|
|
|
12
12
|
export { promptFrontendArchitecture } from "./frontend/frontend-architecture.prompt.js";
|
|
13
13
|
export { promptPackageManager } from "./workspace/package-manager.prompt.js";
|
|
14
14
|
export { promptCapabilities, type CapabilityOption, } from "./capabilities/capabilities.prompt.js";
|
|
15
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -12,4 +12,3 @@ export { promptFramework } from "./frontend/framework.prompt.js";
|
|
|
12
12
|
export { promptFrontendArchitecture } from "./frontend/frontend-architecture.prompt.js";
|
|
13
13
|
export { promptPackageManager } from "./workspace/package-manager.prompt.js";
|
|
14
14
|
export { promptCapabilities, } from "./capabilities/capabilities.prompt.js";
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -10,4 +10,3 @@ export { MENU_CANCELLED, MENU_ITEMS, MENU_MESSAGE, MENU_NAME_PATTERN, } from "./
|
|
|
10
10
|
export { numberedSelect, type NumberedSelectIO } from "./menu.select.js";
|
|
11
11
|
export { notInProjectMessage, runMenuFlow } from "./menu.flow.js";
|
|
12
12
|
export { createTerminalMenuPrompter } from "./menu.adapter.js";
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -10,4 +10,3 @@ export { MENU_CANCELLED, MENU_ITEMS, MENU_MESSAGE, MENU_NAME_PATTERN, } from "./
|
|
|
10
10
|
export { numberedSelect } from "./menu.select.js";
|
|
11
11
|
export { notInProjectMessage, runMenuFlow } from "./menu.flow.js";
|
|
12
12
|
export { createTerminalMenuPrompter } from "./menu.adapter.js";
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -15,4 +15,3 @@ export declare function notInProjectMessage(item: MenuItem, cwd: string, name: s
|
|
|
15
15
|
* menu again rather than failing after its follow-up questions.
|
|
16
16
|
*/
|
|
17
17
|
export declare function runMenuFlow(options: MenuFlowOptions): Promise<MenuOutcome>;
|
|
18
|
-
//# sourceMappingURL=menu.flow.d.ts.map
|
|
@@ -23,4 +23,3 @@ export interface NumberedSelectIO {
|
|
|
23
23
|
* A digit picks its entry at once; ↑/↓ (or k/j) move and Enter confirms.
|
|
24
24
|
*/
|
|
25
25
|
export declare function numberedSelect(items: readonly MenuItem[], io: NumberedSelectIO): Promise<MenuItemId | MenuCancel>;
|
|
26
|
-
//# sourceMappingURL=menu.select.d.ts.map
|
|
@@ -17,4 +17,3 @@ export interface RecipeOutcome {
|
|
|
17
17
|
}
|
|
18
18
|
/** Applies `recipe` to the app at `context.appRoot` of the project at `root`. */
|
|
19
19
|
export declare function applyAppRecipe(recipe: AppRecipe, context: RecipeContext, root: string): Promise<RecipeOutcome>;
|
|
20
|
-
//# sourceMappingURL=recipeApply.app.d.ts.map
|
|
@@ -11,4 +11,3 @@ export declare function recordedDatabase(root: string): string;
|
|
|
11
11
|
export declare function recipeContextFor(root: string, dir: string): RecipeContext;
|
|
12
12
|
/** The context of a project recipe (docker) for `layout`. */
|
|
13
13
|
export declare function projectRecipeContext(layout: ProjectLayout, feature: string, capabilities: readonly string[]): ProjectRecipeContext;
|
|
14
|
-
//# sourceMappingURL=recipeApply.context.d.ts.map
|