catalyst-core 0.0.3-canary.8 → 0.1.0-beta.1

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 (184) hide show
  1. package/.release-meta.json +4 -0
  2. package/README.md +4 -5
  3. package/bin/catalyst.js +28 -15
  4. package/changelog.md +137 -27
  5. package/dist/native/androidProject/app/build.gradle.kts +125 -15
  6. package/dist/native/androidProject/app/proguard-rules.pro +85 -14
  7. package/dist/native/androidProject/app/src/debug/res/xml/network_security_config.xml +8 -0
  8. package/dist/native/androidProject/app/src/main/AndroidManifest.xml +10 -3
  9. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/BridgeMessageValidator.kt +552 -0
  10. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/CatalystConstants.kt +109 -0
  11. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/CustomWebview.kt +596 -110
  12. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/MainActivity.kt +407 -47
  13. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/MetricsMonitor.kt +341 -0
  14. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/NativeBridge.kt +964 -70
  15. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/SplashActivity.kt +111 -0
  16. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/URLWhitelistManager.kt +231 -0
  17. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/Utils.kt +49 -55
  18. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/WebCacheManager.kt +81 -8
  19. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/design/DesignTokens.kt +307 -0
  20. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/security/EmulatorDetector.kt +203 -0
  21. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/security/FridaDetector.kt +187 -0
  22. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/security/SecurityAlertHandler.kt +170 -0
  23. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/security/SecurityAlertUI.kt +366 -0
  24. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/security/SecurityBottomSheet.kt +138 -0
  25. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/security/SecurityCheckManager.kt +511 -0
  26. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/security/SecurityCheckScheduler.kt +68 -0
  27. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/BridgeUtils.kt +51 -11
  28. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/DeviceInfoUtils.kt +85 -0
  29. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/DownloadUtils.kt +36 -14
  30. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/FileUtils.kt +3 -2
  31. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/FrameworkServerUtils.kt +57 -8
  32. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/IntentUtils.kt +31 -6
  33. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/KeyboardUtil.kt +82 -0
  34. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/NetworkUtils.kt +105 -0
  35. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/NotificationConstants.kt +28 -0
  36. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/NotificationUtils.kt +639 -0
  37. package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/SafeAreaUtils.kt +62 -0
  38. package/dist/native/androidProject/app/src/main/res/drawable/splashscreen_fallback.png +0 -0
  39. package/dist/native/androidProject/app/src/main/res/layout/activity_main.xml +1 -0
  40. package/dist/native/androidProject/app/src/main/res/layout/activity_splash.xml +20 -0
  41. package/dist/native/androidProject/app/src/main/res/values/strings.xml +1 -1
  42. package/dist/native/androidProject/app/src/main/res/values/themes.xml +23 -0
  43. package/dist/native/androidProject/app/src/main/res/values-night/themes.xml +11 -0
  44. package/dist/native/androidProject/app/src/main/res/xml/network_security_config.xml +12 -0
  45. package/dist/native/androidProject/app/src/noFcm/java/io/yourname/androidproject/utils/NotificationManager.kt +166 -0
  46. package/dist/native/androidProject/app/src/noFcm/java/io/yourname/androidproject/utils/PushNotificationUtils.kt +94 -0
  47. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/BridgeMessageValidatorTest.kt +267 -0
  48. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/BridgeUtilsTest.kt +286 -0
  49. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/CameraUtilsTest.kt +296 -0
  50. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/ConfigMappingTest.kt +594 -0
  51. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/CustomWebviewTest.kt +466 -0
  52. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/DeviceInfoUtilsTest.kt +187 -0
  53. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/FileUtilsTest.kt +304 -0
  54. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/NativeBridgeTest.kt +424 -0
  55. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/NotificationUtilsTest.kt +469 -0
  56. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/SecurityBridgeTest.kt +199 -0
  57. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/URLWhitelistManagerTest.kt +462 -0
  58. package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/WebCacheManagerTest.kt +391 -0
  59. package/dist/native/androidProject/app/src/withFcm/java/io/yourname/androidproject/utils/NotificationManager.kt +224 -0
  60. package/dist/native/androidProject/app/src/withFcm/java/io/yourname/androidproject/utils/PushNotificationUtils.kt +399 -0
  61. package/dist/native/androidProject/build.gradle.kts +6 -0
  62. package/dist/native/androidProject/gradle/libs.versions.toml +8 -2
  63. package/dist/native/androidProject/settings.gradle.kts +1 -1
  64. package/dist/native/androidSetup.js +4 -3
  65. package/dist/native/assets/catalyst.png +0 -0
  66. package/dist/native/bridge/WebBridge.js +20 -3
  67. package/dist/native/bridge/constants/NativeInterfaces.js +28 -8
  68. package/dist/native/bridge/errors.js +1 -1
  69. package/dist/native/bridge/hooks.js +76 -16
  70. package/dist/native/bridge/safeArea.js +5 -0
  71. package/dist/native/bridge/standardizedHooks.js +23 -5
  72. package/dist/native/bridge/useBaseHook.js +7 -9
  73. package/dist/native/bridge/utils/CameraUtils.js +58 -0
  74. package/dist/native/bridge/utils/FileObjectConverter.js +40 -0
  75. package/dist/native/bridge/utils/NativeBridge.js +62 -8
  76. package/dist/native/buildAppAndroid.js +116 -42
  77. package/dist/native/buildAppIos.js +291 -26
  78. package/dist/native/iosnativeWebView/Configurations/Debug.xcconfig +21 -0
  79. package/dist/native/iosnativeWebView/Configurations/Release.xcconfig +24 -0
  80. package/dist/native/iosnativeWebView/Configurations/Shared.xcconfig +50 -0
  81. package/dist/native/iosnativeWebView/Package.resolved +32 -0
  82. package/dist/native/iosnativeWebView/Package.swift +37 -0
  83. package/dist/native/iosnativeWebView/Sources/CatalystNotifications/LocalNotificationHandler.swift +293 -0
  84. package/dist/native/iosnativeWebView/Sources/CatalystNotifications/NotificationManager.swift +299 -0
  85. package/dist/native/iosnativeWebView/Sources/CatalystNotifications/PushNotificationHandler.swift +199 -0
  86. package/dist/native/iosnativeWebView/Sources/Core/Constants/CatalystConstants.swift +125 -0
  87. package/dist/native/iosnativeWebView/Sources/Core/Constants/ConfigConstants.swift +70 -0
  88. package/dist/native/iosnativeWebView/Sources/Core/Notifications/NotificationModels.swift +156 -0
  89. package/dist/native/iosnativeWebView/Sources/Core/Protocols/NotificationHandlerProtocol.swift +35 -0
  90. package/dist/native/iosnativeWebView/Sources/Core/Utils/BootTimingUtility.swift +26 -0
  91. package/dist/native/iosnativeWebView/{iosnativeWebView → Sources/Core/Utils}/CacheManager.swift +69 -36
  92. package/dist/native/iosnativeWebView/Sources/Core/Utils/CameraTransportUtils.swift +363 -0
  93. package/dist/native/iosnativeWebView/Sources/Core/Utils/DeviceInfoUtils.swift +67 -0
  94. package/dist/native/iosnativeWebView/Sources/Core/Utils/FilePickerHandler.swift +1053 -0
  95. package/dist/native/iosnativeWebView/Sources/Core/Utils/FrameworkServerUtils.swift +901 -0
  96. package/dist/native/iosnativeWebView/{iosnativeWebView → Sources/Core/Utils}/ImageHandler.swift +206 -20
  97. package/dist/native/iosnativeWebView/Sources/Core/Utils/NetworkMonitor.swift +112 -0
  98. package/dist/native/iosnativeWebView/Sources/Core/Utils/NotificationHandlerProvider.swift +20 -0
  99. package/dist/native/iosnativeWebView/Sources/Core/Utils/NullNotificationHandler.swift +85 -0
  100. package/dist/native/iosnativeWebView/{iosnativeWebView → Sources/Core/Utils}/ResourceURLProtocol.swift +60 -25
  101. package/dist/native/iosnativeWebView/Sources/Core/Utils/SafeAreaUtils.swift +132 -0
  102. package/dist/native/iosnativeWebView/Sources/Core/Utils/ScreenSecureManager.swift +131 -0
  103. package/dist/native/iosnativeWebView/Sources/Core/Utils/URLWhitelistManager.swift +224 -0
  104. package/dist/native/iosnativeWebView/Sources/Core/Utils/WebKitConfig.swift +43 -0
  105. package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeCommandHandler.swift +991 -0
  106. package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeDelegateHandler.swift +166 -0
  107. package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeFileHandler.swift +340 -0
  108. package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeJavaScriptInterface.swift +149 -0
  109. package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeMessageValidator.swift +611 -0
  110. package/dist/native/iosnativeWebView/Sources/Core/WebView/NativeBridge.swift +334 -0
  111. package/dist/native/iosnativeWebView/Sources/Core/WebView/SplashView.swift +95 -0
  112. package/dist/native/iosnativeWebView/Sources/Core/WebView/SplashViewModel.swift +86 -0
  113. package/dist/native/iosnativeWebView/Sources/Core/WebView/WebView.swift +181 -0
  114. package/dist/native/iosnativeWebView/Sources/Core/WebView/WebViewModel.swift +182 -0
  115. package/dist/native/iosnativeWebView/Sources/Core/WebView/WebViewNavigationDelegate.swift +395 -0
  116. package/dist/native/iosnativeWebView/iosnativeWebView/AppDelegate.swift +84 -0
  117. package/dist/native/iosnativeWebView/iosnativeWebView/Assets.xcassets/AccentColor.colorset/Contents.json +8 -8
  118. package/dist/native/iosnativeWebView/iosnativeWebView/Assets.xcassets/AppIcon.appiconset/Contents.json +10 -10
  119. package/dist/native/iosnativeWebView/iosnativeWebView/Assets.xcassets/Contents.json +4 -4
  120. package/dist/native/iosnativeWebView/iosnativeWebView/ContentView.swift +65 -10
  121. package/dist/native/iosnativeWebView/iosnativeWebView/Info-Release.plist +21 -0
  122. package/dist/native/iosnativeWebView/iosnativeWebView/Info.plist +13 -0
  123. package/dist/native/iosnativeWebView/iosnativeWebView/Preview Content/Preview Assets.xcassets/Contents.json +4 -4
  124. package/dist/native/iosnativeWebView/iosnativeWebView/iosnativeWebView.entitlements +12 -0
  125. package/dist/native/iosnativeWebView/iosnativeWebView/iosnativeWebViewApp.swift +80 -0
  126. package/dist/native/iosnativeWebView/iosnativeWebView/localhost.p12 +0 -0
  127. package/dist/native/iosnativeWebView/iosnativeWebView.xcodeproj/project.pbxproj +118 -100
  128. package/dist/native/iosnativeWebView/iosnativeWebView.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +69 -0
  129. package/dist/native/iosnativeWebView/iosnativeWebView.xcodeproj/xcshareddata/xcschemes/iosnativeWebView.xcscheme +9 -4
  130. package/dist/native/iosnativeWebView/iosnativeWebView.xctestplan +47 -0
  131. package/dist/native/iosnativeWebView/iosnativeWebViewTests/BootTimingUtilityTests.swift +236 -0
  132. package/dist/native/iosnativeWebView/iosnativeWebViewTests/BridgeCommandHandlerSecurityTests.swift +212 -0
  133. package/dist/native/iosnativeWebView/iosnativeWebViewTests/BridgeMessageValidatorTests.swift +418 -0
  134. package/dist/native/iosnativeWebView/iosnativeWebViewTests/CacheManagerTests.swift +390 -0
  135. package/dist/native/iosnativeWebView/iosnativeWebViewTests/ConfigMappingTests.swift +299 -0
  136. package/dist/native/iosnativeWebView/iosnativeWebViewTests/FilePickerHandlerTests.swift +383 -0
  137. package/dist/native/iosnativeWebView/iosnativeWebViewTests/FrameworkServerUtilsTests.swift +391 -0
  138. package/dist/native/iosnativeWebView/iosnativeWebViewTests/NativeBridgeTests.swift +581 -0
  139. package/dist/native/iosnativeWebView/iosnativeWebViewTests/NotificationHandlerTests.swift +430 -0
  140. package/dist/native/iosnativeWebView/iosnativeWebViewTests/ScreenSecureManagerTests.swift +121 -0
  141. package/dist/native/iosnativeWebView/iosnativeWebViewTests/URLWhitelistManagerTests.swift +367 -0
  142. package/dist/native/iosnativeWebView/iosnativeWebViewTests/WebViewTests.swift +440 -0
  143. package/dist/native/renameAndroidProject.js +80 -70
  144. package/dist/native/setupEmulatorIos.js +22 -5
  145. package/dist/native/setupServer.js +11 -10
  146. package/dist/native/terminalProgress.js +10 -10
  147. package/dist/native/utils.js +4 -5
  148. package/dist/otel.js +4 -0
  149. package/dist/scripts/build.js +2 -2
  150. package/dist/scripts/devBuild.js +2 -2
  151. package/dist/scripts/loadEnvironmentVariables.js +3 -1
  152. package/dist/scripts/scriptUtils.js +2 -2
  153. package/dist/sentry.js +4 -1
  154. package/dist/server/renderer/document/Body.js +4 -4
  155. package/dist/server/renderer/handler.js +7 -5
  156. package/dist/webpack/development.client.babel.js +1 -1
  157. package/mcp_v2/conversion-tasks.json +326 -0
  158. package/mcp_v2/knowledge-base.json +1068 -0
  159. package/mcp_v2/lib/helpers.js +159 -0
  160. package/mcp_v2/mcp.js +562 -0
  161. package/mcp_v2/package.json +13 -0
  162. package/mcp_v2/schema.sql +88 -0
  163. package/mcp_v2/setup.js +276 -0
  164. package/mcp_v2/tools/build.js +686 -0
  165. package/mcp_v2/tools/config.js +453 -0
  166. package/mcp_v2/tools/conversion.js +799 -0
  167. package/mcp_v2/tools/debug.js +113 -0
  168. package/mcp_v2/tools/knowledge.js +219 -0
  169. package/mcp_v2/tools/sync.js +23 -0
  170. package/mcp_v2/tools/tasks.js +945 -0
  171. package/package.json +6 -3
  172. package/dist/native/androidProject/.idea/.name +0 -1
  173. package/dist/native/androidProject/.idea/AndroidProjectSystem.xml +0 -6
  174. package/dist/native/androidProject/.idea/compiler.xml +0 -6
  175. package/dist/native/androidProject/.idea/deploymentTargetSelector.xml +0 -10
  176. package/dist/native/androidProject/.idea/gradle.xml +0 -19
  177. package/dist/native/androidProject/.idea/migrations.xml +0 -10
  178. package/dist/native/androidProject/.idea/misc.xml +0 -5
  179. package/dist/native/androidProject/.idea/runConfigurations.xml +0 -17
  180. package/dist/native/androidProject/.idea/vcs.xml +0 -6
  181. package/dist/native/iosnativeWebView/iosnativeWebView/NativeBridge.swift +0 -217
  182. package/dist/native/iosnativeWebView/iosnativeWebView/WebView.swift +0 -96
  183. package/dist/native/iosnativeWebView/iosnativeWebView/WebViewModel.swift +0 -47
  184. package/dist/native/iosnativeWebView/iosnativeWebView/WebViewNavigationDelegate.swift +0 -140
