MCPcopy Create free account
hub / github.com/getsentry/XcodeBuildMCP / parseStructuredEnvelope

Function parseStructuredEnvelope

src/snapshot-tests/harness.ts:95–105  ·  view source on GitHub ↗
(
  stdout: string,
  label: string,
)

Source from the content-addressed store, hash-verified

93}
94
95function parseStructuredEnvelope(
96 stdout: string,
97 label: string,
98): NonNullable<SnapshotResult['structuredEnvelope']> {
99 try {
100 return JSON.parse(stdout) as NonNullable<SnapshotResult['structuredEnvelope']>;
101 } catch (error) {
102 const message = error instanceof Error ? error.message : String(error);
103 throw new Error(`Failed to parse CLI JSON output for ${label}: ${message}`);
104 }
105}
106
107export function resolveCliJsonSnapshotErrorState(
108 status: number | null,

Callers 1

invokeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected