UNPKG

@sentry/remix

Version:
32 lines 1.33 kB
import type { ActionFunctionArgs, LoaderFunctionArgs, ServerBuild } from '@remix-run/node'; import type { AgnosticRouteObject } from '@remix-run/router'; import type { Span, TransactionSource } from '@sentry/core'; type ServerRouteManifest = ServerBuild['routes']; /** * Store configured FormData keys as span attributes for Remix actions. */ export declare function storeFormDataKeys(args: LoaderFunctionArgs | ActionFunctionArgs, span: Span, formDataKeys?: Record<string, string | boolean>): Promise<void>; /** * Converts Remix route IDs to parameterized paths at runtime. * (e.g., "routes/users.$id" -> "/users/:id") * * @param routeId - The Remix route ID * @returns The parameterized path * @internal */ export declare function convertRemixRouteIdToPath(routeId: string): string; /** Check if running in Cloudflare Workers environment. */ export declare function isCloudflareEnv(): boolean; /** * Get transaction name from routes and url */ export declare function getTransactionName(routes: AgnosticRouteObject[], url: URL): [string, TransactionSource]; /** * Creates routes from the server route manifest * * @param manifest * @param parentId */ export declare function createRoutes(manifest: ServerRouteManifest, parentId?: string): AgnosticRouteObject[]; export {}; //# sourceMappingURL=utils.d.ts.map