UNPKG

@sentry/remix

Version:
21 lines • 1.33 kB
/** * Hashes `source` into a UUID shaped ID. It has to be deterministic, because the source map upload * runs in a different process than the server and must arrive at the same ID. */ export declare function getDebugId(source: string): string; /** The snippet that registers a module's debug ID in `globalThis._sentryDebugIds`, keyed by its stack. */ export declare function getDebugIdSnippet(debugId: string): string; /** Reads back the debug ID that {@link getDebugIdSnippet} put into a module, which survives minification. */ export declare function findDebugId(code: string): string | undefined; /** * Puts the debug ID snippet on its own line at the top of `source`, so it runs before the module * body and registers the ID even when that body throws. * * `source` may end in an inline source map, which is how the asset server hands a module to its * loaders. The returned map then maps back to `source` and the asset server composes it with its * own, so it only has to shift every line down by one. */ export declare function injectDebugIdSnippet(source: string, debugId: string): string; /** Adds the debug ID to a source map, under both field names the upload tooling reads. */ export declare function addDebugIdToSourceMap(sourceMap: string, debugId: string): string; //# sourceMappingURL=debugId.d.ts.map