mirror of
https://github.com/Kong/insomnia.git
synced 2026-09-23 14:45:01 -04:00
Break the route<->component cycles without touching createFetcherSubmitHook or use-request.ts, and without generated +types: - The data-access hooks that descendants import are moved out of route entry files into neutral modules that own both the interface and the hook, so route files are no longer shared-hook modules: * ui/hooks/use-project-loader-data.ts (ProjectLoaderData + useProjectLoaderData) * ui/hooks/use-mock-route.ts (MockRouteLoaderData + useMockRouteLoaderData; patcher kept) Each route's clientLoader conforms to the interface via 'satisfies', so the type has a single source and cannot drift; consumers import the named hook. - cycle route.update -> content-type-dropdown -> use-request -> route.update is cut at the route->component edge by moving the pure updateMimeType/newBodyGraphQL helpers to ui/utils/request-mime-type.ts (use-request/createFetcherSubmitHook untouched). - grpc: GrpcMessage/GrpcRequestState moved to ui/utils/grpc.ts. - useWorkspaceLoaderData is left in place (route.workspace is not in any cycle).