one
Version:
One is a React framework for web, iOS, and Android apps.
1 lines • 1.63 kB
Source Map (JSON)
{"version":3,"file":"serverRouteModules.js","names":[],"sources":["esm/cli/serverRouteModules.js"],"sourcesContent":["import { getRouteExportsFromEntry } from \"../server/routeExportsFromEntry\";\nimport { toAbsoluteUrl } from \"../utils/toAbsolute\";\nconst serverEntries = /* @__PURE__ */ new Map();\nfunction loadServerEntry(serverEntry) {\n let loading = serverEntries.get(serverEntry);\n if (!loading) {\n loading = import(toAbsoluteUrl(serverEntry));\n serverEntries.set(serverEntry, loading);\n }\n return loading;\n}\nasync function getRouteExports(serverEntry, routerRoot, routeFile) {\n const entry = await loadServerEntry(serverEntry);\n const exported = await getRouteExportsFromEntry(entry, routerRoot, routeFile);\n if (!exported) {\n const routes = entry?.default?.options?.routes ?? entry?.default?.default?.options?.routes;\n throw new Error(\n `[one] route ${routeFile} is missing from the built server entry route map (looked in: ${Object.keys(routes ?? {}).join(\", \")})`\n );\n }\n return exported;\n}\nexport {\n getRouteExports\n};\n//# sourceMappingURL=serverRouteModules.js.map\n"],"mappings":";;;;AAEA,MAAM,gCAAgC,IAAI,IAAI;AAC9C,SAAS,gBAAgB,aAAa;CACpC,IAAI,UAAU,cAAc,IAAI,WAAW;CAC3C,IAAI,CAAC,SAAS;EACZ,UAAU,OAAO,cAAc,WAAW;EAC1C,cAAc,IAAI,aAAa,OAAO;CACxC;CACA,OAAO;AACT;AACA,eAAe,gBAAgB,aAAa,YAAY,WAAW;CACjE,MAAM,QAAQ,MAAM,gBAAgB,WAAW;CAC/C,MAAM,WAAW,MAAM,yBAAyB,OAAO,YAAY,SAAS;CAC5E,IAAI,CAAC,UAAU;EACb,MAAM,SAAS,OAAO,SAAS,SAAS,UAAU,OAAO,SAAS,SAAS,SAAS;EACpF,MAAM,IAAI,MACR,eAAe,UAAU,gEAAgE,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,EAChI;CACF;CACA,OAAO;AACT"}