one 1.1.298 → 1.1.300

Sign up to get free protection for your applications and to get access to all the features.
Files changed (343) hide show
  1. package/dist/cjs/cleanUrl.js +1 -1
  2. package/dist/cjs/cleanUrl.js.map +1 -1
  3. package/dist/cjs/cleanUrl.native.js +1 -1
  4. package/dist/cjs/cleanUrl.native.js.map +1 -1
  5. package/dist/cjs/cli/runAndroid.js +34 -0
  6. package/dist/cjs/cli/runAndroid.js.map +6 -0
  7. package/dist/cjs/cli/runAndroid.native.js +39 -0
  8. package/dist/cjs/cli/runAndroid.native.js.map +6 -0
  9. package/dist/cjs/cli/runIos.js +34 -0
  10. package/dist/cjs/cli/runIos.js.map +6 -0
  11. package/dist/cjs/cli/runIos.native.js +39 -0
  12. package/dist/cjs/cli/runIos.native.js.map +6 -0
  13. package/dist/cjs/cli.js +23 -1
  14. package/dist/cjs/cli.js.map +1 -1
  15. package/dist/cjs/cli.native.js +25 -1
  16. package/dist/cjs/cli.native.js.map +2 -2
  17. package/dist/cjs/createHandleRequest.js +2 -2
  18. package/dist/cjs/createHandleRequest.js.map +1 -1
  19. package/dist/cjs/createHandleRequest.native.js +2 -2
  20. package/dist/cjs/createHandleRequest.native.js.map +2 -2
  21. package/dist/cjs/vite/createFileSystemRouter.js +1 -1
  22. package/dist/cjs/vite/createFileSystemRouter.js.map +1 -1
  23. package/dist/cjs/vite/createFileSystemRouter.native.js +1 -1
  24. package/dist/cjs/vite/createFileSystemRouter.native.js.map +1 -1
  25. package/dist/cjs/vite/replaceLoader.js +7 -1
  26. package/dist/cjs/vite/replaceLoader.js.map +1 -1
  27. package/dist/cjs/vite/replaceLoader.native.js +7 -1
  28. package/dist/cjs/vite/replaceLoader.native.js.map +1 -1
  29. package/dist/esm/Root.native.js +110 -104
  30. package/dist/esm/Root.native.js.map +6 -1
  31. package/dist/esm/Route.native.js +12 -10
  32. package/dist/esm/Route.native.js.map +6 -1
  33. package/dist/esm/cleanUrl.js +1 -1
  34. package/dist/esm/cleanUrl.js.map +1 -1
  35. package/dist/esm/cleanUrl.mjs +1 -1
  36. package/dist/esm/cleanUrl.mjs.map +1 -1
  37. package/dist/esm/cleanUrl.native.js +13 -14
  38. package/dist/esm/cleanUrl.native.js.map +6 -1
  39. package/dist/esm/cli/label-process.native.js +5 -4
  40. package/dist/esm/cli/label-process.native.js.map +6 -1
  41. package/dist/esm/cli/main.native.js +8 -13
  42. package/dist/esm/cli/main.native.js.map +6 -1
  43. package/dist/esm/cli/prebuild.native.js +5 -5
  44. package/dist/esm/cli/prebuild.native.js.map +6 -1
  45. package/dist/esm/cli/run.native.js +21 -28
  46. package/dist/esm/cli/run.native.js.map +6 -1
  47. package/dist/esm/cli/runAndroid.js +10 -0
  48. package/dist/esm/cli/runAndroid.js.map +6 -0
  49. package/dist/esm/cli/runAndroid.mjs +10 -0
  50. package/dist/esm/cli/runAndroid.mjs.map +1 -0
  51. package/dist/esm/cli/runAndroid.native.js +10 -0
  52. package/dist/esm/cli/runAndroid.native.js.map +6 -0
  53. package/dist/esm/cli/runIos.js +10 -0
  54. package/dist/esm/cli/runIos.js.map +6 -0
  55. package/dist/esm/cli/runIos.mjs +10 -0
  56. package/dist/esm/cli/runIos.mjs.map +1 -0
  57. package/dist/esm/cli/runIos.native.js +10 -0
  58. package/dist/esm/cli/runIos.native.js.map +6 -0
  59. package/dist/esm/cli.js +23 -1
  60. package/dist/esm/cli.js.map +1 -1
  61. package/dist/esm/cli.mjs +33 -1
  62. package/dist/esm/cli.mjs.map +1 -1
  63. package/dist/esm/cli.native.js +143 -148
  64. package/dist/esm/cli.native.js.map +6 -1
  65. package/dist/esm/clientLoaderResolver.native.js +9 -6
  66. package/dist/esm/clientLoaderResolver.native.js.map +6 -1
  67. package/dist/esm/config.native.js +12 -11
  68. package/dist/esm/config.native.js.map +6 -1
  69. package/dist/esm/constants.native.js +7 -5
  70. package/dist/esm/constants.native.js.map +6 -1
  71. package/dist/esm/createApp.native.js +13 -9
  72. package/dist/esm/createApp.native.js.map +6 -1
  73. package/dist/esm/createHandleRequest.js +2 -2
  74. package/dist/esm/createHandleRequest.js.map +1 -1
  75. package/dist/esm/createHandleRequest.mjs +2 -2
  76. package/dist/esm/createHandleRequest.mjs.map +1 -1
  77. package/dist/esm/createHandleRequest.native.js +57 -66
  78. package/dist/esm/createHandleRequest.native.js.map +6 -1
  79. package/dist/esm/createRoute.native.js +16 -16
  80. package/dist/esm/createRoute.native.js.map +6 -1
  81. package/dist/esm/fallbackViews/Sitemap.native.js +6 -3
  82. package/dist/esm/fallbackViews/Sitemap.native.js.map +6 -1
  83. package/dist/esm/fallbackViews/Unmatched.native.js +5 -3
  84. package/dist/esm/fallbackViews/Unmatched.native.js.map +6 -1
  85. package/dist/esm/fork/NavigationContainer.native.js +24 -31
  86. package/dist/esm/fork/NavigationContainer.native.js.map +6 -1
  87. package/dist/esm/fork/createMemoryHistory.native.js +99 -115
  88. package/dist/esm/fork/createMemoryHistory.native.js.map +6 -1
  89. package/dist/esm/fork/extractPathFromURL.native.js +16 -15
  90. package/dist/esm/fork/extractPathFromURL.native.js.map +6 -1
  91. package/dist/esm/fork/findFocusedRoute.native.js +6 -5
  92. package/dist/esm/fork/findFocusedRoute.native.js.map +6 -1
  93. package/dist/esm/fork/getPathFromState.native.js +127 -140
  94. package/dist/esm/fork/getPathFromState.native.js.map +6 -1
  95. package/dist/esm/fork/getStateFromPath.native.js +292 -288
  96. package/dist/esm/fork/getStateFromPath.native.js.map +6 -1
  97. package/dist/esm/fork/useLinking.native.js +70 -61
  98. package/dist/esm/fork/useLinking.native.js.map +6 -1
  99. package/dist/esm/fork/validatePathConfig.native.js +15 -9
  100. package/dist/esm/fork/validatePathConfig.native.js.map +6 -1
  101. package/dist/esm/getLinkingConfig.native.js +11 -6
  102. package/dist/esm/getLinkingConfig.native.js.map +6 -1
  103. package/dist/esm/getReactNavigationConfig.native.js +28 -20
  104. package/dist/esm/getReactNavigationConfig.native.js.map +6 -1
  105. package/dist/esm/getRoutes.native.js +249 -229
  106. package/dist/esm/getRoutes.native.js.map +6 -1
  107. package/dist/esm/getURL.native.js +4 -4
  108. package/dist/esm/getURL.native.js.map +6 -1
  109. package/dist/esm/head/Head.android.js +5 -3
  110. package/dist/esm/head/Head.android.js.map +6 -1
  111. package/dist/esm/head/Head.ios.js +144 -132
  112. package/dist/esm/head/Head.ios.js.map +6 -1
  113. package/dist/esm/head/Head.native.js +7 -7
  114. package/dist/esm/head/Head.native.js.map +6 -1
  115. package/dist/esm/head/HeadModule.native.js +6 -6
  116. package/dist/esm/head/HeadModule.native.js.map +6 -1
  117. package/dist/esm/head/index.native.js +2 -2
  118. package/dist/esm/head/index.native.js.map +6 -1
  119. package/dist/esm/head/types.native.js +1 -2
  120. package/dist/esm/head/types.native.js.map +6 -1
  121. package/dist/esm/head/url.native.js +10 -8
  122. package/dist/esm/head/url.native.js.map +6 -1
  123. package/dist/esm/hooks.native.js +53 -34
  124. package/dist/esm/hooks.native.js.map +6 -1
  125. package/dist/esm/imperative-api.native.js +9 -6
  126. package/dist/esm/imperative-api.native.js.map +6 -1
  127. package/dist/esm/import-mode/index.android.js +4 -3
  128. package/dist/esm/import-mode/index.android.js.map +6 -1
  129. package/dist/esm/import-mode/index.ios.js +4 -3
  130. package/dist/esm/import-mode/index.ios.js.map +6 -1
  131. package/dist/esm/import-mode/index.native.js +3 -1
  132. package/dist/esm/import-mode/index.native.js.map +6 -1
  133. package/dist/esm/index.native.js +65 -27
  134. package/dist/esm/index.native.js.map +6 -1
  135. package/dist/esm/interfaces/router.native.js +4 -2
  136. package/dist/esm/interfaces/router.native.js.map +6 -1
  137. package/dist/esm/layouts/Drawer.native.js +7 -6
  138. package/dist/esm/layouts/Drawer.native.js.map +6 -1
  139. package/dist/esm/layouts/Stack.native.js +7 -6
  140. package/dist/esm/layouts/Stack.native.js.map +6 -1
  141. package/dist/esm/layouts/Tabs.native.js +42 -39
  142. package/dist/esm/layouts/Tabs.native.js.map +6 -1
  143. package/dist/esm/layouts/withLayoutContext.native.js +51 -48
  144. package/dist/esm/layouts/withLayoutContext.native.js.map +6 -1
  145. package/dist/esm/link/Link.native.js +62 -53
  146. package/dist/esm/link/Link.native.js.map +6 -1
  147. package/dist/esm/link/Redirect.native.js +8 -9
  148. package/dist/esm/link/Redirect.native.js.map +6 -1
  149. package/dist/esm/link/href.native.js +28 -27
  150. package/dist/esm/link/href.native.js.map +6 -1
  151. package/dist/esm/link/linking.native.js +51 -40
  152. package/dist/esm/link/linking.native.js.map +6 -1
  153. package/dist/esm/link/path.native.js +28 -19
  154. package/dist/esm/link/path.native.js.map +6 -1
  155. package/dist/esm/link/useLinkTo.native.js +22 -20
  156. package/dist/esm/link/useLinkTo.native.js.map +6 -1
  157. package/dist/esm/link/useLoadedNavigation.native.js +30 -23
  158. package/dist/esm/link/useLoadedNavigation.native.js.map +6 -1
  159. package/dist/esm/matchers.native.js +16 -3
  160. package/dist/esm/matchers.native.js.map +6 -1
  161. package/dist/esm/platform.native.js +4 -2
  162. package/dist/esm/platform.native.js.map +6 -1
  163. package/dist/esm/polyfills-mobile.native.js +4 -5
  164. package/dist/esm/polyfills-mobile.native.js.map +6 -1
  165. package/dist/esm/polyfills-server.native.js +1 -1
  166. package/dist/esm/polyfills-server.native.js.map +6 -1
  167. package/dist/esm/render.native.js +3 -1
  168. package/dist/esm/render.native.js.map +6 -1
  169. package/dist/esm/router/RouterStore.native.js +1 -2
  170. package/dist/esm/router/RouterStore.native.js.map +6 -1
  171. package/dist/esm/router/constants.native.js +4 -2
  172. package/dist/esm/router/constants.native.js.map +6 -1
  173. package/dist/esm/router/getNormalizedStatePath.native.js +18 -17
  174. package/dist/esm/router/getNormalizedStatePath.native.js.map +6 -1
  175. package/dist/esm/router/lastAction.native.js +10 -9
  176. package/dist/esm/router/lastAction.native.js.map +6 -1
  177. package/dist/esm/router/router.native.js +135 -114
  178. package/dist/esm/router/router.native.js.map +6 -1
  179. package/dist/esm/router/serverLocationContext.native.js +4 -2
  180. package/dist/esm/router/serverLocationContext.native.js.map +6 -1
  181. package/dist/esm/router/useInitializeOneRouter.native.js +8 -5
  182. package/dist/esm/router/useInitializeOneRouter.native.js.map +6 -1
  183. package/dist/esm/serve.native.js +77 -104
  184. package/dist/esm/serve.native.js.map +6 -1
  185. package/dist/esm/server/createRoutesManifest.native.js +14 -11
  186. package/dist/esm/server/createRoutesManifest.native.js.map +6 -1
  187. package/dist/esm/server/getServerManifest.native.js +61 -67
  188. package/dist/esm/server/getServerManifest.native.js.map +6 -1
  189. package/dist/esm/server-render.native.js +9 -10
  190. package/dist/esm/server-render.native.js.map +6 -1
  191. package/dist/esm/sortRoutes.native.js +27 -17
  192. package/dist/esm/sortRoutes.native.js.map +6 -1
  193. package/dist/esm/typed-routes/generateRouteTypes.native.js +10 -11
  194. package/dist/esm/typed-routes/generateRouteTypes.native.js.map +6 -1
  195. package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.native.js +38 -37
  196. package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.native.js.map +6 -1
  197. package/dist/esm/types.native.js +1 -2
  198. package/dist/esm/types.native.js.map +6 -1
  199. package/dist/esm/useFocusEffect.native.js +25 -22
  200. package/dist/esm/useFocusEffect.native.js.map +6 -1
  201. package/dist/esm/useLoader.native.js +50 -50
  202. package/dist/esm/useLoader.native.js.map +6 -1
  203. package/dist/esm/useNavigation.native.js +23 -19
  204. package/dist/esm/useNavigation.native.js.map +6 -1
  205. package/dist/esm/useScreens.native.js +143 -160
  206. package/dist/esm/useScreens.native.js.map +6 -1
  207. package/dist/esm/useViteRoutes.native.js +25 -28
  208. package/dist/esm/useViteRoutes.native.js.map +6 -1
  209. package/dist/esm/utils/assertIsReady.native.js +6 -3
  210. package/dist/esm/utils/assertIsReady.native.js.map +6 -1
  211. package/dist/esm/utils/dynamicImport.native.js +5 -3
  212. package/dist/esm/utils/dynamicImport.native.js.map +6 -1
  213. package/dist/esm/utils/existsAsync.native.js +6 -4
  214. package/dist/esm/utils/existsAsync.native.js.map +6 -1
  215. package/dist/esm/utils/getPageExport.native.js +12 -11
  216. package/dist/esm/utils/getPageExport.native.js.map +6 -1
  217. package/dist/esm/utils/globDir.native.js +5 -3
  218. package/dist/esm/utils/globDir.native.js.map +6 -1
  219. package/dist/esm/utils/hashString.native.js +4 -2
  220. package/dist/esm/utils/hashString.native.js.map +6 -1
  221. package/dist/esm/utils/isResponse.native.js +4 -2
  222. package/dist/esm/utils/isResponse.native.js.map +6 -1
  223. package/dist/esm/utils/isStatus.native.js +4 -2
  224. package/dist/esm/utils/isStatus.native.js.map +6 -1
  225. package/dist/esm/utils/promiseWithResolvers.native.js +7 -7
  226. package/dist/esm/utils/promiseWithResolvers.native.js.map +6 -1
  227. package/dist/esm/utils/rand.native.js +5 -3
  228. package/dist/esm/utils/rand.native.js.map +6 -1
  229. package/dist/esm/utils/redirect.native.js +7 -5
  230. package/dist/esm/utils/redirect.native.js.map +6 -1
  231. package/dist/esm/utils/removeSearch.native.js +4 -2
  232. package/dist/esm/utils/removeSearch.native.js.map +6 -1
  233. package/dist/esm/utils/removeUndefined.native.js +6 -3
  234. package/dist/esm/utils/removeUndefined.native.js.map +6 -1
  235. package/dist/esm/utils/requireResolve.native.js +4 -2
  236. package/dist/esm/utils/requireResolve.native.js.map +6 -1
  237. package/dist/esm/utils/url.native.js +6 -2
  238. package/dist/esm/utils/url.native.js.map +6 -1
  239. package/dist/esm/utils/weakKey.native.js +11 -10
  240. package/dist/esm/utils/weakKey.native.js.map +6 -1
  241. package/dist/esm/utils/weakMemo.native.js +8 -8
  242. package/dist/esm/utils/weakMemo.native.js.map +6 -1
  243. package/dist/esm/views/EmptyRoute.native.js +5 -3
  244. package/dist/esm/views/EmptyRoute.native.js.map +6 -1
  245. package/dist/esm/views/ErrorBoundary.native.js +5 -8
  246. package/dist/esm/views/ErrorBoundary.native.js.map +6 -1
  247. package/dist/esm/views/LoadProgressBar.native.js +58 -57
  248. package/dist/esm/views/LoadProgressBar.native.js.map +6 -1
  249. package/dist/esm/views/Navigator.native.js +54 -71
  250. package/dist/esm/views/Navigator.native.js.map +6 -1
  251. package/dist/esm/views/PreloadLinks.native.js +3 -1
  252. package/dist/esm/views/PreloadLinks.native.js.map +6 -1
  253. package/dist/esm/views/RootErrorBoundary.native.js +39 -29
  254. package/dist/esm/views/RootErrorBoundary.native.js.map +6 -1
  255. package/dist/esm/views/Screen.native.js +12 -12
  256. package/dist/esm/views/Screen.native.js.map +6 -1
  257. package/dist/esm/views/ScrollRestoration.native.js +27 -27
  258. package/dist/esm/views/ScrollRestoration.native.js.map +6 -1
  259. package/dist/esm/views/Try.native.js +40 -37
  260. package/dist/esm/views/Try.native.js.map +6 -1
  261. package/dist/esm/vite/build.native.js +260 -295
  262. package/dist/esm/vite/build.native.js.map +6 -1
  263. package/dist/esm/vite/clientTreeShakePlugin.native.js +34 -33
  264. package/dist/esm/vite/clientTreeShakePlugin.native.js.map +6 -1
  265. package/dist/esm/vite/constants.native.js +6 -4
  266. package/dist/esm/vite/constants.native.js.map +6 -1
  267. package/dist/esm/vite/createFileSystemRouter.js +1 -1
  268. package/dist/esm/vite/createFileSystemRouter.js.map +1 -1
  269. package/dist/esm/vite/createFileSystemRouter.mjs +1 -1
  270. package/dist/esm/vite/createFileSystemRouter.mjs.map +1 -1
  271. package/dist/esm/vite/createFileSystemRouter.native.js +100 -131
  272. package/dist/esm/vite/createFileSystemRouter.native.js.map +6 -1
  273. package/dist/esm/vite/customNodeExternals.native.js +9 -10
  274. package/dist/esm/vite/customNodeExternals.native.js.map +6 -1
  275. package/dist/esm/vite/ensureTsConfig.native.js +7 -5
  276. package/dist/esm/vite/ensureTsConfig.native.js.map +6 -1
  277. package/dist/esm/vite/findDepsToOptimize.native.js +27 -19
  278. package/dist/esm/vite/findDepsToOptimize.native.js.map +6 -1
  279. package/dist/esm/vite/fixDependenciesPlugin.native.js +5 -3
  280. package/dist/esm/vite/fixDependenciesPlugin.native.js.map +6 -1
  281. package/dist/esm/vite/generateTypesForRoutes.native.js +9 -9
  282. package/dist/esm/vite/generateTypesForRoutes.native.js.map +6 -1
  283. package/dist/esm/vite/getManifest.native.js +6 -4
  284. package/dist/esm/vite/getManifest.native.js.map +6 -1
  285. package/dist/esm/vite/headers.native.js +11 -5
  286. package/dist/esm/vite/headers.native.js.map +6 -1
  287. package/dist/esm/vite/loadEnv.native.js +7 -6
  288. package/dist/esm/vite/loadEnv.native.js.map +6 -1
  289. package/dist/esm/vite/makePluginWebOnly.native.js +9 -5
  290. package/dist/esm/vite/makePluginWebOnly.native.js.map +6 -1
  291. package/dist/esm/vite/one.native.js +142 -127
  292. package/dist/esm/vite/one.native.js.map +6 -1
  293. package/dist/esm/vite/removeReactNativeWebAnimatedPlugin.native.js +14 -11
  294. package/dist/esm/vite/removeReactNativeWebAnimatedPlugin.native.js.map +6 -1
  295. package/dist/esm/vite/replaceLoader.js +7 -1
  296. package/dist/esm/vite/replaceLoader.js.map +1 -1
  297. package/dist/esm/vite/replaceLoader.mjs +5 -1
  298. package/dist/esm/vite/replaceLoader.mjs.map +1 -1
  299. package/dist/esm/vite/replaceLoader.native.js +13 -10
  300. package/dist/esm/vite/replaceLoader.native.js.map +6 -1
  301. package/dist/esm/vite/resolveAPIRequest.native.js +44 -47
  302. package/dist/esm/vite/resolveAPIRequest.native.js.map +6 -1
  303. package/dist/esm/vite/server.native.js +5 -4
  304. package/dist/esm/vite/server.native.js.map +6 -1
  305. package/dist/esm/vite/types.native.js +1 -2
  306. package/dist/esm/vite/types.native.js.map +6 -1
  307. package/dist/esm/vite/virtualEntryPlugin.native.js +21 -16
  308. package/dist/esm/vite/virtualEntryPlugin.native.js.map +6 -1
  309. package/dist/esm/vite/vitePluginSsrCss.native.js +61 -50
  310. package/dist/esm/vite/vitePluginSsrCss.native.js.map +6 -1
  311. package/dist/esm/vite.native.js +19 -10
  312. package/dist/esm/vite.native.js.map +6 -1
  313. package/dist/esm/zero/getQueryKey.native.js +5 -3
  314. package/dist/esm/zero/getQueryKey.native.js.map +6 -1
  315. package/dist/esm/zero/isZeroQuery.native.js +4 -2
  316. package/dist/esm/zero/isZeroQuery.native.js.map +6 -1
  317. package/dist/esm/zero/resolveQuery.native.js +9 -8
  318. package/dist/esm/zero/resolveQuery.native.js.map +6 -1
  319. package/dist/esm/zero/subscribeToQuery.native.js +5 -3
  320. package/dist/esm/zero/subscribeToQuery.native.js.map +6 -1
  321. package/dist/esm/zero/types.native.js +1 -2
  322. package/dist/esm/zero/types.native.js.map +6 -1
  323. package/dist/esm/zero/useQuery.native.js +12 -12
  324. package/dist/esm/zero/useQuery.native.js.map +6 -1
  325. package/dist/esm/zero/useQueryZero.native.js +24 -20
  326. package/dist/esm/zero/useQueryZero.native.js.map +6 -1
  327. package/dist/esm/zero.native.js +9 -5
  328. package/dist/esm/zero.native.js.map +6 -1
  329. package/package.json +7 -7
  330. package/src/cleanUrl.ts +1 -1
  331. package/src/cli/runAndroid.ts +6 -0
  332. package/src/cli/runIos.ts +6 -0
  333. package/src/cli.ts +27 -1
  334. package/src/createHandleRequest.ts +7 -0
  335. package/src/vite/createFileSystemRouter.tsx +1 -2
  336. package/src/vite/replaceLoader.ts +7 -1
  337. package/types/cli/runAndroid.d.ts +2 -0
  338. package/types/cli/runAndroid.d.ts.map +1 -0
  339. package/types/cli/runIos.d.ts +2 -0
  340. package/types/cli/runIos.d.ts.map +1 -0
  341. package/types/createHandleRequest.d.ts.map +1 -1
  342. package/types/vite/createFileSystemRouter.d.ts.map +1 -1
  343. package/types/vite/replaceLoader.d.ts.map +1 -1
