basalt / generator/src / serviceSiblingsExist
Function: serviceSiblingsExist()
> serviceSiblingsExist(name, options?): Promise<boolean>
Defined in: generator/src/generate.ts:157
Whether the sibling files a CRUD service imports — <name>.repository.ts and <name>.schema.ts in the module directory — are already under baseDir. Both, or none: a service importing a file nobody generated does not compile.
This is what basalt make:service <Name> consults when neither --crud nor --no-crud was given, and what a programmatic caller should consult before calling generate('service', …) on its own — generateResource does not need it (it writes the siblings itself).
Parameters
name
string
options?
WriteOptions = {}
Returns
Promise<boolean>