MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / sourceFile

Function sourceFile

apps/cloud/src/observability/sentry-privacy.ts:72–76  ·  view source on GitHub ↗
(value: string | undefined)

Source from the content-addressed store, hash-verified

70 value !== undefined && /^[\w.$<>:/@ -]{1,160}$/.test(value) ? value : undefined;
71
72const sourceFile = (value: string | undefined): string | undefined => {
73 if (!value) return undefined;
74 const path = URL.canParse(value) ? new URL(value).pathname : value.split(/[?#]/)[0];
75 return path && /^\/?(?:assets\/)?[\w./-]+\.(?:js|mjs|ts|tsx)$/.test(path) ? path : undefined;
76};
77
78/** Keep error classification, source positions and correlation; omit all raw payloads. */
79export const minimizeSentryEvent = (event: ErrorEvent): ErrorEvent => {

Callers 1

minimizeSentryEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected