import type { FileEntry } from 'roku-deploy'; import type { BreakpointManager } from './BreakpointManager'; import type { LocationManager, SourceLocation } from './LocationManager'; import { Cache } from 'brighterscript/dist/Cache'; import type { ScopeFunction } from '../bsc/BscProject'; import type { Position } from 'brighterscript'; export declare const componentLibraryPostfix = "__lib"; /** * Staging info for a single project, used when describing all projects to a client. */ export interface ProjectStagingInfo { /** * The kind of project. `main` is the application project (always exactly one); `componentLibrary` * is a component library project. */ type: 'main' | 'componentLibrary'; /** * Absolute path to the project's staging directory. */ stagingDir: string; } /** * Manages the collection of brightscript projects being used in a debug session. * Will contain the main project (in rootDir), as well as component libraries. */ export declare class ProjectManager { constructor(options: { /** * A class that keeps track of all the breakpoints for a debug session. * It needs to be notified of any changes in breakpoints */ breakpointManager: BreakpointManager; locationManager: LocationManager; }); private breakpointManager; private locationManager; launchConfiguration: { enableSourceMaps?: boolean; enableDebugProtocol?: boolean; packagePath: string; }; logger: import("@rokucommunity/logger").Logger; mainProject: Project; componentLibraryProjects: ComponentLibraryProject[]; addComponentLibraryProject(project: ComponentLibraryProject): void; getAllProjects(): Project[]; /** * Get the list of staging folder paths from all projects */ getStagingDirs(): string[]; /** * Get staging-dir info for every project. The main project is always first; component libraries * follow in order. This main-first ordering is a contract that clients rely on, so it is covered * by unit tests to guard against regressions. */ getProjectStagingInfo(): ProjectStagingInfo[]; /** * Get all of the functions avaiable for all scopes for this file. * @param pkgPath the device path of the file (probably with `pkg:` or `libpkg` or something...) * @returns */ getScopeFunctionsForFile(pkgPath: string): Promise>; /** * Get the range of the scope for the given position in the file * @param pkgPath the device path of the file (probably with `pkg:` or `libpkg` or something...) * @param position the position in the file to get the scope range for */ getScopeRange(pkgPath: string, position: Position): Promise<{ start: { line: number; column: number; }; end: { line: number; column: number; }; }>; /** * Given a debugger path and line number, compensate for the injected breakpoint line offsets * @param filePath - the path to the file that may or may not have breakpoints * @param debuggerLineNumber - the line number from the debugger */ getLineNumberOffsetByBreakpoints(filePath: string, debuggerLineNumber: number): any; sourceLocationCache: Cache>; /** * @param debuggerPath * @param debuggerLineNumber - the 1-based line number from the debugger * @param debuggerColumnNumber - the 1-based column number from the debugger */ getSourceLocation(debuggerPath: string, debuggerLineNumber: number, debuggerColumnNumber?: number): Promise; /** * * @param stagingDir - the path to */ registerEntryBreakpoint(stagingDir: string): Promise; /** * Given a debugger-relative file path, find the path to that file in the staging directory. * This supports the standard out dir, as well as component library out dirs * @param debuggerPath the path to the file which was provided by the debugger * @param stagingDir - the path to the root of the staging folder (where all of the files were copied before deployment) * @return a full path to the file in the staging directory */ getStagingFileInfo(debuggerPath: string): Promise<{ relativePath: string; absolutePath: string; project: Project; }>; /** * Resolve a debugger-reported path to a staging file within a specific project. Returns undefined if the * path could not be mapped into that project's staging directory. */ private buildStagingFileInfo; dispose(): void; } export interface AddProjectParams { rootDir: string; outDir: string; packagePath?: string; sourceDirs?: string[]; files: Array; injectRaleTrackerTask?: boolean; raleTrackerTaskFileLocation?: string; injectRdbOnDeviceComponent?: boolean; rdbFilesBasePath?: string; bsConst?: Record; stagingDir?: string; enhanceREPLCompletions: boolean; } export declare class Project { constructor(params: AddProjectParams); rootDir: string; outDir: string; packagePath: string; sourceDirs: string[]; files: Array; stagingDir: string; fileMappings: Array<{ src: string; dest: string; }>; /** * Absolute staging paths of every file referenced by a `