(filePath: string, doc: Document)
| 71 | * Uses doc.toString() to preserve comments and formatting. |
| 72 | */ |
| 73 | export async function writeIntegrationsFile(filePath: string, doc: Document): Promise<void> { |
| 74 | const yamlContent = serializeIntegrationsDocument(doc) |
| 75 | |
| 76 | // Ensure parent directory exists |
| 77 | const dir = path.dirname(filePath) |
| 78 | await fs.mkdir(dir, { recursive: true }) |
| 79 | |
| 80 | await fs.writeFile(filePath, yamlContent, 'utf-8') |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * Execute the integrations pull command. |
no test coverage detected