summary refs log tree commit diff
path: root/src/util/secretUtils.js
blob: bbad8ca0766f56d97e2284f181762c9c7078ce34 (plain) (blame)
1
2
3
4
5
6
7
8
9
import fs from 'node:fs/promises';

export async function readSecret(path) {
    if (!path) {
        throw new Error('Path to secret file is required');
    }
    const content = await fs.readFile(path, 'utf8');
    return content.trim();
}