fn has_task_definition_in_repo(
        loader: &TurboJsonLoader,
        package_graph: &PackageGraph,
        task_name: &TaskName<'static>,
    ) -> Result<bool, Error> {
        for (package, _) in package_graph.packages() {
            let task_id = task_name
                .task_id()
                .unwrap_or_else(|| TaskId::new(package.as_str(), task_name.task()));
            if Self::has_task_definition_in_run(loader, package, task_name, &task_id)? {
                return Ok(true);
            }
        }
        Ok(false)
    }
Checks if there's a task definition somewhere in the repository
crates/turborepo-lib/src/engine/builder.rs