basalt / generator/src / generatorCommands
Function: generatorCommands()
> generatorCommands(defaults?): CommandDefinition[]
Defined in: generator/src/commands.ts:133
CLI commands: basalt make:resource Project, basalt make:service Project, … Options: --dir=<path> (target root), --force (overwrite), --prisma (Prisma-backed repository + schema.prisma model), --soft-delete (deletedAt column + restore() + restore route), --no-register (skip wiring the resource into src/app.ts), --public / --no-auth (deliberately PUBLIC routes; by default every route requires an authenticated user), --tenant / --no-tenant (force tenant scoping on/off; by default it is on when the project depends on @basaltkit/tenancy).
After generating, a security note states whether the routes are authenticated and whether the data is tenant-scoped.
defaults holds what is true of the project rather than of one invocation — which Prisma client the repositories are typed against, and whether they are Prisma-backed at all:
generatorCommands({
prisma: true,
prismaClient: { import: '../../tenant-db.js', type: 'TenantDb' },
})A flag still wins, in both directions: --no-prisma turns off a default of prisma: true. A default a flag cannot override is a trap, and the CLI's argv parser already gives the negation its own value.
Parameters
defaults?
GeneratorOptions = {}