@@ -3,7 +3,11 @@ function replaceLoader({
3
3
  loaderData
4
4
  }) {
5
5
  const stringifiedData = JSON.stringify(loaderData);
6
- return code.includes("__vxrn__loader__") ? code.replace(/["']__vxrn__loader__['"]/, stringifiedData) : code + `
6
+ return code.includes("__vxrn__loader__") ? code.replace(/["']__vxrn__loader__['"]/,
7
+ // make sure this ' ' is added in front,
8
+ // minifiers will do `return"something"
9
+ // but if its null then it becomes returnnull
10
+ " " + stringifiedData.replace(/\$/g, "$$$$")) : code + `
7
11
  export const loader = () => (${stringifiedData})`;
8
12
  }
9
13
  export { replaceLoader };
@@ -1 +1 @@
1
- {"version":3,"names":["replaceLoader","code","loaderData","stringifiedData","JSON","stringify","includes","replace"],"sources":["../../../src/vite/replaceLoader.ts"],"sourcesContent":[null],"mappings":"AAAO,SAASA,cAAc;EAC5BC,IAAA;EACAC;AACF,GAGG;EACD,MAAMC,eAAA,GAAkBC,IAAA,CAAKC,SAAA,CAAUH,UAAU;EASjD,OANOD,IAAA,CAAKK,QAAA,CAAS,kBAAkB,IAG9BL,IAAA,CAAKM,OAAA,CAAQ,4BAA4BJ,eAAe,IAFtDF,IAAA,GAAO;AAAA,+BAAkCE,eAAe;AAMrE","ignoreList":[]}
1
+ {"version":3,"names":["replaceLoader","code","loaderData","stringifiedData","JSON","stringify","includes","replace"],"sources":["../../../src/vite/replaceLoader.ts"],"sourcesContent":[null],"mappings":"AAAO,SAASA,cAAc;EAC5BC,IAAA;EACAC;AACF,GAGG;EACD,MAAMC,eAAA,GAAkBC,IAAA,CAAKC,SAAA,CAAUH,UAAU;EAejD,OAZOD,IAAA,CAAKK,QAAA,CAAS,kBAAkB,IAG9BL,IAAA,CAAKM,OAAA,CACV;EAAA;EAAA;EAAA;EAIA,MAAMJ,eAAA,CAAgBI,OAAA,CAAQ,OAAO,MAAM,CAC7C,IARSN,IAAA,GAAO;AAAA,+BAAkCE,eAAe;AAYrE","ignoreList":[]}
@@ -1,14 +1,17 @@
1
1
  function replaceLoader(param) {
2
- var {
3
- code,
4
- loaderData
5
- } = param,
6
- stringifiedData = JSON.stringify(loaderData),
7
- out = function () {
8
- return code.includes("__vxrn__loader__") ? code.replace(/["']__vxrn__loader__['"]/, stringifiedData) : code + `
2
+ var { code, loaderData } = param, stringifiedData = JSON.stringify(loaderData), out = function() {
3
+ return code.includes("__vxrn__loader__") ? code.replace(
4
+ /["']__vxrn__loader__['"]/,
5
+ // make sure this ' ' is added in front,
6
+ // minifiers will do `return"something"
7
+ // but if its null then it becomes returnnull
8
+ " " + stringifiedData.replace(/\$/g, "$$$$")
9
+ ) : code + `
9
10
  export const loader = () => (${stringifiedData})`;
10
- }();
11
+ }();
11
12
  return out;
