({
challengeFiles,
challengeType
}: BuildChallengeData)
| 304 | } |
| 305 | |
| 306 | async function buildPythonChallenge({ |
| 307 | challengeFiles, |
| 308 | challengeType |
| 309 | }: BuildChallengeData): Promise<BuildResult> { |
| 310 | if (!challengeFiles) throw new Error('No challenge files provided'); |
| 311 | const pipeLine = composeFunctions( |
| 312 | ...(getPythonTransformers() as unknown as ApplyFunctionProps[]) |
| 313 | ); |
| 314 | const finalFiles = await Promise.all(challengeFiles.map(pipeLine)); |
| 315 | const error = finalFiles.find(({ error }) => error)?.error; |
| 316 | const sources = buildSourceMap(finalFiles); |
| 317 | |
| 318 | return { |
| 319 | challengeType, |
| 320 | sources, |
| 321 | build: sources?.contents, |
| 322 | error |
| 323 | }; |
| 324 | } |
nothing calls this directly
no test coverage detected