/** * @name DeployLogSettings * @typedef {object} DeployLogSettings * @property {boolean} enabled Whether a per-deploy log file is written. * @property {string} dir Log directory; relative paths resolve against the deploy source. * @property {number} keep Number of most-recent deploy logs to retain. */ /** * Resolves the per-deploy log settings from the loaded Rampway config, applying * defaults. `deployLog: false` (or `{enabled: false}`) disables logging. * * @param {unknown} rawConfig Full loaded Rampway config object. * @returns {DeployLogSettings} */ export function resolveDeployLogConfig(rawConfig: unknown): DeployLogSettings; /** * @name DeployLog * @typedef {object} DeployLog * @property {string} path Absolute path of the log file being written. * @property {import('node:fs').WriteStream} stream Append stream to tee reporter output into. * @property {() => Promise} close Flushes and closes the log stream. */ /** * Opens the per-deploy log for a run: resolves the directory relative to the * deploy source, creates a timestamped file, prunes old logs to the configured * keep count, and returns an append stream. Returns `null` when logging is * disabled. * * @param {{config: unknown, sourcePath: string, stageName: string, now?: Date}} args * @returns {DeployLog | null} */ export function openDeployLog({ config, sourcePath, stageName, now }: { config: unknown; sourcePath: string; stageName: string; now?: Date; }): DeployLog | null; export type DeployLogSettings = { /** * Whether a per-deploy log file is written. */ enabled: boolean; /** * Log directory; relative paths resolve against the deploy source. */ dir: string; /** * Number of most-recent deploy logs to retain. */ keep: number; }; export type DeployLog = { /** * Absolute path of the log file being written. */ path: string; /** * Append stream to tee reporter output into. */ stream: import("node:fs").WriteStream; /** * Flushes and closes the log stream. */ close: () => Promise; }; //# sourceMappingURL=deploy-log.d.ts.map