12
13
  }
13
- export { replaceLoader };
14
- //# sourceMappingURL=replaceLoader.native.js.map
14
+ export {
15
+ replaceLoader
16
+ };
17
+ //# sourceMappingURL=replaceLoader.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["replaceLoader","param","code","loaderData","stringifiedData","JSON","stringify","out","includes","replace"],"sources":["../../../src/vite/replaceLoader.ts"],"sourcesContent":[null],"mappings":"AAAO,SAASA,cAAcC,KAAA;EAC5B;MAAAC,IAAA;MAAAC;IAAA,IAAAF,KAAA;IAAAG,eAAA,GAAAC,IAAA,CAAAC,SAAA,CAAAH,UAAA;IAAAI,GAAA;MACA,OAAAL,IAAA,CAAAM,QAAA,uBAAAN,IAAA,CAAAO,OAAA,6BAAAL,eAAA,IAAAF,IAAA;AACF,+BAGGE,eAAA;IACD;EASA,OANOG,GAAA;AACW;AAMpB,S","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/replaceLoader.ts"],
4
+ "mappings": "AAAO,SAASA,cAAc,OAM7B;MAN6B,EAC5BC,MACAC,WAAU,IAFkB,OAOtBC,kBAAkBC,KAAKC,UAAUH,UAAAA,GAEjCI,MAAO,WAAA;AACX,WAAKL,KAAKM,SAAS,kBAAA,IAGZN,KAAKO;MACV;;;;MAIA,MAAML,gBAAgBK,QAAQ,OAAO,MAAA;IAAA,IAP9BP,OAAO;+BAAkCE,eAAAA;EASpD,EAAA;AAEA,SAAOG;AACT;",
5
+ "names": ["replaceLoader", "code", "loaderData", "stringifiedData", "JSON", "stringify", "out", "includes", "replace"]
6
+ }
@@ -1,56 +1,51 @@
1
- import { isResponse } from "../utils/isResponse.native.js";
2
- import { asyncHeadersCache, mergeHeaders, requestAsyncLocalStore } from "./headers.native.js";
1
+ import { isResponse } from "../utils/isResponse";
2
+ import { asyncHeadersCache, mergeHeaders, requestAsyncLocalStore } from "./headers";
3
3
  function resolveAPIRequest(asyncImport, request, params) {
4
- if (asyncImport) return new Promise(function (res, rej) {
5
- var id = {
6
- _id: Math.random()
7
- };
8
- requestAsyncLocalStore.run(id, async function () {
9
- try {
10
- var imported = await asyncImport(),
11
- requestType = request.method || "GET",
12
- handler = imported[requestType] || imported.default;
13
- if (!handler) {
14
- console.warn(`No handler found for request ${requestType}`);
15
- return;
16
- }
17
- var response = await handler(request, {
4
+ if (asyncImport)
5
+ return new Promise(function(res, rej) {
6
+ var id = {
7
+ _id: Math.random()
8
+ };
9
+ requestAsyncLocalStore.run(id, async function() {
10
+ try {
11
+ var imported = await asyncImport(), requestType = request.method || "GET", handler = imported[requestType] || imported.default;
12
+ if (!handler) {
13
+ console.warn(`No handler found for request ${requestType}`);
14
+ return;
15
+ }
16
+ var response = await handler(request, {
18
17
  params
19
- }),
20
- asyncHeaders = asyncHeadersCache.get(id);
21
- if (asyncHeaders) try {
22
- response instanceof Response ? mergeHeaders(response.headers, asyncHeaders) : response && typeof response == "object" ? response = Response.json(response, {
23
- headers: asyncHeaders
24
- }) : response = new Response(response, {
25
- headers: asyncHeaders
26
- });
18
+ }), asyncHeaders = asyncHeadersCache.get(id);
19
+ if (asyncHeaders)
20
+ try {
21
+ response instanceof Response ? mergeHeaders(response.headers, asyncHeaders) : response && typeof response == "object" ? response = Response.json(response, {
22
+ headers: asyncHeaders
23
+ }) : response = new Response(response, {
24
+ headers: asyncHeaders
25
+ });
26
+ } catch (err) {
27
+ if (`${err}`.includes("immutable")) {
28
+ var body = response.body ? await streamToString(response.body) : "";
29
+ response = new Response(body, {
30
+ headers: response.headers,
31
+ status: response.status,
32
+ statusText: response.statusText
33
+ }), mergeHeaders(response.headers, asyncHeaders);
34
+ } else
35
+ console.error(` [one] error adding headers: ${err}`);
36
+ }
37
+ res(response);
27
38
  } catch (err) {
28
- if (`${err}`.includes("immutable")) {
29
- var body = response.body ? await streamToString(response.body) : "";
30
- response = new Response(body, {
31
- headers: response.headers,
32
- status: response.status,
33
- statusText: response.statusText
34
- }), mergeHeaders(response.headers, asyncHeaders);
35
- } else console.error(` [one] error adding headers: ${err}`);
39
+ isResponse(err) ? res(err) : rej(err);
36
40
  }
37
- res(response);
38
- } catch (err) {
39
- isResponse(err) ? res(err) : rej(err);
40
- }
41
+ });
41
42
  });
42
- });
43
43
  }
44
44
  async function streamToString(stream) {
45
- var reader = stream.getReader(),
46
- decoder = new TextDecoder(),
47
- result = "";
45
+ var reader = stream.getReader(), decoder = new TextDecoder(), result = "";
48
46
  try {
49
- for (;;) {
50
- var {
51
- done,
52
- value
53
- } = await reader.read();
47
+ for (; ; ) {
48
+ var { done, value } = await reader.read();
54
49
  if (done) break;
55
50
  result += decoder.decode(value, {
56
51
  stream: !0
@@ -63,5 +58,7 @@ async function streamToString(stream) {
63
58
  }
64
59
  return result;
65
60
  }
66
- export { resolveAPIRequest };
67
- //# sourceMappingURL=resolveAPIRequest.native.js.map
61
+ export {
62
+ resolveAPIRequest
63
+ };
64
+ //# sourceMappingURL=resolveAPIRequest.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["isResponse","asyncHeadersCache","mergeHeaders","requestAsyncLocalStore","resolveAPIRequest","asyncImport","request","params","Promise","res","rej","id","_id","Math","random","run","imported","requestType","method","handler","default","console","warn","response","asyncHeaders","get","Response","headers","json","err","includes","body","streamToString","status","statusText","error","stream","reader","getReader","decoder","TextDecoder","result","done","value","read","decode"],"sources":["../../../src/vite/resolveAPIRequest.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,UAAA,QAAkB;AAC3B,SAASC,iBAAA,EAAmBC,YAAA,EAAcC,sBAAA,QAA8B;AAEjE,SAASC,kBACdC,WAAA,EACAC,OAAA,EACAC,MAAA,EACA;EACA,IAAKF,WAAA,EAEL,OAAO,IAAIG,OAAA,CAAQ,UAAMC,GAAA,EAAQC,GAAA;IAC/B,IAAAC,EAAM;MACNC,GAAA,EAAAC,IAAA,CAAAC,MAAA;IAC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AA,GAAc;AAElC,oBAAMC,OAAOR,SAASQ,OAAO,MAAMC,eAAeT,SAASQ,IAAI,IAAI;AACnER,2BAAW,IAAIG,SAASK,MAAM;kBAC5BJ,SAASJ,SAASI;kBAClBM,QAAQV,SAASU;kBACjBC,YAAYX,SAASW;gBACvB,CAAA,GACAhC,aAAaqB,SAASI,SAASH,YAAAA;cACjC;AACEH,wBAAQc,MAAM,gCAAgCN,GAAAA,EAAK;YAEvD;AAGFpB,cAAIc,QAAAA;QACN,SAASM,KAAK;AAEZ,UAAI7B,WAAW6B,GAAAA,IACbpB,IAAIoB,GAAAA,IAEJnB,IAAImB,GAAAA;QAER;MACF,CAAA;IACF,CAAA;AACF;AAEA,eAAeG,eAAeI,QAAsB;AAClD,MAAMC,SAASD,OAAOE,UAAS,GACzBC,UAAU,IAAIC,YAAAA,GAChBC,SAAS;AAEb,MAAI;AACF,eAAa;AACX,UAAM,EAAEC,MAAMC,MAAK,IAAK,MAAMN,OAAOO,KAAI;AACzC,UAAIF,KAAM;AACVD,gBAAUF,QAAQM,OAAOF,OAAO;QAAEP,QAAQ;MAAK,CAAA;IACjD;EACF,SAASD,OAAO;AACdd,YAAQc,MAAM,6BAA6BA,KAAAA;EAC7C,UAAA;AACEE,WAAOS,YAAW;EACpB;AAEA,SAAOL;AACT;",
5
+ "names": ["isResponse", "asyncHeadersCache", "mergeHeaders", "requestAsyncLocalStore", "resolveAPIRequest", "asyncImport", "request", "params", "Promise", "res", "rej", "id", "_id", "Math", "random", "run", "imported", "requestType", "method", "handler", "default", "console", "warn", "response", "asyncHeaders", "get", "Response", "headers", "json", "err", "includes", "body", "streamToString", "status", "statusText", "error", "stream", "reader", "getReader", "decoder", "TextDecoder", "result", "done", "value", "read", "decode", "releaseLock"]
6
+ }
@@ -1,17 +1,18 @@
1
1
  import { parentPort } from "node:worker_threads";
2
2
  import { fileURLToPath } from "node:url";
3
3
  import { ESModulesEvaluator, ModuleRunner, RemoteRunnerTransport } from "vite/module-runner";
4
- if (!parentPort) throw new Error("No parent port");
4
+ if (!parentPort)
5
+ throw new Error("No parent port");
5
6
  var runner = new ModuleRunner({
6
7
  root: fileURLToPath(new URL("./", import.meta.url)),
7
8
  transport: new RemoteRunnerTransport({
8
- send: function (data) {
9
+ send: function(data) {
9
10
  return parentPort.postMessage(data);
10
11
  },
11
- onMessage: function (listener) {
12
+ onMessage: function(listener) {
12
13
  return parentPort.on("message", listener);
13
14
  },
14
15
  timeout: 5e3
15
16
  })
16
17
  }, new ESModulesEvaluator());
17
- //# sourceMappingURL=server.native.js.map
18
+ //# sourceMappingURL=server.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["parentPort","fileURLToPath","ESModulesEvaluator","ModuleRunner","RemoteRunnerTransport","Error","runner","root","URL","import","meta","url","transport","send","data","postMessage","onMessage","listener","on","timeout"],"sources":["../../../src/vite/server.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,UAAA,QAAkB;AAC3B,SAASC,aAAA,QAAqB;AAC9B,SAASC,kBAAA,EAAoBC,YAAA,EAAcC,qBAAA,QAA6B;AAExE,IAAI,CAACJ,UAAA,EACH,MAAM,IAAIK,KAAA,CAAM,gBAAgB;AAGlC,IAAAC,MAAM,OAASH,YAAI;EACjBI,IAAA,EAAAN,aAAA,KAAAO,GAAA,OAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;EAAAC,SACQ,MAAAR,qBAA4B;IAClCS,IAAA,WAAAA,CAAeC,IAAA;MACb,OAAOd,UAAS,CAAAe,WAAY,CAAAD,IAAA;IAAgB;IACeE,SAC3D,EAAS,SAAAA,CAAAC,QAAA;MACV,OAAAjB,UAAA,CAAAkB,EAAA,YAAAD,QAAA;IACH;IACAE,OAAI;EACN","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/server.ts"],
4
+ "mappings": "AAAA,SAASA,kBAAkB;AAC3B,SAASC,qBAAqB;AAC9B,SAASC,oBAAoBC,cAAcC,6BAA6B;AAExE,IAAI,CAACJ;AACH,QAAM,IAAIK,MAAM,gBAAgB;AAGlC,IAAMC,SAAS,IAAIH,aACjB;EACEI,MAAMN,cAAc,IAAIO,IAAI,MAAM,YAAYC,GAAG,CAAA;EACjDC,WAAW,IAAIN,sBAAsB;IACnCO,MAAM,SAACC,MAAAA;aAASZ,WAAYa,YAAYD,IAAAA;;IACxCE,WAAW,SAACC,UAAAA;aAAaf,WAAYgB,GAAG,WAAWD,QAAAA;;IACnDE,SAAS;EACX,CAAA;AACF,GACA,IAAIf,mBAAAA,CAAAA;",
5
+ "names": ["parentPort", "fileURLToPath", "ESModulesEvaluator", "ModuleRunner", "RemoteRunnerTransport", "Error", "runner", "root", "URL", "url", "transport", "send", "data", "postMessage", "onMessage", "listener", "on", "timeout"]
6
+ }
@@ -1,2 +1 @@
1
-
2
- //# sourceMappingURL=types.native.js.map
1
+ //# sourceMappingURL=types.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "mappings": "",
5
+ "names": []
6
+ }
@@ -1,12 +1,5 @@
1
1
  import { isNativeEnvironment } from "vxrn";
2
- var virtualEntryIdName = "one-entry",
3
- virtualEntryId = `virtual:${virtualEntryIdName}`,
4
- virtalEntryIdClient = `/@id/__x00__virtual:${virtualEntryIdName}`,
5
- resolvedVirtualEntryId = "\0" + virtualEntryId,
6
- virtualEntryIdNativeName = `${virtualEntryIdName}-native`,
7
- virtualEntryIdNative = `virtual:${virtualEntryIdNativeName}`,
8
- resolvedVirtualEntryIdNative = "\0" + virtualEntryIdNativeName,
9
- USE_One_SETUP_FILE = `
2
+ var virtualEntryIdName = "one-entry", virtualEntryId = `virtual:${virtualEntryIdName}`, virtalEntryIdClient = `/@id/__x00__virtual:${virtualEntryIdName}`, resolvedVirtualEntryId = "\0" + virtualEntryId, virtualEntryIdNativeName = `${virtualEntryIdName}-native`, virtualEntryIdNative = `virtual:${virtualEntryIdNativeName}`, resolvedVirtualEntryIdNative = "\0" + virtualEntryIdNativeName, USE_One_SETUP_FILE = `
10
3
  if (process.env.One_SETUP_FILE) {
11
4
  import(/* @vite-ignore */ process.env.One_SETUP_FILE)
12
5
  }
@@ -17,13 +10,17 @@ function createVirtualEntry(options) {
17
10
  name: "one-virtual-entry",
18
11
  enforce: "pre",
19
12
  resolveId(id) {
20
- if (id === virtualEntryId) return resolvedVirtualEntryId;
21
- if (id === virtualEntryIdNative) return resolvedVirtualEntryIdNative;
13
+ if (id === virtualEntryId)
14
+ return resolvedVirtualEntryId;
15
+ if (id === virtualEntryIdNative)
16
+ return resolvedVirtualEntryIdNative;
22
17
  },
23
18
  load(id) {
24
19
  if (id === resolvedVirtualEntryId) {
25
- var prependCode = isNativeEnvironment(this.environment) ? "" : (/* `import()` will not work on native */
26
- USE_One_SETUP_FILE);
20
+ var prependCode = isNativeEnvironment(this.environment) ? "" : (
21
+ /* `import()` will not work on native */
22
+ USE_One_SETUP_FILE
23
+ );
27
24
  return `
28
25
  ${prependCode}
29
26
 
@@ -36,8 +33,10 @@ export default createApp({
36
33
  `;
37
34
  }
38
35
  if (id === resolvedVirtualEntryIdNative) {
39
- var prependCode1 = isNativeEnvironment(this.environment) ? "" : (/* `import()` will not work on native */
40
- USE_One_SETUP_FILE);
36
+ var prependCode1 = isNativeEnvironment(this.environment) ? "" : (
37
+ /* `import()` will not work on native */
38
+ USE_One_SETUP_FILE
39
+ );
41
40
  return `
42
41
  ${prependCode1}
43
42
 
@@ -52,5 +51,11 @@ export default createApp({
52
51
  }
53
52
  };
54
53
  }
55
- export { createVirtualEntry, virtalEntryIdClient, virtualEntryId, virtualEntryIdName, virtualEntryIdNative };
56
- //# sourceMappingURL=virtualEntryPlugin.native.js.map
54
+ export {
55
+ createVirtualEntry,
56
+ virtalEntryIdClient,
57
+ virtualEntryId,
58
+ virtualEntryIdName,
59
+ virtualEntryIdNative
60
+ };
61
+ //# sourceMappingURL=virtualEntryPlugin.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["isNativeEnvironment","virtualEntryIdName","virtualEntryId","virtalEntryIdClient","resolvedVirtualEntryId","virtualEntryIdNativeName","virtualEntryIdNative","resolvedVirtualEntryIdNative","USE_One_SETUP_FILE","createVirtualEntry","options","appDirGlob","root","name","enforce","resolveId","id","load","prependCode","environment","prependCode1"],"sources":["../../../src/vite/virtualEntryPlugin.ts"],"sourcesContent":[null],"mappings":"AACA,SAASA,mBAAA,QAA2B;AAE7B,IAAAC,kBAAM,cAAqB;EAAAC,cACrB,cAAiBD,kBAAW,EAAkB;EAAAE,mBAC9C,0BAAsBF,kBAAuB,EAAkB;EAAAG,sBACtE,OAAyB,GAAAF,cAAO;EAAAG,wBAEhC,MAA2BJ,kBAAG,SAAkB;EAAAK,oBACzC,cAAuBD,wBAAW,EAAwB;EAAAE,4BACjE,OAA+B,GAAAF,wBAAO;EAAAG,kBAEtC;AAAqB;AAAA;AAAA;AAAA;AAMpB,SAASC,mBAAmBC,OAAA,EAAmC;EACpE,IAAAC,UAAM,OAAaD,OAAI,CAAAE,IAAQ,WAAI;EAEnC,OAAO;IACLC,IAAA,EAAM;IACNC,OAAA,EAAS;IAETC,UAAUC,EAAA,EAAI;MACZ,IAAIA,EAAA,KAAOd,cAAA,EACT,OAAOE,sBAAA;MAET,IAAIY,EAAA,KAAOV,oBAAA,EACT,OAAOC,4BAAA;IAEX;IAEAU,KAAKD,EAAA,EAAI;MACP,IAAIA,EAAA,KAAOZ,sBAAA;QAIT,IAAAc,WAAO,GAAAlB,mBAAA,MAAAmB,WAAA,UAHa;QAIfX,kBAAA;QAAA;AAAA,EAAAU,WAAA;AAIW;AAAA;AAEgB;AAAA,cAAAP,UAAA;AAKlC;AAIE,8BAAOA,UAAA;AAAA;AACF;MAAA;MAAA,IAAAK,EAAA,KAAAT,4BAAA;QAAA,IAAAa,YAIW,GAAApB,mBAAA,MAAAmB,WAAA;QAAAX,kBAAA,CAEgB;QAAA;AAAA,EAAAY,YAIpC;AAAA;AAEJ","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/virtualEntryPlugin.ts"],
4
+ "mappings": "AACA,SAASA,2BAA2B;AAE7B,IAAMC,qBAAqB,aACrBC,iBAAiB,WAAWD,kBAAAA,IAC5BE,sBAAsB,uBAAuBF,kBAAAA,IACpDG,yBAAyB,OAAOF,gBAEhCG,2BAA2B,GAAGJ,kBAAAA,WACvBK,uBAAuB,WAAWD,wBAAAA,IACzCE,+BAA+B,OAAOF,0BAEtCG,qBAAqB;;;;;AAMpB,SAASC,mBAAmBC,SAAyB;AAC1D,MAAMC,aAAa,IAAID,QAAQE,IAAI;AAEnC,SAAO;IACLC,MAAM;IACNC,SAAS;IAETC,UAAUC,IAAE;AACV,UAAIA,OAAOd;AACT,eAAOE;AAET,UAAIY,OAAOV;AACT,eAAOC;IAEX;IAEAU,KAAKD,IAAE;AACL,UAAIA,OAAOZ,wBAAwB;AACjC,YAAMc,cAAclB,oBAAoB,KAAKmB,WAAW,IACpD;;UACAX;;AACJ,eAAO;EACbU,WAAAA;;;;cAIYP,UAAAA;;8BAEgBA,UAAAA;;;MAGxB;AAEA,UAAIK,OAAOT,8BAA8B;AACvC,YAAMW,eAAclB,oBAAoB,KAAKmB,WAAW,IACpD;;UACAX;;AACJ,eAAO;EACbU,YAAAA;;;;cAIYP,UAAAA;;8BAEgBA,UAAAA;;;MAGxB;IACF;EACF;AACF;",
5
+ "names": ["isNativeEnvironment", "virtualEntryIdName", "virtualEntryId", "virtalEntryIdClient", "resolvedVirtualEntryId", "virtualEntryIdNativeName", "virtualEntryIdNative", "resolvedVirtualEntryIdNative", "USE_One_SETUP_FILE", "createVirtualEntry", "options", "appDirGlob", "root", "name", "enforce", "resolveId", "id", "load", "prependCode", "environment"]
6
+ }
@@ -1,12 +1,11 @@
1
1
  var VIRTUAL_ENTRY = "virtual:ssr-css.css";
2
2
  function vitePluginSsrCss(pluginOpts) {
3
- var server,
4
- virtualHref = "/@id/__x00__" + VIRTUAL_ENTRY;
3
+ var server, virtualHref = "/@id/__x00__" + VIRTUAL_ENTRY;
5
4
  return {
6
5
  name: "vite-plugin-ssr-css",
7
6
  apply: "serve",
8
7
  configureServer(server_) {
9
- server = server_, server.middlewares.use(async function (req, res, next) {
8
+ server = server_, server.middlewares.use(async function(req, res, next) {
10
9
  var _req_url;
11
10
  if (!((_req_url = req.url) === null || _req_url === void 0) && _req_url.includes(virtualHref)) {
12
11
  invalidateModule(server, "\0" + VIRTUAL_ENTRY + "?direct");
@@ -24,30 +23,32 @@ function vitePluginSsrCss(pluginOpts) {
24
23
  },
25
24
  async load(id, _options) {
26
25
  if (id.startsWith("\0" + VIRTUAL_ENTRY)) {
27
- var url = new URL(id.slice(1), "https://test.local"),
28
- code = await collectStyle(server, pluginOpts.entries);
26
+ var url = new URL(id.slice(1), "https://test.local"), code = await collectStyle(server, pluginOpts.entries);
29
27
  return url.searchParams.has("direct") || (code = `export default ${JSON.stringify(code)}`), code;
30
28
  }
31
29
  },
32
30
  // also expose via transformIndexHtml
33
31
  transformIndexHtml: {
34
- handler: async function () {
35
- return [{
36
- tag: "link",
37
- injectTo: "head",
38
- attrs: {
39
- rel: "stylesheet",
40
- href: virtualHref,
41
- "data-ssr-css": !0
42
- }
43
- }, {
44
- tag: "script",
45
- injectTo: "head",
46
- attrs: {
47
- type: "module"
32
+ handler: async function() {
33
+ return [
34
+ {
35
+ tag: "link",
36
+ injectTo: "head",
37
+ attrs: {
38
+ rel: "stylesheet",
39
+ href: virtualHref,
40
+ "data-ssr-css": !0
41
+ }
48
42
  },
49
- children: (/* js */
50
- `
43
+ {
44
+ tag: "script",
45
+ injectTo: "head",
46
+ attrs: {
47
+ type: "module"
48
+ },
49
+ children: (
50
+ /* js */
51
+ `
51
52
  import { createHotContext } from "/@vite/client";
52
53
  const hot = createHotContext("/__clear_ssr_css");
53
54
  hot.on("vite:afterUpdate", () => {
@@ -55,8 +56,10 @@ function vitePluginSsrCss(pluginOpts) {
55
56
  .querySelectorAll("[data-ssr-css]")
56
57
  .forEach(node => node.remove());
57
58
  });
58
- `)
59
- }];
59
+ `
60
+ )
61
+ }
62
+ ];
60
63
  }
61
64
  }
62
65
  };
@@ -66,49 +69,57 @@ function invalidateModule(server, id) {
66
69
  mod && server.moduleGraph.invalidateModule(mod);
67
70
  }
68
71
  async function collectStyle(server, entries) {
69
- var urls = await collectStyleUrls(server, entries),
70
- codes = await Promise.all(urls.map(async function (url) {
71
- var res = await server.transformRequest(url + "?direct"),
72
- code = res?.code || "",
73
- prefix = `/* [collectStyle] ${url} */`;
74
- try {
75
- var {
76
- transform
77
- } = await import("lightningcss"),
78
- processed = transform({
79
- filename: "code.css",
80
- code: Buffer.from(code),
81
- ...server.config.css.lightningcss
82
- }).code.toString();
83
- return [prefix, processed];
84
- } catch (err) {
85
- return console.error(` [one] Error post-processing CSS, leaving un-processed: ${err}`), [prefix, code];
86
- }
87
- }));
72
+ var urls = await collectStyleUrls(server, entries), codes = await Promise.all(urls.map(async function(url) {
73
+ var res = await server.transformRequest(url + "?direct"), code = res?.code || "", prefix = `/* [collectStyle] ${url} */`;
74
+ try {
75
+ var { transform } = await import("lightningcss"), processed = transform({
76
+ filename: "code.css",
77
+ code: Buffer.from(code),
78
+ ...server.config.css.lightningcss
79
+ }).code.toString();
80
+ return [
81
+ prefix,
82
+ processed
83
+ ];
84
+ } catch (err) {
85
+ return console.error(` [one] Error post-processing CSS, leaving un-processed: ${err}`), [
86
+ prefix,
87
+ code
88
+ ];
89
+ }
90
+ }));
88
91
  return codes.flat().filter(Boolean).join(`
89
92
 
90
93
  `);
91
94
  }
92
95
  async function collectStyleUrls(server, entries) {
93
- var visited = /* @__PURE__ */new Set();
96
+ var visited = /* @__PURE__ */ new Set();
94
97
  async function traverse(url) {
95
98
  var [, id] = await server.moduleGraph.resolveUrl(url);
96
99
  if (!visited.has(id)) {
97
100
  visited.add(id);
98
101
  var mod = server.moduleGraph.getModuleById(id);
99
- mod && (await Promise.all([...mod.importedModules].map(function (childMod) {
102
+ mod && await Promise.all([
103
+ ...mod.importedModules
104
+ ].map(function(childMod) {
100
105
  return traverse(childMod.url);
101
- })));
106
+ }));
102
107
  }
103
108
  }
104
- return await Promise.all(entries.map(function (e) {
109
+ return await Promise.all(entries.map(function(e) {
105
110
  return server.transformRequest(e);
106
- })), await Promise.all(entries.map(function (url) {
111
+ })), await Promise.all(entries.map(function(url) {
107
112
  return traverse(url);
108
- })), [...visited].filter(function (url) {
113
+ })), [
114
+ ...visited
115
+ ].filter(function(url) {
109
116
  return url.match(CSS_LANGS_RE);
110
117
  });
111
118
  }
112
119
  var CSS_LANGS_RE = /\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/;
113
- export { VIRTUAL_ENTRY, collectStyle, vitePluginSsrCss };
114
- //# sourceMappingURL=vitePluginSsrCss.native.js.map
120
+ export {
121
+ VIRTUAL_ENTRY,
122
+ collectStyle,
123
+ vitePluginSsrCss
124
+ };
125
+ //# sourceMappingURL=vitePluginSsrCss.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["VIRTUAL_ENTRY","vitePluginSsrCss","pluginOpts","server","virtualHref","name","apply","configureServer","server_","middlewares","use","req","res","next","_req_url","url","includes","invalidateModule","code","collectStyle","entries","setHeader","write","end","resolveId","source","_importer","_options","startsWith","load","id","URL","slice","searchParams","has","JSON","stringify","transformIndexHtml","handler","tag","injectTo","attrs","rel","href","type","children","mod","moduleGraph","getModuleById","urls","collectStyleUrls","codes","Promise","all","map","transformRequest","prefix","transform","processed","filename","Buffer","from","config","css","lightningcss","toString","err","console","error","flat","filter","Boolean","join","visited","Set","traverse","resolveUrl","add"],"sources":["../../../src/vite/vitePluginSsrCss.ts"],"sourcesContent":[null],"mappings":"AAKO,IAAAA,aAAM,wBAAgB;AAEtB,SAASC,iBAAiBC,UAAA,EAA2C;EAC1E,IAAIC,MAAA;IAAAC,WAAA,oBAAAJ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AGd,OAAO2D,OAAOC,IAAIC;MACvB,CAAA,EAAG/C,KAAKgD,SAAQ;AAEhB,aAAO;QAACT;QAAQE;;IAClB,SAASQ,KAAK;AACZC,qBAAQC,MAAM,2DAA2DF,GAAAA,EAAK,GACvE;QAACV;QAAQvC;;IAClB;EACF,CAAA,CAAA;AAEF,SAAOkC,MAAMkB,KAAI,EAAGC,OAAOC,OAAAA,EAASC,KAAK;;CAAA;AAC3C;AAEA,eAAetB,iBAAiB/C,QAAuBgB,SAAiB;AACtE,MAAMsD,UAAU,oBAAIC,IAAAA;AAEpB,iBAAeC,SAAS7D,KAAW;AACjC,QAAM,CAAA,EAAGgB,EAAAA,IAAM,MAAM3B,OAAO4C,YAAY6B,WAAW9D,GAAAA;AACnD,QAAI2D,SAAQvC,IAAIJ,EAAAA,GAGhB2C;cAAQI,IAAI/C,EAAAA;AACZ,UAAMgB,MAAM3C,OAAO4C,YAAYC,cAAclB,EAAAA;AAC7C,MAAKgB,OAGL,MAAMM,QAAQC,IAAI;WAAIP,IAAIgC;QAAiBxB,IAAI,SAACyB,UAAAA;eAAaJ,SAASI,SAASjE,GAAG;;;EACpF;AAGA,eAAMsC,QAAQC,IAAIlC,QAAQmC,IAAI,SAAC0B,GAAAA;WAAM7E,OAAOoD,iBAAiByB,CAAAA;OAG7D,MAAM5B,QAAQC,IAAIlC,QAAQmC,IAAI,SAACxC,KAAAA;WAAQ6D,SAAS7D,GAAAA;OAGzC;OAAI2D;IAASH,OAAO,SAACxD,KAAAA;WAAQA,IAAImE,MAAMC,YAAAA;;AAChD;AAGA,IAAMA,eAAe;",
5
+ "names": ["VIRTUAL_ENTRY", "vitePluginSsrCss", "pluginOpts", "server", "virtualHref", "name", "apply", "configureServer", "server_", "middlewares", "use", "req", "res", "next", "url", "includes", "invalidateModule", "code", "collectStyle", "entries", "setHeader", "write", "end", "resolveId", "source", "_importer", "_options", "startsWith", "undefined", "load", "id", "URL", "slice", "searchParams", "has", "JSON", "stringify", "transformIndexHtml", "handler", "tag", "injectTo", "attrs", "rel", "href", "type", "children", "mod", "moduleGraph", "getModuleById", "urls", "collectStyleUrls", "codes", "Promise", "all", "map", "transformRequest", "prefix", "transform", "processed", "filename", "Buffer", "from", "config", "css", "lightningcss", "toString", "err", "console", "error", "flat", "filter", "Boolean", "join", "visited", "Set", "traverse", "resolveUrl", "add", "importedModules", "childMod", "e", "match", "CSS_LANGS_RE"]
6
+ }
@@ -1,10 +1,19 @@
1
- import { clientTreeShakePlugin } from "./vite/clientTreeShakePlugin.native.js";
2
- import { createFileSystemRouter } from "./vite/createFileSystemRouter.native.js";
3
- import { vitePluginSsrCss } from "./vite/vitePluginSsrCss.native.js";
4
- import { removeReactNativeWebAnimatedPlugin } from "./vite/removeReactNativeWebAnimatedPlugin.native.js";
5
- import { makePluginWebOnly } from "./vite/makePluginWebOnly.native.js";
6
- import { setCurrentRequestHeaders } from "./vite/headers.native.js";
7
- import { build } from "./vite/build.native.js";
8
- import { one } from "./vite/one.native.js";
9
- export { build, clientTreeShakePlugin, createFileSystemRouter, makePluginWebOnly, one, removeReactNativeWebAnimatedPlugin, setCurrentRequestHeaders, vitePluginSsrCss };
10
- //# sourceMappingURL=vite.native.js.map
1
+ import { clientTreeShakePlugin } from "./vite/clientTreeShakePlugin";
2
+ import { createFileSystemRouter } from "./vite/createFileSystemRouter";
3
+ import { vitePluginSsrCss } from "./vite/vitePluginSsrCss";
4
+ import { removeReactNativeWebAnimatedPlugin } from "./vite/removeReactNativeWebAnimatedPlugin";
5
+ import { makePluginWebOnly } from "./vite/makePluginWebOnly";
6
+ import { setCurrentRequestHeaders } from "./vite/headers";
7
+ import { build } from "./vite/build";
8
+ import { one } from "./vite/one";
9
+ export {
10
+ build,
11
+ clientTreeShakePlugin,
12
+ createFileSystemRouter,
13
+ makePluginWebOnly,
14
+ one,
15
+ removeReactNativeWebAnimatedPlugin,
16
+ setCurrentRequestHeaders,
17
+ vitePluginSsrCss
18
+ };
19
+ //# sourceMappingURL=vite.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["clientTreeShakePlugin","createFileSystemRouter","vitePluginSsrCss","removeReactNativeWebAnimatedPlugin","makePluginWebOnly","setCurrentRequestHeaders","build","one"],"sources":["../../src/vite.ts"],"sourcesContent":[null],"mappings":"AACA,SAASA,qBAAA,QAA6B;AACtC,SAASC,sBAAA,QAA8B;AACvC,SAASC,gBAAA,QAAwB;AACjC,SAASC,kCAAA,QAA0C;AACnD,SAASC,iBAAA,QAAyB;AAElC,SAASC,wBAAA,QAAgC;AAEzC,SAASC,KAAA,QAAa;AACtB,SAASC,GAAA,QAAW","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/Users/n8/one/packages/one/src/vite.ts"],
4
+ "mappings": "AACA,SAASA,6BAA6B;AACtC,SAASC,8BAA8B;AACvC,SAASC,wBAAwB;AACjC,SAASC,0CAA0C;AACnD,SAASC,yBAAyB;AAElC,SAASC,gCAAgC;AAEzC,SAASC,aAAa;AACtB,SAASC,WAAW;",
5
+ "names": ["clientTreeShakePlugin", "createFileSystemRouter", "vitePluginSsrCss", "removeReactNativeWebAnimatedPlugin", "makePluginWebOnly", "setCurrentRequestHeaders", "build", "one"]
6
+ }
@@ -1,6 +1,8 @@
1
- import { hashString } from "../utils/hashString.native.js";
1
+ import { hashString } from "../utils/hashString";
2
2
  function getQueryKey(query) {
3
3
  return hashString(JSON.stringify(query.ast));
4
4
  }
5
- export { getQueryKey };
6
- //# sourceMappingURL=getQueryKey.native.js.map
5
+ export {
6
+ getQueryKey
7
+ };
8
+ //# sourceMappingURL=getQueryKey.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["hashString","getQueryKey","query","JSON","stringify","ast"],"sources":["../../../src/zero/getQueryKey.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,UAAA,QAAkB;AAEpB,SAASC,YAAYC,KAAA,EAA6B;EACvD,OAAOF,UAAA,CAAWG,IAAA,CAAKC,SAAA,CAAUF,KAAA,CAAMG,GAAG,CAAC;AAC7C","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/zero/Users/n8/one/packages/one/src/zero/getQueryKey.ts"],
4
+ "mappings": "AAAA,SAASA,kBAAkB;AAEpB,SAASC,YAAYC,OAAmB;AAC7C,SAAOF,WAAWG,KAAKC,UAAUF,MAAMG,GAAG,CAAA;AAC5C;",
5
+ "names": ["hashString", "getQueryKey", "query", "JSON", "stringify", "ast"]
6
+ }
@@ -1,5 +1,7 @@
1
1
  function isZeroQuery(obj) {
2
2
  return !(!obj || typeof obj != "object" || !obj.ast || !obj.ast.table);
3
3
  }
4
- export { isZeroQuery };
5
- //# sourceMappingURL=isZeroQuery.native.js.map
4
+ export {
5
+ isZeroQuery
6
+ };
7
+ //# sourceMappingURL=isZeroQuery.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["isZeroQuery","obj","ast","table"],"sources":["../../../src/zero/isZeroQuery.ts"],"sourcesContent":[null],"mappings":"AACO,SAASA,YAAYC,GAAA,EAAmB;EAG7C,OAFI,GAACA,GAAA,IACD,OAAOA,GAAA,IAAQ,YACf,CAACA,GAAA,CAAIC,GAAA,IAAO,CAACD,GAAA,CAAIC,GAAA,CAAIC,KAAA;AAE3B","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/zero/Users/n8/one/packages/one/src/zero/isZeroQuery.ts"],
4
+ "mappings": "AACO,SAASA,YAAYC,KAAQ;AAGlC,SAFI,GAACA,OACD,OAAOA,OAAQ,YACf,CAACA,IAAIC,OAAO,CAACD,IAAIC,IAAIC;AAE3B;",
5
+ "names": ["isZeroQuery", "obj", "ast", "table"]
6
+ }
@@ -1,11 +1,10 @@
1
1
  async function resolveZeroQuery(query) {
2
- var view = query.materialize(),
3
- tm = setTimeout(function () {
4
- console.warn(" Warning: query slow to resolve, ensure Zero server is running", JSON.stringify(query.ast, null, 2));
5
- }, 2e3);
6
- return new Promise(function (res, rej) {
2
+ var view = query.materialize(), tm = setTimeout(function() {
3
+ console.warn(" Warning: query slow to resolve, ensure Zero server is running", JSON.stringify(query.ast, null, 2));
4
+ }, 2e3);
5
+ return new Promise(function(res, rej) {
7
6
  try {
8
- var unsubscribe = view.addListener(function (snapshot) {
7
+ var unsubscribe = view.addListener(function(snapshot) {
9
8
  unsubscribe(), clearTimeout(tm), res(snapshot);
10
9
  });
11
10
  view.hydrate();
@@ -14,5 +13,7 @@ async function resolveZeroQuery(query) {
14
13
  }
15
14
  });
16
15
  }
17
- export { resolveZeroQuery };
18
- //# sourceMappingURL=resolveQuery.native.js.map
16
+ export {
17
+ resolveZeroQuery
18
+ };
19
+ //# sourceMappingURL=resolveQuery.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["resolveZeroQuery","query","view","materialize","tm","setTimeout","console","warn","JSON","stringify","ast","Promise","res","rej","unsubscribe","addListener","snapshot","clearTimeout","hydrate","err"],"sources":["../../../src/zero/resolveQuery.ts"],"sourcesContent":[null],"mappings":"AAGA,eAAsBA,iBAAiBC,KAAA,EAA4B;EACjE,IAAAC,IAAM,GAAAD,KAAO,CAAAE,WAAM;IAAYC,EAGzB,GAAAC,UAAK,aAAiB;MAC1BC,OAAA,CAAQC,IAAA,mEAAAC,IAAA,CAAAC,SAAA,CAAAR,KAAA,CAAAS,GAAA;IAAA,MACN;EAAA,OACA,IAAKC,OAAA,CAAU,UAAMC,GAAK,EAAAC,GAAM,EAAC;IACnC;MACC,IAAIC,WAAA,GAAAZ,IAAA,CAAAa,WAAA,WAAAC,QAAA;QAEPF,WAAW,EAAQ,EAACG,YAAa,CAAAb,EAAA,GAAAQ,GAAA,CAAAI,QAAA;MAC/B,EAAI;MACFd,IAAA,CAAAgB,OAAM;IACJ,SAAAC,GAAA;MAGFF,YAAC,CAAAb,EAAA,GAAAS,GAAA,CAAAM,GAAA;IAED;EAAa,EACf;AACE;AACO,SAEXnB,gBAAC","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/zero/Users/n8/one/packages/one/src/zero/resolveQuery.ts"],
4
+ "mappings": "AAGA,eAAsBA,iBAAiBC,OAAY;AACjD,MAAMC,OAAOD,MAAME,YAAW,GAGxBC,KAAKC,WAAW,WAAA;AACpBC,YAAQC,KACN,kEACAC,KAAKC,UAAUR,MAAMS,KAAK,MAAM,CAAA,CAAA;EAEpC,GAAG,GAAA;AAEH,SAAO,IAAIC,QAAQ,SAACC,KAAKC,KAAAA;AACvB,QAAI;AACF,UAAMC,cAAcZ,KAAKa,YAAY,SAACC,UAAAA;AACpCF,oBAAAA,GACAG,aAAab,EAAAA,GACbQ,IAAII,QAAAA;MACN,CAAA;AAEAd,WAAKgB,QAAO;IACd,SAASC,KAAK;AACZF,mBAAab,EAAAA,GACbS,IAAIM,GAAAA;IACN;EACF,CAAA;AACF;",
5
+ "names": ["resolveZeroQuery", "query", "view", "materialize", "tm", "setTimeout", "console", "warn", "JSON", "stringify", "ast", "Promise", "res", "rej", "unsubscribe", "addListener", "snapshot", "clearTimeout", "hydrate", "err"]
6
+ }