akanjs 2.2.4 → 2.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (609) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/base/base.ts +1 -1
  3. package/base/primitiveRegistry.ts +6 -10
  4. package/base/types.ts +1 -4
  5. package/capacitor.base.config.ts +1 -1
  6. package/client/capacitor.ts +1 -1
  7. package/client/cookie.ts +2 -4
  8. package/client/createFont.ts +2 -2
  9. package/client/csrTypes.ts +2 -8
  10. package/client/makePageProto.tsx +4 -10
  11. package/client/router.ts +3 -8
  12. package/client/translator.ts +4 -12
  13. package/common/Logger.ts +1 -4
  14. package/common/formatNumber.ts +2 -5
  15. package/common/hmrPhase.ts +1 -1
  16. package/common/isValidDate.ts +0 -3
  17. package/constant/fieldInfo.ts +3 -3
  18. package/constant/purify.ts +1 -2
  19. package/constant/types.ts +0 -4
  20. package/constant/via.ts +6 -12
  21. package/document/databaseRegistry.ts +0 -8
  22. package/document/into.ts +0 -1
  23. package/fetch/client/fetchClient.ts +1 -6
  24. package/fetch/client/httpClient.ts +1 -2
  25. package/fetch/fetchType/appliedReturn.type.ts +0 -1
  26. package/fetch/fetchType/endpointFetch.type.ts +0 -3
  27. package/fetch/fetchType/sliceFetch.type.ts +0 -8
  28. package/fetch/requestStorage.ts +2 -10
  29. package/package.json +67 -24
  30. package/server/akanApp.ts +2 -5
  31. package/server/akanLib.ts +0 -1
  32. package/server/akanServer.ts +3 -4
  33. package/server/artifact/builderRpc.ts +2 -2
  34. package/server/artifact/ipcTypes.ts +0 -4
  35. package/server/decorators.ts +1 -1
  36. package/server/di/diLifecycle.ts +3 -6
  37. package/server/hmr/clientScript.ts +2 -20
  38. package/server/hmr/devHmrController.ts +0 -4
  39. package/server/processMetricsCollector.ts +1 -1
  40. package/server/resolver/database.resolver.ts +2 -2
  41. package/server/resolver/resolver.contract.fixture.ts +0 -1
  42. package/server/resolver/signal.resolver.ts +2 -10
  43. package/server/routing/apiRouter.ts +2 -4
  44. package/server/rscClient.tsx +1 -7
  45. package/server/rscWorkerHost.ts +11 -33
  46. package/server/ssrFromRscRenderer.tsx +3 -35
  47. package/server/types/react-server-dom-webpack.d.ts +1 -7
  48. package/server/vendor/react-dom-client.ts +1 -1
  49. package/server/vendor/react-dom.ts +2 -3
  50. package/server/vendor/react-jsx-dev-runtime.ts +1 -1
  51. package/server/vendor/react-jsx-runtime.ts +1 -1
  52. package/server/vendor/react-refresh-runtime.ts +2 -2
  53. package/server/vendor/react-server-dom-webpack-client-browser.ts +1 -1
  54. package/server/vendor/react.ts +2 -9
  55. package/server/vendor/scheduler.ts +2 -3
  56. package/server/webRouter.ts +2 -3
  57. package/service/adapt.ts +1 -5
  58. package/service/predefinedAdaptor/cache.adaptor.ts +1 -2
  59. package/service/predefinedAdaptor/database.adaptor.ts +2 -2
  60. package/service/predefinedAdaptor/solidSqlite.ts +1 -2
  61. package/service/predefinedAdaptor/websocket.adaptor.ts +3 -15
  62. package/service/serve.ts +3 -7
  63. package/signal/base.signal.ts +0 -1
  64. package/signal/endpointInfo.ts +0 -7
  65. package/signal/intercept.ts +0 -2
  66. package/signal/middleware.ts +1 -2
  67. package/signal/serverSignal.ts +1 -15
  68. package/signal/signalContext.ts +1 -1
  69. package/signal/signalRegistry.ts +0 -5
  70. package/signal/sliceInfo.ts +0 -3
  71. package/signal/trace.ts +0 -11
  72. package/signal/types.ts +2 -11
  73. package/store/action.ts +3 -5
  74. package/store/stateBuilder.ts +0 -2
  75. package/store/stateInfo.ts +1 -2
  76. package/store/types.ts +1 -1
  77. package/test/playwright.config.base.ts +5 -28
  78. package/test/playwright.pageAgent.ts +1 -1
  79. package/test/sampleOf.ts +1 -1
  80. package/test/testServer.ts +1 -1
  81. package/types/base/base.d.ts +53 -0
  82. package/types/base/baseEnv.d.ts +68 -0
  83. package/types/base/index.d.ts +6 -0
  84. package/types/base/primitiveRegistry.d.ts +134 -0
  85. package/types/base/symbols.d.ts +11 -0
  86. package/types/base/types.d.ts +68 -0
  87. package/types/base/utils.d.ts +4 -0
  88. package/types/base.d.ts +1 -0
  89. package/types/capacitor.base.config.d.ts +3 -0
  90. package/types/client/capacitor.d.ts +233 -0
  91. package/types/client/clientRuntime.d.ts +63 -0
  92. package/types/client/cookie.d.ts +33 -0
  93. package/types/client/createFont.d.ts +6 -0
  94. package/types/client/csrTypes.d.ts +262 -0
  95. package/types/client/decorators.d.ts +7 -0
  96. package/types/client/device.d.ts +41 -0
  97. package/types/client/fetch.d.ts +1 -0
  98. package/types/client/index.d.ts +14 -0
  99. package/types/client/locale.d.ts +5 -0
  100. package/types/client/makePageProto.d.ts +17002 -0
  101. package/types/client/router.d.ts +66 -0
  102. package/types/client/rscNavigation.d.ts +19 -0
  103. package/types/client/storage.d.ts +5 -0
  104. package/types/client/translator.d.ts +18 -0
  105. package/types/client/types.d.ts +145 -0
  106. package/types/client/useClient.d.ts +1 -0
  107. package/types/client.d.ts +1 -0
  108. package/types/common/Logger.d.ts +41 -0
  109. package/types/common/applyMixins.d.ts +3 -0
  110. package/types/common/capitalize.d.ts +2 -0
  111. package/types/common/deepObjectify.d.ts +4 -0
  112. package/types/common/fileUpload.d.ts +28 -0
  113. package/types/common/formatNumber.d.ts +1 -0
  114. package/types/common/formatPhone.d.ts +2 -0
  115. package/types/common/getAllPropertyDescriptors.d.ts +5 -0
  116. package/types/common/hmrPhase.d.ts +6 -0
  117. package/types/common/httpClient.d.ts +20 -0
  118. package/types/common/index.d.ts +29 -0
  119. package/types/common/isDayjs.d.ts +2 -0
  120. package/types/common/isEmail.d.ts +2 -0
  121. package/types/common/isPhoneNumber.d.ts +2 -0
  122. package/types/common/isQueryEqual.d.ts +1 -0
  123. package/types/common/isValidDate.d.ts +2 -0
  124. package/types/common/jwtDecode.d.ts +2 -0
  125. package/types/common/localeConfig.d.ts +11 -0
  126. package/types/common/lowerlize.d.ts +2 -0
  127. package/types/common/mergeVersion.d.ts +10 -0
  128. package/types/common/objectify.d.ts +1 -0
  129. package/types/common/pathGet.d.ts +1 -0
  130. package/types/common/pathSet.d.ts +3 -0
  131. package/types/common/randomPick.d.ts +1 -0
  132. package/types/common/randomPicks.d.ts +1 -0
  133. package/types/common/routeConvention.d.ts +35 -0
  134. package/types/common/sleep.d.ts +2 -0
  135. package/types/common/splitVersion.d.ts +11 -0
  136. package/types/common/subRoute.d.ts +7 -0
  137. package/types/common/types.d.ts +14 -0
  138. package/types/common.d.ts +1 -0
  139. package/types/constant/constantRegistry.d.ts +89 -0
  140. package/types/constant/crystalize.d.ts +4 -0
  141. package/types/constant/deserialize.d.ts +7 -0
  142. package/types/constant/fieldInfo.d.ts +153 -0
  143. package/types/constant/getDefault.d.ts +3 -0
  144. package/types/constant/immerify.d.ts +2 -0
  145. package/types/constant/index.d.ts +10 -0
  146. package/types/constant/purify.d.ts +12 -0
  147. package/types/constant/serialize.d.ts +11 -0
  148. package/types/constant/types.d.ts +77 -0
  149. package/types/constant/via.d.ts +52 -0
  150. package/types/constant.d.ts +1 -0
  151. package/types/dictionary/base.dictionary.d.ts +1 -0
  152. package/types/dictionary/dictInfo.d.ts +206 -0
  153. package/types/dictionary/dictionary.d.ts +11 -0
  154. package/types/dictionary/index.d.ts +4 -0
  155. package/types/dictionary/locale.d.ts +128 -0
  156. package/types/dictionary/trans.d.ts +82 -0
  157. package/types/dictionary.d.ts +1 -0
  158. package/types/document/by.d.ts +20 -0
  159. package/types/document/dataLoader.d.ts +36 -0
  160. package/types/document/database.d.ts +96 -0
  161. package/types/document/databaseRegistry.d.ts +36 -0
  162. package/types/document/documentQuery.d.ts +105 -0
  163. package/types/document/documentSchema.d.ts +33 -0
  164. package/types/document/filterMeta.d.ts +84 -0
  165. package/types/document/index.d.ts +11 -0
  166. package/types/document/into.d.ts +65 -0
  167. package/types/document/loaderInfo.d.ts +35 -0
  168. package/types/document/schema.d.ts +5 -0
  169. package/types/document/types.d.ts +36 -0
  170. package/types/document.d.ts +1 -0
  171. package/types/fetch/client/fetchClient.d.ts +78 -0
  172. package/types/fetch/client/httpClient.d.ts +39 -0
  173. package/types/fetch/client/index.d.ts +3 -0
  174. package/types/fetch/client/wsClient.d.ts +37 -0
  175. package/types/fetch/client.d.ts +1 -0
  176. package/types/fetch/fetchType/appliedReturn.type.d.ts +67 -0
  177. package/types/fetch/fetchType/buildFetch.type.d.ts +11 -0
  178. package/types/fetch/fetchType/clientSignal.type.d.ts +16 -0
  179. package/types/fetch/fetchType/endpointFetch.type.d.ts +29 -0
  180. package/types/fetch/fetchType/index.d.ts +5 -0
  181. package/types/fetch/fetchType/sliceFetch.type.d.ts +76 -0
  182. package/types/fetch/fetchType.d.ts +1 -0
  183. package/types/fetch/index.d.ts +4 -0
  184. package/types/fetch/requestStorage.d.ts +29 -0
  185. package/types/fetch/serializer/fetch.serializer.d.ts +14 -0
  186. package/types/fetch/serializer/index.d.ts +1 -0
  187. package/types/fetch/serializer.d.ts +1 -0
  188. package/types/fetch/types.d.ts +19 -0
  189. package/types/fetch.d.ts +1 -0
  190. package/types/index.d.ts +213 -0
  191. package/types/server/akanApp.d.ts +17 -0
  192. package/types/server/akanAppHeaders.d.ts +1 -0
  193. package/types/server/akanLib.d.ts +33 -0
  194. package/types/server/akanOption.d.ts +15 -0
  195. package/types/server/akanServer.d.ts +47 -0
  196. package/types/server/artifact/builderRpc.d.ts +42 -0
  197. package/types/server/artifact/index.d.ts +6 -0
  198. package/types/server/artifact/ipcTypes.d.ts +73 -0
  199. package/types/server/artifact/manifestTypes.d.ts +16 -0
  200. package/types/server/artifact/routeClientCache.d.ts +45 -0
  201. package/types/server/artifact/routeSeedIndexStore.d.ts +43 -0
  202. package/types/server/artifact/routesManifestStore.d.ts +16 -0
  203. package/types/server/artifact.d.ts +1 -0
  204. package/types/server/decorators.d.ts +6 -0
  205. package/types/server/di/diLifecycle.d.ts +45 -0
  206. package/types/server/di/index.d.ts +4 -0
  207. package/types/server/di/predefinedAdaptor.d.ts +33 -0
  208. package/types/server/di/resolveAdaptorHierarchy.d.ts +21 -0
  209. package/types/server/di/resolveHierarchy.d.ts +11 -0
  210. package/types/server/di/resolveServiceHierarchy.d.ts +13 -0
  211. package/types/server/di/utils.d.ts +14 -0
  212. package/types/server/di.d.ts +1 -0
  213. package/types/server/hmr/changeBatch.d.ts +13 -0
  214. package/types/server/hmr/clientScript.d.ts +1 -0
  215. package/types/server/hmr/devHmrController.d.ts +24 -0
  216. package/types/server/hmr/index.d.ts +4 -0
  217. package/types/server/hmr/wsHub.d.ts +45 -0
  218. package/types/server/hmr.d.ts +1 -0
  219. package/types/server/imageOptimizer.d.ts +12 -0
  220. package/types/server/imageOptimizerError.d.ts +4 -0
  221. package/types/server/index.d.ts +14 -0
  222. package/types/server/lifecycle/shutdownManager.d.ts +13 -0
  223. package/types/server/logging/rotatingLogWriter.d.ts +20 -0
  224. package/types/server/processMetricsCollector.d.ts +10 -0
  225. package/types/server/proxy/akanResponse.d.ts +7 -0
  226. package/types/server/proxy/bunRequestFields.d.ts +1 -0
  227. package/types/server/proxy/hostBasePathWebProxy.d.ts +6 -0
  228. package/types/server/proxy/index.d.ts +6 -0
  229. package/types/server/proxy/localeWebProxy.d.ts +5 -0
  230. package/types/server/proxy/types.d.ts +37 -0
  231. package/types/server/proxy/webProxyRunner.d.ts +7 -0
  232. package/types/server/proxy.d.ts +1 -0
  233. package/types/server/resolver/database.resolver.d.ts +6 -0
  234. package/types/server/resolver/index.d.ts +3 -0
  235. package/types/server/resolver/service.resolver.d.ts +7 -0
  236. package/types/server/resolver/signal.resolver.d.ts +29 -0
  237. package/types/server/resolver.d.ts +1 -0
  238. package/types/server/robots.d.ts +1 -0
  239. package/types/server/routeElementComposer.d.ts +41 -0
  240. package/types/server/routeTreeBuilder.d.ts +28 -0
  241. package/types/server/routing/apiRouter.d.ts +61 -0
  242. package/types/server/rscClient.d.ts +15 -0
  243. package/types/server/rscWorker.d.ts +3 -0
  244. package/types/server/rscWorkerHost.d.ts +83 -0
  245. package/types/server/sitemap.d.ts +13 -0
  246. package/types/server/ssrFromRscRenderer.d.ts +6 -0
  247. package/types/server/ssrTypes.d.ts +47 -0
  248. package/types/server/systemPages.d.ts +27 -0
  249. package/types/server/types/react-server-dom-webpack.d.ts +91 -0
  250. package/types/server/types.d.ts +67 -0
  251. package/types/server/vendor/akanjs-base.d.ts +1 -0
  252. package/types/server/vendor/akanjs-common.d.ts +1 -0
  253. package/types/server/vendor/akanjs-constant.d.ts +1 -0
  254. package/types/server/vendor/akanjs-store.d.ts +1 -0
  255. package/types/server/vendor/react-dom-client.d.ts +3 -0
  256. package/types/server/vendor/react-dom.d.ts +3 -0
  257. package/types/server/vendor/react-jsx-dev-runtime.d.ts +3 -0
  258. package/types/server/vendor/react-jsx-runtime.d.ts +3 -0
  259. package/types/server/vendor/react-refresh-runtime.d.ts +3 -0
  260. package/types/server/vendor/react-server-dom-webpack-client-browser.d.ts +3 -0
  261. package/types/server/vendor/react.d.ts +11 -0
  262. package/types/server/vendor/scheduler.d.ts +3 -0
  263. package/types/server/webRouter.d.ts +44 -0
  264. package/types/server.d.ts +1 -0
  265. package/types/service/adapt.d.ts +15 -0
  266. package/types/service/base.service.d.ts +18 -0
  267. package/types/service/index.d.ts +10 -0
  268. package/types/service/injectInfo.d.ts +102 -0
  269. package/types/service/ipcTypes.d.ts +194 -0
  270. package/types/service/predefinedAdaptor/cache.adaptor.d.ts +46 -0
  271. package/types/service/predefinedAdaptor/compress.adaptor.d.ts +22 -0
  272. package/types/service/predefinedAdaptor/database.adaptor.d.ts +329 -0
  273. package/types/service/predefinedAdaptor/index.d.ts +13 -0
  274. package/types/service/predefinedAdaptor/logging.adaptor.d.ts +20 -0
  275. package/types/service/predefinedAdaptor/queue.adaptor.d.ts +22 -0
  276. package/types/service/predefinedAdaptor/role.adaptor.d.ts +17 -0
  277. package/types/service/predefinedAdaptor/schedule.adaptor.d.ts +60 -0
  278. package/types/service/predefinedAdaptor/solidCache.adaptor.d.ts +25 -0
  279. package/types/service/predefinedAdaptor/solidPubsub.adaptor.d.ts +20 -0
  280. package/types/service/predefinedAdaptor/solidQueue.adaptor.d.ts +19 -0
  281. package/types/service/predefinedAdaptor/solidSqlite.d.ts +24 -0
  282. package/types/service/predefinedAdaptor/sqlitePath.d.ts +9 -0
  283. package/types/service/predefinedAdaptor/storage.adaptor.d.ts +80 -0
  284. package/types/service/predefinedAdaptor/websocket.adaptor.d.ts +49 -0
  285. package/types/service/predefinedAdaptor.d.ts +1 -0
  286. package/types/service/serve.d.ts +31 -0
  287. package/types/service/serviceModule.d.ts +50 -0
  288. package/types/service/serviceRegistry.d.ts +9 -0
  289. package/types/service/types.d.ts +55 -0
  290. package/types/service.d.ts +1 -0
  291. package/types/signal/base.signal.d.ts +41 -0
  292. package/types/signal/endpoint.d.ts +28 -0
  293. package/types/signal/endpointInfo.d.ts +77 -0
  294. package/types/signal/exception.d.ts +54786 -0
  295. package/types/signal/guard.d.ts +10 -0
  296. package/types/signal/guards.d.ts +10 -0
  297. package/types/signal/index.d.ts +19 -0
  298. package/types/signal/intercept.d.ts +17 -0
  299. package/types/signal/internal.d.ts +18 -0
  300. package/types/signal/internalArg.d.ts +31 -0
  301. package/types/signal/internalInfo.d.ts +45 -0
  302. package/types/signal/middleware.d.ts +51 -0
  303. package/types/signal/serializer/fetch.serializer.d.ts +14 -0
  304. package/types/signal/serializer/index.d.ts +1 -0
  305. package/types/signal/serializer.d.ts +1 -0
  306. package/types/signal/serverSignal.d.ts +36 -0
  307. package/types/signal/signalContext.d.ts +96 -0
  308. package/types/signal/signalRegistry.d.ts +49 -0
  309. package/types/signal/slice.d.ts +42 -0
  310. package/types/signal/sliceInfo.d.ts +51 -0
  311. package/types/signal/trace.d.ts +97 -0
  312. package/types/signal/types.d.ts +142 -0
  313. package/types/signal.d.ts +1 -0
  314. package/types/store/action.d.ts +145 -0
  315. package/types/store/baseSt.d.ts +412 -0
  316. package/types/store/hooks.d.ts +1 -0
  317. package/types/store/index.d.ts +8 -0
  318. package/types/store/rootStore.d.ts +22 -0
  319. package/types/store/state.d.ts +91 -0
  320. package/types/store/stateBuilder.d.ts +141 -0
  321. package/types/store/stateInfo.d.ts +23 -0
  322. package/types/store/store.d.ts +36 -0
  323. package/types/store/storeInstance.d.ts +38 -0
  324. package/types/store/storeRegistry.d.ts +13 -0
  325. package/types/store/types.d.ts +42 -0
  326. package/types/store/withSelector.d.ts +42 -0
  327. package/types/store.d.ts +1 -0
  328. package/types/test/index.d.ts +4 -0
  329. package/types/test/playwright.config.base.d.ts +9 -0
  330. package/types/test/playwright.pageAgent.d.ts +12 -0
  331. package/types/test/sample.d.ts +15 -0
  332. package/types/test/sampleOf.d.ts +5 -0
  333. package/types/test/signalTest.preload.d.ts +1 -0
  334. package/types/test/signalTestRuntime.d.ts +29 -0
  335. package/types/test/testServer.d.ts +26 -0
  336. package/types/test.d.ts +1 -0
  337. package/types/ui/BottomSheet.d.ts +13 -0
  338. package/types/ui/Button.d.ts +11 -0
  339. package/types/ui/ClientSide.d.ts +8 -0
  340. package/types/ui/Clipboard.d.ts +7 -0
  341. package/types/ui/Constant/Doc.d.ts +29 -0
  342. package/types/ui/Constant/Mermaid.d.ts +8 -0
  343. package/types/ui/Constant/index.d.ts +6 -0
  344. package/types/ui/Constant/schemaDoc.d.ts +84 -0
  345. package/types/ui/Constant.d.ts +1 -0
  346. package/types/ui/Copy.d.ts +10 -0
  347. package/types/ui/CsrImage.d.ts +18 -0
  348. package/types/ui/Data/CardList.d.ts +36 -0
  349. package/types/ui/Data/Dashboard.d.ts +11 -0
  350. package/types/ui/Data/Insight.d.ts +9 -0
  351. package/types/ui/Data/Item.d.ts +75 -0
  352. package/types/ui/Data/ListContainer.d.ts +49 -0
  353. package/types/ui/Data/Pagination.d.ts +9 -0
  354. package/types/ui/Data/QueryMaker.d.ts +8 -0
  355. package/types/ui/Data/TableList.d.ts +26 -0
  356. package/types/ui/Data/index.d.ts +9 -0
  357. package/types/ui/Data/index_.d.ts +8 -0
  358. package/types/ui/Data.d.ts +1 -0
  359. package/types/ui/DatePicker.d.ts +36 -0
  360. package/types/ui/Dialog/Action.d.ts +5 -0
  361. package/types/ui/Dialog/Close.d.ts +6 -0
  362. package/types/ui/Dialog/Content.d.ts +6 -0
  363. package/types/ui/Dialog/Modal.d.ts +9 -0
  364. package/types/ui/Dialog/Provider.d.ts +11 -0
  365. package/types/ui/Dialog/Title.d.ts +5 -0
  366. package/types/ui/Dialog/Trigger.d.ts +6 -0
  367. package/types/ui/Dialog/context.d.ts +10 -0
  368. package/types/ui/Dialog/index.d.ts +9 -0
  369. package/types/ui/Dialog.d.ts +1 -0
  370. package/types/ui/DragAction.d.ts +24 -0
  371. package/types/ui/DraggableList.d.ts +31 -0
  372. package/types/ui/Dropdown.d.ts +14 -0
  373. package/types/ui/Empty.d.ts +12 -0
  374. package/types/ui/Field.d.ts +411 -0
  375. package/types/ui/FontFace.d.ts +6 -0
  376. package/types/ui/Image.d.ts +49 -0
  377. package/types/ui/InfiniteScroll.d.ts +10 -0
  378. package/types/ui/Input.d.ts +95 -0
  379. package/types/ui/KeyboardAvoiding.d.ts +8 -0
  380. package/types/ui/Layout/BottomAction.d.ts +6 -0
  381. package/types/ui/Layout/BottomInset.d.ts +7 -0
  382. package/types/ui/Layout/BottomTab.d.ts +14 -0
  383. package/types/ui/Layout/Header.d.ts +8 -0
  384. package/types/ui/Layout/LeftSider.d.ts +9 -0
  385. package/types/ui/Layout/Navbar.d.ts +11 -0
  386. package/types/ui/Layout/RightSider.d.ts +10 -0
  387. package/types/ui/Layout/Sider.d.ts +7 -0
  388. package/types/ui/Layout/Template.d.ts +7 -0
  389. package/types/ui/Layout/TopLeftAction.d.ts +6 -0
  390. package/types/ui/Layout/Unit.d.ts +9 -0
  391. package/types/ui/Layout/View.d.ts +8 -0
  392. package/types/ui/Layout/Zone.d.ts +6 -0
  393. package/types/ui/Layout/index.d.ts +14 -0
  394. package/types/ui/Layout.d.ts +1 -0
  395. package/types/ui/Link/Back.d.ts +7 -0
  396. package/types/ui/Link/Close.d.ts +7 -0
  397. package/types/ui/Link/CsrLink.d.ts +2 -0
  398. package/types/ui/Link/Lang.d.ts +8 -0
  399. package/types/ui/Link/SsrLink.d.ts +2 -0
  400. package/types/ui/Link/index.d.ts +10 -0
  401. package/types/ui/Link/types.d.ts +42 -0
  402. package/types/ui/Link.d.ts +1 -0
  403. package/types/ui/Load/Edit.d.ts +4 -0
  404. package/types/ui/Load/Edit_Client.d.ts +27 -0
  405. package/types/ui/Load/Page.d.ts +15 -0
  406. package/types/ui/Load/PageCSR.d.ts +3 -0
  407. package/types/ui/Load/Pagination.d.ts +8 -0
  408. package/types/ui/Load/Units.d.ts +30 -0
  409. package/types/ui/Load/View.d.ts +22 -0
  410. package/types/ui/Load/index.d.ts +8 -0
  411. package/types/ui/Load/index_.d.ts +3 -0
  412. package/types/ui/Load.d.ts +1 -0
  413. package/types/ui/Loading/Area.d.ts +1 -0
  414. package/types/ui/Loading/Button.d.ts +7 -0
  415. package/types/ui/Loading/Input.d.ts +7 -0
  416. package/types/ui/Loading/ProgressBar.d.ts +6 -0
  417. package/types/ui/Loading/Skeleton.d.ts +7 -0
  418. package/types/ui/Loading/Spin.d.ts +7 -0
  419. package/types/ui/Loading/index.d.ts +8 -0
  420. package/types/ui/Loading.d.ts +1 -0
  421. package/types/ui/Menu.d.ts +26 -0
  422. package/types/ui/Modal.d.ts +19 -0
  423. package/types/ui/Model/AdminPanel.d.ts +31 -0
  424. package/types/ui/Model/Edit.d.ts +16 -0
  425. package/types/ui/Model/EditModal.d.ts +52 -0
  426. package/types/ui/Model/EditWrapper.d.ts +13 -0
  427. package/types/ui/Model/LoadInit.d.ts +10 -0
  428. package/types/ui/Model/New.d.ts +16 -0
  429. package/types/ui/Model/NewWrapper.d.ts +13 -0
  430. package/types/ui/Model/NewWrapper_Client.d.ts +13 -0
  431. package/types/ui/Model/Remove.d.ts +13 -0
  432. package/types/ui/Model/RemoveWrapper.d.ts +12 -0
  433. package/types/ui/Model/SureToRemove.d.ts +11 -0
  434. package/types/ui/Model/View.d.ts +19 -0
  435. package/types/ui/Model/ViewEditModal.d.ts +12 -0
  436. package/types/ui/Model/ViewModal.d.ts +14 -0
  437. package/types/ui/Model/ViewWrapper.d.ts +12 -0
  438. package/types/ui/Model/index.d.ts +16 -0
  439. package/types/ui/Model/index_.d.ts +14 -0
  440. package/types/ui/Model.d.ts +1 -0
  441. package/types/ui/More.d.ts +12 -0
  442. package/types/ui/ObjectId.d.ts +5 -0
  443. package/types/ui/Pagination.d.ts +20 -0
  444. package/types/ui/Popconfirm.d.ts +28 -0
  445. package/types/ui/Portal.d.ts +6 -0
  446. package/types/ui/Radio.d.ts +19 -0
  447. package/types/ui/RecentTime.d.ts +12 -0
  448. package/types/ui/Refresh.d.ts +7 -0
  449. package/types/ui/ScreenNavigator.d.ts +18 -0
  450. package/types/ui/Select.d.ts +43 -0
  451. package/types/ui/Signal/Arg.d.ts +78 -0
  452. package/types/ui/Signal/Doc.d.ts +33 -0
  453. package/types/ui/Signal/Listener.d.ts +9 -0
  454. package/types/ui/Signal/Message.d.ts +23 -0
  455. package/types/ui/Signal/Object.d.ts +20 -0
  456. package/types/ui/Signal/PubSub.d.ts +24 -0
  457. package/types/ui/Signal/Request.d.ts +8 -0
  458. package/types/ui/Signal/Response.d.ts +14 -0
  459. package/types/ui/Signal/RestApi.d.ts +40 -0
  460. package/types/ui/Signal/WebSocket.d.ts +11 -0
  461. package/types/ui/Signal/index.d.ts +18 -0
  462. package/types/ui/Signal/makeExample.d.ts +4 -0
  463. package/types/ui/Signal/style.d.ts +15 -0
  464. package/types/ui/Signal.d.ts +1 -0
  465. package/types/ui/System/CSR.d.ts +32 -0
  466. package/types/ui/System/Client.d.ts +47 -0
  467. package/types/ui/System/Common.d.ts +47 -0
  468. package/types/ui/System/DevModeToggle.d.ts +1 -0
  469. package/types/ui/System/Gtag.d.ts +4 -0
  470. package/types/ui/System/Messages.d.ts +1 -0
  471. package/types/ui/System/Reconnect.d.ts +1 -0
  472. package/types/ui/System/Root.d.ts +6 -0
  473. package/types/ui/System/SSR.d.ts +24 -0
  474. package/types/ui/System/SelectLanguage.d.ts +5 -0
  475. package/types/ui/System/ThemeToggle.d.ts +4 -0
  476. package/types/ui/System/index.d.ts +12 -0
  477. package/types/ui/System.d.ts +1 -0
  478. package/types/ui/Tab/Menu.d.ts +12 -0
  479. package/types/ui/Tab/Menus.d.ts +6 -0
  480. package/types/ui/Tab/Panel.d.ts +8 -0
  481. package/types/ui/Tab/Provider.d.ts +10 -0
  482. package/types/ui/Tab/context.d.ts +9 -0
  483. package/types/ui/Tab/index.d.ts +7 -0
  484. package/types/ui/Tab.d.ts +1 -0
  485. package/types/ui/Table.d.ts +41 -0
  486. package/types/ui/ToggleSelect.d.ts +33 -0
  487. package/types/ui/Unauthorized.d.ts +9 -0
  488. package/types/ui/animated.d.ts +5 -0
  489. package/types/ui/fontCss.d.ts +11 -0
  490. package/types/ui/index.d.ts +44 -0
  491. package/types/ui.d.ts +1 -0
  492. package/types/webkit/bootCsr.d.ts +16 -0
  493. package/types/webkit/createRobotPage.d.ts +15 -0
  494. package/types/webkit/createSitemapPage.d.ts +4 -0
  495. package/types/webkit/index.d.ts +17 -0
  496. package/types/webkit/lazy.d.ts +11 -0
  497. package/types/webkit/types.d.ts +7 -0
  498. package/types/webkit/useCamera.d.ts +19 -0
  499. package/types/webkit/useCodepush.d.ts +16 -0
  500. package/types/webkit/useContact.d.ts +11 -0
  501. package/types/webkit/useCsrValues.d.ts +30 -0
  502. package/types/webkit/useDebounce.d.ts +2 -0
  503. package/types/webkit/useFetch.d.ts +18 -0
  504. package/types/webkit/useGeoLocation.d.ts +8 -0
  505. package/types/webkit/useHistory.d.ts +23 -0
  506. package/types/webkit/useInterval.d.ts +2 -0
  507. package/types/webkit/useLocation.d.ts +8 -0
  508. package/types/webkit/usePurchase.d.ts +19 -0
  509. package/types/webkit/usePushNoti.d.ts +7 -0
  510. package/types/webkit/useThrottle.d.ts +2 -0
  511. package/types/webkit.d.ts +1 -0
  512. package/ui/BottomSheet.tsx +1 -1
  513. package/ui/Clipboard.tsx +1 -1
  514. package/ui/CsrImage.tsx +3 -14
  515. package/ui/Data/ListContainer.tsx +1 -1
  516. package/ui/Data/Pagination.tsx +1 -1
  517. package/ui/Data/QueryMaker.tsx +0 -339
  518. package/ui/Data/index.ts +0 -1
  519. package/ui/DatePicker.tsx +1 -95
  520. package/ui/Dialog/Modal.tsx +1 -1
  521. package/ui/DraggableList.tsx +5 -5
  522. package/ui/Field.tsx +2 -3
  523. package/ui/Image.tsx +2 -3
  524. package/ui/InfiniteScroll.tsx +0 -1
  525. package/ui/Input.tsx +1 -8
  526. package/ui/Layout/BottomTab.tsx +2 -2
  527. package/ui/Link/SsrLink.tsx +1 -2
  528. package/ui/Load/Page.tsx +1 -1
  529. package/ui/Load/PageCSR.tsx +0 -1
  530. package/ui/Load/Units.tsx +1 -2
  531. package/ui/Load/View.tsx +1 -2
  532. package/ui/Menu.tsx +5 -8
  533. package/ui/Model/EditModal.tsx +2 -5
  534. package/ui/Popconfirm.tsx +2 -4
  535. package/ui/ScreenNavigator.tsx +2 -3
  536. package/ui/Signal/Message.tsx +2 -3
  537. package/ui/Signal/PubSub.tsx +0 -2
  538. package/ui/Signal/Response.tsx +1 -1
  539. package/ui/Signal/WebSocket.tsx +2 -11
  540. package/ui/System/Client.tsx +7 -41
  541. package/ui/System/Gtag.tsx +2 -5
  542. package/ui/System/Messages.tsx +2 -2
  543. package/ui/System/Reconnect.tsx +5 -6
  544. package/ui/System/Root.tsx +0 -1
  545. package/ui/System/SSR.tsx +1 -7
  546. package/ui/ToggleSelect.tsx +3 -8
  547. package/ui/Unauthorized.tsx +1 -1
  548. package/webkit/bootCsr.tsx +3 -6
  549. package/webkit/lazy.tsx +1 -8
  550. package/webkit/useCamera.tsx +0 -1
  551. package/webkit/useCodepush.tsx +4 -9
  552. package/webkit/useContact.tsx +0 -1
  553. package/webkit/useCsrValues.ts +6 -10
  554. package/webkit/useDebounce.ts +2 -2
  555. package/webkit/usePurchase.tsx +5 -9
  556. package/webkit/usePushNoti.tsx +0 -1
  557. package/base/base.test.ts +0 -135
  558. package/base/baseEnv.test.ts +0 -146
  559. package/base/primitiveRegistry.test.ts +0 -127
  560. package/base/symbols.test.ts +0 -29
  561. package/base/utils.test.ts +0 -30
  562. package/build.ts +0 -318
  563. package/capacitor.base.config.test.ts +0 -83
  564. package/client/client.auth-storage.test.ts +0 -210
  565. package/client/client.decorators.test.ts +0 -74
  566. package/client/client.device.test.ts +0 -181
  567. package/client/client.page.test.tsx +0 -175
  568. package/client/client.pure.test.ts +0 -146
  569. package/client/client.router.test.ts +0 -290
  570. package/common/Logger.test.ts +0 -45
  571. package/common/formatAndValidation.test.ts +0 -61
  572. package/common/httpClient.test.ts +0 -91
  573. package/common/objectPath.test.ts +0 -108
  574. package/common/routeConvention.test.ts +0 -132
  575. package/common/runtimeConfig.test.ts +0 -84
  576. package/constant/constant.test.ts +0 -374
  577. package/dictionary/dictionary.test.ts +0 -352
  578. package/document/document.test.ts +0 -698
  579. package/fetch/fetch.test.ts +0 -838
  580. package/server/akanApp.test.ts +0 -130
  581. package/server/akanServer.test.ts +0 -157
  582. package/server/artifact/routeClientCache.test.ts +0 -265
  583. package/server/artifact/routeSeedIndex.test.ts +0 -56
  584. package/server/artifact/routesManifest.test.ts +0 -64
  585. package/server/di/diLifecycle.contract.test.ts +0 -168
  586. package/server/logging/rotatingLogWriter.test.ts +0 -119
  587. package/server/processMetrics.test.ts +0 -24
  588. package/server/proxy/webProxyRunner.test.ts +0 -66
  589. package/server/resolver/resolver.contract.test.ts +0 -594
  590. package/server/robots.test.ts +0 -16
  591. package/server/routeTree.test.tsx +0 -198
  592. package/server/routing/apiRouter.test.ts +0 -136
  593. package/server/sitemap.test.ts +0 -61
  594. package/server/systemPages.test.tsx +0 -93
  595. package/server/webRouter.test.ts +0 -49
  596. package/service/predefinedAdaptor/compress.adaptor.test.ts +0 -184
  597. package/service/predefinedAdaptor/solidCache.adaptor.test.ts +0 -107
  598. package/service/predefinedAdaptor/solidSqlite.test.ts +0 -457
  599. package/service/service.test.ts +0 -732
  600. package/signal/signal.test.ts +0 -892
  601. package/store/stateBuilder.test.ts +0 -168
  602. package/store/store.test.ts +0 -427
  603. package/tsconfig.json +0 -5
  604. package/ui/Constant/schemaDoc.test.ts +0 -113
  605. package/ui/InfiniteScroll.test.tsx +0 -155
  606. package/ui/System/Common.test.ts +0 -37
  607. package/webkit/bootCsr.test.tsx +0 -153
  608. package/webkit/native.test.tsx +0 -341
  609. package/webkit/webkit.test.tsx +0 -531
