catalyst-core 0.3.0-beta.5 → 0.3.0-canary.2

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 (316) hide show
  1. package/changelog.md +185 -71
  2. package/dist/errors/generateDocs.js +100 -0
  3. package/dist/errors/index.js +243 -0
  4. package/dist/errors/registry.js +483 -0
  5. package/dist/errors-index.json +506 -0
  6. package/dist/globals.d.ts +62 -0
  7. package/dist/index.d.ts +5 -0
  8. package/dist/index.jsx +5 -8
  9. package/dist/logger.js +1 -1
  10. package/dist/native/androidProject/app/build.gradle.kts +142 -7
  11. package/dist/native/androidProject/app/src/main/AndroidManifest.xml +4 -0
  12. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/NativeBridge.kt +2 -2
  13. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/camera/BarcodeDetector.kt +3 -0
  14. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/camera/CameraSessionManager.kt +3 -0
  15. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/FrameworkServerUtils.kt +43 -8
  16. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/BridgeUtilsTest.kt +181 -1
  17. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/CameraUtilsTest.kt +156 -236
  18. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/FileSizeRouterUtilsTest.kt +471 -0
  19. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/FileUtilsTest.kt +222 -226
  20. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/FrameworkServerUtilsTest.kt +300 -0
  21. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/IntentUtilsTest.kt +244 -0
  22. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/MetricsMonitorTest.kt +359 -0
  23. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/NativeBridgeTest.kt +108 -63
  24. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/NotificationUtilsTest.kt +329 -385
  25. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/OfflineCacheServiceTest.kt +302 -0
  26. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/PerfEventBufferTest.kt +133 -0
  27. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/UtilsKtTest.kt +152 -0
  28. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/WebCacheManagerTest.kt +145 -324
  29. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/camera/BarcodeDetectorTest.kt +132 -0
  30. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/camera/HoldControllerTest.kt +155 -0
  31. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/camera/TorchControllerTest.kt +150 -0
  32. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/camera/VideoStreamStateMachineTest.kt +120 -0
  33. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/camera/VideoStreamStateTest.kt +62 -0
  34. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/camera/ViewfinderMapperTest.kt +143 -0
  35. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/camera/ZoomControllerTest.kt +421 -0
  36. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/design/DesignTokensTest.kt +207 -0
  37. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/plugins/PluginBridgeTest.kt +368 -0
  38. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/security/FridaDetectorTest.kt +193 -0
  39. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/security/SecurityCheckManagerTest.kt +260 -0
  40. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/security/SecurityCheckSchedulerTest.kt +166 -0
  41. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/utils/DeviceInfoUtilsTest.kt +167 -0
  42. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/utils/DownloadUtilsTest.kt +197 -0
  43. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/utils/NetworkMonitorTest.kt +271 -0
  44. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/utils/PushNotificationUtilsTest.kt +119 -0
  45. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/utils/SafeAreaUtilsTest.kt +108 -0
  46. package/dist/native/androidProject/build.gradle.kts +1 -0
  47. package/dist/native/androidProject/gradle/libs.versions.toml +26 -0
  48. package/dist/native/androidProject/settings.gradle.kts +11 -8
  49. package/dist/native/androidSetup.js +2 -2
  50. package/dist/native/bridge/WebBridge.d.ts +98 -0
  51. package/dist/native/bridge/WebBridge.js +40 -6
  52. package/dist/native/bridge/constants/NativeInterfaces.d.ts +391 -0
  53. package/dist/native/bridge/errors.d.ts +67 -0
  54. package/dist/native/bridge/errors.js +66 -151
  55. package/dist/native/bridge/hooks/index.d.ts +13 -0
  56. package/dist/native/bridge/hooks/index.js +0 -6
  57. package/dist/native/bridge/hooks/useAI.d.ts +1 -0
  58. package/dist/native/bridge/hooks/useAI.js +3 -1
  59. package/dist/native/bridge/hooks/useCamera.d.ts +86 -0
  60. package/dist/native/bridge/hooks/useCamera.js +35 -6
  61. package/dist/native/bridge/hooks/useDataProtection.d.ts +17 -0
  62. package/dist/native/bridge/hooks/useDeviceInfo.d.ts +34 -0
  63. package/dist/native/bridge/hooks/useDeviceInfo.js +5 -0
  64. package/dist/native/bridge/hooks/useFilePicker.d.ts +53 -0
  65. package/dist/native/bridge/hooks/useFilePicker.js +13 -0
  66. package/dist/native/bridge/hooks/useGoogleSignIn.d.ts +12 -0
  67. package/dist/native/bridge/hooks/useHapticFeedback.d.ts +76 -0
  68. package/dist/native/bridge/hooks/useHapticFeedback.js +6 -1
  69. package/dist/native/bridge/hooks/useIntent.d.ts +33 -0
  70. package/dist/native/bridge/hooks/useIntent.js +2 -0
  71. package/dist/native/bridge/hooks/useNativeTransition.d.ts +53 -0
  72. package/dist/native/bridge/hooks/useNativeTransition.js +12 -5
  73. package/dist/native/bridge/hooks/useNetworkStatus.d.ts +22 -0
  74. package/dist/native/bridge/hooks/useNetworkStatus.js +7 -0
  75. package/dist/native/bridge/hooks/useNotification.d.ts +83 -0
  76. package/dist/native/bridge/hooks/useNotification.js +81 -34
  77. package/dist/native/bridge/hooks/useSafeArea.d.ts +12 -0
  78. package/dist/native/bridge/hooks/useSafeArea.js +8 -0
  79. package/dist/native/bridge/hooks/useVideoStream.d.ts +67 -0
  80. package/dist/native/bridge/hooks/useVideoStream.js +38 -52
  81. package/dist/native/bridge/hooks/utils.d.ts +4 -0
  82. package/dist/native/bridge/hooks.d.ts +1 -0
  83. package/dist/native/bridge/perf/collectors/ApiCollector.d.ts +30 -0
  84. package/dist/native/bridge/perf/collectors/ApiCollector.js +4 -0
  85. package/dist/native/bridge/perf/collectors/CacheCollector.d.ts +43 -0
  86. package/dist/native/bridge/perf/collectors/CacheCollector.js +4 -0
  87. package/dist/native/bridge/perf/collectors/HookCollector.d.ts +37 -0
  88. package/dist/native/bridge/perf/collectors/HookCollector.js +4 -0
  89. package/dist/native/bridge/perf/collectors/InsightsCollector.d.ts +103 -0
  90. package/dist/native/bridge/perf/collectors/InsightsCollector.js +4 -0
  91. package/dist/native/bridge/perf/collectors/InteractionCollector.d.ts +53 -0
  92. package/dist/native/bridge/perf/collectors/InteractionCollector.js +4 -0
  93. package/dist/native/bridge/perf/collectors/KeyboardCollector.d.ts +30 -0
  94. package/dist/native/bridge/perf/collectors/KeyboardCollector.js +4 -0
  95. package/dist/native/bridge/perf/collectors/NavigationCollector.d.ts +37 -0
  96. package/dist/native/bridge/perf/collectors/NavigationCollector.js +4 -0
  97. package/dist/native/bridge/perf/collectors/NetworkTimingCollector.d.ts +30 -0
  98. package/dist/native/bridge/perf/collectors/NetworkTimingCollector.js +4 -0
  99. package/dist/native/bridge/perf/collectors/RenderCollector.d.ts +47 -0
  100. package/dist/native/bridge/perf/collectors/RenderCollector.js +8 -0
  101. package/dist/native/bridge/perf/collectors/ScrollCollector.d.ts +29 -0
  102. package/dist/native/bridge/perf/collectors/ScrollCollector.js +4 -0
  103. package/dist/native/bridge/perf/collectors/ThreadCollector.d.ts +31 -0
  104. package/dist/native/bridge/perf/collectors/ThreadCollector.js +4 -0
  105. package/dist/native/bridge/perf/core/constants.d.ts +76 -0
  106. package/dist/native/bridge/perf/core/measure.d.ts +39 -0
  107. package/dist/native/bridge/perf/core/measure.js +4 -0
  108. package/dist/native/bridge/perf/core/session.d.ts +49 -0
  109. package/dist/native/bridge/perf/core/session.js +4 -0
  110. package/dist/native/bridge/perf/core/store.d.ts +37 -0
  111. package/dist/native/bridge/perf/core/store.js +4 -0
  112. package/dist/native/bridge/perf/core/summary.d.ts +60 -0
  113. package/dist/native/bridge/perf/core/traceExport.d.ts +10 -0
  114. package/dist/native/bridge/perf/core/waterfalls.d.ts +2 -0
  115. package/dist/native/bridge/perf/index.d.ts +63 -0
  116. package/dist/native/bridge/perf/index.js +4 -0
  117. package/dist/native/bridge/safeArea.d.ts +11 -0
  118. package/dist/native/bridge/safeArea.js +2 -0
  119. package/dist/native/bridge/useBaseHook.d.ts +137 -0
  120. package/dist/native/bridge/useBaseHook.js +34 -4
  121. package/dist/native/bridge/utils/CameraUtils.d.ts +94 -0
  122. package/dist/native/bridge/utils/CameraUtils.js +4 -0
  123. package/dist/native/bridge/utils/FileObjectConverter.d.ts +36 -0
  124. package/dist/native/bridge/utils/NativeBridge.d.ts +270 -0
  125. package/dist/native/bridge/utils/NativeBridge.js +10 -0
  126. package/dist/native/buildAndroid/index.js +1 -1
  127. package/dist/native/buildAppAndroid.js +9 -0
  128. package/dist/native/buildAppIos.js +16 -1
  129. package/dist/native/buildErrorFormat.js +57 -0
  130. package/dist/native/buildIos/config.js +15 -1
  131. package/dist/native/buildIos/index.js +1 -1
  132. package/dist/native/buildIos/plugins.js +10 -1
  133. package/dist/native/iosnativeWebView/CoreLogic/Package.swift +36 -0
  134. package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Camera/VideoStreamState.swift +1 -1
  135. package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Camera/VideoStreamStateMachine.swift +6 -4
  136. package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Utils/BootTimingUtility.swift +3 -3
  137. package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Utils/FrameworkServerUtils.swift +14 -9
  138. package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Utils/NetworkMonitor.swift +11 -9
  139. package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Utils/NotificationHandlerProvider.swift +1 -1
  140. package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Utils/URLWhitelistManager.swift +7 -7
  141. package/dist/native/iosnativeWebView/CoreLogic/Tests/CatalystCoreLogicTests/AnyCodableTests.swift +154 -0
  142. package/dist/native/iosnativeWebView/{iosnativeWebViewTests → CoreLogic/Tests/CatalystCoreLogicTests}/BootTimingUtilityTests.swift +23 -5
  143. package/dist/native/iosnativeWebView/CoreLogic/Tests/CatalystCoreLogicTests/CatalystConstantsTests.swift +192 -0
  144. package/dist/native/iosnativeWebView/{iosnativeWebViewTests → CoreLogic/Tests/CatalystCoreLogicTests}/ConfigMappingTests.swift +1 -1
  145. package/dist/native/iosnativeWebView/CoreLogic/Tests/CatalystCoreLogicTests/FrameworkServerUtilsErrorPathTests.swift +106 -0
  146. package/dist/native/iosnativeWebView/CoreLogic/Tests/CatalystCoreLogicTests/FrameworkServerUtilsLoopbackTests.swift +243 -0
  147. package/dist/native/iosnativeWebView/{iosnativeWebViewTests → CoreLogic/Tests/CatalystCoreLogicTests}/FrameworkServerUtilsTests.swift +1 -1
  148. package/dist/native/iosnativeWebView/CoreLogic/Tests/CatalystCoreLogicTests/NetworkMonitorTests.swift +119 -0
  149. package/dist/native/iosnativeWebView/CoreLogic/Tests/CatalystCoreLogicTests/NotificationHandlerProviderTests.swift +59 -0
  150. package/dist/native/iosnativeWebView/{iosnativeWebViewTests → CoreLogic/Tests/CatalystCoreLogicTests}/NotificationHandlerTests.swift +1 -1
  151. package/dist/native/iosnativeWebView/{iosnativeWebViewTests → CoreLogic/Tests/CatalystCoreLogicTests}/URLWhitelistManagerTests.swift +1 -1
  152. package/dist/native/iosnativeWebView/CoreLogic/Tests/CatalystCoreLogicTests/VideoStreamStateMachineTests.swift +171 -0
  153. package/dist/native/iosnativeWebView/CoreLogic/Tests/CatalystCoreLogicTests/VideoStreamStateTests.swift +91 -0
  154. package/dist/native/iosnativeWebView/Package.swift +10 -9
  155. package/dist/native/iosnativeWebView/Sources/CatalystNotifications/LocalNotificationHandler.swift +7 -2
  156. package/dist/native/iosnativeWebView/Sources/CatalystNotifications/NotificationManager.swift +1 -2
  157. package/dist/native/iosnativeWebView/Sources/CatalystNotifications/PushNotificationHandler.swift +5 -4
  158. package/dist/native/iosnativeWebView/Sources/Core/Camera/CameraSessionManager.swift +1 -0
  159. package/dist/native/iosnativeWebView/Sources/Core/Camera/HoldController.swift +1 -0
  160. package/dist/native/iosnativeWebView/Sources/Core/Camera/NativeCameraManager.swift +6 -5
  161. package/dist/native/iosnativeWebView/Sources/Core/Camera/ZoomController.swift +1 -0
  162. package/dist/native/iosnativeWebView/Sources/Core/Plugins/PluginBridge.swift +1 -0
  163. package/dist/native/iosnativeWebView/Sources/Core/Utils/CacheManager.swift +31 -30
  164. package/dist/native/iosnativeWebView/Sources/Core/Utils/CameraTransportUtils.swift +2 -1
  165. package/dist/native/iosnativeWebView/Sources/Core/Utils/DeviceInfoUtils.swift +1 -1
  166. package/dist/native/iosnativeWebView/Sources/Core/Utils/FilePickerHandler.swift +22 -19
  167. package/dist/native/iosnativeWebView/Sources/Core/Utils/ImageHandler.swift +40 -39
  168. package/dist/native/iosnativeWebView/Sources/Core/Utils/PerfEventBuffer.swift +1 -0
  169. package/dist/native/iosnativeWebView/Sources/Core/Utils/ResourceURLProtocol.swift +15 -15
  170. package/dist/native/iosnativeWebView/Sources/Core/Utils/WebKitConfig.swift +4 -3
  171. package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeCommandHandler.swift +6 -1
  172. package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeDelegateHandler.swift +1 -0
  173. package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeFileHandler.swift +2 -1
  174. package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeJavaScriptInterface.swift +2 -1
  175. package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeMessageValidator.swift +3 -5
  176. package/dist/native/iosnativeWebView/Sources/Core/WebView/NativeBridge.swift +20 -13
  177. package/dist/native/iosnativeWebView/Sources/Core/WebView/SplashView.swift +6 -5
  178. package/dist/native/iosnativeWebView/Sources/Core/WebView/SplashViewModel.swift +14 -13
  179. package/dist/native/iosnativeWebView/Sources/Core/WebView/TransitionManager.swift +3 -3
  180. package/dist/native/iosnativeWebView/Sources/Core/WebView/WebView.swift +9 -8
  181. package/dist/native/iosnativeWebView/Sources/Core/WebView/WebViewModel.swift +7 -6
  182. package/dist/native/iosnativeWebView/Sources/Core/WebView/WebViewNavigationDelegate.swift +24 -25
  183. package/dist/native/iosnativeWebView/iosnativeWebView/AppDelegate.swift +6 -1
  184. package/dist/native/iosnativeWebView/iosnativeWebView/ContentView.swift +1 -0
  185. package/dist/native/iosnativeWebView/iosnativeWebView/iosnativeWebViewApp.swift +4 -0
  186. package/dist/native/iosnativeWebView/iosnativeWebView.xcodeproj/project.pbxproj +2 -22
  187. package/dist/native/iosnativeWebView/iosnativeWebViewTests/BridgeMessageValidatorTests.swift +1 -0
  188. package/dist/native/iosnativeWebView/iosnativeWebViewTests/CacheManagerTests.swift +1 -0
  189. package/dist/native/iosnativeWebView/iosnativeWebViewTests/FilePickerHandlerTests.swift +2 -1
  190. package/dist/native/iosnativeWebView/iosnativeWebViewTests/NativeBridgeTests.swift +15 -9
  191. package/dist/native/iosnativeWebView/iosnativeWebViewTests/WebViewTests.swift +1 -0
  192. package/dist/native/setupEmulatorIos.js +2 -2
  193. package/dist/native/terminalProgress.js +17 -17
  194. package/dist/router/ClientRouter.d.ts +8 -0
  195. package/dist/router/ClientRouter.js +13 -11
  196. package/dist/router/ServerRouter.d.ts +13 -0
  197. package/dist/router/ServerRouter.js +19 -7
  198. package/dist/scripts/build.js +14 -2
  199. package/dist/scripts/loadEnvironmentVariables.js +3 -2
  200. package/dist/scripts/plugins.js +1 -1
  201. package/dist/scripts/preServerInit.js +49 -3
  202. package/dist/scripts/preflight.js +111 -0
  203. package/dist/scripts/scriptUtils.js +46 -1
  204. package/dist/scripts/serve.js +7 -3
  205. package/dist/scripts/start.js +8 -3
  206. package/dist/server/expressServer.d.ts +1 -0
  207. package/dist/server/expressServer.js +247 -271
  208. package/dist/server/manifestCache.d.ts +2 -0
  209. package/dist/server/manifestCache.js +25 -33
  210. package/dist/server/renderer/ChunkExtractor.d.ts +44 -0
  211. package/dist/server/renderer/ChunkExtractor.js +113 -125
  212. package/dist/server/renderer/document/Body.d.ts +21 -0
  213. package/dist/server/renderer/document/Body.jsx +45 -45
  214. package/dist/server/renderer/document/FastRefresh.d.ts +3 -0
  215. package/dist/server/renderer/document/FastRefresh.jsx +7 -13
  216. package/dist/server/renderer/document/Head.d.ts +20 -0
  217. package/dist/server/renderer/document/Head.jsx +32 -32
  218. package/dist/server/renderer/document/index.d.ts +2 -0
  219. package/dist/server/renderer/document/index.jsx +2 -2
  220. package/dist/server/renderer/extract.d.ts +67 -0
  221. package/dist/server/renderer/extract.js +92 -89
  222. package/dist/server/renderer/handler.d.ts +2 -0
  223. package/dist/server/renderer/handler.jsx +401 -404
  224. package/dist/server/renderer/index.d.ts +2 -0
  225. package/dist/server/renderer/index.js +5 -8
  226. package/dist/server/renderer/render.d.ts +35 -0
  227. package/dist/server/renderer/render.js +25 -32
  228. package/dist/server/utils/botDetectionMiddleware.d.ts +1 -0
  229. package/dist/server/utils/botDetectionMiddleware.js +33 -23
  230. package/dist/server/utils/cjsRequire.d.ts +8 -0
  231. package/dist/server/utils/cjsRequire.js +2 -2
  232. package/dist/server/utils/userAgentUtil.d.ts +7 -0
  233. package/dist/server/utils/userAgentUtil.js +68 -71
  234. package/dist/server/utils/validator.d.ts +31 -0
  235. package/dist/server/utils/validator.js +133 -158
  236. package/dist/vite/inject-cache-key-plugin.js +3 -27
  237. package/dist/vite/moduleAliases.js +36 -0
  238. package/dist/vite/node-loader.mjs +2 -29
  239. package/dist/vite/resolveDevServerConfig.js +4 -1
  240. package/dist/vite/vite.config.js +2 -29
  241. package/dist/web-router/components/MetaTag.d.ts +4 -0
  242. package/dist/web-router/components/MetaTag.jsx +26 -28
  243. package/dist/web-router/components/MetaTag.test.jsx +100 -0
  244. package/dist/web-router/components/RouterDataProvider.d.ts +96 -0
  245. package/dist/web-router/components/RouterDataProvider.jsx +260 -259
  246. package/dist/web-router/components/RouterDataProvider.server.test.jsx +98 -0
  247. package/dist/web-router/components/RouterDataProvider.test.jsx +310 -0
  248. package/dist/web-router/components/Split.d.ts +74 -0
  249. package/dist/web-router/components/Split.jsx +147 -156
  250. package/dist/web-router/components/Split.server.test.jsx +52 -0
  251. package/dist/web-router/components/Split.test.jsx +167 -0
  252. package/dist/web-router/components/SplitInview.d.ts +22 -0
  253. package/dist/web-router/components/SplitInview.jsx +78 -89
  254. package/dist/web-router/components/SplitInview.test.jsx +112 -0
  255. package/dist/web-router/components/SsrRequestContext.d.ts +20 -0
  256. package/dist/web-router/components/SsrRequestContext.jsx +17 -7
  257. package/dist/web-router/components/SsrRequestContext.test.jsx +53 -0
  258. package/dist/web-router/context.d.ts +15 -0
  259. package/dist/web-router/context.jsx +5 -5
  260. package/dist/web-router/context.test.jsx +10 -0
  261. package/dist/web-router/utils/metaDataUtils.d.ts +24 -0
  262. package/dist/web-router/utils/metaDataUtils.jsx +86 -86
  263. package/dist/web-router/utils/metaDataUtils.test.jsx +188 -0
  264. package/dist/web-router/vitest.setup.js +12 -0
  265. package/mcp_v2/knowledge-base.json +115 -17
  266. package/mcp_v2/mcp.js +141 -3
  267. package/mcp_v2/package-lock.json +2031 -0
  268. package/mcp_v2/package.json +13 -2
  269. package/mcp_v2/scripts/copyErrorsIndex.cjs +34 -0
  270. package/mcp_v2/test/errors.test.ts +123 -0
  271. package/mcp_v2/test/github.test.ts +177 -0
  272. package/mcp_v2/tools/errors.d.ts +20 -0
  273. package/mcp_v2/tools/errors.js +63 -0
  274. package/mcp_v2/tools/github.d.ts +41 -0
  275. package/mcp_v2/tools/github.js +231 -0
  276. package/mcp_v2/vitest.config.mjs +22 -0
  277. package/package.json +60 -11
  278. package/test/errors/docsDrift.test.ts +113 -0
  279. package/test/errors/index.test.ts +200 -0
  280. package/test/errors/registry.test.ts +108 -0
  281. package/test/scripts/preflight.test.ts +118 -0
  282. package/test/server/ChunkExtractor.test.ts +97 -0
  283. package/test/server/extract.test.ts +128 -0
  284. package/test/server/fixtures/template/server/document.jsx +19 -0
  285. package/test/server/fixtures/template/server/index.js +10 -0
  286. package/test/server/fixtures/template/src/js/containers/App/index.jsx +33 -0
  287. package/test/server/fixtures/template/src/js/routes/index.jsx +72 -0
  288. package/test/server/fixtures/template/src/js/routes/utils.jsx +39 -0
  289. package/test/server/fixtures/template/src/js/store/index.js +19 -0
  290. package/test/server/handler.assets.test.ts +330 -0
  291. package/test/server/handler.test.ts +208 -0
  292. package/test/server/manifestCache.test.ts +71 -0
  293. package/test/server/render.test.ts +71 -0
  294. package/test/server/scriptUtils.test.ts +103 -0
  295. package/test/server/userAgentUtil.test.ts +48 -0
  296. package/test/server/validator.test.ts +225 -0
  297. package/test/vite/resolveDevServerConfig.test.js +4 -1
  298. package/tsconfig.test.json +23 -0
  299. package/vitest.config.ts +93 -0
  300. package/dist/caching.js +0 -1
  301. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/DeviceInfoUtilsTest.kt +0 -187
  302. package/dist/native/bridge/standardizedHooks.js +0 -611
  303. package/dist/router.js +0 -1
  304. package/dist/scripts/validator.js +0 -149
  305. package/dist/web-router/hooks.jsx +0 -72
  306. package/dist/web-router/types/components/MetaTag.d.ts +0 -2
  307. package/dist/web-router/types/components/RouterDataProvider.d.ts +0 -95
  308. package/dist/web-router/types/context.d.ts +0 -14
  309. package/dist/web-router/types/hooks.d.ts +0 -1
  310. package/dist/web-router/types/index.d.ts +0 -3
  311. package/dist/web-router/types/utils/metaDataUtils.d.ts +0 -40
  312. /package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Constants/CatalystConstants.swift +0 -0
  313. /package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Constants/ConfigConstants.swift +0 -0
  314. /package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Notifications/NotificationModels.swift +0 -0
  315. /package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Protocols/NotificationHandlerProtocol.swift +0 -0
  316. /package/dist/native/iosnativeWebView/{Sources/Core → CoreLogic/Sources/CatalystCoreLogic}/Utils/NullNotificationHandler.swift +0 -0