@@ -0,0 +1,4 @@
1
+ {
2
+ "tag": "beta",
3
+ "version": "0.1.0-beta.1"
4
+ }
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,40 +1,150 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.0-beta.1] - 2026-04-15
4
+
5
+ - Promoted `0.1.0-canary.7` to the first proper beta release after stabilization.
6
+ - No code changes from `0.1.0-canary.7`; this release marks the same build as production-ready beta.
7
+
8
+ ## [0.1.0-canary.7] - 2026-03-31
9
+
10
+ - 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.
11
+ - 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.
12
+
13
+ ## [0.1.0-canary.6] - 2026-03-09
14
+
15
+ - Hardened URL whitelisting with thread-safety improvements, broader test coverage, and related iOS build fixes to make access-control behavior more reliable.
16
+ - Improved compatibility and runtime resilience by softening bridge environment mismatch failures and preserving backward compatibility for `useDataProtection` on older native binaries.
17
+
18
+ ## [0.1.0-canary.5] - 2026-02-27
19
+
20
+ - Strengthened native app security with backup restrictions, screen-capture protection, web data clearing, and related Android/iOS test coverage.
21
+ - Improved universal app runtime behavior with safe-area inset support, edge-to-edge rendering, and notification permission override fixes.
22
+ - Expanded platform support with offline fallback handling, notification/access-control refinements, localhost HTTP allowances for local development, and file-picker/HTTPS server improvements.
23
+
24
+ ## [0.1.0-canary.4] - 2026-02-12
25
+
26
+ - Added Google Sign-In support for both Android and iOS in Catalyst, enabling a unified native authentication experience for apps built on the framework.
27
+ - Improved release/build reliability with related bridge and CI updates, making integration smoother and more consistent across platforms.
28
+
29
+ ## [0.1.0-canary.3] - 2026-02-04
30
+
31
+ - Android device security: added root, emulator, and Frida detection with launch-time checks and a Material Design 3 bottom sheet threat alert UI
32
+
33
+ ## [0.1.0-canary.2] - 2026-01-28
34
+
35
+ - Adds mono-repository support for catalyst
36
+ - Notifications sound channel bug fix
37
+
38
+ ## [0.1.0-canary.1] - 2026-01-12
39
+
40
+ - Universal Merge
41
+
42
+ ## [0.0.3-canary.20] - 2025-12-12
43
+
44
+ - Patch: Allow localhost traffic to be served from http
45
+
46
+ ## [0.0.3-canary.19] - 2025-12-09
47
+
48
+ - Offline fallback support: packages `public/offline.html` into Android/iOS bundles and shows it automatically when connectivity drops (with retry handling)
49
+ - Notification refactor: streamlined config toggle for local vs push, centralized permission/asset handling, and simpler routing into the web app
50
+ - Access control: combined access control config for ios
51
+
52
+ ## [0.0.3-canary.18] - 2025-11-19
53
+
54
+ - Configuration Files
55
+ - Android Native WebView - MainActivity.kt
56
+ - Android Native WebView - CustomWebview.kt
57
+
58
+ ## [0.0.3-canary.17] - 2025-11-19
59
+
60
+ - ✨ Added complete notification system (local & push)
61
+ - 🔔 New useNotification() React hook
62
+ - 📱 Firebase Cloud Messaging conditional build support
63
+ - 🤖 Android notification handling in MainActivity
64
+ - 🔧 5 new notification commands + 5 callbacks in NativeBridge
65
+ - 📦 Auto-processing of notification icons & sounds
66
+ - ⚙️ Conditional dependencies based on notification config
67
+ - 🧹 Updated .gitignore & .npmignore
68
+ - 📋 Enhanced build process with automatic permission injection
69
+ - 🔗 Deep link integration with notifications
70
+
71
+ ## [0.0.3-canary.16] - 2025-11-19
72
+
73
+ - FeaturesGallery Support for File Picker: Enhanced file picker to open native gallery for selecting images and videos
74
+ - HTTPS Framework Server: Enabled HTTPS support for the framework server with self-signed SSL certificate
75
+ - MIME Type Handling: Fixed and improved MIME type detection and handling in the file picker
76
+
77
+ ## [0.0.3-canary.15] - 2025-11-19
78
+
79
+ - Adding Android release support and appInfo key
80
+
81
+ ## [0.0.3-canary.14] - 2025-09-29
82
+
83
+ - Android custom splashscreen
84
+
85
+ ## [0.0.3-canary.13] - 2025-09-28
86
+
87
+ - Multi file support in useFilePicker hook
88
+ - Android multiple app icon support
89
+ - Android whitelisting toggle support
90
+
91
+ ## [0.0.3-canary.12] - 2025-09-26
92
+
93
+ - Universal App Context: Added comprehensive context support for building universal mobile applications
94
+ - OpenTelemetry SDK Integration: Built-in support for observability and performance monitoring with Otel SDK
95
+
96
+ ## [0.0.3-canary.11] - 2025-09-26
97
+
98
+ - Build organization: Store APKs and iOS builds organized by generation date and time for better tracking and management
99
+ - Enhanced Android native support: Add support for native keyboard and webview resizing in Android
100
+ - Device info API web support: Web support in device info API
101
+
102
+ ## [0.0.3-canary.10] - 2025-09-11
103
+
104
+ - **Sentry import bug fix**
105
+ - **Open telemetry SDK**
106
+
107
+ ## [0.0.3-canary.9] - 2025-09-11
108
+
109
+ - **App name configuration**
110
+ - **Device Info API**
111
+ - **Access control configuration**
112
+
3
113
  ## [0.0.3-canary.8] - 2025-01-06
