(filePath: string)
| 55 | * This preserves comments and formatting for later manipulation. |
| 56 | */ |
| 57 | export async function readIntegrationsDocument(filePath: string): Promise<Document | null> { |
| 58 | try { |
| 59 | const content = await fs.readFile(filePath, 'utf-8') |
| 60 | return parseIntegrationsDocument(content) |
| 61 | } catch (error) { |
| 62 | if (isErrnoENOENT(error)) { |
| 63 | return null |
| 64 | } |
| 65 | throw error |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * Write integrations document to the YAML file. |
no test coverage detected