MCPcopy Create free account
hub / github.com/CodeForBreakfast/eventsourcing / runValidation

Function runValidation

scripts/validate-markdown-examples.ts:587–599  ·  view source on GitHub ↗
(packageDir: string, tempDir: string)

Source from the content-addressed store, hash-verified

585 onTrue: () => skipValidationIfNoBlocks(tempDir),
586 onFalse: () => typeCheckAndReportErrors(allBlocks, tempDir),
587 });
588
589const collectAllCodeBlocks =
590 (packageDir: string) =>
591 (
592 markdownFiles: readonly string[]
593 ): Effect.Effect<readonly CodeBlock[], Error, FileSystem.FileSystem | Path.Path> =>
594 EffectArray.reduce(
595 markdownFiles,
596 Effect.succeed([] as readonly CodeBlock[]) as Effect.Effect<
597 readonly CodeBlock[],
598 Error,
599 FileSystem.FileSystem | Path.Path
600 >,
601 (acc, file) => Effect.flatMap(acc, readAndExtractCodeBlocks(file, packageDir))
602 );

Callers 1

Calls 5

cleanTempDirectoryFunction · 0.85
createTempDirectoryFunction · 0.85
findMarkdownFilesFunction · 0.85
collectAllCodeBlocksFunction · 0.85
processAllBlocksFunction · 0.85

Tested by

no test coverage detected