catalyst-core 0.1.0-canary.9 → 0.2.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.
- package/README.md +1 -1
- package/bin/catalyst.js +8 -1
- package/changelog.md +6 -0
- package/dist/native/androidProject/app/build.gradle.kts +34 -8
- package/dist/native/androidProject/app/src/main/AndroidManifest.xml +2 -1
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/BridgeMessageValidator.kt +1 -1
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/CustomWebview.kt +270 -78
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/MainActivity.kt +34 -5
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/NativeBridge.kt +149 -1
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/NativeCameraManager.kt +337 -0
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/OfflineCacheService.kt +374 -0
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/TransitionManager.kt +202 -0
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/WebCacheManager.kt +156 -39
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/camera/BarcodeDetector.kt +123 -0
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/camera/CameraSessionManager.kt +244 -0
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/camera/HoldController.kt +70 -0
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/camera/TorchController.kt +57 -0
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/camera/VideoStreamState.kt +41 -0
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/camera/VideoStreamStateMachine.kt +40 -0
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/camera/ViewfinderMapper.kt +75 -0
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/camera/ZoomController.kt +156 -0
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/plugins/CatalystPlugin.kt +7 -0
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/plugins/GeneratedPluginIndex.kt +6 -0
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/plugins/PluginBridge.kt +253 -0
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/security/FridaDetector.kt +16 -5
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/BridgeUtils.kt +42 -5
- package/dist/native/androidProject/app/src/main/java/io/yourname/androidproject/utils/FrameworkServerUtils.kt +7 -3
- package/dist/native/androidProject/app/src/main/res/drawable/debug_viewfinder_border.xml +8 -0
- package/dist/native/androidProject/app/src/main/res/layout/activity_main.xml +37 -0
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/CustomWebviewTest.kt +7 -2
- package/dist/native/androidProject/app/src/test/java/io/yourname/androidproject/plugins/PluginBridgeTest.kt +139 -0
- package/dist/native/androidSetup.js +1 -0
- package/dist/native/bridge/WebBridge.js +5 -5
- package/dist/native/bridge/constants/NativeInterfaces.js +9 -5
- package/dist/native/bridge/hooks/index.js +1 -0
- package/dist/native/bridge/hooks/useCamera.js +9 -0
- package/dist/native/bridge/hooks/useDataProtection.js +2 -0
- package/dist/native/bridge/hooks/useDeviceInfo.js +2 -0
- package/dist/native/bridge/hooks/useFilePicker.js +2 -0
- package/dist/native/bridge/hooks/useGoogleSignIn.js +1 -0
- package/dist/native/bridge/hooks/useHapticFeedback.js +1 -0
- package/dist/native/bridge/hooks/useIntent.js +1 -0
- package/dist/native/bridge/hooks/useNativeTransition.js +43 -0
- package/dist/native/bridge/hooks/useNetworkStatus.js +3 -0
- package/dist/native/bridge/hooks/useNotification.js +2 -0
- package/dist/native/bridge/hooks/useSafeArea.js +2 -0
- package/dist/native/bridge/hooks/useVideoStream.js +6 -0
- package/dist/native/bridge/hooks/utils.js +1 -0
- package/dist/native/bridge/hooks.js +1 -137
- package/dist/native/bridge/useBaseHook.js +12 -7
- package/dist/native/bridge/utils/NativeBridge.js +41 -6
- package/dist/native/buildAndroid/assets.js +52 -0
- package/dist/native/buildAndroid/build.js +19 -0
- package/dist/native/buildAndroid/config.js +1 -0
- package/dist/native/buildAndroid/index.js +1 -0
- package/dist/native/buildAppAndroid.js +2 -150
- package/dist/native/buildAppIos.js +2 -312
- package/dist/native/buildIos/assets.js +8 -0
- package/dist/native/buildIos/build.js +40 -0
- package/dist/native/buildIos/config.js +71 -0
- package/dist/native/buildIos/index.js +6 -0
- package/dist/native/buildIos/plugins.js +45 -0
- package/dist/native/internalPluginUtils.js +7 -0
- package/dist/native/iosnativeWebView/Package.resolved +36 -0
- package/dist/native/iosnativeWebView/Sources/Core/Camera/BarcodeDetector.swift +116 -0
- package/dist/native/iosnativeWebView/Sources/Core/Camera/CameraPreviewView.swift +58 -0
- package/dist/native/iosnativeWebView/Sources/Core/Camera/CameraSessionManager.swift +308 -0
- package/dist/native/iosnativeWebView/Sources/Core/Camera/HoldController.swift +63 -0
- package/dist/native/iosnativeWebView/Sources/Core/Camera/NativeCameraManager.swift +194 -0
- package/dist/native/iosnativeWebView/Sources/Core/Camera/TorchController.swift +60 -0
- package/dist/native/iosnativeWebView/Sources/Core/Camera/VideoStreamState.swift +44 -0
- package/dist/native/iosnativeWebView/Sources/Core/Camera/VideoStreamStateMachine.swift +60 -0
- package/dist/native/iosnativeWebView/Sources/Core/Camera/ZoomController.swift +130 -0
- package/dist/native/iosnativeWebView/Sources/Core/Constants/CatalystConstants.swift +11 -1
- package/dist/native/iosnativeWebView/Sources/Core/Constants/ConfigConstants.swift +2 -1
- package/dist/native/iosnativeWebView/Sources/Core/Plugins/CatalystPlugin.swift +5 -0
- package/dist/native/iosnativeWebView/Sources/Core/Plugins/GeneratedPluginIndex.swift +6 -0
- package/dist/native/iosnativeWebView/Sources/Core/Plugins/PluginBridge.swift +364 -0
- package/dist/native/iosnativeWebView/Sources/Core/Utils/CacheManager.swift +39 -4
- package/dist/native/iosnativeWebView/Sources/Core/Utils/OfflineCacheService.swift +683 -0
- package/dist/native/iosnativeWebView/Sources/Core/Utils/OfflineURLSchemeHandler.swift +94 -0
- package/dist/native/iosnativeWebView/Sources/Core/Utils/ResourceURLProtocol.swift +19 -6
- package/dist/native/iosnativeWebView/Sources/Core/Utils/SafeAreaUtils.swift +1 -0
- package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeCommandHandler.swift +1 -0
- package/dist/native/iosnativeWebView/Sources/Core/WebView/BridgeMessageValidator.swift +4 -1
- package/dist/native/iosnativeWebView/Sources/Core/WebView/NativeBridge.swift +227 -4
- package/dist/native/iosnativeWebView/Sources/Core/WebView/TransitionManager.swift +169 -0
- package/dist/native/iosnativeWebView/Sources/Core/WebView/WeakScriptMessageHandler.swift +14 -0
- package/dist/native/iosnativeWebView/Sources/Core/WebView/WebView.swift +53 -8
- package/dist/native/iosnativeWebView/Sources/Core/WebView/WebViewNavigationDelegate.swift +88 -4
- package/dist/native/iosnativeWebView/iosnativeWebView/ContentView.swift +30 -11
- package/dist/native/iosnativeWebView/iosnativeWebView/Info.plist +11 -17
- package/dist/native/iosnativeWebView/iosnativeWebView.xcodeproj/project.pbxproj +8 -2
- package/dist/native/iosnativeWebView/iosnativeWebViewTests/BootTimingUtilityTests.swift +1 -1
- package/dist/native/iosnativeWebView/iosnativeWebViewTests/ConfigMappingTests.swift +4 -2
- package/dist/native/iosnativeWebView/iosnativeWebViewTests/PluginBridgeTests.swift +160 -0
- package/dist/native/plugin-bridge/PluginBridge.js +1 -0
- package/dist/native/pluginComposerAndroid.js +28 -0
- package/dist/native/pluginComposerIos.js +16 -0
- package/dist/native/renameAndroidProject.js +5 -5
- package/dist/native/setupEmulatorIos.js +6 -4
- package/dist/native/setupServer.js +2 -3
- package/dist/native/utils.js +4 -1
- package/dist/offline/catalyst-sw.js +1 -0
- package/dist/offline/registerServiceWorker.js +1 -0
- package/dist/otel.js +70 -2
- package/dist/router/ClientRouter.js +1 -1
- package/dist/scripts/build.js +1 -1
- package/dist/scripts/cleanCache.js +1 -0
- package/dist/scripts/devBuild.js +1 -1
- package/dist/scripts/devServe.js +1 -1
- package/dist/scripts/generateOfflineManifest.js +1 -0
- package/dist/scripts/loadEnvironmentVariables.js +1 -2
- package/dist/scripts/plugins.js +1 -0
- package/dist/scripts/registerAliases.js +6 -2
- package/dist/scripts/scriptUtils.js +2 -1
- package/dist/scripts/serve.js +2 -1
- package/dist/scripts/start.js +7 -2
- package/dist/server/expressServer.js +4 -8
- package/dist/server/renderer/document/Body.js +4 -4
- package/dist/server/renderer/document/Head.js +2 -2
- package/dist/server/renderer/extract.js +31 -27
- package/dist/server/renderer/handler.js +47 -24
- package/dist/server/renderer/index.js +1 -1
- package/dist/server/startServer.js +57 -7
- package/dist/server/utils/userAgentUtil.js +9 -3
- package/dist/server/utils/validator.js +1 -1
- package/dist/webpack/babel-plugins/remove-client.plugin.js +2 -2
- package/dist/webpack/babel-plugins/remove-ssr.plugin.js +2 -2
- package/dist/webpack/babel.config.client.js +1 -1
- package/dist/webpack/babel.config.ssr.js +1 -1
- package/dist/webpack/base.babel.js +7 -8
- package/dist/webpack/development.client.babel.js +7 -16
- package/dist/webpack/production.client.babel.js +1 -1
- package/dist/webpack/production.ssr.babel.js +5 -1
- package/mcp_v2/knowledge-base.json +206 -100
- package/mcp_v2/lib/helpers.js +42 -8
- package/mcp_v2/lib/seed.js +88 -0
- package/mcp_v2/mcp.js +150 -4
- package/mcp_v2/setup.js +30 -193
- package/mcp_v2/tools/build.js +1 -1
- package/mcp_v2/tools/config.js +16 -4
- package/mcp_v2/tools/conversion.js +11 -11
- package/mcp_v2/tools/github.js +1117 -0
- package/mcp_v2/tools/knowledge.js +16 -3
- package/mcp_v2/tools/sync.js +179 -10
- package/mcp_v2/tools/tasks.js +13 -4
- package/package.json +20 -8
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
Catalyst offers a comprehensive suite of features designed for modern web development. It includes isomorphic rendering for optimal performance, an extendable server with full-stack capabilities, and configurable state management. The framework employs smart prefetching of data and chunks, allows easy configuration of global styles and layouts, and provides SEO optimization at both global and page levels.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Catalyst also supports universal apps for Android and iOS. See the [Universal App guide](https://catalyst.1mg.com/public_docs/content/Guides%20and%20Tutorials/First%20Universal%20App/first-universal-app) to get started.
|
|
18
18
|
|
|
19
19
|
## Installation
|
|
20
20
|
|
package/bin/catalyst.js
CHANGED
|
@@ -13,6 +13,8 @@ const validCommands = [
|
|
|
13
13
|
"serve",
|
|
14
14
|
"devBuild",
|
|
15
15
|
"devServe",
|
|
16
|
+
"plugin",
|
|
17
|
+
"plugins",
|
|
16
18
|
"buildApp",
|
|
17
19
|
"buildApp:ios",
|
|
18
20
|
"buildApp:android",
|
|
@@ -67,11 +69,14 @@ const scriptIndex = args.findIndex(
|
|
|
67
69
|
x === "serve" ||
|
|
68
70
|
x === "devBuild" ||
|
|
69
71
|
x === "devServe" ||
|
|
72
|
+
x === "plugin" ||
|
|
73
|
+
x === "plugins" ||
|
|
70
74
|
isPlatformCommand(x, "buildApp") ||
|
|
71
75
|
isPlatformCommand(x, "setupEmulator")
|
|
72
76
|
)
|
|
73
77
|
const script = scriptIndex === -1 ? args[0] : args[scriptIndex]
|
|
74
78
|
const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : []
|
|
79
|
+
const resolvedScript = script === "plugin" ? "plugins" : script
|
|
75
80
|
|
|
76
81
|
if (validCommands.includes(script)) {
|
|
77
82
|
// Handle platform-specific or combined commands
|
|
@@ -90,7 +95,9 @@ if (validCommands.includes(script)) {
|
|
|
90
95
|
// Original commands
|
|
91
96
|
const result = spawnSync(
|
|
92
97
|
process.execPath,
|
|
93
|
-
nodeArgs
|
|
98
|
+
nodeArgs
|
|
99
|
+
.concat(require.resolve("../dist/scripts/" + resolvedScript))
|
|
100
|
+
.concat(args.slice(scriptIndex + 1)),
|
|
94
101
|
{ stdio: "inherit" }
|
|
95
102
|
)
|
|
96
103
|
handleProcessResult(result)
|
package/changelog.md
CHANGED
|
@@ -5,6 +5,12 @@
|
|
|
5
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
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
7
|
|
|
8
|
+
## [0.1.0-canary.8] - 2026-04-15
|
|
9
|
+
|
|
10
|
+
- Introduced Catalyst’s internal plugin architecture, adding the `PluginBridge` web API, native plugin runtimes for Android and iOS, and manifest-driven build composition for modular native capabilities.
|
|
11
|
+
- Added config-based plugin enablement through `WEBVIEW_CONFIG.plugins` and a `catalyst plugins` CLI for discovering and managing internal framework plugins from the app layer.
|
|
12
|
+
- Shipped the first cross-platform migrated plugin, `device_info`
|
|
13
|
+
|
|
8
14
|
## [0.1.0-beta.1] - 2026-04-15
|
|
9
15
|
|
|
10
16
|
- Promoted `0.1.0-canary.7` to the first proper beta release after stabilization.
|
|
@@ -10,7 +10,7 @@ buildscript {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
val configPath
|
|
13
|
+
val configPath = findProperty("configPath") as? String
|
|
14
14
|
val keystorePassword: String? by project.properties // Changed from keyStorePassword to keystorePassword
|
|
15
15
|
val keyAlias: String? by project.properties
|
|
16
16
|
val keyPassword: String? by project.properties
|
|
@@ -29,15 +29,32 @@ fun isAllowBackupEnabled(): Boolean {
|
|
|
29
29
|
|
|
30
30
|
fun isNotificationsEnabled(): Boolean {
|
|
31
31
|
return try {
|
|
32
|
-
if (configPath
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
if (configPath != null) {
|
|
33
|
+
val configFile = File(configPath)
|
|
34
|
+
if (configFile.exists()) {
|
|
35
|
+
val json = JSONObject(configFile.readText())
|
|
36
|
+
if (json.has("WEBVIEW_CONFIG")) {
|
|
37
|
+
val webviewConfig = json.getJSONObject("WEBVIEW_CONFIG")
|
|
38
|
+
return webviewConfig.optJSONObject("notifications")?.optBoolean("enabled", false) ?: false
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
35
42
|
|
|
36
|
-
val
|
|
37
|
-
if (
|
|
43
|
+
val generatedBuildProps = File("${project.projectDir}/catalyst-build.properties")
|
|
44
|
+
if (generatedBuildProps.exists()) {
|
|
45
|
+
val props = Properties()
|
|
46
|
+
props.load(generatedBuildProps.inputStream())
|
|
47
|
+
return props.getProperty("notifications.enabled", "false").trim().lowercase() == "true"
|
|
48
|
+
}
|
|
38
49
|
|
|
39
|
-
val
|
|
40
|
-
|
|
50
|
+
val webviewProps = File("${project.projectDir}/src/main/assets/webview_config.properties")
|
|
51
|
+
if (webviewProps.exists()) {
|
|
52
|
+
val props = Properties()
|
|
53
|
+
props.load(webviewProps.inputStream())
|
|
54
|
+
return props.getProperty("notifications.enabled", "false").trim().lowercase() == "true"
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
false
|
|
41
58
|
} catch (e: Exception) {
|
|
42
59
|
false
|
|
43
60
|
}
|
|
@@ -208,6 +225,15 @@ dependencies {
|
|
|
208
225
|
// SLF4J simple logger for Ktor (optional, can be excluded if needed)
|
|
209
226
|
implementation("org.slf4j:slf4j-simple:2.0.9")
|
|
210
227
|
|
|
228
|
+
// CameraX
|
|
229
|
+
implementation("androidx.camera:camera-core:1.3.4")
|
|
230
|
+
implementation("androidx.camera:camera-camera2:1.3.4")
|
|
231
|
+
implementation("androidx.camera:camera-lifecycle:1.3.4")
|
|
232
|
+
implementation("androidx.camera:camera-view:1.3.4")
|
|
233
|
+
|
|
234
|
+
// ML Kit Barcode Scanning
|
|
235
|
+
implementation("com.google.mlkit:barcode-scanning:17.3.0")
|
|
236
|
+
|
|
211
237
|
// Notification dependencies - conditional based on config
|
|
212
238
|
if (isNotificationsEnabled()) {
|
|
213
239
|
implementation("androidx.localbroadcastmanager:localbroadcastmanager:1.1.0")
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
android:usesCleartextTraffic="true"
|
|
25
25
|
android:networkSecurityConfig="@xml/network_security_config"
|
|
26
26
|
tools:targetApi="31">
|
|
27
|
+
<!-- nosemgrep: java.android.security.exported_activity.exported_activity - Launcher activity must be exported so Android can start the app from the launcher. -->
|
|
27
28
|
<activity
|
|
28
29
|
android:name="io.yourname.androidproject.SplashActivity"
|
|
29
30
|
android:exported="true"
|
|
@@ -51,4 +52,4 @@
|
|
|
51
52
|
</provider>
|
|
52
53
|
</application>
|
|
53
54
|
|
|
54
|
-
</manifest>
|
|
55
|
+
</manifest>
|
|
@@ -60,7 +60,7 @@ data class SchemaDefinition(
|
|
|
60
60
|
object BridgeMessageValidator {
|
|
61
61
|
|
|
62
62
|
private const val TAG = "BridgeMessageValidator"
|
|
63
|
-
private const val MAX_MESSAGE_SIZE =
|
|
63
|
+
private const val MAX_MESSAGE_SIZE = CatalystConstants.Bridge.MAX_MESSAGE_SIZE
|
|
64
64
|
|
|
65
65
|
// Valid commands — single source of truth from CatalystConstants
|
|
66
66
|
private val validCommands = CatalystConstants.Bridge.VALID_COMMANDS
|