/**
 * Ensure a directory exists (recursive).
 * Single source of truth — replaces scattered mkdirSync calls.
 */
export declare function ensureDir(dirPath: string): void;
/**
 * Copy a directory recursively.
 * Single source of truth — extracted from addon-installer + first-boot-installer.
 */
export declare function copyDirRecursive(src: string, dest: string): void;
/**
 * Strip @camstack/* dependencies and devDependencies from a package.json object.
 * Used when installing addons into the addons directory — @camstack packages
 * are provided by the host runtime, not installed per-addon.
 *
 * Returns a new object (immutable).
 */
export declare function stripCamstackDeps(pkg: Record<string, unknown>): Record<string, unknown>;
/**
 * Copy extra file directories declared in package.json "files" field.
 * Copies directories (not individual files) from source to destination.
 * Skips "dist" (already handled) and glob patterns.
 */
export declare function copyExtraFileDirs(pkgJson: Record<string, unknown>, sourceDir: string, destDir: string): void;
/**
 * Create symlinks in node_modules so that static `import from '@camstack/core'` works.
 * Links: node_modules/@camstack/{pkg} -> data/addons/{pkg}/
 * (not just dist -- need package.json for Node's exports resolution)
 */
export declare function symlinkAddonsToNodeModules(addonsDir: string, nodeModulesDir: string): void;
/**
 * Plant `<addonsDir>/node_modules/@camstack/{types,core,...}` symlinks
 * pointing at the hub's resolved copies. This lets npm-installed addons
 * (whose runtime imports `@camstack/types`/`core` as peer deps) find
 * them via Node's parent-walk module resolution from inside
 * `data/addons/@camstack/<addon>/dist/`.
 *
 * Without this, the resolution chain dead-ends well before reaching the
 * hub's `node_modules` because the user-data path lives outside the
 * server tree (e.g. `~/Library/Application Support/...` on macOS).
 *
 * The complementary `symlinkAddonsToNodeModules` plants the OPPOSITE
 * direction (`hub/node_modules/@camstack/<pkg>` → `addonsDir/...`) so
 * the hub's own static imports resolve. Both are needed.
 */
export declare function symlinkPeerDepsIntoAddonsDir(addonsDir: string, hubNodeModulesDir: string): void;
/**
 * Check if any file in src/ is newer than dist/.
 * Returns true if rebuild is needed.
 */
export declare function isSourceNewer(packageDir: string): boolean;
/**
 * Ensure a library dependency (not an addon) has a dist/ directory.
 * Does NOT rebuild — in dev mode, `npm run build` should be run separately.
 * Only checks that dist/ exists and has an index file.
 */
export declare function ensureLibraryBuilt(packageName: string, packagesDir: string): void;
/**
 * Install a single npm package into a target directory (package.json + dist/).
 * No validation on camstack.addons -- works for any @camstack/* package.
 * Uses synchronous child_process calls (suitable for first-boot and update paths).
 */
export declare function installPackageFromNpmSync(packageName: string, targetDir: string): void;
//# sourceMappingURL=fs-utils.d.ts.map