( cwd: string, text: string, extension: "jsonc" | "json" = "jsonc", )
| 37 | // XDG_CONFIG_HOME ?? <HOME>/.config (XDG_CONFIG_HOME is unset in |
| 38 | // the test env, so it resolves under the temp HOME below). |
| 39 | function writeProjectConfig( |
| 40 | cwd: string, |
| 41 | text: string, |
| 42 | extension: "jsonc" | "json" = "jsonc", |
| 43 | ): string { |
| 44 | const path = join(cwd, ".cortexkit", `magic-context.${extension}`); |
| 45 | writeConfig(path, text); |
| 46 | return path; |
| 47 | } |
| 48 | |
| 49 | function writeUserConfig( |
| 50 | home: string, |
no test coverage detected