@@ -98,9 +98,7 @@ export class RscWorker {
98
98
 
99
99
  #status: WorkerStatus = "starting";
100
100
  #killed = false;
101
- // Render sends issued while the worker is starting / restarting are queued
102
- // here and flushed on the next `ready`. Each closure re-checks `#pending` so
103
- // cancelled streams don't forward a stale request to the new worker.
101
+
104
102
  #queuedSends: Array<() => void> = [];
105
103
  #restartAttempts = 0;
106
104
  #restartCount = 0;
@@ -140,9 +138,7 @@ export class RscWorker {
140
138
 
141
139
  render(req: Request): ReadableStream<Uint8Array> {
142
140
  const requestId = crypto.randomUUID();
143
- // Serialize headers so the worker can rebuild a Request mirror inside its
144
- // own `requestStorage` scope. Without this, server components running in
145
- // the worker cannot read cookies/auth headers of the incoming request.
141
+
146
142
  const headers: Array<[string, string]> = [];
147
143
  req.headers.forEach((value, key) => {
148
144
  headers.push([key, value]);
@@ -156,10 +152,7 @@ export class RscWorker {
156
152
  onError: (msg) => controller.error(new Error(msg)),
157
153
  });
158
154
  const send = () => {
159
- // The stream may have been cancelled, or the worker may have died
160
- // again between queueing and flushing — both cases drop silently
161
- // (the pending entry is already gone / will be handled by the exit
162
- // path).
155
+
163
156
  if (!this.#pending.has(requestId)) return;
164
157
  try {
165
158
  this.#proc.send({ type: "render", requestId, url: req.url, method: req.method, headers });
@@ -312,8 +305,6 @@ export class RscWorker {
312
305
  try {
313
306
  this.#proc.send({ type: "updateCssAssets", cssAssets });
314
307
  } catch {
315
- // If the worker died mid-send we'll pick up the new value on the next
316
- // `hello` after restart; nothing to do here.
317
308
  }
318
309
  }
319
310
 
@@ -329,15 +320,10 @@ export class RscWorker {
329
320
  this.#cssAssets = input.cssAssets ?? this.#cssAssets;
330
321
  this.#pagesBundleBuildId = input.buildId;
331
322
  if (input.pagesBundlePath) this.#pagesBundlePath = input.pagesBundlePath;
332
- // While restarting / starting, the new worker will pick up the latest
333
- // `#clientManifest` / `#cssAssets` / `#pagesBundlePath` via the `init` reply
334
- // to its first `hello`, so callers don't need to wait on an explicit
335
- // `reloaded` ack.
323
+
336
324
  if (this.#status !== "ready") return Promise.resolve();
337
325
  return new Promise<void>((resolve, reject) => {
338
- // If a previous reload was still in flight, supersede it — the latest
339
- // build strictly implies the earlier one completed from the caller's
340
- // perspective.
326
+
341
327
  if (this.#pendingReload) this.#pendingReload.resolve();
342
328
  this.#pendingReload = { resolve, reject, targetBuildId: input.buildId };
343
329
  try {
@@ -386,10 +372,7 @@ export class RscWorker {
386
372
  if (proc !== this.#proc) return;
387
373
  switch (message.type) {
388
374
  case "hello":
389
- // Re-injecting `#clientManifest` / `#cssAssets` here is what makes crash
390
- // recovery transparent: after a respawn the new worker's first act is
391
- // to ask for config, and it receives the latest manifest the host has
392
- // accumulated via `reload(...)`.
375
+
393
376
  this.#proc.send({
394
377
  type: "init",
395
378
  clientManifest: this.#clientManifest,
@@ -434,8 +417,7 @@ export class RscWorker {
434
417
  return;
435
418
  case "error":
436
419
  if (message.requestId === "__init__") {
437
- // Init errors are surfaced on `ready` only for the very first spawn;
438
- // subsequent restarts swallow them and let exponential backoff retry.
420
+
439
421
  if (!this.#readyResolved) this.#rejectReady(new Error(String(message.message)));
440
422
  else this.#logger.error(`[rsc] worker init error on restart: ${message.message}`);
441
423
  return;
@@ -509,9 +491,7 @@ export class RscWorker {
509
491
  }
510
492
 
511
493
  #handleExit(proc: Bun.Subprocess<"ignore", "inherit", "inherit">, code: number | null): void {
512
- // Stale exits from a proc we've already replaced can still fire if the
513
- // old subprocess was slow to cleanup; ignore them so we don't
514
- // double-schedule a restart.
494
+
515
495
  if (proc !== this.#proc) return;
516
496
 
517
497
  const err = new Error(`rsc worker exited with code ${code}`);
@@ -521,8 +501,7 @@ export class RscWorker {
521
501
  this.#pendingReload.reject(err);
522
502
  this.#pendingReload = null;
523
503
  }
524
- // Drop any sends that were queued against the dead worker. Callers own
525
- // their streams and will see the `onError` above.
504
+
526
505
  this.#queuedSends = [];
527
506
 
528
507
  if (this.#killed) {
@@ -539,7 +518,7 @@ export class RscWorker {
539
518
  this.#status = "stopped";
540
519
  const msg = `[rsc] worker failed ${attempt} restarts; giving up. SSR will return errors until the server restarts.`;
541
520
  this.#logger.error(msg);
542
- // Surface a rejection on the initial `ready` if we never succeeded.
521
+
543
522
  this.#rejectReady(new Error(msg));
544
523
  return;
545
524
  }
@@ -609,10 +588,9 @@ export class RscWorker {
609
588
  const raw = fs.readFileSync(filePath, "utf8").trim();
610
589
  if (!raw || raw === "max") continue;
611
590
  const parsed = Number.parseInt(raw, 10);
612
- // Ignore host-level sentinel values that are effectively unlimited.
591
+
613
592
  if (Number.isFinite(parsed) && parsed > 0 && parsed < 1024 ** 5) return parsed;
614
593
  } catch {
615
- // cgroup files are best-effort; explicit env thresholds still work.
616
594
  }
617
595
  }
618
596
  return null;
@@ -12,11 +12,6 @@ export class SsrFromRscRenderer {
12
12
  ssrChunkCacheHitCount: 0,
13
13
  };
14
14
 
15
- // Inline bootstrap that runs as a classic script BEFORE any <script type="module">.
16
- // - Installs the webpack runtime shims that react-server-dom-webpack/client.browser
17
- // needs at module initialization time.
18
- // - Creates a tiny queue so <script>self.__RSC_PUSH__(...)</script> tags
19
- // emitted after the HTML shell can be buffered until rscClient picks them up.
20
15
  static readonly #clientBootstrap = `(function(){
21
16
  var registry = new Map();
22
17
  function load(id) {
@@ -58,8 +53,7 @@ export class SsrFromRscRenderer {
58
53
  }
59
54
 
60
55
  async render(input: SsrFromRscInput): Promise<ReadableStream<Uint8Array>> {
61
- // Split the RSC stream: one branch drives the server-side SSR render, the
62
- // other is relayed to the client as inline <script> tags for hydration.
56
+
63
57
  const [rscForSsr, rscForClient] = input.rscStream.tee();
64
58
 
65
59
  const ssrNodeStream = Readable.fromWeb(rscForSsr as never);
@@ -103,19 +97,6 @@ export class SsrFromRscRenderer {
103
97
  if (g.__rsc_ssr_shims_installed__) return;
104
98
  g.__rsc_ssr_shims_installed__ = true;
105
99
 
106
- // SSR-side webpack runtime shims. We use dynamic `import()` rather than
107
- // `require()` because client component chunks may transitively use
108
- // top-level await, which Bun's `require()` refuses to load.
109
- //
110
- // `chunks`/`id` entries in the ssrManifest are absolute filesystem paths
111
- // to server-importable client chunks. These may differ from the browser
112
- // chunks referenced by the Flight client manifest because the browser build
113
- // can rely on import maps while this SSR pass is loaded directly by Bun.
114
- // HMR cache-busting is filename-based: each rebuild emits a new
115
- // content-hashed chunk filename, which means a new import
116
- // specifier, which bypasses Bun's module cache naturally. The
117
- // `?v=<digits>` stripping below is defensive for any caller that still
118
- // appends a version query to keep the pre-existing registry keys stable.
119
100
  const registry = new Map<string, Record<string, unknown>>();
120
101
  g.__webpack_chunk_load__ = async (chunkId: string) => {
121
102
  if (registry.has(chunkId)) {
@@ -206,8 +187,7 @@ export class SsrFromRscRenderer {
206
187
  if (tail) controller.enqueue(encoder.encode(tail));
207
188
  return;
208
189
  }
209
- // `<head>` never appeared — e.g. error shell. Emit buffered bytes
210
- // verbatim so we don't swallow the document.
190
+
211
191
  const tail = decoder.decode();
212
192
  const rest = withHtmlTheme(buffered + tail);
213
193
  if (rest) controller.enqueue(encoder.encode(rest));
@@ -220,20 +200,10 @@ export class SsrFromRscRenderer {
220
200
  return value.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
221
201
  }
222
202
 
223
- // React-server-dom-webpack/server emits a Flight hint of the form
224
- // `:HL["<href>","stylesheet"]\n` for every `<link rel="stylesheet">` in the
225
- // server tree. That string is forwarded verbatim to the browser which then
226
- // calls `ReactDOM.preload(href, "stylesheet")`, creating an invalid
227
- // `<link rel="preload" as="stylesheet">` (valid preload `as` is `"style"`).
228
- // The SSR-side Fizz dispatcher happens to tolerate this, but Chromium logs
229
- // `<link rel=preload> must have a valid "as" value`. Rewrite the hint for
230
- // the browser-bound stream to use the spec-correct `"style"`; the SSR-bound
231
- // tee is left untouched so we don't alter React's server behavior.
232
203
  static #sanitizeFlightForClient(stream: ReadableStream<Uint8Array>): ReadableStream<Uint8Array> {
233
204
  const decoder = new TextDecoder();
234
205
  const encoder = new TextEncoder();
235
- // Matches just the trailing `,"stylesheet"]` of an HL hint line. The href is
236
- // left alone; only the `as` slot is rewritten.
206
+
237
207
  const hlStylesheetRe = /(:HL\["[^"\\]*(?:\\.[^"\\]*)*",)"stylesheet"(\])/g;
238
208
 
239
209
  return stream.pipeThrough(
@@ -283,8 +253,6 @@ export class SsrFromRscRenderer {
283
253
  reader.releaseLock();
284
254
  }
285
255
 
286
- // Inline RSC scripts must not be interleaved with arbitrary HTML bytes:
287
- // Fizz may split inside SVG path data or attributes, corrupting markup.
288
256
  const rscReader = rscClientStream.getReader();
289
257
  try {
290
258
  while (true) {
@@ -1,10 +1,4 @@
1
- // Minimal ambient declarations for the `react-server-dom-webpack` subpaths we
2
- // use. The upstream package ships runtime code only; no types are published.
3
- // We only declare the surface our SSR/RSC pipeline actually touches.
4
- //
5
- // This file is intentionally a top-level ambient declaration (no `import`/
6
- // `export` at file scope) so that TypeScript registers the module names below
7
- // globally.
1
+
8
2
 
9
3
  declare module "react-server-dom-webpack/server.node" {
10
4
  export interface ClientReferenceManifestEntry {
@@ -1,4 +1,4 @@
1
- // @ts-nocheck — see ./react.ts for the rationale.
1
+
2
2
  import * as m from "react-dom/client";
3
3
 
4
4
  export default m;
@@ -1,6 +1,5 @@
1
- // @ts-nocheck — see ./react.ts for the full rationale behind vendor entries
2
- // and why we enumerate named exports manually instead of relying on
3
- // `export * from "<cjs>"`.
1
+
2
+
4
3
  import * as m from "react-dom";
5
4
 
6
5
  export default m;
@@ -1,4 +1,4 @@
1
- // @ts-nocheck — see ./react.ts for the rationale.
1
+
2
2
  import * as m from "react/jsx-dev-runtime";
3
3
 
4
4
  export default m;
@@ -1,4 +1,4 @@
1
- // @ts-nocheck — see ./react.ts for the rationale.
1
+
2
2
  import * as m from "react/jsx-runtime";
3
3
 
4
4
  export default m;
@@ -1,5 +1,5 @@
1
- // @ts-nocheck — react-refresh/runtime ships implementation details without
2
- // stable ESM type declarations for the browser-side runtime surface.
1
+
2
+
3
3
  import * as m from "react-refresh/runtime";
4
4
 
5
5
  export default m;
@@ -1,4 +1,4 @@
1
- // @ts-nocheck — see ./react.ts for the rationale.
1
+
2
2
  import * as m from "react-server-dom-webpack/client.browser";
3
3
 
4
4
  export default m;
@@ -1,12 +1,5 @@
1
- // @ts-nocheck — `@types/react` declares its module via `export =`, which TS
2
- // refuses to combine with wildcard re-export forms. At bundle time Bun sees
3
- // the JS module (CJS) which does expose these named properties.
4
- //
5
- // We enumerate exports explicitly because Bun's `export * from "<cjs>"` only
6
- // emits an internal `__reExport` object and never generates top-level ESM
7
- // named bindings — so downstream chunks that `import { useState } from
8
- // "react"` would silently get `undefined`. See the importmap dedup story
9
- // in `vendorSpecifiers.ts` for the rationale behind these entries.
1
+
2
+
10
3
  import * as m from "react";
11
4
 
12
5
  export default m;
@@ -1,6 +1,5 @@
1
- // @ts-nocheck — `scheduler` ships no `.d.ts`, and see ./react.ts for the
2
- // rationale behind manual named re-exports (Bun's `export * from "<cjs>"`
3
- // doesn't emit ESM exports).
1
+
2
+
4
3
  import * as m from "scheduler";
5
4
 
6
5
  export default m;
@@ -437,12 +437,11 @@ export class WebRouter {
437
437
  const fwdProto = req.headers.get("x-forwarded-proto")?.split(",")[0]?.trim();
438
438
  const fwdHost = req.headers.get("x-forwarded-host")?.split(",")[0]?.trim();
439
439
  const hostFallback = fwdHost ?? req.headers.get("host");
440
- const protoFallback = fwdProto ?? parsed.protocol.slice(0, -1); // strip trailing ':'
440
+ const protoFallback = fwdProto ?? parsed.protocol.slice(0, -1);
441
441
  if (hostFallback && protoFallback) {
442
442
  try {
443
443
  return new URL(`${protoFallback}://${hostFallback}`).origin;
444
444
  } catch {
445
- /* fallthrough */
446
445
  }
447
446
  }
448
447
  return parsed.origin;
@@ -462,7 +461,7 @@ export class WebRouter {
462
461
  static #isTrustedRscTarget(clientOrigin: string, targetUrl: URL): boolean {
463
462
  try {
464
463
  if (targetUrl.origin === clientOrigin) return true;
465
- // TLS termination + missing/partial forwarded headers may skew scheme while hostname matches the public host.
464
+
466
465
  return targetUrl.hostname === new URL(clientOrigin).hostname;
467
466
  } catch {
468
467
  return false;
package/service/adapt.ts CHANGED
@@ -10,7 +10,7 @@ export interface Adaptor {
10
10
 
11
11
  export type AdaptorCls<
12
12
  Methods = any,
13
- // biome-ignore lint/complexity/noBannedTypes: `{}` keeps un-injected adaptor classes assignable.
13
+
14
14
  InjectMap extends Record<string, InjectInfo> = {},
15
15
  > = Cls<
16
16
  Methods & ExtractInjectInfoObject<InjectMap> & Adaptor,
@@ -22,7 +22,6 @@ export function adapt<Name extends string>(name: Name): AdaptorCls;
22
22
  export function adapt<Name extends string, Injection extends InjectBuilder<"use" | "env" | "memory" | "plug">>(
23
23
  name: Name,
24
24
  injectBuilder: Injection,
25
- // biome-ignore lint/complexity/noBannedTypes: `{}` preserves adaptor method inference for generated class types.
26
25
  ): AdaptorCls<{}, ReturnType<Injection>>;
27
26
 
28
27
  export function adapt(name: string, injectBuilder?: InjectBuilder) {
@@ -32,10 +31,8 @@ export function adapt(name: string, injectBuilder?: InjectBuilder) {
32
31
  static readonly [INJECT_META] = injectInfoMap;
33
32
  static readonly refName = name;
34
33
  async onInit() {
35
- //
36
34
  }
37
35
  async onDestroy() {
38
- //
39
36
  }
40
37
  }
41
38
  return Adaptor;
@@ -44,7 +41,6 @@ export function adapt(name: string, injectBuilder?: InjectBuilder) {
44
41
  export function dangerouslyAdapt<Name extends string, Injection extends InjectBuilder>(
45
42
  name: Name,
46
43
  injectBuilder: Injection,
47
- // biome-ignore lint/complexity/noBannedTypes: `{}` preserves adaptor method inference for generated class types.
48
44
  ): AdaptorCls<{}, ReturnType<Injection>>;
49
45
  export function dangerouslyAdapt(name: string, injectBuilder?: InjectBuilder) {
50
46
  return adapt(name, injectBuilder as InjectBuilder<"use" | "env" | "memory" | "plug">);
@@ -35,8 +35,7 @@ export class RedisCache
35
35
  operationMode,
36
36
  repoName,
37
37
  redis = {
38
- // username, // TODO: Implement username and password
39
- // password, // TODO: Implement username and password
38
+
40
39
  sshOptions: {
41
40
  host: `${appName}-${environment}.${serveDomain}`,
42
41
  port: 32767,
@@ -300,7 +300,7 @@ const jsonPath = (path: string) =>
300
300
  .map((part) => part.replaceAll('"', '\\"'))
301
301
  .join(".")}`;
302
302
  const encodeSqlValue = (value: unknown) => encodeDocumentValue(value);
303
- // Dates are persisted as epoch ms, but legacy rows may hold ISO strings; accept both.
303
+
304
304
  const decodeDateValue = (value: unknown) => {
305
305
  if (value === null || value === undefined) return value;
306
306
  if (typeof value === "number") return dayjs(value);
@@ -1128,7 +1128,7 @@ export class SqliteDocumentStore {
1128
1128
  private prepareReadStmt(sql: string) {
1129
1129
  const cached = this.#readStmtCache.get(sql);
1130
1130
  if (cached) return cached;
1131
- // Keep the cache bounded; list/find query shapes repeat heavily, while ad-hoc filters should not grow forever.
1131
+
1132
1132
  if (this.#readStmtCache.size >= 128) {
1133
1133
  const oldest = this.#readStmtCache.keys().next().value;
1134
1134
  if (oldest) this.#readStmtCache.delete(oldest);
@@ -67,8 +67,7 @@ export const encodeSolidValue = (value: unknown): { type: SolidValueType; value:
67
67
  if (Buffer.isBuffer(value)) return { type: "buffer", value };
68
68
  if (typeof value === "number") return { type: "number", value: String(value) };
69
69
  if (typeof value === "string") return { type: "string", value };
70
- // Objects, arrays, booleans, null: stored as JSON so callers can round-trip
71
- // structured values (e.g. refresh sessions) through the SQLite-backed cache.
70
+
72
71
  return { type: "json", value: JSON.stringify(value ?? null) };
73
72
  };
74
73
 
@@ -63,7 +63,7 @@ export class WebSocketRedisAdaptor
63
63
  #heartbeatInterval: Timer | null = null;
64
64
 
65
65
  override async onInit() {
66
- // Publisher lifecycle
66
+
67
67
  this.publisher.on("connect", () => {
68
68
  this.#publisherReady = true;
69
69
  this.logger.verbose("Publisher connected");
@@ -77,7 +77,6 @@ export class WebSocketRedisAdaptor
77
77
  this.logger.warn(`Publisher error: ${err.message}`);
78
78
  });
79
79
 
80
- // Subscriber lifecycle
81
80
  this.subscriber.on("error", (err: Error) => {
82
81
  this.logger.warn(`Subscriber error: ${err.message}`);
83
82
  });
@@ -85,7 +84,6 @@ export class WebSocketRedisAdaptor
85
84
  await this.publisher.connect();
86
85
  await this.subscriber.connect();
87
86
 
88
- // Subscribe to broadcast channel
89
87
  await this.subscriber.subscribe(BROADCAST_CHANNEL, (err?: Error | null) => {
90
88
  if (err) this.logger.warn(`Subscribe error: ${err.message}`);
91
89
  });
@@ -107,8 +105,6 @@ export class WebSocketRedisAdaptor
107
105
  }
108
106
  });
109
107
 
110
- // Server heartbeat — expire server key every 60s, refresh every 30s
111
- // If a pod crashes without graceful shutdown, its keys expire after 60s
112
108
  await this.redis.set(`${WEBSOCKET_PREFIX}server:${this.serverId}`, Date.now().toString(), "EX", 60);
113
109
  this.#heartbeatInterval = setInterval(async () => {
114
110
  try {
@@ -123,13 +119,12 @@ export class WebSocketRedisAdaptor
123
119
  }
124
120
 
125
121
  override async onDestroy() {
126
- // Stop heartbeat
122
+
127
123
  if (this.#heartbeatInterval) {
128
124
  clearInterval(this.#heartbeatInterval);
129
125
  this.#heartbeatInterval = null;
130
126
  }
131
127
 
132
- // Clean up all sockets registered to this server
133
128
  await this.#cleanupServer();
134
129
 
135
130
  if (this.subscriber) {
@@ -147,8 +142,6 @@ export class WebSocketRedisAdaptor
147
142
  this.logger.verbose("WebSocket Redis adaptor destroyed");
148
143
  }
149
144
 
150
- // ── Pub/Sub ──
151
-
152
145
  publish(roomId: string, data: unknown): void {
153
146
  const endpointKey = this.#getEndpointKey(roomId);
154
147
  const endpointInfo = endpointKey ? this.#endpointMap.get(endpointKey) : null;
@@ -187,8 +180,6 @@ export class WebSocketRedisAdaptor
187
180
  return idx >= 0 ? roomId.substring(0, idx) : roomId;
188
181
  }
189
182
 
190
- // ── Room membership ──
191
-
192
183
  async joinRoom(ws: Bun.ServerWebSocket<unknown>, room: string): Promise<void> {
193
184
  const socketId = this.#getSocketId(ws);
194
185
  const pipeline = this.redis.multi();
@@ -218,7 +209,6 @@ export class WebSocketRedisAdaptor
218
209
  await pipeline.exec();
219
210
  }
220
211
 
221
- // ── Socket registration ──
222
212
  #getSocketId(ws: Bun.ServerWebSocket<unknown>): string {
223
213
  const data = ws.data as WsSocketData;
224
214
  if (!data.socketId) data.socketId = `${this.serverId}-${Bun.randomUUIDv7()}`;
@@ -241,8 +231,6 @@ export class WebSocketRedisAdaptor
241
231
  await this.leaveAllRooms(ws);
242
232
  }
243
233
 
244
- // ── Internal helpers ──
245
-
246
234
  #packMessage(origin: string, roomId: string, payload: Buffer): Buffer {
247
235
  const originBuf = Buffer.from(origin, "utf-8");
248
236
  const roomIdBuf = Buffer.from(roomId, "utf-8");
@@ -306,7 +294,7 @@ export class WebSocketRedisAdaptor
306
294
  const sockets = await this.redis.smembers(`${WEBSOCKET_PREFIX}server:${this.serverId}:sockets`);
307
295
  const pipeline = this.redis.multi();
308
296
  for (const socketId of sockets) {
309
- // Get rooms for each socket and remove from room sets
297
+
310
298
  const rooms = await this.redis.smembers(`${WEBSOCKET_PREFIX}socket:${socketId}:rooms`);
311
299
  for (const room of rooms) {
312
300
  pipeline.srem(`${WEBSOCKET_PREFIX}room:${room}`, socketId);
package/service/serve.ts CHANGED
@@ -38,7 +38,7 @@ const avoidKeys = new Set([
38
38
 
39
39
  export interface Service {
40
40
  readonly logger: Logger;
41
- // readonly connection: Connection;
41
+
42
42
  onInit(): Promise<void>;
43
43
  _libsOnInit(): Promise<void>;
44
44
  onDestroy(): Promise<void>;
@@ -47,9 +47,9 @@ export interface Service {
47
47
 
48
48
  export type ServiceCls<
49
49
  RefName extends string = string,
50
- // biome-ignore lint/complexity/noBannedTypes: `{}` keeps generated service types from gaining object prototype keys.
50
+
51
51
  Methods = {},
52
- // biome-ignore lint/complexity/noBannedTypes: `{}` keeps services with no injections assignable.
52
+
53
53
  InjectMap extends { [key: string]: InjectInfo } = {},
54
54
  > = Cls<
55
55
  Methods & ExtractInjectInfoObject<InjectMap> & Service,
@@ -65,14 +65,12 @@ export function serve<RefName extends string, Injection extends InjectBuilder>(
65
65
  refName: RefName,
66
66
  injectBuilder: Injection,
67
67
  ...extendSrvs: Cls[]
68
- // biome-ignore lint/complexity/noBannedTypes: `{}` preserves plain service method inference.
69
68
  ): ServiceCls<RefName, {}, ReturnType<Injection>>;
70
69
  export function serve<RefName extends string, Injection extends InjectBuilder>(
71
70
  refName: RefName,
72
71
  option: ServiceOptions,
73
72
  injectBuilder: Injection,
74
73
  ...extendSrvs: Cls[]
75
- // biome-ignore lint/complexity/noBannedTypes: `{}` preserves plain service method inference.
76
74
  ): ServiceCls<RefName, {}, ReturnType<Injection>>;
77
75
  export function serve<
78
76
  T extends string,
@@ -155,10 +153,8 @@ export function serve(
155
153
  static [INJECT_META] = {};
156
154
  readonly logger = new Logger(this.constructor.name);
157
155
  async onInit() {
158
- //
159
156
  }
160
157
  async onDestroy() {
161
- //
162
158
  }
163
159
  };
164
160
  applyMixins(srvRef, extSrvs, avoidKeys);
@@ -27,7 +27,6 @@ export class BaseEndpoint extends endpoint(srv.base, ({ query, mutation, message
27
27
  .msg("data", String, { nullable: true })
28
28
  .exec((data) => `wsPing: ${data}`),
29
29
  pubsubPing: pubsub(String).exec(() => {
30
- //
31
30
  }),
32
31
  })) {}
33
32
 
@@ -324,9 +324,6 @@ export class EndpointInfo<
324
324
  }
325
325
  }
326
326
 
327
- // TODO: signal type 에 따라 기본 internal arg들 배정해주기
328
- // TODO: pubsub은 exec 없어도 되게하기
329
- // TODO: exec 없으면 타입에러 뜨게하기
330
327
  export type BuildEndpoint<SrvModule extends ServiceModel = ServiceModel> = {
331
328
  query: <Returns extends ConstantFieldTypeInput = ConstantFieldTypeInput, Nullable extends boolean = false>(
332
329
  returnRef: Returns,
@@ -357,10 +354,6 @@ export type EndpointBuilder<SrvModule extends ServiceModel = ServiceModel> = (bu
357
354
  [key: string]: EndpointInfo;
358
355
  };
359
356
 
360
- // --- Accessors ---
361
- // Named projections for EndpointInfo's 10 generics. Use these instead of
362
- // re-inferring the whole shape so that parameter-order refactors only need
363
- // to be reflected in one place.
364
357
  export type EndpInfoReqType<E> =
365
358
  E extends EndpointInfo<infer T, any, any, any, any, any, any, any, any, any> ? T : never;
366
359
  export type EndpInfoSrvs<E> = E extends EndpointInfo<any, infer S, any, any, any, any, any, any, any, any> ? S : never;
@@ -32,10 +32,8 @@ export function intercept(refName: string, injectBuilder?: InjectBuilder) {
32
32
  return Promise.resolve((res: Response) => Promise.resolve(res));
33
33
  }
34
34
  async onInit() {
35
- //
36
35
  }
37
36
  async onDestroy() {
38
- //
39
37
  }
40
38
  };
41
39
  }
@@ -63,7 +63,6 @@ export class Cache extends middleware("cache") {
63
63
  }
64
64
  traceCache(false);
65
65
 
66
- // Execute - middleware는 makeResponse 이전에 실행됨
67
66
  const result = await next();
68
67
 
69
68
  context.adaptor.logger.debug(`Caching result type ${context.key}: ${typeof result} / ${Array.isArray(result)}`);
@@ -102,7 +101,7 @@ export class Retry extends middleware("retry") {
102
101
  console.warn(`[${context.key}] Retry ${attempt + 1}/${maxRetries}:`, lastError.message);
103
102
 
104
103
  if (attempt < maxRetries - 1) {
105
- // Exponential backoff
104
+
106
105
  await new Promise((resolve) => setTimeout(resolve, 2 ** attempt * 100));
107
106
  }
108
107
  }
@@ -85,20 +85,6 @@ type ServerSignalClsStatics = {
85
85
  readonly [INTERNAL_META]: { [key: string]: InternalInfo };
86
86
  };
87
87
 
88
- // type ServerSignalClsStatics<EnpCls, IntCls> = EnpCls extends {
89
- // refName: infer RefName;
90
- // [ENDPOINT_META]: infer EndpointInfoObj;
91
- // }
92
- // ? IntCls extends { [ENDPOINT_META]: infer InternalInfoObj }
93
- // ? {
94
- // readonly refName: RefName;
95
- // readonly [ENDPOINT_META]: EndpointInfoObj;
96
- // readonly [ENDPOINT_META]: InternalInfoObj;
97
- // readonly [INJECT_META]: { queue: QueueAdaptor };
98
- // }
99
- // : never
100
- // : never;
101
-
102
88
  export type ServerSignalCls<EnpCls = any, IntCls = any> = AdaptorCls<
103
89
  EndpointServerSignalMethods<EnpCls> & InternalServerSignalMethods<IntCls> & ServerSignal
104
90
  > &
@@ -111,7 +97,7 @@ export const serverSignal = <EnpCls, IntCls>(
111
97
  ): ServerSignalCls<EnpCls, IntCls> => {
112
98
  const refName = (endpointRef as unknown as EndpointCls).refName.slice(0, -8);
113
99
  return class ServerSignal extends adapt(`${refName}Signal`, ({ plug }) => ({
114
- // websocket: use<ServerWebSocket>(),
100
+
115
101
  queue: plug(QueueAdaptorRole),
116
102
  })) {
117
103
  static readonly [ENDPOINT_META] = Object.fromEntries(
@@ -360,7 +360,7 @@ export class HttpExecutionContext<Appended = unknown> {
360
360
  async getArgs(endpointInfo: EndpointInfo): Promise<unknown[]> {
361
361
  if (endpointInfo.args.length === 0) return [];
362
362
  this.params = this.req.params;
363
- // TODO: Optimize the efficiency of this code
363
+
364
364
  const hasBodyArgs = endpointInfo.args.some((arg) => arg.type === "body");
365
365
  const hasUploadArgs = hasBodyArgs && endpointInfo.args.some((arg) => arg.type === "body" && arg.argRef === Upload);
366
366
  if (endpointInfo.type === "mutation" && hasBodyArgs && this.req.body) {
@@ -56,11 +56,6 @@ export class ServiceSignal<
56
56
  }
57
57
  }
58
58
 
59
- // TODO: add scalar signal for resolve field
60
- // export interface ScalarSignal {
61
- // internal: InternalCls;
62
- // }
63
-
64
59
  /** Registry for database and service signals used by routing and fetch serialization. */
65
60
  export class SignalRegistry {
66
61
  static readonly #database = new Map<string, DatabaseSignal<InternalCls, EndpointCls, SliceCls, ServerSignalCls>>();
@@ -202,9 +202,6 @@ export const buildSlice =
202
202
  signalOption,
203
203
  );
204
204
 
205
- // --- Accessors ---
206
- // Named projections for SliceInfo's 11 generics. Use these to avoid repeating
207
- // 11-slot `extends SliceInfo<any, any, ..., infer X, any, any>` patterns.
208
205
  export type SliceInfoRefName<S> =
209
206
  S extends SliceInfo<infer R, any, any, any, any, any, any, any, any, any, any> ? R : never;
210
207
  export type SliceInfoInput<S> =