import "../shared/outfitter-69ef2e9j.js"; import "../shared/outfitter-1dekqnaw.js"; import "../shared/outfitter-232ean4v.js"; import "../shared/outfitter-xa4915yp.js"; import "../shared/outfitter-m3ehh37q.js"; import "../shared/outfitter-nx1sywpb.js"; import "../shared/outfitter-y784nh31.js"; import "../shared/outfitter-pw74st5t.js"; import { TargetDefinition } from "../shared/outfitter-gsjbcta2.js"; import { OperationCollector } from "../shared/outfitter-xr6g13nz.js"; import "../shared/outfitter-8231g70k.js"; import { ScaffoldPlan } from "../shared/outfitter-crxe5gth.js"; import { Result } from "@outfitter/contracts"; /** Discriminated union describing the detected project layout at a given directory. */ type ProjectStructure = { readonly kind: "workspace"; readonly rootDir: string; readonly workspacePatterns: readonly string[]; } | { readonly kind: "single-package"; readonly rootDir: string; readonly packageJson: Record; } | { readonly kind: "none"; readonly rootDir: string; }; interface ScaffoldPlanningOptions { readonly local?: boolean | undefined; readonly noTooling?: boolean | undefined; readonly with?: string | undefined; } /** * Detects whether the given directory is a workspace root, a single package, * or has no package.json at all. Walks up to find workspace roots when needed. */ declare function detectProjectStructure(cwd: string): Result; /** * Ensures the workspace root package.json includes the given placement pattern (e.g. "apps/*"). * @returns `true` if the pattern was added, `false` if it already existed. */ declare function ensureWorkspacePattern(rootDir: string, placement: "apps" | "packages", dryRun: boolean, collector?: OperationCollector): Result; /** * Converts a single-package directory into a workspace by moving existing files * into the appropriate `apps/` or `packages/` subdirectory and creating a workspace root. * Rolls back on failure. */ declare function convertToWorkspace(rootDir: string, existingPkg: Record, dryRun: boolean, collector?: OperationCollector): Result<{ movedExisting: { from: string; to: string; name: string; }; }, string>; /** * Builds a scaffold plan for a target within a workspace, including preset * copying, shared config injection, and optional tooling blocks. */ declare function buildScaffoldPlan(target: TargetDefinition, rootDir: string, targetName: string, options: ScaffoldPlanningOptions): ScaffoldPlan; /** * Validates that a scaffold target name is safe as both a directory name and an npm package name. * Suggests a sanitized alternative when the name is invalid. */ declare function validateScaffoldTargetName(targetName: string): Result; export { validateScaffoldTargetName, ensureWorkspacePattern, detectProjectStructure, convertToWorkspace, buildScaffoldPlan, ProjectStructure };