import { type CollectionBuilder } from "./introspect-db-logic"; /** * Which `defineCollection` to generate against, for collections written to `outDir`. * * **The detection is the package manifests above the output directory**, unioned from * `outDir` up to and including the project root — the first ancestor holding a * `rebase.json`, or `MAX_LEVELS` up if there is none. * * That is the rule Node itself applies: a file in `config/collections` resolves a bare * specifier through `config/node_modules`, then `/node_modules`, and so on up. * Reading the manifests along that same path answers the only question that matters — * *will this import resolve in the project I am writing into* — from the state on disk * at the moment of generation. The alternatives are all proxies for it: `rebase.json`'s * `apps` block says a CMS scaffold declared an admin app, and a `frontend/` directory * says one was scaffolded, but neither is what the compiler consults, and either can be * true of a project whose `config` package does not depend on `@rebasepro/admin-types`. * * Ambiguity resolves towards the admin panel: a project that declares both packages has * a panel, and `@rebasepro/admin-types` is the flavour that keeps the `admin` block. */ export declare function detectCollectionBuilder(outDir: string): CollectionBuilder;