import { projectCredentialsPath, projectLinkPath, type ProjectLink } from "@nylorun/core/project"; /** * The Project link (`.nylorun/link.json`) and credentials (`.nylorun/credentials.json`). * `nylorun start` writes both, format 3: the local Tenant's name, its URL and Host id, and * the Tenant id as information (nothing in a request selects a Tenant). `start` replaces a link * of an older format. Reading is `@nylorun/core/project`'s, which every client shares. */ export type { ProjectLink }; export { projectLinkPath as linkPath, projectCredentialsPath as credentialsPath }; /** The Project's link, or undefined when it has none. An unreadable link is an error. */ export declare function readProjectLink(projectRoot: string): Promise; export declare function writeProjectLink(projectRoot: string, link: { tenant: string; hostUrl: string; hostId: string; tenantId: string; }): Promise; /** * An application key and its principal, and the management key and its principal when the file * has one: `credentials.json`'s content (format 1). */ export interface KeyCredentials { applicationKey: string; principalId: string; management?: { key: string; principalId: string; }; } /** The Project's keys, or undefined when absent or unreadable. */ export declare function readProjectCredentials(projectRoot: string): Promise; /** * A credentials file (format 0 or 1): the Project's, or one the nylorun commands keep in the * Host root. Undefined when absent or unreadable, so `start` replaces it; a newer format is an * error, as for the link, so this release never rewrites it in its own. */ export declare function readCredentialsFile(path: string): Promise; /** `.nylorun/credentials.json` (format 1, mode 0600). */ export declare function writeProjectCredentials(projectRoot: string, credentials: KeyCredentials): Promise; /** A credentials file (format 1), written atomically with mode 0600. */ export declare function writeCredentialsFile(path: string, credentials: KeyCredentials): Promise;