MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / normalizeResourceOutput

Function normalizeResourceOutput

src/snapshot-tests/resource-harness.ts:18–29  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

16const DEVICE_CONNECTION_STATUS_REGEX = /\[✓\]|\[✗\]/g;
17
18function normalizeResourceOutput(text: string): string {
19 let normalized = normalizeSnapshotOutput(text);
20 normalized = normalized.replace(PROCESS_UPTIME_MS_REGEX, '"uptimeMs": <UPTIME>');
21 normalized = normalized.replace(PROCESS_RSS_BYTES_REGEX, '"rssBytes": <BYTES>');
22 normalized = normalized.replace(PROCESS_HEAP_BYTES_REGEX, '"heapUsedBytes": <BYTES>');
23 normalized = normalized.replace(PROCESS_TREE_LINE_REGEX, ' <PID> (ppid <PID>): <PROCESS>');
24 normalized = normalized.replace(NVM_PATH_LINE_REGEX, '/.nvm/versions/node/<NODE_VERSION>/bin');
25 normalized = normalized.replace(ARGV_LINE_REGEX, '$1 <ARGV>');
26 normalized = normalized.replace(EXEC_PATH_LINE_REGEX, '$1 <EXEC_PATH>');
27 normalized = normalized.replace(DEVICE_CONNECTION_STATUS_REGEX, '[<STATUS>]');
28 return normalized;
29}
30
31export interface ResourceSnapshotResult {
32 text: string;

Callers 1

invokeResourceFunction · 0.85

Calls 1

normalizeSnapshotOutputFunction · 0.90

Tested by

no test coverage detected