catalyst-core 0.0.3-canary.9 → 0.1.0-beta.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 (182) hide show
  1. package/README.md +4 -5
  2. package/bin/catalyst.js +28 -15
  3. package/changelog.md +139 -30
  4. package/dist/native/androidProject/app/build.gradle.kts +125 -15
  5. package/dist/native/androidProject/app/proguard-rules.pro +85 -14
  6. package/dist/native/androidProject/app/src/debug/res/xml/network_security_config.xml +8 -0
  7. package/dist/native/androidProject/app/src/main/AndroidManifest.xml +10 -3
  8. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/BridgeMessageValidator.kt +552 -0
  9. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/CatalystConstants.kt +109 -0
  10. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/CustomWebview.kt +605 -124
  11. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/MainActivity.kt +405 -47
  12. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/MetricsMonitor.kt +341 -0
  13. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/NativeBridge.kt +954 -71
  14. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/SplashActivity.kt +111 -0
  15. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/URLWhitelistManager.kt +231 -0
  16. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/Utils.kt +49 -55
  17. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/WebCacheManager.kt +81 -8
  18. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/design/DesignTokens.kt +307 -0
  19. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/security/EmulatorDetector.kt +203 -0
  20. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/security/FridaDetector.kt +187 -0
  21. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/security/SecurityAlertHandler.kt +170 -0
  22. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/security/SecurityAlertUI.kt +366 -0
  23. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/security/SecurityBottomSheet.kt +138 -0
  24. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/security/SecurityCheckManager.kt +511 -0
  25. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/security/SecurityCheckScheduler.kt +68 -0
  26. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/BridgeUtils.kt +47 -11
  27. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/DeviceInfoUtils.kt +38 -13
  28. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/DownloadUtils.kt +36 -14
  29. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/FileUtils.kt +3 -2
  30. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/FrameworkServerUtils.kt +57 -8
  31. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/IntentUtils.kt +31 -6
  32. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/KeyboardUtil.kt +82 -0
  33. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/NetworkUtils.kt +105 -0
  34. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/NotificationConstants.kt +28 -0
  35. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/NotificationUtils.kt +639 -0
  36. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/SafeAreaUtils.kt +62 -0
  37. package/dist/native/androidProject/app/src/main/res/drawable/splashscreen_fallback.png +0 -0
  38. package/dist/native/androidProject/app/src/main/res/layout/activity_main.xml +1 -0
  39. package/dist/native/androidProject/app/src/main/res/layout/activity_splash.xml +20 -0
  40. package/dist/native/androidProject/app/src/main/res/values/themes.xml +23 -0
  41. package/dist/native/androidProject/app/src/main/res/values-night/themes.xml +11 -0
  42. package/dist/native/androidProject/app/src/main/res/xml/network_security_config.xml +12 -0
  43. package/dist/native/androidProject/app/src/noFcm/java/io/yourname/androidproject/utils/NotificationManager.kt +166 -0
  44. package/dist/native/androidProject/app/src/noFcm/java/io/yourname/androidproject/utils/PushNotificationUtils.kt +94 -0
  45. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/BridgeMessageValidatorTest.kt +267 -0
  46. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/BridgeUtilsTest.kt +286 -0
  47. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/CameraUtilsTest.kt +296 -0
  48. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/ConfigMappingTest.kt +594 -0
  49. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/CustomWebviewTest.kt +466 -0
  50. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/DeviceInfoUtilsTest.kt +187 -0
  51. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/FileUtilsTest.kt +304 -0
  52. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/NativeBridgeTest.kt +424 -0
  53. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/NotificationUtilsTest.kt +469 -0
  54. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/SecurityBridgeTest.kt +199 -0
  55. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/URLWhitelistManagerTest.kt +462 -0
  56. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/WebCacheManagerTest.kt +391 -0
  57. package/dist/native/androidProject/app/src/withFcm/java/io/yourname/androidproject/utils/NotificationManager.kt +224 -0
  58. package/dist/native/androidProject/app/src/withFcm/java/io/yourname/androidproject/utils/PushNotificationUtils.kt +399 -0
  59. package/dist/native/androidProject/build.gradle.kts +6 -0
  60. package/dist/native/androidProject/gradle/libs.versions.toml +8 -2
  61. package/dist/native/androidSetup.js +4 -3
  62. package/dist/native/assets/catalyst.png +0 -0
  63. package/dist/native/bridge/WebBridge.js +16 -3
  64. package/dist/native/bridge/constants/NativeInterfaces.js +28 -10
  65. package/dist/native/bridge/errors.js +1 -1
  66. package/dist/native/bridge/hooks.js +76 -16
  67. package/dist/native/bridge/safeArea.js +5 -0
  68. package/dist/native/bridge/standardizedHooks.js +23 -5
  69. package/dist/native/bridge/useBaseHook.js +7 -9
  70. package/dist/native/bridge/utils/CameraUtils.js +58 -0
  71. package/dist/native/bridge/utils/FileObjectConverter.js +40 -0
  72. package/dist/native/bridge/utils/NativeBridge.js +57 -8
  73. package/dist/native/buildAppAndroid.js +115 -43
  74. package/dist/native/buildAppIos.js +291 -26
  75. package/dist/native/iosnativeWebView/Configurations/Debug.xcconfig +21 -0
  76. package/dist/native/iosnativeWebView/Configurations/Release.xcconfig +24 -0
  77. package/dist/native/iosnativeWebView/Configurations/Shared.xcconfig +50 -0
  78. package/dist/native/iosnativeWebView/Package.resolved +32 -0
  79. package/dist/native/iosnativeWebView/Package.swift +37 -0
  80. package/dist/native/iosnativeWebView/Sources/CatalystNotifications/LocalNotificationHandler.swift +293 -0
  81. package/dist/native/iosnativeWebView/Sources/CatalystNotifications/NotificationManager.swift +299 -0
  82. package/dist/native/iosnativeWebView/Sources/CatalystNotifications/PushNotificationHandler.swift +199 -0
  83. package/dist/native/iosnativeWebView/Sources/Core/Constants/CatalystConstants.swift +125 -0
  84. package/dist/native/iosnativeWebView/Sources/Core/Constants/ConfigConstants.swift +70 -0
  85. package/dist/native/iosnativeWebView/Sources/Core/Notifications/NotificationModels.swift +156 -0
  86. package/dist/native/iosnativeWebView/Sources/Core/Protocols/NotificationHandlerProtocol.swift +35 -0
  87. package/dist/native/iosnativeWebView/Sources/Core/Utils/BootTimingUtility.swift +26 -0
  88. package/dist/native/iosnativeWebView/{iosnativeWebView → Sources/Core/Utils}/CacheManager.swift +69 -36
  89. package/dist/native/iosnativeWebView/Sources/Core/Utils/CameraTransportUtils.swift +363 -0
  90. package/dist/native/iosnativeWebView/Sources/Core/Utils/DeviceInfoUtils.swift +67 -0
  91. package/dist/native/iosnativeWebView/Sources/Core/Utils/FilePickerHandler.swift +1053 -0
  92. package/dist/native/iosnativeWebView/Sources/Core/Utils/FrameworkServerUtils.swift +901 -0
  93. package/dist/native/iosnativeWebView/{iosnativeWebView → Sources/Core/Utils}/ImageHandler.swift +206 -20
  94. package/dist/native/iosnativeWebView/Sources/Core/Utils/NetworkMonitor.swift +112 -0
  95. package/dist/native/iosnativeWebView/Sources/Core/Utils/NotificationHandlerProvider.swift +20 -0
  96. package/dist/native/iosnativeWebView/Sources/Core/Utils/NullNotificationHandler.swift +85 -0
  97. package/dist/native/iosnativeWebView/{iosnativeWebView → Sources/Core/Utils}/ResourceURLProtocol.swift +60 -25
  98. package/dist/native/iosnativeWebView/Sources/Core/Utils/SafeAreaUtils.swift +132 -0
  99. package/dist/native/iosnativeWebView/Sources/Core/Utils/ScreenSecureManager.swift +131 -0
  100. package/dist/native/iosnativeWebView/Sources/Core/Utils/URLWhitelistManager.swift +224 -0
  101. package/dist/native/iosnativeWebView/Sources/Core/Utils/WebKitConfig.swift +43 -0
  102. package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeCommandHandler.swift +991 -0
  103. package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeDelegateHandler.swift +166 -0
  104. package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeFileHandler.swift +340 -0
  105. package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeJavaScriptInterface.swift +149 -0
  106. package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeMessageValidator.swift +611 -0
  107. package/dist/native/iosnativeWebView/Sources/Core/WebView/NativeBridge.swift +334 -0
  108. package/dist/native/iosnativeWebView/Sources/Core/WebView/SplashView.swift +95 -0
  109. package/dist/native/iosnativeWebView/Sources/Core/WebView/SplashViewModel.swift +86 -0
  110. package/dist/native/iosnativeWebView/Sources/Core/WebView/WebView.swift +181 -0
  111. package/dist/native/iosnativeWebView/Sources/Core/WebView/WebViewModel.swift +182 -0
  112. package/dist/native/iosnativeWebView/Sources/Core/WebView/WebViewNavigationDelegate.swift +395 -0
  113. package/dist/native/iosnativeWebView/iosnativeWebView/AppDelegate.swift +84 -0
  114. package/dist/native/iosnativeWebView/iosnativeWebView/Assets.xcassets/AccentColor.colorset/Contents.json +8 -8
  115. package/dist/native/iosnativeWebView/iosnativeWebView/Assets.xcassets/AppIcon.appiconset/Contents.json +10 -10
  116. package/dist/native/iosnativeWebView/iosnativeWebView/Assets.xcassets/Contents.json +4 -4
  117. package/dist/native/iosnativeWebView/iosnativeWebView/ContentView.swift +65 -10
  118. package/dist/native/iosnativeWebView/iosnativeWebView/Info-Release.plist +21 -0
  119. package/dist/native/iosnativeWebView/iosnativeWebView/Info.plist +13 -0
  120. package/dist/native/iosnativeWebView/iosnativeWebView/Preview Content/Preview Assets.xcassets/Contents.json +4 -4
  121. package/dist/native/iosnativeWebView/iosnativeWebView/iosnativeWebView.entitlements +12 -0
  122. package/dist/native/iosnativeWebView/iosnativeWebView/iosnativeWebViewApp.swift +80 -0
  123. package/dist/native/iosnativeWebView/iosnativeWebView/localhost.p12 +0 -0
  124. package/dist/native/iosnativeWebView/iosnativeWebView.xcodeproj/project.pbxproj +118 -100
  125. package/dist/native/iosnativeWebView/iosnativeWebView.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +69 -0
  126. package/dist/native/iosnativeWebView/iosnativeWebView.xcodeproj/xcshareddata/xcschemes/iosnativeWebView.xcscheme +9 -4
  127. package/dist/native/iosnativeWebView/iosnativeWebView.xctestplan +47 -0
  128. package/dist/native/iosnativeWebView/iosnativeWebViewTests/BootTimingUtilityTests.swift +236 -0
  129. package/dist/native/iosnativeWebView/iosnativeWebViewTests/BridgeCommandHandlerSecurityTests.swift +212 -0
  130. package/dist/native/iosnativeWebView/iosnativeWebViewTests/BridgeMessageValidatorTests.swift +418 -0
  131. package/dist/native/iosnativeWebView/iosnativeWebViewTests/CacheManagerTests.swift +390 -0
  132. package/dist/native/iosnativeWebView/iosnativeWebViewTests/ConfigMappingTests.swift +299 -0
  133. package/dist/native/iosnativeWebView/iosnativeWebViewTests/FilePickerHandlerTests.swift +383 -0
  134. package/dist/native/iosnativeWebView/iosnativeWebViewTests/FrameworkServerUtilsTests.swift +391 -0
  135. package/dist/native/iosnativeWebView/iosnativeWebViewTests/NativeBridgeTests.swift +581 -0
  136. package/dist/native/iosnativeWebView/iosnativeWebViewTests/NotificationHandlerTests.swift +430 -0
  137. package/dist/native/iosnativeWebView/iosnativeWebViewTests/ScreenSecureManagerTests.swift +121 -0
  138. package/dist/native/iosnativeWebView/iosnativeWebViewTests/URLWhitelistManagerTests.swift +367 -0
  139. package/dist/native/iosnativeWebView/iosnativeWebViewTests/WebViewTests.swift +440 -0
  140. package/dist/native/renameAndroidProject.js +80 -70
  141. package/dist/native/setupEmulatorIos.js +22 -5
  142. package/dist/native/setupServer.js +11 -10
  143. package/dist/native/terminalProgress.js +10 -10
  144. package/dist/native/utils.js +4 -5
  145. package/dist/otel.js +4 -0
  146. package/dist/scripts/build.js +2 -2
  147. package/dist/scripts/devBuild.js +2 -2
  148. package/dist/scripts/loadEnvironmentVariables.js +3 -1
  149. package/dist/scripts/scriptUtils.js +2 -2
  150. package/dist/sentry.js +4 -1
  151. package/dist/server/renderer/document/Body.js +4 -4
  152. package/dist/server/renderer/handler.js +7 -5
  153. package/dist/webpack/development.client.babel.js +1 -1
  154. package/mcp_v2/conversion-tasks.json +326 -0
  155. package/mcp_v2/knowledge-base.json +1068 -0
  156. package/mcp_v2/lib/helpers.js +165 -0
  157. package/mcp_v2/mcp.js +563 -0
  158. package/mcp_v2/package.json +13 -0
  159. package/mcp_v2/schema.sql +88 -0
  160. package/mcp_v2/setup.js +278 -0
  161. package/mcp_v2/tools/build.js +686 -0
  162. package/mcp_v2/tools/config.js +453 -0
  163. package/mcp_v2/tools/conversion.js +799 -0
  164. package/mcp_v2/tools/debug.js +113 -0
  165. package/mcp_v2/tools/knowledge.js +219 -0
  166. package/mcp_v2/tools/sync.js +23 -0
  167. package/mcp_v2/tools/tasks.js +945 -0
  168. package/package.json +11 -15
  169. package/dist/native/androidProject/.idea/.name +0 -1
  170. package/dist/native/androidProject/.idea/AndroidProjectSystem.xml +0 -6
  171. package/dist/native/androidProject/.idea/compiler.xml +0 -6
  172. package/dist/native/androidProject/.idea/deploymentTargetSelector.xml +0 -10
  173. package/dist/native/androidProject/.idea/gradle.xml +0 -18
  174. package/dist/native/androidProject/.idea/migrations.xml +0 -10
  175. package/dist/native/androidProject/.idea/misc.xml +0 -10
  176. package/dist/native/androidProject/.idea/runConfigurations.xml +0 -17
  177. package/dist/native/androidProject/.idea/vcs.xml +0 -6
  178. package/dist/native/iosnativeWebView/iosnativeWebView/NativeBridge.swift +0 -217
  179. package/dist/native/iosnativeWebView/iosnativeWebView/WebView.swift +0 -96
  180. package/dist/native/iosnativeWebView/iosnativeWebView/WebViewModel.swift +0 -47
  181. package/dist/native/iosnativeWebView/iosnativeWebView/WebViewNavigationDelegate.swift +0 -140
  182. package/license +0 -10
