UNPKG

gaunt-sloth-assistant

Version:

[![Tests and Lint](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/actions/workflows/unit-tests.yml) [![Integration Tests](https://github.co

20 lines 640 B
import { resolve } from 'node:path'; import { display } from '#src/consoleUtils.js'; import { readFileSyncWithMessages } from '#src/utils.js'; import { getProjectDir } from '#src/systemUtils.js'; /** * Reads the text file from current dir * @param _ config (unused in this provider) * @param fileName * @returns file contents */ export async function get(_, fileName) { if (!fileName) { return null; } const currentDir = getProjectDir(); const filePath = resolve(currentDir, fileName); display(`Reading file ${fileName}...`); return readFileSyncWithMessages(filePath); } //# sourceMappingURL=file.js.map