import { Result } from "../util/result.js"; import { FileSystemProvider, URI } from "langium"; import { ModuleDescriptor } from "./descriptor.js"; /** Represents the context of a Kumori module, including its root directory, cache location, and descriptor.*/ export interface ModuleContext { /** The parsed descriptor of the module. */ Current: ModuleDescriptor; /** The parsed descriptor of the module. */ Root: ModuleDescriptor; /** Location of significant directories. */ Locations: { Config: () => string | undefined; /** Location of cache directory. */ Cache: () => URI; /** Location of vendor directory. */ Vendor: () => URI; /** Location of checksum file. */ Checksum: () => URI; }; } /** Creates a `ModuleContext` for the module containing the given current working directory. */ export declare function ModuleContext(fs: FileSystemProvider, location: URI, configPath?: string): Promise>; export declare namespace ModuleContext { /** Moves the context to a new location. Fails if the new location does not contain a different module. */ function Move(ctx: ModuleContext, fs: FileSystemProvider, location: URI): Promise>; }