4
114
 
5
- - **App icon configuration**
6
- - **Splash screen integration**
7
- - **Url Whitelisting**
115
+ - **App icon configuration**
116
+ - **Splash screen integration**
117
+ - **Url Whitelisting**
8
118
 
9
119
  ## [0.0.3-canary.7] - 2025-01-06
10
120
 
11
121
  ### 🚀 Features
12
122
 
13
- - **Native API Integration**: Enhanced native module integration for better performance
14
- - **Automated IP Resolution**: Intelligent network detection eliminates manual IP configuration
15
- - **Universal Build System**: Streamlined one-command builds for both Android and iOS platforms
16
- - **Enhanced CLI Interface**: Improved command-line tools for better developer experience
123
+ - **Native API Integration**: Enhanced native module integration for better performance
124
+ - **Automated IP Resolution**: Intelligent network detection eliminates manual IP configuration
125
+ - **Universal Build System**: Streamlined one-command builds for both Android and iOS platforms
126
+ - **Enhanced CLI Interface**: Improved command-line tools for better developer experience
17
127
 
18
128
  ### 🐛 Bug Fixes
19
129
 
20
- - Fixed IP address detection issues on development environments
21
- - Resolved build configuration conflicts between platforms
22
- - Improved error handling and recovery mechanisms
130
+ - Fixed IP address detection issues on development environments
131
+ - Resolved build configuration conflicts between platforms
132
+ - Improved error handling and recovery mechanisms
23
133
 
