import type { BoilerplateFramework, BoilerplateOptions, BoilerplateTemplate, FileMerge } from './types.ts'; export type { BoilerplateFramework, BoilerplateOptions, BoilerplateTemplate, FileMerge, } from './types.ts'; export { getInstallSpecifier, packageTag } from './dependencies.ts'; export { mergeFile } from './merge.ts'; export { boilerplateFrameworks } from './types.ts'; /** Explicit inputs for standalone v3 generation in another CLI. */ export interface GenerateOptions { framework: BoilerplateFramework; mode: 'offline' | 'hosted'; backendURL?: string; scripts?: string[]; } /** A filesystem-free plan. The host owns validation against existing files and writes. */ export interface GenerationPlan { /** Paths relative to the project root, with contents for a project without them. */ files: Record; /** * How to apply a file the project already has, with {@link mergeFile}. * Other existing files are replaced only when the user allows it. */ merge: Record; /** Registry installation arguments, with c15t packages on the CLI's release line. */ dependencies: string[]; instructions: string[]; } /** * Generate a framework's quickstart files without filesystem, terminal, or * network access. Hosted mode writes the backend URL to `.env` under the * framework's public env var; offline mode resolves the policy in the * browser and writes no `.env`. * @param options Explicit framework, storage mode, backend URL, and integrations. * @returns Files relative to the project root, how to merge them into * existing files, bare dependency names, and wiring instructions. * @throws {Error} When a framework, mode, backend URL, or integration is invalid. * @example * const template = generateBoilerplateTemplate({ * framework: 'react', mode: 'hosted', * backendURL: 'https://your-project.inth.app', scripts: ['posthog'], * }); * template.files['src/consent.tsx']; */ export declare const generateBoilerplateTemplate: (options: BoilerplateOptions) => BoilerplateTemplate; /** * Create a standalone integration plan. Installation arguments pin c15t * packages to the release line of the CLI that published this source. * @param options Explicit framework and consent configuration. * @returns Files relative to the project root, merge rules for files the * project already has, dependencies, and wiring instructions. * @throws {Error} When inputs are invalid. */ export declare const generate: (options: GenerateOptions) => GenerationPlan; /** * Parse standalone generation arguments with defaults supplied by a host CLI. * @param args Arguments after `generate`. Explicit arguments override host * defaults. Value flags accept `--flag value` and `--flag=value`. * @param defaults Framework, mode, backend URL, and integrations from the host. * @returns Explicit generation options. Backend validation runs during generation. * @throws {Error} When arguments are missing, conflicting, or unsupported. * @example * const options = parseGenerateOptions(['hosted', '--framework', 'react', * '--backend-url', 'https://your-project.inth.app']); */ export declare const parseGenerateOptions: (args: string[], defaults?: Partial) => GenerateOptions; /** * Run standalone generation from arguments forwarded by a host CLI. * @param args Arguments after `generate`. Explicit arguments override host defaults. * @param defaults Framework and configuration supplied by the host. * @returns A generation plan without installing dependencies or writing files. * @throws {Error} When arguments or configuration are invalid. */ export declare const runGenerateCommand: (args: string[], defaults?: Partial) => GenerationPlan;