- vm_api.py: pure FastAPI JSON API on :8098 with CORS - vm-api.service: systemd unit for API (replaces inline HTML vm_web.py for frontend) - vm_web.py: kept intact as fallback; Apache now proxies /api/ -> :8098 - frontend/: Vite + React + TanStack Query scaffold - Apache vhost updated: DocumentRoot -> frontend/dist, /api/ proxy, SPA fallback - All original HTML pages still functional via :8099 during transition
1 line
2.5 KiB
Plaintext
1 line
2.5 KiB
Plaintext
{"version":3,"file":"renderRouteNotFound.cjs","names":[],"sources":["../../src/renderRouteNotFound.tsx"],"sourcesContent":["import * as React from 'react'\nimport { DefaultGlobalNotFound } from './not-found'\nimport { wrapInNonRouteComponentContext } from './nonRouteComponentContext'\nimport type { AnyRoute, AnyRouter } from '@tanstack/router-core'\n\n/**\n * Renders a not found component for a route when no matching route is found.\n *\n * @param router - The router instance containing the route configuration\n * @param route - The route that triggered the not found state\n * @param data - Additional data to pass to the not found component\n * @returns The rendered not found component or a default fallback component\n */\nexport function renderRouteNotFound(\n router: AnyRouter,\n route: AnyRoute,\n data: any,\n) {\n if (!route.options.notFoundComponent) {\n if (router.options.defaultNotFoundComponent) {\n const notFoundElement = (\n <router.options.defaultNotFoundComponent {...data} />\n )\n return process.env.NODE_ENV !== 'production'\n ? wrapInNonRouteComponentContext(notFoundElement, 'notFoundComponent')\n : notFoundElement\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!route.options.notFoundComponent) {\n console.warn(\n `Warning: A notFoundError was encountered on the route with ID \"${route.id}\", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Not Found</p>)`,\n )\n }\n }\n\n return <DefaultGlobalNotFound />\n }\n\n const notFoundElement = <route.options.notFoundComponent {...data} />\n return process.env.NODE_ENV !== 'production'\n ? wrapInNonRouteComponentContext(notFoundElement, 'notFoundComponent')\n : notFoundElement\n}\n"],"mappings":";;;;;;;;;;;;;;;AAaA,SAAgB,oBACd,QACA,OACA,MACA;CACA,IAAI,CAAC,MAAM,QAAQ,mBAAmB;EACpC,IAAI,OAAO,QAAQ,0BAA0B;GAC3C,MAAM,kBACJ,iBAAA,GAAA,kBAAA,KAAC,OAAO,QAAQ,0BAAhB,EAAyC,GAAI,KAAO,CAAA;GAEtD,OAAA,QAAA,IAAA,aAAgC,eAC5B,iCAAA,+BAA+B,iBAAiB,mBAAmB,IACnE;EACN;EAEA,IAAA,QAAA,IAAA,aAA6B;OACvB,CAAC,MAAM,QAAQ,mBACjB,QAAQ,KACN,kEAAkE,MAAM,GAAG,mPAC7E;EAAA;EAIJ,OAAO,iBAAA,GAAA,kBAAA,KAAC,kBAAA,uBAAD,CAAwB,CAAA;CACjC;CAEA,MAAM,kBAAkB,iBAAA,GAAA,kBAAA,KAAC,MAAM,QAAQ,mBAAf,EAAiC,GAAI,KAAO,CAAA;CACpE,OAAA,QAAA,IAAA,aAAgC,eAC5B,iCAAA,+BAA+B,iBAAiB,mBAAmB,IACnE;AACN"} |