24
134
  ### 🔧 Improvements
25
135
 
26
- - **Performance**: Optimized native module loading and execution
27
- - **Developer Experience**: Enhanced CLI with better error messages and debugging info
28
- - **Configuration**: Dynamic config updates without requiring restarts
29
- - **Build Process**: Faster and more reliable build pipeline
136
+ - **Performance**: Optimized native module loading and execution
137
+ - **Developer Experience**: Enhanced CLI with better error messages and debugging info
138
+ - **Configuration**: Dynamic config updates without requiring restarts
139
+ - **Build Process**: Faster and more reliable build pipeline
30
140
 
31
141
  ### 🧪 Testing & Validation
32
142
 
33
- - ✅ **Android Build**: Verified APK generation, installation, and runtime behavior
34
- - ✅ **iOS Build**: Tested build process and device compatibility
35
- - ✅ **IP Detection**: Validated automatic network resolution across platforms
36
- - ✅ **Native Modules**: Confirmed API integration and performance benchmarks
37
- - ✅ **CLI Operations**: Tested enhanced command-line workflows and error handling
143
+ - ✅ **Android Build**: Verified APK generation, installation, and runtime behavior
144
+ - ✅ **iOS Build**: Tested build process and device compatibility
145
+ - ✅ **IP Detection**: Validated automatic network resolution across platforms
146
+ - ✅ **Native Modules**: Confirmed API integration and performance benchmarks
147
+ - ✅ **CLI Operations**: Tested enhanced command-line workflows and error handling
38
148
 
39
149
  ### 🔄 Breaking Changes
40
150
 
@@ -42,17 +152,17 @@
42
152
 
43
153
  ### 📝 Technical Details
44
154
 
45
- - Improved native API bridge for better cross-platform communication
46
- - Enhanced error reporting with detailed stack traces and suggestions
47
- - Optimized build configuration for faster development cycles
48
- - Added comprehensive logging for debugging and monitoring
155
+ - Improved native API bridge for better cross-platform communication
156
+ - Enhanced error reporting with detailed stack traces and suggestions
157
+ - Optimized build configuration for faster development cycles
158
+ - Added comprehensive logging for debugging and monitoring
49
159
 
50
160
  ### 🔗 Migration Notes
51
161
 
52
- - No migration steps required
53
- - Existing projects will automatically benefit from improvements
54
- - Optional: Update CLI usage to leverage new enhanced features
162
+ - No migration steps required
163
+ - Existing projects will automatically benefit from improvements
164
+ - Optional: Update CLI usage to leverage new enhanced features
55
165
 
56
166
  ## Version
57
167
 
58
- - Target version: 0.0.3-canary.7
168
+ - 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>