( pluginSlug: string, configJSON: string, )
| 11 | * @param configJSON - config of the plugin runner as JSON. |
| 12 | */ |
| 13 | export async function createRunnerFiles( |
| 14 | pluginSlug: string, |
| 15 | configJSON: string, |
| 16 | ): Promise<RunnerFilesPaths> { |
| 17 | const uniqueId = getUniqueProcessThreadId(); |
| 18 | const runnerWorkDir = path.join(pluginWorkDir(pluginSlug), uniqueId); |
| 19 | const runnerConfigPath = path.join(runnerWorkDir, 'plugin-config.json'); |
| 20 | const runnerOutputPath = path.join(runnerWorkDir, 'runner-output.json'); |
| 21 | |
| 22 | await ensureDirectoryExists(path.dirname(runnerOutputPath)); |
| 23 | await writeFile(runnerConfigPath, configJSON); |
| 24 | |
| 25 | return { |
| 26 | runnerConfigPath, |
| 27 | runnerOutputPath, |
| 28 | }; |
| 29 | } |
nothing calls this directly
no test coverage detected