@@ -1,6 +1,7 @@
1
1
  import Foundation
2
2
  import SwiftUI
3
3
  import os
4
+ import CatalystCoreLogic
4
5
 
5
6
  private let logger = Logger(subsystem: Bundle.main.bundleIdentifier ?? "com.app", category: "SplashViewModel")
6
7
 
@@ -16,20 +17,20 @@ public class SplashViewModel: ObservableObject {
16
17
  logger.info("SplashViewModel initialized")
17
18
  startDurationTimer()
18
19
  }
19
-
20
+
20
21
  deinit {
21
22
  durationTimer?.invalidate()
22
23
  }
23
-
24
+
24
25
  private func startDurationTimer() {
25
26
  // Check if duration-based dismissal is configured
26
27
  guard let duration = ConfigConstants.splashScreenDuration else {
27
28
  logger.info("No splash screen duration configured, using progress-based dismissal")
28
29
  return
29
30
  }
30
-
31
+
31
32
  logger.info("Starting duration timer for \(duration) seconds")
32
-
33
+
33
34
  // Create a timer that fires after the specified duration
34
35
  durationTimer = Timer.scheduledTimer(withTimeInterval: duration, repeats: false) { [weak self] _ in
35
36
  DispatchQueue.main.async {
@@ -37,20 +38,20 @@ public class SplashViewModel: ObservableObject {
37
38
  }
38
39
  }
39
40
  }
40
-
41
+
41
42
  func updateProgress(_ progress: Double) {
42
43
  logger.debug("WebView progress updated: \(progress)")
43
-
44
+
44
45
  // Check if duration exists (ConfigConstants.splashScreenDuration is Optional)
45
46
  if let duration = ConfigConstants.splashScreenDuration {
46
47
  // Duration-based dismissal - check if minimum time has elapsed
47
48
  let timeElapsed = Date().timeIntervalSince(startTime)
48
-
49
+
49
50
  // Mark that WebView has loaded, but don't dismiss until duration is met
50
51
  if progress >= 1.0 {
51
52
  hasWebViewLoaded = true
52
53
  }
53
-
54
+
54
55
  // If both conditions are met (duration elapsed AND WebView loaded), dismiss immediately
55
56
  if timeElapsed >= duration && hasWebViewLoaded {
56
57
  dismissSplash()
@@ -62,22 +63,22 @@ public class SplashViewModel: ObservableObject {
62
63
  }
63
64
  }
64
65
  }
65
-
66
+
66
67
  private func dismissSplashByDuration() {
67
68
  dismissSplash()
68
69
  }
69
-
70
+
70
71
  private func dismissSplash() {
71
72
  guard shouldShowSplash else { return }
72
-
73
+
73
74
  durationTimer?.invalidate()
74
75
  durationTimer = nil
75
-
76
+
76
77
  withAnimation(.easeOut(duration: 0.3)) {
77
78
  shouldShowSplash = false
78
79
  }
79
80
  }
80
-
81
+
81
82
  // Public method to manually dismiss splash (if needed)
82
83
  func forceDismiss() {
83
84
  logger.info("Force dismissing splash screen")
@@ -111,9 +111,9 @@ class TransitionManager {
111
111
  let endTranslation: CGPoint
112
112
  switch direction {
113
113
  case "right": endTranslation = CGPoint(x: -w, y: 0)
114
- case "up": endTranslation = CGPoint(x: 0, y: h)
115
- case "down": endTranslation = CGPoint(x: 0, y: -h)
116
- default: endTranslation = CGPoint(x: w, y: 0) // "left" — overlay slides out to the right
114
+ case "up": endTranslation = CGPoint(x: 0, y: h)
115
+ case "down": endTranslation = CGPoint(x: 0, y: -h)
116
+ default: endTranslation = CGPoint(x: w, y: 0) // "left" — overlay slides out to the right
117
117
  }
118
118
 
119
119
  UIView.animate(
@@ -1,6 +1,7 @@
1
1
  import SwiftUI
2
2
  import WebKit
3
3
  import os
4
+ import CatalystCoreLogic
4
5
 
5
6
  private let logger = Logger(subsystem: Bundle.main.bundleIdentifier ?? "com.app", category: "WebView")
6
7
 
@@ -36,7 +37,7 @@ public struct WebView: UIViewRepresentable, Equatable {
36
37
  "durationMs": totalTime,
37
38
  ])
38
39
  }
39
-
40
+
40
41
  public func makeUIView(context: Context) -> WKWebView {
41
42
  let makeUIViewStart = CFAbsoluteTimeGetCurrent()
42
43
  logWithTimestamp("🔨 makeUIView() started")
@@ -155,7 +156,7 @@ public struct WebView: UIViewRepresentable, Equatable {
155
156
 
156
157
  return webView
157
158
  }
158
-
159
+
159
160
  public func updateUIView(_ webView: WKWebView, context: Context) {
160
161
  #if DEBUG
161
162
  if #available(iOS 16.4, *) {
@@ -163,11 +164,11 @@ public struct WebView: UIViewRepresentable, Equatable {
163
164
  }
164
165
  #endif
165
166
  }
166
-
167
+
167
168
  public func makeCoordinator() -> Coordinator {
168
169
  Coordinator(self)
169
170
  }
170
-
171
+
171
172
  public static func dismantleUIView(_ webView: WKWebView, coordinator: Coordinator) {
172
173
  // Safely remove observer with error handling
173
174
  if coordinator.isObserverAdded {
@@ -193,7 +194,7 @@ public struct WebView: UIViewRepresentable, Equatable {
193
194
 
194
195
  logger.debug("WebView cleanup completed")
195
196
  }
196
-
197
+
197
198
  public class Coordinator: NSObject {
198
199
  var parent: WebView
199
200
  var nativeBridge: NativeBridge?
@@ -208,7 +209,7 @@ public struct WebView: UIViewRepresentable, Equatable {
208
209
  public init(_ parent: WebView) {
209
210
  self.parent = parent
210
211
  }
211
-
212
+
212
213
  func setupNativeBridge(_ webView: WKWebView) {
213
214
  // Create a UIViewController to use for presenting any UI
214
215
  let hostingController = UIViewController()
@@ -242,7 +243,7 @@ public struct WebView: UIViewRepresentable, Equatable {
242
243
  fpsMonitor?.stop()
243
244
  fpsMonitor = nil
244
245
  }
245
-
246
+
246
247
  @objc func handleCameraPinch(_ gesture: UIPinchGestureRecognizer) {
247
248
  // No-op when camera is not streaming — don't accidentally zoom the page
248
249
  guard parent.cameraManager.isStreaming else { return }
@@ -258,7 +259,7 @@ public struct WebView: UIViewRepresentable, Equatable {
258
259
 
259
260
  override public func observeValue(forKeyPath keyPath: String?,
260
261
  of object: Any?,
261
- change: [NSKeyValueChangeKey : Any]?,
262
+ change: [NSKeyValueChangeKey: Any]?,
262
263
  context: UnsafeMutableRawPointer?) {
263
264
  if keyPath == #keyPath(WKWebView.estimatedProgress),
264
265
  let webView = object as? WKWebView {
@@ -1,6 +1,7 @@
1
1
  import Foundation
2
2
  import UIKit
3
3
  import os
4
+ import CatalystCoreLogic
4
5
 
5
6
  private let logger = Logger(subsystem: Bundle.main.bundleIdentifier ?? "com.app", category: "WebViewModel")
6
7
 
@@ -40,11 +41,11 @@ public class WebViewModel: ObservableObject {
40
41
  #endif
41
42
  }
42
43
  }
43
-
44
+
44
45
  public func setLoading(_ loading: Bool, fromCache: Bool = false) {
45
46
  isLoading = loading
46
47
  isLoadingFromCache = fromCache
47
-
48
+
48
49
  if !loading {
49
50
  loadingProgress = 1.0
50
51
  // Reset loading state after a short delay
@@ -55,18 +56,18 @@ public class WebViewModel: ObservableObject {
55
56
  self.isLoadingFromCache = false
56
57
  }
57
58
  }
58
-
59
+
59
60
  logger.info("Loading state changed: loading=\(loading), fromCache=\(fromCache)")
60
61
  }
61
-
62
+
62
63
  public func setProgress(_ progress: Double) {
63
64
  loadingProgress = progress
64
65
  }
65
-
66
+
66
67
  public func addToHistory(_ urlString: String) {
67
68
  navigationHistory.append(urlString)
68
69
  }
69
-
70
+
70
71
  public func reset() {
71
72
  isLoading = false
72
73
  loadingProgress = 0
@@ -1,6 +1,7 @@
1
1
  import WebKit
2
2
  import os
3
3
  import UIKit
4
+ import CatalystCoreLogic
4
5
 
5
6
  private let logger = Logger(subsystem: Bundle.main.bundleIdentifier ?? "com.app", category: "WebViewNavigation")
6
7
 
@@ -24,7 +25,7 @@ class WebViewNavigationDelegate: NSObject, WKNavigationDelegate {
24
25
  self.cameraManager = cameraManager
25
26
  super.init()
26
27
  }
27
-
28
+
28
29
  func webView(_ webView: WKWebView,
29
30
  decidePolicyFor navigationAction: WKNavigationAction,
30
31
  decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
@@ -165,7 +166,7 @@ class WebViewNavigationDelegate: NSObject, WKNavigationDelegate {
165
166
  for: navigationAction.request
166
167
  )
167
168
  let cacheDurationMs = CatalystPerf.nativeTimeMs() - cacheStartMs
168
-
169
+
169
170
  switch cacheState {
170
171
  case .fresh, .stale:
171
172
  logger.info("✅ Serving fresh/stale cached content")
@@ -189,12 +190,11 @@ class WebViewNavigationDelegate: NSObject, WKNavigationDelegate {
189
190
  characterEncodingName: "UTF-8",
190
191
  baseURL: url)
191
192
  }
192
-
193
+
193
194
  decisionHandler(.cancel)
194
195
  return
195
196
  }
196
-
197
- case .expired:
197
+ case .expired:
198
198
  logger.info("♻️ Cache expired, fetching fresh content")
199
199
  CatalystPerf.add([
200
200
  "type": "cache-miss-fetch",
@@ -204,7 +204,6 @@ class WebViewNavigationDelegate: NSObject, WKNavigationDelegate {
204
204
  "nativeStartMs": cacheStartMs,
205
205
  "durationMs": cacheDurationMs,
206
206
  ])
207
- break
208
207
  }
209
208
  } else {
210
209
  if !isCacheableMethod {
@@ -213,29 +212,29 @@ class WebViewNavigationDelegate: NSObject, WKNavigationDelegate {
213
212
  logger.info("⏭️ URL doesn't match cache pattern: \(url.absoluteString)")
214
213
  }
215
214
  }
216
-
215
+
217
216
  await MainActor.run {
218
217
  viewModel.setLoading(true, fromCache: false)
219
218
  }
220
219
  decisionHandler(.allow)
221
220
  }
222
221
  }
223
-
222
+
224
223
  func webView(_ webView: WKWebView,
225
224
  decidePolicyFor navigationResponse: WKNavigationResponse,
226
225
  decisionHandler: @escaping (WKNavigationResponsePolicy) -> Void) {
227
-
226
+
228
227
  guard let response = navigationResponse.response as? HTTPURLResponse,
229
228
  let url = response.url else {
230
229
  decisionHandler(.allow)
231
230
  return
232
231
  }
233
-
232
+
234
233
  Task {
235
234
  if CacheManager.shared.shouldCacheURL(url) {
236
235
  let request = URLRequest(url: url)
237
-
238
- URLSession.shared.dataTask(with: request) { data, urlResponse, error in
236
+
237
+ URLSession.shared.dataTask(with: request) { data, urlResponse, _ in
239
238
  if let data = data,
240
239
  let httpResponse = urlResponse as? HTTPURLResponse {
241
240
  Task {
@@ -248,13 +247,13 @@ class WebViewNavigationDelegate: NSObject, WKNavigationDelegate {
248
247
  }
249
248
  }.resume()
250
249
  }
251
-
250
+
252
251
  await MainActor.run {
253
252
  decisionHandler(.allow)
254
253
  }
255
254
  }
256
255
  }
257
-
256
+
258
257
  func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) {
259
258
  logWithTimestamp("📡 didStartProvisionalNavigation - loading started")
260
259
  if hasStartedProfilerNavigation {
@@ -386,23 +385,23 @@ class WebViewNavigationDelegate: NSObject, WKNavigationDelegate {
386
385
  }
387
386
  }
388
387
  }
389
-
388
+
390
389
  /// Handle SSL certificate challenges
391
390
  /// For localhost connections, trust our self-signed certificate
392
391
  /// For all other domains, use default validation
393
392
  func webView(_ webView: WKWebView,
394
393
  didReceive challenge: URLAuthenticationChallenge,
395
394
  completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
396
-
395
+
397
396
  let protectionSpace = challenge.protectionSpace
398
397
  let host = protectionSpace.host
399
-
398
+
400
399
  // Only bypass certificate validation for localhost
401
400
  if (host == "localhost" || host == "127.0.0.1") &&
402
401
  protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust {
403
-
402
+
404
403
  logger.debug("🔐 SSL challenge for localhost - trusting self-signed certificate")
405
-
404
+
406
405
  if let serverTrust = protectionSpace.serverTrust {
407
406
  let credential = URLCredential(trust: serverTrust)
408
407
  completionHandler(.useCredential, credential)
@@ -410,7 +409,7 @@ class WebViewNavigationDelegate: NSObject, WKNavigationDelegate {
410
409
  return
411
410
  }
412
411
  }
413
-
412
+
414
413
  // For all other domains, use default certificate validation
415
414
  logger.debug("🔐 SSL challenge for \(host) - using default validation")
416
415
  completionHandler(.performDefaultHandling, nil)
@@ -480,7 +479,7 @@ class WebViewNavigationDelegate: NSObject, WKNavigationDelegate {
480
479
  viewModel.setLoading(false, fromCache: true)
481
480
  return true
482
481
  }
483
-
482
+
484
483
  /// Open URL in system browser
485
484
  private func openInSystemBrowser(_ url: URL) {
486
485
  Task { @MainActor in
@@ -497,14 +496,14 @@ class WebViewNavigationDelegate: NSObject, WKNavigationDelegate {
497
496
  }
498
497
  }
499
498
  }
500
-
499
+
501
500
  /// Handle special URL schemes (tel:, mailto:, sms:)
502
501
  private func handleSpecialScheme(_ url: URL) -> Bool {
503
502
  guard let scheme = url.scheme?.lowercased() else { return false }
504
-
503
+
505
504
  // Only handle tel, mailto, sms
506
505
  guard ["tel", "mailto", "sms"].contains(scheme) else { return false }
507
-
506
+
508
507
  Task { @MainActor in
509
508
  if UIApplication.shared.canOpenURL(url) {
510
509
  // App available to handle the scheme (opens default mail app for mailto)
@@ -518,7 +517,7 @@ class WebViewNavigationDelegate: NSObject, WKNavigationDelegate {
518
517
  }
519
518
  }
520
519
  }
521
-
520
+
522
521
  return true
523
522
  }
524
523
 
@@ -9,6 +9,7 @@ import UIKit
9
9
  import WebKit
10
10
  import os
11
11
  import CatalystCore
12
+ import CatalystCoreLogic
12
13
  #if canImport(GoogleSignIn)
13
14
  import GoogleSignIn
14
15
  #endif
@@ -64,7 +65,11 @@ public class AppDelegate: NSObject, UIApplicationDelegate {
64
65
  )
65
66
  }
66
67
 
67
- public func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
68
+ public func application(
69
+ _ application: UIApplication,
70
+ didReceiveRemoteNotification userInfo: [AnyHashable: Any],
71
+ fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void
72
+ ) {
68
73
  NotificationCenter.default.post(
69
74
  name: NSNotification.Name("RemoteNotificationReceived"),
70
75
  object: nil,
@@ -2,6 +2,7 @@ import SwiftUI
2
2
  import os
3
3
  import WebKit
4
4
  import CatalystCore
5
+ import CatalystCoreLogic
5
6
 
6
7
  private let logger = Logger(subsystem: Bundle.main.bundleIdentifier ?? "com.app", category: "ContentView")
7
8
 
@@ -9,6 +9,7 @@ import SwiftUI
9
9
  import UIKit
10
10
  import os
11
11
  import CatalystCore
12
+ import CatalystCoreLogic
12
13
  #if canImport(GoogleSignIn)
13
14
  import GoogleSignIn
14
15
  #endif
@@ -21,7 +22,10 @@ import CatalystNotifications
21
22
 
22
23
  private let logger = Logger(subsystem: Bundle.main.bundleIdentifier ?? "com.app", category: "App")
23
24
 
25
+ // Name matches the Xcode target / product name; renaming the @main entry
26
+ // point is an Xcode project change, out of scope for lint wiring.
24
27
  @main
28
+ // swiftlint:disable:next type_name
25
29
  struct iosnativeWebViewApp: App {
26
30
  // Connect SwiftUI app to UIKit AppDelegate for early initialization
27
31
  @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
@@ -13,18 +13,13 @@
13
13
  C99974342E97D56900C25611 /* CatalystCore in Frameworks */ = {isa = PBXBuildFile; productRef = C99974332E97D56900C25611 /* CatalystCore */; };
14
14
  C999743A2E97D69E00C25611 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C99974382E97D69E00C25611 /* ContentView.swift */; };
15
15
  E90872B42E8D00D80076627C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E90872B32E8D00D80076627C /* AppDelegate.swift */; };
16
- E9F699D22EDEFEF2005E972E /* URLWhitelistManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F699D02EDEFEF2005E972E /* URLWhitelistManagerTests.swift */; };
17
- E9F699D42EE05984005E972E /* ConfigMappingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F699D32EE05984005E972E /* ConfigMappingTests.swift */; };
18
16
  E9F699D62EE05D74005E972E /* BridgeMessageValidatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F699D52EE05D74005E972E /* BridgeMessageValidatorTests.swift */; };
19
17
  E9F699D82EE06068005E972E /* NativeBridgeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F699D72EE06068005E972E /* NativeBridgeTests.swift */; };
20
18
  E9F699DA2EE063D5005E972E /* WebViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F699D92EE063D5005E972E /* WebViewTests.swift */; };
21
19
  E9F699DC2EE06483005E972E /* CacheManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F699DB2EE06482005E972E /* CacheManagerTests.swift */; };
22
20
  E9F699DE2EE06506005E972E /* FilePickerHandlerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F699DD2EE06506005E972E /* FilePickerHandlerTests.swift */; };
23
- E9F699E02EE065B0005E972E /* NotificationHandlerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F699DF2EE065B0005E972E /* NotificationHandlerTests.swift */; };
24
- E9F699E22EE06650005E972E /* FrameworkServerUtilsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F699E12EE06650005E972E /* FrameworkServerUtilsTests.swift */; };
25
- E9F699E42EE0696A005E972E /* BootTimingUtilityTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F699E32EE0696A005E972E /* BootTimingUtilityTests.swift */; };
26
- F2B100012F11111100AAA001 /* PluginBridgeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2B100022F11111100AAA001 /* PluginBridgeTests.swift */; };
27
21
  F1234AC22E990180008C7F58 /* localhost.p12 in Resources */ = {isa = PBXBuildFile; fileRef = F1234AC32E990180008C7F58 /* localhost.p12 */; };
22
+ F2B100012F11111100AAA001 /* PluginBridgeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2B100022F11111100AAA001 /* PluginBridgeTests.swift */; };
28
23
  /* End PBXBuildFile section */
29
24
 
30
25
  /* Begin PBXContainerItemProxy section */
@@ -57,18 +52,13 @@
57
52
  C9DAB6492E950DDC00A02A44 /* iosnativeWebView.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = iosnativeWebView.entitlements; sourceTree = "<group>"; };
58
53
  E90872B32E8D00D80076627C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
59
54
  E9F699CF2EDEFCF3005E972E /* iosnativeWebView.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = iosnativeWebView.xctestplan; sourceTree = "<group>"; };
60
- E9F699D02EDEFEF2005E972E /* URLWhitelistManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLWhitelistManagerTests.swift; sourceTree = "<group>"; };
61
- E9F699D32EE05984005E972E /* ConfigMappingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfigMappingTests.swift; sourceTree = "<group>"; };
62
55
  E9F699D52EE05D74005E972E /* BridgeMessageValidatorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BridgeMessageValidatorTests.swift; sourceTree = "<group>"; };
63
56
  E9F699D72EE06068005E972E /* NativeBridgeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NativeBridgeTests.swift; sourceTree = "<group>"; };
64
57
  E9F699D92EE063D5005E972E /* WebViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewTests.swift; sourceTree = "<group>"; };
65
58
  E9F699DB2EE06482005E972E /* CacheManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CacheManagerTests.swift; sourceTree = "<group>"; };
66
59
  E9F699DD2EE06506005E972E /* FilePickerHandlerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilePickerHandlerTests.swift; sourceTree = "<group>"; };
67
- E9F699DF2EE065B0005E972E /* NotificationHandlerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationHandlerTests.swift; sourceTree = "<group>"; };
68
- E9F699E12EE06650005E972E /* FrameworkServerUtilsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrameworkServerUtilsTests.swift; sourceTree = "<group>"; };
69
- E9F699E32EE0696A005E972E /* BootTimingUtilityTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BootTimingUtilityTests.swift; sourceTree = "<group>"; };
70
- F2B100022F11111100AAA001 /* PluginBridgeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PluginBridgeTests.swift; sourceTree = "<group>"; };
71
60
  F1234AC32E990180008C7F58 /* localhost.p12 */ = {isa = PBXFileReference; lastKnownFileType = file; path = localhost.p12; sourceTree = "<group>"; };
61
+ F2B100022F11111100AAA001 /* PluginBridgeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PluginBridgeTests.swift; sourceTree = "<group>"; };
72
62
  XCCONFIG001000000001 /* Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
73
63
  XCCONFIG001000000002 /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
74
64
  /* End PBXFileReference section */
@@ -147,17 +137,12 @@
147
137
  E9F699D12EDEFEF2005E972E /* iosnativeWebViewTests */ = {
148
138
  isa = PBXGroup;
149
139
  children = (
150
- E9F699E32EE0696A005E972E /* BootTimingUtilityTests.swift */,
151
- E9F699E12EE06650005E972E /* FrameworkServerUtilsTests.swift */,
152
- E9F699DF2EE065B0005E972E /* NotificationHandlerTests.swift */,
153
140
  E9F699DD2EE06506005E972E /* FilePickerHandlerTests.swift */,
154
141
  E9F699DB2EE06482005E972E /* CacheManagerTests.swift */,
155
142
  E9F699D92EE063D5005E972E /* WebViewTests.swift */,
156
143
  E9F699D72EE06068005E972E /* NativeBridgeTests.swift */,
157
144
  F2B100022F11111100AAA001 /* PluginBridgeTests.swift */,
158
145
  E9F699D52EE05D74005E972E /* BridgeMessageValidatorTests.swift */,
159
- E9F699D32EE05984005E972E /* ConfigMappingTests.swift */,
160
- E9F699D02EDEFEF2005E972E /* URLWhitelistManagerTests.swift */,
161
146
  );
162
147
  path = iosnativeWebViewTests;
163
148
  sourceTree = "<group>";
@@ -320,16 +305,11 @@
320
305
  buildActionMask = 2147483647;
321
306
  files = (
322
307
  E9F699DE2EE06506005E972E /* FilePickerHandlerTests.swift in Sources */,
323
- E9F699E02EE065B0005E972E /* NotificationHandlerTests.swift in Sources */,
324
308
  E9F699DC2EE06483005E972E /* CacheManagerTests.swift in Sources */,
325
- E9F699D42EE05984005E972E /* ConfigMappingTests.swift in Sources */,
326
309
  E9F699D82EE06068005E972E /* NativeBridgeTests.swift in Sources */,
327
310
  F2B100012F11111100AAA001 /* PluginBridgeTests.swift in Sources */,
328
311
  E9F699DA2EE063D5005E972E /* WebViewTests.swift in Sources */,
329
- E9F699E42EE0696A005E972E /* BootTimingUtilityTests.swift in Sources */,
330
- E9F699E22EE06650005E972E /* FrameworkServerUtilsTests.swift in Sources */,
331
312
  E9F699D62EE05D74005E972E /* BridgeMessageValidatorTests.swift in Sources */,
332
- E9F699D22EDEFEF2005E972E /* URLWhitelistManagerTests.swift in Sources */,
333
313
  );
334
314
  runOnlyForDeploymentPostprocessing = 0;
335
315
  };
@@ -1,5 +1,6 @@
1
1
  import XCTest
2
2
  import WebKit
3
+ import CatalystCoreLogic
3
4
  @testable import CatalystCore
4
5
 
5
6
  /**
@@ -1,5 +1,6 @@
1
1
  import XCTest
2
2
  import Foundation
3
+ import CatalystCoreLogic
3
4
  @testable import CatalystCore
4
5
 
5
6
  /**
@@ -1,6 +1,7 @@
1
1
  import XCTest
2
2
  import UIKit
3
3
  import UniformTypeIdentifiers
4
+ import CatalystCoreLogic
4
5
  @testable import CatalystCore
5
6
 
6
7
  /**
@@ -358,7 +359,7 @@ class MockFilePickerDelegate: FilePickerHandlerDelegate {
358
359
  var didFailWithError: Error?
359
360
  var stateChanges: [String] = []
360
361
 
361
- func filePickerHandler(_ handler: FilePickerHandler, didFinishWith payload: [String : Any]) {
362
+ func filePickerHandler(_ handler: FilePickerHandler, didFinishWith payload: [String: Any]) {
362
363
  didFinishPayload = payload
363
364
  }
364
365
 
@@ -436,19 +436,21 @@ final class NativeBridgeTests: XCTestCase {
436
436
 
437
437
  // Set up expectation for callback (will eventually be sent)
438
438
  var javascriptExecuted = false
439
- mockWebView.onEvaluateJavaScript = { script in
439
+ mockWebView.onEvaluateJavaScript = { _ in
440
440
  javascriptExecuted = true
441
441
  }
442
442
 
443
443
  // Process permission request - should not crash
444
444
  bridge.userContentController(mockWebView.configuration.userContentController, didReceive: message)
445
445
 
446
- // Give async operation a brief moment to start
446
+ // Give async operation a brief moment to start. CI simulators are much slower
447
+ // than local hardware, so the wait timeout is given generous headroom to avoid
448
+ // flaky failures under CI load.
447
449
  let expectation = XCTestExpectation(description: "Async operation starts")
448
450
  DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
449
451
  expectation.fulfill()
450
452
  }
451
- wait(for: [expectation], timeout: 1.0)
453
+ wait(for: [expectation], timeout: 30.0)
452
454
 
453
455
  // Verify command was processed (JavaScript may or may not have executed depending on permissions)
454
456
  // The key is that the bridge handled the command without crashing
@@ -467,19 +469,21 @@ final class NativeBridgeTests: XCTestCase {
467
469
  let message = createMockMessage(body: messageBody)
468
470
 
469
471
  var javascriptExecuted = false
470
- mockWebView.onEvaluateJavaScript = { script in
472
+ mockWebView.onEvaluateJavaScript = { _ in
471
473
  javascriptExecuted = true
472
474
  }
473
475
 
474
476
  // Process permission request - should not crash
475
477
  bridge.userContentController(mockWebView.configuration.userContentController, didReceive: message)
476
478
 
477
- // Give async operation a brief moment to start
479
+ // Give async operation a brief moment to start. CI simulators are much slower
480
+ // than local hardware, so the wait timeout is given generous headroom to avoid
481
+ // flaky failures under CI load.
478
482
  let expectation = XCTestExpectation(description: "Async operation starts")
479
483
  DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
480
484
  expectation.fulfill()
481
485
  }
482
- wait(for: [expectation], timeout: 1.0)
486
+ wait(for: [expectation], timeout: 30.0)
483
487
 
484
488
  // Verify command was processed without crashing
485
489
  XCTAssertTrue(true, "Notification permission request should be processed without error")
@@ -518,19 +522,21 @@ final class NativeBridgeTests: XCTestCase {
518
522
  let message = createMockMessage(body: messageBody)
519
523
 
520
524
  var javascriptExecuted = false
521
- mockWebView.onEvaluateJavaScript = { script in
525
+ mockWebView.onEvaluateJavaScript = { _ in
522
526
  javascriptExecuted = true
523
527
  }
524
528
 
525
529
  // Process permission request
526
530
  bridge.userContentController(mockWebView.configuration.userContentController, didReceive: message)
527
531
 
528
- // Give async operation a brief moment to start
532
+ // Give async operation a brief moment to start. CI simulators are much slower
533
+ // than local hardware, so the wait timeout is given generous headroom to avoid
534
+ // flaky failures under CI load.
529
535
  let expectation = XCTestExpectation(description: "Async operation starts")
530
536
  DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
531
537
  expectation.fulfill()
532
538
  }
533
- wait(for: [expectation], timeout: 1.0)
539
+ wait(for: [expectation], timeout: 30.0)
534
540
 
535
541
  // Verify command was processed (callback will be sent with actual status)
536
542
  XCTAssertTrue(true, "Permission handling should complete without error")
@@ -1,6 +1,7 @@
1
1
  import XCTest
2
2
  import WebKit
3
3
  import SwiftUI
4
+ @testable import CatalystCoreLogic
4
5
  @testable import CatalystCore
5
6
 
6
7
  /**
@@ -3,7 +3,7 @@
3
3
  var _child_process = require("child_process");
4
4
  var _fs = _interopRequireDefault(require("fs"));
5
5
  var _utils = require("./utils.js");
6
- var _TerminalProgress = _interopRequireDefault(require("./TerminalProgress.js"));
6
+ var _terminalProgress = _interopRequireDefault(require("./terminalProgress.js"));
7
7
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
8
8
  const configPath = `${process.env.PWD}/config/config.json`;
9
9
  const {
@@ -26,7 +26,7 @@ const progressPaddingConfig = {
26
26
  errorPaddingLeft: 6,
27
27
  bottomMargin: 2
28
28
  };
29
- const progress = new _TerminalProgress.default(steps, "Catalyst Universal Ios Setup", progressPaddingConfig);
29
+ const progress = new _terminalProgress.default(steps, "Catalyst Universal Ios Setup", progressPaddingConfig);
30
30
  async function initializeConfig() {
31
31
  const configFile = _fs.default.readFileSync(configPath, "utf8");
32
32
  const config = JSON.parse(configFile);