package/README.md CHANGED
@@ -7,8 +7,8 @@
7
7
 
8
8
  ## Table of Contents
9
9
 
10
- - Overview
11
- - Installation
10
+ - Overview
11
+ - Installation
12
12
 
13
13
  ## Overview
14
14
 
@@ -16,13 +16,12 @@ Catalyst offers a comprehensive suite of features designed for modern web develo
16
16
 
17
17
  This version adds support for Universal app for both Android and iOS. Please checkout [Universal App Documentaion](https://catalyst.1mg.com/public_docs/content/Universal%20App/RunUniversalApp)
18
18
 
19
-
20
19
  ## Installation
21
20
 
22
21
  **System Requirements**
23
22
 
24
- - Node version 20.4.0 or later
25
- - Compatible with **macOS** and **Linux**
23
+ - Node version 20.4.0 or later
24
+ - Compatible with **macOS** and **Linux**
26
25
 
27
26
  **Automatic Installation**
28
27
 
package/bin/catalyst.js CHANGED
@@ -8,9 +8,17 @@ const args = process.argv.slice(2)
8
8
 
9
9
  // Array of valid commands
10
10
  const validCommands = [
11
- "build", "start", "serve", "devBuild", "devServe",
12
- "buildApp", "buildApp:ios", "buildApp:android",
13
- "setupEmulator", "setupEmulator:ios", "setupEmulator:android"
11
+ "build",
12
+ "start",
13
+ "serve",
14
+ "devBuild",
15
+ "devServe",
16
+ "buildApp",
17
+ "buildApp:ios",
18
+ "buildApp:android",
19
+ "setupEmulator",
20
+ "setupEmulator:ios",
21
+ "setupEmulator:android",
14
22
  ]
15
23
 
16
24
  // Map of platform-specific commands to their script paths
@@ -18,17 +26,16 @@ const platformScripts = {
18
26
  "setupEmulator:ios": "../dist/native/setupEmulatorIos.js",
19
27
  "setupEmulator:android": "../dist/native/androidSetup.js",
20
28
  "buildApp:ios": "../dist/native/buildAppIos.js",
21
- "buildApp:android": "../dist/native/buildAppAndroid.js"
29
+ "buildApp:android": "../dist/native/buildAppAndroid.js",
22
30
  }
23
31
 
24
32
  // Helper to check if arg is a platform command
25
33
  const isPlatformCommand = (arg, prefix) => {
26
34
  if (!arg.startsWith(`${prefix}:`)) return false
27
- const platform = arg.split(':')[1]
28
- return ['ios', 'android'].includes(platform) || platform === undefined
35
+ const platform = arg.split(":")[1]
36
+ return ["ios", "android"].includes(platform) || platform === undefined
29
37
  }
30
38
 
31
-
32
39
  // Helper function to run a platform command
33
40
  const runPlatformCommand = (baseCommand, platform) => {
34
41
  const command = `${baseCommand}:${platform}`
@@ -42,7 +49,7 @@ const runPlatformCommand = (baseCommand, platform) => {
42
49
 
43
50
  // Helper function to run commands for all platforms
44
51
  const runAllPlatforms = (baseCommand) => {
45
- const platforms = ['ios', 'android']
52
+ const platforms = ["ios", "android"]
46
53
  for (const platform of platforms) {
47
54
  const result = runPlatformCommand(baseCommand, platform)
48
55
  if (result.status !== 0) {
@@ -54,8 +61,14 @@ const runAllPlatforms = (baseCommand) => {
54
61
  }
55
62
 
56
63
  const scriptIndex = args.findIndex(
57
- (x) => x === "build" || x === "start" || x === "serve" || x === "devBuild" || x === "devServe" ||
58
- isPlatformCommand(x, 'buildApp') || isPlatformCommand(x, 'setupEmulator')
64
+ (x) =>
65
+ x === "build" ||
66
+ x === "start" ||
67
+ x === "serve" ||
68
+ x === "devBuild" ||
69
+ x === "devServe" ||
70
+ isPlatformCommand(x, "buildApp") ||
71
+ isPlatformCommand(x, "setupEmulator")
59
72
  )
60
73
  const script = scriptIndex === -1 ? args[0] : args[scriptIndex]
61
74
  const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : []
@@ -92,17 +105,17 @@ function handleProcessResult(result) {
92
105
  if (result.signal === "SIGKILL") {
93
106
  console.log(
94
107
  "The build failed because the process exited too early. " +
95
- "This probably means the system ran out of memory or someone called " +
96
- "`kill -9` on the process."
108
+ "This probably means the system ran out of memory or someone called " +
109
+ "`kill -9` on the process."
97
110
  )
98
111
  } else if (result.signal === "SIGTERM") {
99
112
  console.log(
100
113
  "The build failed because the process exited too early. " +
101
- "Someone might have called `kill` or `killall`, or the system could " +
102
- "be shutting down."
114
+ "Someone might have called `kill` or `killall`, or the system could " +
115
+ "be shutting down."
103
116
  )
104
117
  }
105
118
  process.exit(1)
106
119
  }
107
120
  process.exit(result.status)
108
- }
121
+ }
package/changelog.md CHANGED
@@ -1,46 +1,155 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.0-beta.2] - 2026-05-06
4
+
5
+ - Moved Catalyst into a monorepo structure with `catalyst-core`, `create-catalyst-app`, the Catalyst docs app, and the Catalyst core test app managed from one repository.
6
+ - Replaced the internal-package pre-release flow with a local release sandbox that scaffolds a real app using current-branch CCA and a locally packed current-branch `catalyst-core`.
7
+
8
+ ## [0.1.0-beta.1] - 2026-04-15
9
+
10
+ - Promoted `0.1.0-canary.7` to the first proper beta release after stabilization.
11
+ - No code changes from `0.1.0-canary.7`; this release marks the same build as production-ready beta.
12
+
13
+ ## [0.1.0-canary.7] - 2026-03-31
14
+
15
+ - Introduced Catalyst MCP v2 with a new setup flow, database schema, knowledge base, and source-aware migration tooling for stronger project guidance and conversion workflows.
16
+ - Expanded MCP/framework knowledge coverage across SEO, observability, webpack, React Compiler, CLI, file conventions, and native hooks, while improving setup and verification messaging across supported MCP clients.
17
+
18
+ ## [0.1.0-canary.6] - 2026-03-09
19
+
20
+ - Hardened URL whitelisting with thread-safety improvements, broader test coverage, and related iOS build fixes to make access-control behavior more reliable.
21
+ - Improved compatibility and runtime resilience by softening bridge environment mismatch failures and preserving backward compatibility for `useDataProtection` on older native binaries.
22
+
23
+ ## [0.1.0-canary.5] - 2026-02-27
24
+
25
+ - Strengthened native app security with backup restrictions, screen-capture protection, web data clearing, and related Android/iOS test coverage.
26
+ - Improved universal app runtime behavior with safe-area inset support, edge-to-edge rendering, and notification permission override fixes.
27
+ - Expanded platform support with offline fallback handling, notification/access-control refinements, localhost HTTP allowances for local development, and file-picker/HTTPS server improvements.
28
+
29
+ ## [0.1.0-canary.4] - 2026-02-12
30
+
31
+ - Added Google Sign-In support for both Android and iOS in Catalyst, enabling a unified native authentication experience for apps built on the framework.
32
+ - Improved release/build reliability with related bridge and CI updates, making integration smoother and more consistent across platforms.
33
+
34
+ ## [0.1.0-canary.3] - 2026-02-04
35
+
36
+ - Android device security: added root, emulator, and Frida detection with launch-time checks and a Material Design 3 bottom sheet threat alert UI
37
+
38
+ ## [0.1.0-canary.2] - 2026-01-28
39
+
40
+ - Adds mono-repository support for catalyst
41
+ - Notifications sound channel bug fix
42
+
43
+ ## [0.1.0-canary.1] - 2026-01-12
44
+
45
+ - Universal Merge
46
+
47
+ ## [0.0.3-canary.20] - 2025-12-12
48
+
49
+ - Patch: Allow localhost traffic to be served from http
50
+
51
+ ## [0.0.3-canary.19] - 2025-12-09
52
+
53
+ - Offline fallback support: packages `public/offline.html` into Android/iOS bundles and shows it automatically when connectivity drops (with retry handling)
54
+ - Notification refactor: streamlined config toggle for local vs push, centralized permission/asset handling, and simpler routing into the web app
55
+ - Access control: combined access control config for ios
56
+
57
+ ## [0.0.3-canary.18] - 2025-11-19
58
+
59
+ - Configuration Files
60
+ - Android Native WebView - MainActivity.kt
61
+ - Android Native WebView - CustomWebview.kt
62
+
63
+ ## [0.0.3-canary.17] - 2025-11-19
64
+
65
+ - ✨ Added complete notification system (local & push)
66
+ - 🔔 New useNotification() React hook
67
+ - 📱 Firebase Cloud Messaging conditional build support
68
+ - 🤖 Android notification handling in MainActivity
69
+ - 🔧 5 new notification commands + 5 callbacks in NativeBridge
70
+ - 📦 Auto-processing of notification icons & sounds
71
+ - ⚙️ Conditional dependencies based on notification config
72
+ - 🧹 Updated .gitignore & .npmignore
73
+ - 📋 Enhanced build process with automatic permission injection
74
+ - 🔗 Deep link integration with notifications
75
+
76
+ ## [0.0.3-canary.16] - 2025-11-19
77
+
78
+ - FeaturesGallery Support for File Picker: Enhanced file picker to open native gallery for selecting images and videos
79
+ - HTTPS Framework Server: Enabled HTTPS support for the framework server with self-signed SSL certificate
80
+ - MIME Type Handling: Fixed and improved MIME type detection and handling in the file picker
81
+
82
+ ## [0.0.3-canary.15] - 2025-11-19
83
+
84
+ - Adding Android release support and appInfo key
85
+
86
+ ## [0.0.3-canary.14] - 2025-09-29
87
+
88
+ - Android custom splashscreen
89
+
90
+ ## [0.0.3-canary.13] - 2025-09-28
91
+
92
+ - Multi file support in useFilePicker hook
93
+ - Android multiple app icon support
94
+ - Android whitelisting toggle support
95
+
96
+ ## [0.0.3-canary.12] - 2025-09-26
97
+
98
+ - Universal App Context: Added comprehensive context support for building universal mobile applications
99
+ - OpenTelemetry SDK Integration: Built-in support for observability and performance monitoring with Otel SDK
100
+
101
+ ## [0.0.3-canary.11] - 2025-09-26
102
+
103
+ - Build organization: Store APKs and iOS builds organized by generation date and time for better tracking and management
104
+ - Enhanced Android native support: Add support for native keyboard and webview resizing in Android
105
+ - Device info API web support: Web support in device info API
106
+
107
+ ## [0.0.3-canary.10] - 2025-09-11
108
+
109
+ - **Sentry import bug fix**
110
+ - **Open telemetry SDK**
111
+
3
112
  ## [0.0.3-canary.9] - 2025-09-11
4
113
 
5
- - **App name configuration**
6
- - **Device Info API**
7
- - **Access control configuration**
114
+ - **App name configuration**
115
+ - **Device Info API**
116
+ - **Access control configuration**
8
117
 
9
118
  ## [0.0.3-canary.8] - 2025-01-06
10
119
 
11
- - **App icon configuration**
12
- - **Splash screen integration**
13
- - **Url Whitelisting**
120
+ - **App icon configuration**
121
+ - **Splash screen integration**
122
+ - **Url Whitelisting**
14
123
 
15
124
  ## [0.0.3-canary.7] - 2025-01-06
16
125
 
17
126
  ### 🚀 Features
18
127
 
19
- - **Native API Integration**: Enhanced native module integration for better performance
20
- - **Automated IP Resolution**: Intelligent network detection eliminates manual IP configuration
21
- - **Universal Build System**: Streamlined one-command builds for both Android and iOS platforms
22
- - **Enhanced CLI Interface**: Improved command-line tools for better developer experience
128
+ - **Native API Integration**: Enhanced native module integration for better performance
129
+ - **Automated IP Resolution**: Intelligent network detection eliminates manual IP configuration
130
+ - **Universal Build System**: Streamlined one-command builds for both Android and iOS platforms
131
+ - **Enhanced CLI Interface**: Improved command-line tools for better developer experience
23
132
 
24
133
  ### 🐛 Bug Fixes
25
134
 
26
- - Fixed IP address detection issues on development environments
27
- - Resolved build configuration conflicts between platforms
28
- - Improved error handling and recovery mechanisms
135
+ - Fixed IP address detection issues on development environments
136
+ - Resolved build configuration conflicts between platforms
137
+ - Improved error handling and recovery mechanisms
29
138
 
30
139
  ### 🔧 Improvements
31
140
 
32
- - **Performance**: Optimized native module loading and execution
33
- - **Developer Experience**: Enhanced CLI with better error messages and debugging info
34
- - **Configuration**: Dynamic config updates without requiring restarts
35
- - **Build Process**: Faster and more reliable build pipeline
141
+ - **Performance**: Optimized native module loading and execution
142
+ - **Developer Experience**: Enhanced CLI with better error messages and debugging info
143
+ - **Configuration**: Dynamic config updates without requiring restarts
144
+ - **Build Process**: Faster and more reliable build pipeline
36
145
 
37
146
  ### 🧪 Testing & Validation
38
147
 
39
- - ✅ **Android Build**: Verified APK generation, installation, and runtime behavior
40
- - ✅ **iOS Build**: Tested build process and device compatibility
41
- - ✅ **IP Detection**: Validated automatic network resolution across platforms
42
- - ✅ **Native Modules**: Confirmed API integration and performance benchmarks
43
- - ✅ **CLI Operations**: Tested enhanced command-line workflows and error handling
148
+ - ✅ **Android Build**: Verified APK generation, installation, and runtime behavior
149
+ - ✅ **iOS Build**: Tested build process and device compatibility
150
+ - ✅ **IP Detection**: Validated automatic network resolution across platforms
151
+ - ✅ **Native Modules**: Confirmed API integration and performance benchmarks
152
+ - ✅ **CLI Operations**: Tested enhanced command-line workflows and error handling
44
153
 
45
154
  ### 🔄 Breaking Changes
46
155
 
@@ -48,17 +157,17 @@
48
157
 
49
158
  ### 📝 Technical Details
50
159
 
51
- - Improved native API bridge for better cross-platform communication
52
- - Enhanced error reporting with detailed stack traces and suggestions
53
- - Optimized build configuration for faster development cycles
54
- - Added comprehensive logging for debugging and monitoring
160
+ - Improved native API bridge for better cross-platform communication
161
+ - Enhanced error reporting with detailed stack traces and suggestions
162
+ - Optimized build configuration for faster development cycles
163
+ - Added comprehensive logging for debugging and monitoring
55
164
 
56
165
  ### 🔗 Migration Notes
57
166
 
58
- - No migration steps required
59
- - Existing projects will automatically benefit from improvements
60
- - Optional: Update CLI usage to leverage new enhanced features
167
+ - No migration steps required
168
+ - Existing projects will automatically benefit from improvements
169
+ - Optional: Update CLI usage to leverage new enhanced features
61
170
 
62
171
  ## Version
63
172
 
64
- - Target version: 0.0.3-canary.7
173
+ - Target version: 0.0.3-canary.7
@@ -15,6 +15,34 @@ val keystorePassword: String? by project.properties // Changed from keyStorePas
15
15
  val keyAlias: String? by project.properties
16
16
  val keyPassword: String? by project.properties
17
17
 
18
+ fun isAllowBackupEnabled(): Boolean {
19
+ return try {
20
+ val propsFile = File("${project.projectDir}/src/main/assets/webview_config.properties")
21
+ if (!propsFile.exists()) return false
22
+ val props = Properties()
23
+ props.load(propsFile.inputStream())
24
+ props.getProperty("android.security.allowBackup", "false").trim().lowercase() == "true"
25
+ } catch (e: Exception) {
26
+ false
27
+ }
28
+ }
29
+
30
+ fun isNotificationsEnabled(): Boolean {
31
+ return try {
32
+ if (configPath == null) return false
33
+ val configFile = File(configPath!!)
34
+ if (!configFile.exists()) return false
35
+
36
+ val json = JSONObject(configFile.readText())
37
+ if (!json.has("WEBVIEW_CONFIG")) return false
38
+
39
+ val webviewConfig = json.getJSONObject("WEBVIEW_CONFIG")
40
+ webviewConfig.optJSONObject("notifications")?.optBoolean("enabled", false) ?: false
41
+ } catch (e: Exception) {
42
+ false
43
+ }
44
+ }
45
+
18
46
  fun getLocalIpAddress(): String {
19
47
  return NetworkInterface.getNetworkInterfaces().toList()
20
48
  .flatMap { it.inetAddresses.toList() }
@@ -40,6 +68,7 @@ android {
40
68
  versionName = "1.1"
41
69
  testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
42
70
  buildConfigField("String", "LOCAL_IP", "\"${getLocalIpAddress()}\"")
71
+ manifestPlaceholders["allowBackup"] = isAllowBackupEnabled()
43
72
  }
44
73
 
45
74
  // Add signing configuration for app bundle
@@ -61,7 +90,6 @@ android {
61
90
 
62
91
  buildTypes {
63
92
  debug {
64
- manifestPlaceholders += mapOf("allowCleartextTraffic" to true)
65
93
  applicationIdSuffix = ".debug"
66
94
  versionNameSuffix = "-debug"
67
95
  isMinifyEnabled = false
@@ -69,7 +97,6 @@ android {
69
97
  buildConfigField("String", "LOCAL_IP", "\"${getLocalIpAddress()}\"")
70
98
  }
71
99
  release {
72
- manifestPlaceholders += mapOf("allowCleartextTraffic" to false)
73
100
  isMinifyEnabled = true
74
101
  isShrinkResources = true
75
102
  proguardFiles(
@@ -100,12 +127,12 @@ android {
100
127
  }
101
128
 
102
129
  compileOptions {
103
- sourceCompatibility = JavaVersion.VERSION_1_8
104
- targetCompatibility = JavaVersion.VERSION_1_8
130
+ sourceCompatibility = JavaVersion.VERSION_11
131
+ targetCompatibility = JavaVersion.VERSION_11
105
132
  }
106
133
 
107
134
  kotlinOptions {
108
- jvmTarget = "1.8"
135
+ jvmTarget = "11"
109
136
  }
110
137
 
111
138
  buildFeatures {
@@ -122,6 +149,10 @@ android {
122
149
  excludes.add("META-INF/INDEX.LIST")
123
150
  excludes.add("META-INF/io.netty.versions.properties")
124
151
  }
152
+ jniLibs {
153
+ // Enable 16KB page size alignment for all native libraries
154
+ useLegacyPackaging = false
155
+ }
125
156
  }
126
157
 
127
158
  // Configure lint options
@@ -129,6 +160,26 @@ android {
129
160
  checkReleaseBuilds = true
130
161
  abortOnError = true
131
162
  }
163
+
164
+ // Configure test options for unit tests
165
+ testOptions {
166
+ unitTests {
167
+ isReturnDefaultValues = true
168
+ }
169
+ }
170
+
171
+ // Conditional source sets based on notifications config
172
+ sourceSets {
173
+ getByName("main") {
174
+ if (isNotificationsEnabled()) {
175
+ logger.info("SourceSet selected: withFcm (notifications enabled)")
176
+ java.srcDirs("src/withFcm/java")
177
+ } else {
178
+ logger.info("SourceSet selected: noFcm (notifications disabled)")
179
+ java.srcDirs("src/noFcm/java")
180
+ }
181
+ }
182
+ }
132
183
  }
133
184
 
134
185
  dependencies {
@@ -139,18 +190,30 @@ dependencies {
139
190
  testImplementation(libs.junit)
140
191
  androidTestImplementation(libs.androidx.junit)
141
192
  androidTestImplementation(libs.androidx.espresso.core)
142
- implementation("androidx.webkit:webkit:1.12.1")
193
+ implementation(libs.androidx.webkit)
194
+ implementation(libs.androidx.credentials)
195
+ implementation(libs.androidx.credentials.play.services.auth)
196
+ implementation(libs.googleid)
143
197
  implementation("org.json:json:20231013")
144
- implementation("androidx.core:core-splashscreen:1.0.1")
145
-
146
198
  // Ktor Server dependencies for FrameworkServer (~200KB total)
147
- implementation("io.ktor:ktor-server-core:2.3.7")
148
- implementation("io.ktor:ktor-server-netty:2.3.7")
149
- implementation("io.ktor:ktor-server-content-negotiation:2.3.7")
199
+ implementation("io.ktor:ktor-server-core:3.0.3")
200
+ implementation("io.ktor:ktor-server-netty:3.0.3")
201
+ implementation("io.ktor:ktor-server-content-negotiation:3.0.3")
150
202
  implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
151
-
203
+
204
+ // Security detection dependencies
205
+ implementation("com.scottyab:rootbeer-lib:0.1.1") // Root detection
206
+ implementation("com.google.android.play:integrity:1.3.0") // Play Integrity API
207
+
152
208
  // SLF4J simple logger for Ktor (optional, can be excluded if needed)
153
209
  implementation("org.slf4j:slf4j-simple:2.0.9")
210
+
211
+ // Notification dependencies - conditional based on config
212
+ if (isNotificationsEnabled()) {
213
+ implementation("androidx.localbroadcastmanager:localbroadcastmanager:1.1.0")
214
+ implementation("com.google.firebase:firebase-messaging:23.4.0")
215
+ implementation("com.google.firebase:firebase-analytics:21.5.0")
216
+ }
154
217
  }
155
218
 
156
219
  // Task to verify local IP
@@ -258,6 +321,49 @@ tasks.register("generateWebViewConfig") {
258
321
 
259
322
  extractProperties(webviewConfig)
260
323
 
324
+ // Extract splash screen configuration with defaults
325
+ if (webviewConfig.has("splashScreen")) {
326
+ val splashConfig = webviewConfig.getJSONObject("splashScreen")
327
+ properties.setProperty("splashScreen.enabled", "true")
328
+
329
+ // Duration in milliseconds
330
+ if (splashConfig.has("duration")) {
331
+ properties.setProperty("splashScreen.duration", splashConfig.get("duration").toString())
332
+ } else {
333
+ properties.setProperty("splashScreen.duration", "1000")
334
+ }
335
+
336
+ // Background color
337
+ if (splashConfig.has("backgroundColor")) {
338
+ properties.setProperty("splashScreen.backgroundColor", splashConfig.getString("backgroundColor"))
339
+ } else {
340
+ properties.setProperty("splashScreen.backgroundColor", "#ffffff")
341
+ }
342
+
343
+ // Image dimensions
344
+ if (splashConfig.has("imageWidth")) {
345
+ properties.setProperty("splashScreen.imageWidth", splashConfig.get("imageWidth").toString())
346
+ } else {
347
+ properties.setProperty("splashScreen.imageWidth", "120")
348
+ }
349
+
350
+ if (splashConfig.has("imageHeight")) {
351
+ properties.setProperty("splashScreen.imageHeight", splashConfig.get("imageHeight").toString())
352
+ } else {
353
+ properties.setProperty("splashScreen.imageHeight", "120")
354
+ }
355
+
356
+ // Corner radius
357
+ if (splashConfig.has("cornerRadius")) {
358
+ properties.setProperty("splashScreen.cornerRadius", splashConfig.get("cornerRadius").toString())
359
+ } else {
360
+ properties.setProperty("splashScreen.cornerRadius", "20")
361
+ }
362
+ } else {
363
+ // No splash screen configuration, disable it
364
+ properties.setProperty("splashScreen.enabled", "false")
365
+ }
366
+
261
367
  // Set production-specific properties for release builds
262
368
  if (gradle.startParameter.taskNames.any { it.contains("Release") || it.contains("release") }) {
263
369
  properties.setProperty("PRODUCTION_URL", "https://yourwebapp.com") // Replace with your domain
@@ -277,6 +383,10 @@ tasks.register("generateWebViewConfig") {
277
383
  }
278
384
  }
279
385
 
386
+ if (isNotificationsEnabled()) {
387
+ apply(plugin = "com.google.gms.google-services")
388
+ }
389
+
280
390
  // Task to create key store if it doesn't exist
281
391
  // Add this task to your build.gradle.kts
282
392
  tasks.register("generateKeystore") {
@@ -292,7 +402,7 @@ tasks.register("generateKeystore") {
292
402
  val keyPass = project.properties["keyPassword"] as? String ?: System.getenv("KEY_PASSWORD") ?: "android"
293
403
  val alias = project.properties["keyAlias"] as? String ?: System.getenv("KEY_ALIAS") ?: "release"
294
404
 
295
- exec {
405
+ project.exec {
296
406
  commandLine = listOf(
297
407
  "keytool",
298
408
  "-genkey",
@@ -321,7 +431,7 @@ tasks.register("createAppBundle") {
321
431
  =======================================================
322
432
  App Bundle created successfully!
323
433
 
324
- Location: ${project.buildDir}/outputs/bundle/release/app-release.aab
434
+ Location: ${layout.buildDirectory.get().asFile}/outputs/bundle/release/app-release.aab
325
435
 
326
436
  Next steps:
327
437
  1. Test your bundle with:
@@ -331,4 +441,4 @@ tasks.register("createAppBundle") {
331
441
  =======================================================
332
442
  """.trimIndent())
333
443
  }
334
- }
444
+ }
@@ -5,17 +5,88 @@
5
5
  # For more details, see
6
6
  # http://developer.android.com/guide/developing/tools/proguard.html
7
7
 
8
- # If your project uses WebView with JS, uncomment the following
9
- # and specify the fully qualified class name to the JavaScript interface
10
- # class:
11
- #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12
- # public *;
13
- #}
14
-
15
- # Uncomment this to preserve the line number information for
16
- # debugging stack traces.
17
- #-keepattributes SourceFile,LineNumberTable
18
-
19
- # If you keep the line number information, uncomment this to
20
- # hide the original source file name.
21
- #-renamesourcefileattribute SourceFile
8
+ # Keep line numbers for debugging
9
+ -keepattributes SourceFile,LineNumberTable
10
+ -renamesourcefileattribute SourceFile
11
+
12
+ # Keep JavaScript interface for WebView
13
+ -keepclassmembers class * {
14
+ @android.webkit.JavascriptInterface <methods>;
15
+ }
16
+
17
+ # Keep NativeBridge class (JavaScript interface)
18
+ -keep class io.yourname.androidproject.NativeBridge {
19
+ public *;
20
+ }
21
+
22
+ # Keep Kotlin coroutines
23
+ -keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
24
+ -keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
25
+ -dontwarn kotlinx.coroutines.**
26
+
27
+ # Keep Ktor
28
+ -keep class io.ktor.** { *; }
29
+ -keepclassmembers class io.ktor.** { volatile <fields>; }
30
+ -dontwarn io.ktor.**
31
+
32
+ # Keep Netty (used by Ktor server)
33
+ -keep class io.netty.** { *; }
34
+ -keepclassmembers class io.netty.** { *; }
35
+ -dontwarn io.netty.**
36
+
37
+ # Suppress warnings for optional Netty dependencies (not needed on Android)
38
+ -dontwarn io.netty.internal.tcnative.**
39
+ -dontwarn org.conscrypt.**
40
+ -dontwarn org.bouncycastle.**
41
+ -dontwarn org.eclipse.jetty.npn.**
42
+ -dontwarn reactor.blockhound.integration.**
43
+ -dontwarn org.apache.log4j.**
44
+ -dontwarn org.apache.logging.log4j.**
45
+
46
+ # Keep WebViewClient overrides
47
+ -keepclassmembers class * extends android.webkit.WebViewClient {
48
+ public void *(android.webkit.WebView, java.lang.String);
49
+ public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
50
+ public boolean *(android.webkit.WebView, java.lang.String);
51
+ }
52
+
53
+ # Keep WebChromeClient overrides
54
+ -keepclassmembers class * extends android.webkit.WebChromeClient {
55
+ public void *(android.webkit.WebView, java.lang.String);
56
+ }
57
+
58
+ # Keep data classes used for caching
59
+ -keep class io.yourname.androidproject.WebCacheManager$CacheEntry { *; }
60
+ -keep class io.yourname.androidproject.WebCacheManager$CacheMetadata { *; }
61
+
62
+ # Keep RootBeer library for root detection
63
+ -keep class com.scottyab.rootbeer.** { *; }
64
+ -dontwarn com.scottyab.rootbeer.**
65
+
66
+ # Security: keep only the public API surface that MainActivity wires up.
67
+ # Detection internals (EmulatorDetector, FridaDetector) and UI classes
68
+ # (SecurityBottomSheet, SecurityAlertUI) are intentionally obfuscated.
69
+ -keep class io.yourname.androidproject.security.SecurityCheckScheduler {
70
+ public static void initialize(android.content.Context, kotlinx.coroutines.CoroutineScope, io.yourname.androidproject.security.SecurityCheckScheduler$SecurityCheckCallback);
71
+ }
72
+ -keep interface io.yourname.androidproject.security.SecurityCheckScheduler$SecurityCheckCallback {
73
+ public void onSecurityCheckComplete(org.json.JSONObject);
74
+ }
75
+ -keep class io.yourname.androidproject.security.SecurityCheckManager {
76
+ public static org.json.JSONObject getLatestSecurityResults(android.content.Context);
77
+ public static java.lang.String getSecurityMode(android.content.Context);
78
+ }
79
+ -keep class io.yourname.androidproject.security.SecurityAlertHandler {
80
+ public static void handleSecurityCheckResults(android.app.Activity, org.json.JSONObject);
81
+ }
82
+
83
+ # Keep Play Integrity API
84
+ -keep class com.google.android.play.core.integrity.** { *; }
85
+ -dontwarn com.google.android.play.core.integrity.**
86
+
87
+ # Remove debug logging in release builds
88
+ -assumenosideeffects class android.util.Log {
89
+ public static *** d(...);
90
+ public static *** v(...);
91
+ public static *** i(...);
92
+ }
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <network-security-config>
3
+ <base-config cleartextTrafficPermitted="true">
4
+ <trust-anchors>
5
+ <certificates src="system" />
6
+ </trust-anchors>
7
+ </base-config>
8
+ </network-security-config>