(file: string)
| 184 | * initialize instructions). |
| 185 | */ |
| 186 | export function upsertInstructionsEntry(file: string): { path: string; action: 'created' | 'updated' | 'unchanged' } { |
| 187 | const action = replaceOrAppendMarkedSection( |
| 188 | file, |
| 189 | CODEGRAPH_INSTRUCTIONS_BLOCK, |
| 190 | CODEGRAPH_SECTION_START, |
| 191 | CODEGRAPH_SECTION_END, |
| 192 | ); |
| 193 | return { path: file, action: action === 'appended' ? 'updated' : action }; |
| 194 | } |
| 195 | |
| 196 | /** |
| 197 | * Inverse of `replaceOrAppendMarkedSection`. Strips the marker |
no test coverage detected