pub(super) fn unwired(tables: &[String]) {
if tables.is_empty() {
return;
}
println!(
"\nWarning: {} table(s) are generated but not served, because db/api.ts \
does not reference them:",
tables.len()
);
for table in tables {
println!(" {table}");
}
println!(
"Add them to the router in db/api.ts, for example:\n\
\x20 {}: generated.{},",
tables[0], tables[0]
);
}
pub(super) fn preserved() {
println!(
"\n'kept' files already existed and are yours to edit; \
pull does not overwrite them.\n\
Use --force to replace them with the generated version."
);
}
pub(super) fn next_steps() {
println!(
"
Next:
npm install drizzle-orm pg zod drizzle-zod fastify \
@orpc/server @orpc/openapi @orpc/zod"
);
}
pub(super) fn undeclared(models: &[String]) {
if models.is_empty() {
return;
}
println!(
"\nWarning: {} model(s) were written but are not declared, because the \
parent mod.rs is yours and does not list them:",
models.len()
);
for model in models {
println!(" {model}");
}
println!(
"Declare them in the parent mod.rs, for example:\n\
\x20 pub mod {};",
models[0]
);
}