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) 1.1 kB
import type { Tree, ProjectConfiguration, ProjectGraph } from '@nx/devkit'; import type { MoveContext } from '../types/move-context'; /** * Decides which move strategy to execute based on the context. * * @param tree - The virtual file system tree. * @param getProjectGraphAsync - Lazy getter for the dependency graph (only creates when needed). * @param projects - Map of all projects in the workspace. * @param ctx - Resolved move context. * @param getCachedDependentProjects - Function to get cached dependent projects. * @param getProjectSourceFiles - Function to get project source files with caching. * @param cachedTreeExists - Function to check file existence with caching. */ export declare function handleMoveStrategy(tree: Tree, getProjectGraphAsync: () => Promise<ProjectGraph>, projects: Map<string, ProjectConfiguration>, ctx: MoveContext, getCachedDependentProjects: (projectGraph: ProjectGraph, projectName: string) => Set<string>, getProjectSourceFiles: (tree: Tree, projectRoot: string) => string[], cachedTreeExists: (tree: Tree, filePath: string) => boolean): Promise<void>;