UNPKG

@nxworker/workspace

Version:

Nx plugin providing generators for managing workspace files, including the move-file generator for safely moving files between projects while updating all imports

15 lines (14 loc) 937 B
import { Tree, ProjectConfiguration } from '@nx/devkit'; import { MoveFileGeneratorSchema } from '../schema'; import type { MoveContext } from '../types/move-context'; /** * Normalizes, validates, and gathers metadata about the source and target files. * * @param tree - The virtual file system tree. * @param options - Raw options supplied to the generator. * @param projects - Map of all projects in the workspace. * @param cachedTreeExists - Function to check if a file exists (with caching). * @param getProjectSourceFiles - Function to get project source files (with caching). * @returns Resolved context data describing the move operation. */ export declare function resolveAndValidate(tree: Tree, options: MoveFileGeneratorSchema, projects: Map<string, ProjectConfiguration>, cachedTreeExists: (tree: Tree, filePath: string) => boolean, getProjectSourceFiles: (tree: Tree, projectRoot: string) => string[]): MoveContext;