MCPcopy Create free account
hub / github.com/code-pushup/cli / parsePersistConfig

Function parsePersistConfig

packages/ci/src/lib/cli/persist.ts:40–54  ·  view source on GitHub ↗
(
  json: unknown,
)

Source from the content-addressed store, hash-verified

38}
39
40export async function parsePersistConfig(
41 json: unknown,
42): Promise<EnhancedPersistConfig> {
43 const schema = z.object({
44 persist: persistConfigSchema.optional(),
45 upload: uploadConfigSchema.optional(),
46 });
47 const result = await schema.safeParseAsync(json);
48 if (result.error) {
49 throw new Error(
50 `Code PushUp config is invalid:\n${z.prettifyError(result.error)}`,
51 );
52 }
53 return result.data;
54}

Callers 2

printPersistConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected