MCPcopy
hub / github.com/Effect-TS/effect / fileParse

Function fileParse

packages/cli/src/internal/options.ts:313–321  ·  view source on GitHub ↗
(
  name: string,
  format?: "json" | "yaml" | "ini" | "toml"
)

Source from the content-addressed store, hash-verified

311
312/** @internal */
313export const fileParse = (
314 name: string,
315 format?: "json" | "yaml" | "ini" | "toml"
316): Options.Options<unknown> =>
317 mapEffect(fileText(name), ([path, content]) =>
318 Effect.mapError(
319 InternalFiles.parse(path, content, format),
320 (error) => InternalValidationError.invalidValue(InternalHelpDoc.p(error))
321 ))
322
323/** @internal */
324export const fileSchema = <I, A>(

Callers 1

fileSchemaFunction · 0.70

Calls 2

parseMethod · 0.80
fileTextFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…