/** * The two ways one project's payload differs from another's. * * Neither is a flag: both were decided at `rebase init` time. `--headless` * deletes `config/collections`, `backend/src/schema.generated.ts` and * `frontend/`, so a payload that assumes them emits an entrypoint importing * three files that are not there and a Dockerfile whose first `COPY` fails. */ interface ProjectShape { /** * Collections declared in code, under `/collections`. Without them * the server derives its API from the live database instead — the same * signal `rebase build` reads. */ collections: boolean; /** A `frontend` workspace for the image to build and the entrypoint to serve. */ frontend: boolean; } /** * Render one payload file for this project. * * The payload is one set of files rather than one per flavour, because the * flavours differ by about a dozen lines and two copies of a 230-line * entrypoint are how copies drift — the payload had already drifted from * `app/backend/src/index.ts` over `cronsDir`, which silently stopped every cron * job in an ejected project. So both branches live in the file, marked with * lines that are comments in TypeScript, YAML and Dockerfiles alike: * * // {{#collections}} * import { tables } from "./schema.generated.js"; * // {{/collections}} * // {{^collections}} * // No schema module: this project introspects the database. * // {{/collections}} * * `{{#name}}` keeps its block when the flag is on, `{{^name}}` when it is off, * and the marker lines themselves never reach the user. The template stays * valid TypeScript with every marker line removed, which is the flavour a * typechecker would see. */ export declare function renderPayload(contents: string, shape: ProjectShape, projectName: string): string; export declare function ejectCommand(rawArgs?: string[]): Promise; export {};