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

Function normalizeStderrLines

src/snapshot-tests/json-normalize.ts:386–408  ·  view source on GitHub ↗
(items: unknown[])

Source from the content-addressed store, hash-verified

384}
385
386function normalizeStderrLines(items: unknown[]): unknown[] {
387 const normalized: unknown[] = [];
388 let stepRun: string[] = [];
389
390 const flushStepRun = (): void => {
391 if (stepRun.length === 0) return;
392 normalized.push(...stepRun.sort((left, right) => left.localeCompare(right)));
393 stepRun = [];
394 };
395
396 for (const item of items) {
397 if (typeof item === 'string' && item.startsWith('[<STEP>] ')) {
398 stepRun.push(item);
399 continue;
400 }
401
402 flushStepRun();
403 normalized.push(item);
404 }
405
406 flushStepRun();
407 return normalized;
408}
409
410function normalizeValue(
411 value: unknown,

Callers 1

normalizeValueFunction · 0.85

Calls 2

flushStepRunFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected