/** * Configuration for the bootstrap algorithm (see bootstrap.md): WHAT of * the template survives into a new project. Like RepoLayout and * CommandCatalog, this is data the algorithm dispatches on — porting the * bootstrap to another template means editing these rules, not the * algorithm. * * The strip is FEATURE-SHAPED: a project is built one feature at a time, * so it is emptied the same way, in reverse (feature-removal.ts). These * rules say which features survive and what has to be handled outside * the feature grain — nothing else. Directory-shaped stripping was tried * first and failed twice in the same way: directory boundaries do not * match feature boundaries, so a rule aimed at a directory either eats * infrastructure (the outbox's SQL lives among the app's) or misses app * code (route files live beside the router shell). */ export interface BootstrapRules { /** * Path segments excluded from the template copy at any depth — VCS * state, dependency installs, build output, test artifacts, generated * native projects. */ copyExcludes: string[]; /** * The feature files a bootstrapped project INHERITS, as repo-relative * paths or directories (a directory keeps every feature under it). * Every other feature in the template is removed with its vertical * slice. Deciding to retain more of the template is adding entries * here — the algorithm does not change. */ keepFeatures: string[]; /** * Paths removed entirely, scaffolding included — things that belong to * no feature at all (the template's own descriptor, example fixtures). */ removePaths: string[]; /** * Directories emptied outside the feature grain: GENERATED output that * the project regenerates from its own (now empty) contract, and * MIGRATION history, which is the example app's schema story rather * than any one feature's. Package scaffolding survives, as does * anything matching a `keep` pattern. */ emptyDirectories: (string | EmptyDirectoryRule)[]; /** * Files that carry the project's IDENTITY (names, titles, module * registrations) or MIX the example app with infrastructure (a schema * file holding both its tables and the outbox's). The identity step * rewrites the first kind and REDUCES the second — app entries out, * infrastructure untouched. */ identityFiles: string[]; } /** A directory to empty, minus the infrastructure files that survive it. */ export interface EmptyDirectoryRule { path: string; /** * Filenames (or `*`-globs) kept untouched — infrastructure that lives * among the example app's files. Everything else in the directory * goes, as usual. */ keep: string[]; } /** The directory an emptying rule names, whichever form it takes. */ export declare function emptyDirectoryPath(rule: string | EmptyDirectoryRule): string; /** The keep patterns of an emptying rule (none, for the plain form). */ export declare function emptyDirectoryKeeps(rule: string | EmptyDirectoryRule): string[]; /** The rules for the nextjs-fastify stack's example project. */ export declare const NEXTJS_FASTIFY_BOILERPLATE_BOOTSTRAP_RULES: BootstrapRules;