| | | 1 | | import type { ParsedMapFile } from '../MapFileConfig.js'; |
| | | 2 | | |
| | | 3 | | export interface IVariableStore { |
| | | 4 | | getMapping(source: string): Promise<Record<string, string>>; |
| | | 5 | | getParsedMapping(source: string): Promise<ParsedMapFile>; |
| | | 6 | | getEnvironment(source: string): Promise<Record<string, string>>; |
| | | 7 | | saveEnvironment( |
| | | 8 | | destination: string, |
| | | 9 | | envVariables: Record<string, string>, |
| | | 10 | | ): Promise<void>; |
| | | 11 | | /** Raw map-file text, or `null` when the file does not exist. */ |
| | | 12 | | readMapFileContent(source: string): Promise<string | null>; |
| | | 13 | | /** Writes map-file text as given; never creates missing directories. */ |
| | | 14 | | writeMapFileContent(destination: string, content: string): Promise<void>; |
| | | 15 | | /** |
| | | 16 | | * Puts a map file back as it was: writes `original`, or removes the file |
| | | 17 | | * when `original` is `null` because it did not exist before. |
| | | 18 | | */ |
| | | 19 | | restoreMapFile(destination: string, original: string | null): Promise<void>; |
| | | 20 | | } |